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 / .NET Framework / Interop / April 2006

Tip: Looking for answers? Try searching our database.

passing umanaged void * to managed c++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JasonD - 26 Apr 2006 21:55 GMT
I'm exporting a method from a managed C++ DLL using __declspec(dllexport) so
that I can call it from a plain old C app.

This method takes as one of its arguments a void * that comes from the C
app. I store this void * in one of the members of my managed C++ class.  
Since the void * is from my C app, do I need to protect it in anyway from the
GC?

Thanks.

-Jason
Mattias Sjögren - 26 Apr 2006 22:43 GMT
>Since the void * is from my C app, do I need to protect it in anyway from the
>GC?

No, native pointers are not garbage collected types.

Mattias

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


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.