PDA

Click to See Complete Forum and Search --> : Exporting classes with COM


Sam Finch
Sep 30th, 2000, 06:30 PM
I'm trying to write a COM object and I want to export some classes along with it.(as data types, not as COM objects)

I've defined a nuce class CComplex which holds a complex number (they're a bit like real numbers but more complex) and I've defined operators and casts for it.


I can export a data type using the typedef statement in the IDL file.


typedef [ uuid(29A70BDD-3427-4639-A2A7-691DDF51353F),
helpstring ("Unsigned Long Integer") ]
unsigned long ULI;


but If I want to do something like that for a complex number I get an error.
unsatisfied forward declaration


If I try to include the header files I need I get an
expecting a type specification near "include"

does anyone know how I can export my class?

parksie
Oct 1st, 2000, 06:29 AM
I think classes that are exported with COM need to inherit from IUnknown or IDispatch. Check the Platform SDK for more (painful) details.