Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2005

Tip: Looking for answers? Try searching our database.

How to query interface using gcroot?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 08 Jan 2005 22:39 GMT
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.
Ronald Laeremans [MSFT] - 13 Jan 2005 23:50 GMT
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

>I  have a few C# .NET components which might implement one
> or several interfaces, let say I1, I2 and I3.
[quoted text clipped - 5 lines]
> to query for certain interface. How can I do that if I use gcroot
> template? Thanks.
Dave - 14 Jan 2005 03:09 GMT
Ronald,

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

Thanks,
Dave

> 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
[quoted text clipped - 13 lines]
> > to query for certain interface. How can I do that if I use gcroot
> > template? Thanks.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.