Wednesday, September 2, 2009

SafeHandle better than IntPtr for O/S HANDLEs

During my recent travels through P/Invoke, I found SafeHandle, which is preferable to IntPtr for handle types.

See: this blog entry.

Unfortunately, as with many good things, it is not available in the Compact Framework. No HandleRef either.

Now I just need to find out whether I should be using IntPtr or UIntPtr...


Post a Comment