tags:

views:

101

answers:

1

I have a C# COM DLL and I want to call its methods throught c++ methods.

How do I make this?

+3  A: 

Ask VisualStudio to generate the typelib or use regasm.exe /tlb to generate the typelib, then import it into the C++ project with #import directive.

sharptooth
After importing the generated tlb, how can I access to the functions. Can you give me some code example plz
aF
After importing the typelib you get a bunch of interfaces in it. Use those interfaces. Use CoCreateInstance() to instantiate objects.
sharptooth
Check the MSDN docs for the _com_ptr_t class, that's the base class for the smart interface pointers.
Hans Passant
tks guys u'r the best! :)
aF