Bob and Lou,
It should be noted that if you are going to pass handles to unmanaged
code that are represented by managed constructs, you should use the
HandleRef structure instead. This will make sure that if the object is not
referenced anywhere else, it is not disposed of.
For example, if using the Graphics object, and you call GetHdc, you
should use a HandleRef structure instead of an IntPtr, so that when passed
to unmanaged code (a call to BitBlt perhaps), the Graphics instance won't be
collected by the GC if it isn't referenced anywhere.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
System.IntPtr is a standard value type and works with all .NET languages.
--
Bob Powell [MVP]
C#, System.Drawing
The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
Read my Blog at http://bobpowelldotnet.blogspot.com
"Lou" <lo********@comcast.net> wrote in message
news:OY****************@TK2MSFTNGP10.phx.gbl... What is the C# equivelent of the VB .Net "IntPtr"
i need to pass it to the File System object?