basic COM useage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • colmag

    #1

    basic COM useage

    I'm trying to use some COM objects, and have spent days
    getting nowhere.

    Does anyone know of any good tutorials on USING non-MS
    COM objects (i've found loads of tut's on automating
    office), rather than the hundreds of tutorials on making
    COM objects that i've found!

    I've got the "help" file for the API in question, but
    can't work out which objects to use (and how) to achieve
    particular results.
  • Scott M.

    #2
    Re: basic COM useage

    You haven't really asked a specific question here. What exactly do you want
    to know about using a COM object?


    "colmag" <anonymous@disc ussions.microso ft.com> wrote in message
    news:007901c3cd 62$b58be840$a10 1280a@phx.gbl.. .[color=blue]
    > I'm trying to use some COM objects, and have spent days
    > getting nowhere.
    >
    > Does anyone know of any good tutorials on USING non-MS
    > COM objects (i've found loads of tut's on automating
    > office), rather than the hundreds of tutorials on making
    > COM objects that i've found!
    >
    > I've got the "help" file for the API in question, but
    > can't work out which objects to use (and how) to achieve
    > particular results.[/color]


    Comment

    • colmag

      #3
      Re: basic COM useage

      I can't ask a specific question, because although i have
      a specific task in mind, i've realised how clueless I am
      at the moment! lol.

      I've installed an API, and want to use it to retrieve
      information from a bunch of files related to the API's
      parent application, but the API has got dozens of objects
      and methods, some of which seem to duplicate things (to
      me, anyway).

      I've been getting messages about lack of instances etc.,
      so i tried using ctype and createobject, but then got
      messages saying the activex control couldn't be created
      (or something along those lines). I also need to relate
      some of the objects to each other, as one object has a
      load method, another has objects with the properties i
      need. I think i need ctype for this...

      Basically, I'm looking for some guidance on general
      principles of picking up someone else' poorly documented
      API and using it (they give the API away for free, but
      charge a developers licence for documentation. After
      paying thousands to be able to create these files, i'm
      bu**red if i'm paying more to disect them again). I've
      got a couple of books, which is where i got the ctype
      stuff from, but everything seems centred around
      automating office, which i'm not interested in.

      [color=blue]
      >-----Original Message-----
      >You haven't really asked a specific question here. What[/color]
      exactly do you want[color=blue]
      >to know about using a COM object?
      >
      >
      >"colmag" <anonymous@disc ussions.microso ft.com> wrote in[/color]
      message[color=blue]
      >news:007901c3c d62$b58be840$a1 01280a@phx.gbl. ..[color=green]
      >> I'm trying to use some COM objects, and have spent days
      >> getting nowhere.
      >>
      >> Does anyone know of any good tutorials on USING non-MS
      >> COM objects (i've found loads of tut's on automating
      >> office), rather than the hundreds of tutorials on[/color][/color]
      making[color=blue][color=green]
      >> COM objects that i've found!
      >>
      >> I've got the "help" file for the API in question, but
      >> can't work out which objects to use (and how) to[/color][/color]
      achieve[color=blue][color=green]
      >> particular results.[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Scott M.

        #4
        Re: basic COM useage

        Let's start at the beginning...Hav e you made a COM reference to your
        component?

        If so, then just go into Visual Studio's Object Browser (hit F2). Now, from
        the top/left drop down box, you can filter what the Object Brower is showing
        you, so filter it to just the component you now have a reference to.

        This will at least give you an understanding of what object, properties,
        methods and events are in the API, what data types are expected as input and
        return values, etc.

        There's really not much anyone else could do to help you, since this is a
        custom component.

        Good luck!


        "colmag" <anonymous@disc ussions.microso ft.com> wrote in message
        news:05be01c3cd fa$d2561200$a30 1280a@phx.gbl.. .[color=blue]
        > I can't ask a specific question, because although i have
        > a specific task in mind, i've realised how clueless I am
        > at the moment! lol.
        >
        > I've installed an API, and want to use it to retrieve
        > information from a bunch of files related to the API's
        > parent application, but the API has got dozens of objects
        > and methods, some of which seem to duplicate things (to
        > me, anyway).
        >
        > I've been getting messages about lack of instances etc.,
        > so i tried using ctype and createobject, but then got
        > messages saying the activex control couldn't be created
        > (or something along those lines). I also need to relate
        > some of the objects to each other, as one object has a
        > load method, another has objects with the properties i
        > need. I think i need ctype for this...
        >
        > Basically, I'm looking for some guidance on general
        > principles of picking up someone else' poorly documented
        > API and using it (they give the API away for free, but
        > charge a developers licence for documentation. After
        > paying thousands to be able to create these files, i'm
        > bu**red if i'm paying more to disect them again). I've
        > got a couple of books, which is where i got the ctype
        > stuff from, but everything seems centred around
        > automating office, which i'm not interested in.
        >
        >[color=green]
        > >-----Original Message-----
        > >You haven't really asked a specific question here. What[/color]
        > exactly do you want[color=green]
        > >to know about using a COM object?
        > >
        > >
        > >"colmag" <anonymous@disc ussions.microso ft.com> wrote in[/color]
        > message[color=green]
        > >news:007901c3c d62$b58be840$a1 01280a@phx.gbl. ..[color=darkred]
        > >> I'm trying to use some COM objects, and have spent days
        > >> getting nowhere.
        > >>
        > >> Does anyone know of any good tutorials on USING non-MS
        > >> COM objects (i've found loads of tut's on automating
        > >> office), rather than the hundreds of tutorials on[/color][/color]
        > making[color=green][color=darkred]
        > >> COM objects that i've found!
        > >>
        > >> I've got the "help" file for the API in question, but
        > >> can't work out which objects to use (and how) to[/color][/color]
        > achieve[color=green][color=darkred]
        > >> particular results.[/color]
        > >
        > >
        > >.
        > >[/color][/color]


        Comment

        • colmag

          #5
          Re: basic COM useage

          Scott,

          thanks for the input. As it happens, i've referenced all
          of the required components (as per the API readme). I've
          had a look through the objects and have drawn a bit of a
          blank. I can make it load a document, but what i'm
          struggling with is "linking" the objects together (which
          is where i think ctype comes in), to get other object
          properties from the loaded doc.

          Cheers,

          Col.
          [color=blue]
          >-----Original Message-----
          >Let's start at the beginning...Hav e you made a COM[/color]
          reference to your[color=blue]
          >component?
          >
          >If so, then just go into Visual Studio's Object Browser[/color]
          (hit F2). Now, from[color=blue]
          >the top/left drop down box, you can filter what the[/color]
          Object Brower is showing[color=blue]
          >you, so filter it to just the component you now have a[/color]
          reference to.[color=blue]
          >
          >This will at least give you an understanding of what[/color]
          object, properties,[color=blue]
          >methods and events are in the API, what data types are[/color]
          expected as input and[color=blue]
          >return values, etc.
          >
          >There's really not much anyone else could do to help[/color]
          you, since this is a[color=blue]
          >custom component.
          >
          >Good luck![/color]

          Comment

          • Scott M.

            #6
            Re: basic COM useage

            There's really not anything anyone here can do to help beyond this. We
            would really need to be able to see and use the components (since they are
            custom).

            Again, I usually find the Object Browser very helpful for learning about an
            object model (API as you call it).

            "colmag" <anonymous@disc ussions.microso ft.com> wrote in message
            news:002d01c3ce f1$9af91080$a30 1280a@phx.gbl.. .[color=blue]
            > Scott,
            >
            > thanks for the input. As it happens, i've referenced all
            > of the required components (as per the API readme). I've
            > had a look through the objects and have drawn a bit of a
            > blank. I can make it load a document, but what i'm
            > struggling with is "linking" the objects together (which
            > is where i think ctype comes in), to get other object
            > properties from the loaded doc.
            >
            > Cheers,
            >
            > Col.
            >[color=green]
            > >-----Original Message-----
            > >Let's start at the beginning...Hav e you made a COM[/color]
            > reference to your[color=green]
            > >component?
            > >
            > >If so, then just go into Visual Studio's Object Browser[/color]
            > (hit F2). Now, from[color=green]
            > >the top/left drop down box, you can filter what the[/color]
            > Object Brower is showing[color=green]
            > >you, so filter it to just the component you now have a[/color]
            > reference to.[color=green]
            > >
            > >This will at least give you an understanding of what[/color]
            > object, properties,[color=green]
            > >methods and events are in the API, what data types are[/color]
            > expected as input and[color=green]
            > >return values, etc.
            > >
            > >There's really not much anyone else could do to help[/color]
            > you, since this is a[color=green]
            > >custom component.
            > >
            > >Good luck![/color]
            >[/color]


            Comment

            Working...