How to query interface using gcroot?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a few C# .NET components which might implement one
or several interfaces, let say I1, I2 and I3.

The unmanaged C++ client consumes this component using
gcroot template pointer. How client application can find out
what interfaces implement certain instance of the pointer?
I need some kind of QueryInterface method which allows me
to query for certain interface. How can I do that if I use gcroot
template? Thanks.
 
For managed code you can use a cast to serve as a QI call. Native code has
no way to do anything with the handle encapsulated by gcroot. They only
thing it offers is the ability to move the handle through native code and
data for later manipulation by managed code.

Ronald Laeremans
Visual C++ team
 
Ronald,

Thank you for your response. Could you provide an example of
"cast serving as a QI call"

Thanks,
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top