export of COM object to C++?

  • Thread starter Thread starter Trokey
  • Start date Start date
T

Trokey

Here's my situation: I have a .NET (C#) dll (COM 1) which contains a
reference to another COM library (COM 2). I also have a C++ program which
accesses COM 1 via Interop. I want to include a routine in the interface to
COM 1 which accesses an interface defined in COM 2. How do I do this?? I
have done something similar in the case where my COM 1 was written in C++ by
aggregating the interface to access the interface of COM 2.
 
I suggest you modify .NET DLL COM 1 to include a new interface that refers
to COM 2 and use that from C++ dll.

Cheers
Richard
 
What do you mean by "refers to"? I already tried putting a routine in an
existing interface (ICOM1IF) which returns an object of type COM2.ObjectA.
On the C++ side, this translates to a return type of ObjectAPtr, which is
unusable and generates compile errors (ICOM1IF::ObjectAPtr : missing
storage-class or type specifiers).
 
Back
Top