basic COM useage

  • Thread starter Thread starter colmag
  • Start date Start date
C

colmag

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.
 
You haven't really asked a specific question here. What exactly do you want
to know about using a COM object?
 
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.
 
Let's start at the beginning...Have 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!
 
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.
 
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).
 
Back
Top