Question : How to get COM interface API definitions after importing a type library

Hi

I want to use the COM interface APIs from a COM server. For this first I imported the type library through #import "COMServer.exe" using namespace COMServer where COMServer.exe is an in-proc COM server. But how do I get the interface names which I can invoke? Do I need the IDL file?

I haven't done much of COM programming, so apologies if my question is not clear or ambiguos.

Thanks in advance
Harish

Answer : How to get COM interface API definitions after importing a type library

When you compile the file that has the #import statement, the compiler should generate two file 'xxx.tli" and "xxx.tlh" in your output directory.  These files will have the C++ declarations.

Also, you say that your COM server is an in-proc server, yet you are importing an .exe?  I believe that in-proc servers need to be DLLs.
Random Solutions  
 
programming4us programming4us