C++ Interop with .NET user defined Interface RRS feed

  • Question

  • Hi All,

    I plan to invoke interfaces of .NET assembly in the unmanged code. I choose the COM way. I have a problem with the process the return value. Take an example:

    At .NET I have a interface IEveDataManager GetEveDataManager(); //IEveDataManager is a user defined interface

    At COM side, 1. How to get the return value ofGetEveDataManager() ?

                           I use the following getting the address of return value.

                                   IUnknown *p = NULL;

                           Is that right ? Anyone has better way ?

                        2. If above is a right way, then How to use the return value to get interface's public fields.

    I have searched the internet for the answer. Can you tell me more? Thanks.




    Tuesday, June 5, 2012 9:35 AM