QueryInterface in managed code
-
Hello, I need to use COM server in VC++.NET 2003 managed code. After using Tlbimp.exe to generate runtime callable wrapper I can use operator new to create instance of MyClass. What do I need to do to query another COM interface from this instance? In regular unmanaged code I just need to call ::CoCreateInstance(…) and QueryInterface(…). What do I need to call in managed code instead? Please help!!! Regards, Leonid
-
Hello, I need to use COM server in VC++.NET 2003 managed code. After using Tlbimp.exe to generate runtime callable wrapper I can use operator new to create instance of MyClass. What do I need to do to query another COM interface from this instance? In regular unmanaged code I just need to call ::CoCreateInstance(…) and QueryInterface(…). What do I need to call in managed code instead? Please help!!! Regards, Leonid
-
lafleon wrote:
What do I need to do to query another COM interface from this instance?
Can you just call QueryInterface on the instance or can you cast the pointer you got back from the new operator?