Results 1 to 2 of 2

Thread: Exporting classes with COM

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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.

    Code:
    	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.
    Code:
    unsatisfied forward declaration

    If I try to include the header files I need I get an
    Code:
    expecting a type specification near "include"
    does anyone know how I can export my class?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think classes that are exported with COM need to inherit from IUnknown or IDispatch. Check the Platform SDK for more (painful) details.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width