Monday, 22 September 2014

PowerShell: IntPtr


A platform-specific type that is used to represent a pointer or a handle.



1) It's a "native (platform-specific) size integer." It's internally represented as void* but exposed as an integer. You can use it whenever you need to store an unmanaged pointer and don't want to use unsafe code. IntPtr.Zero is effectively NULL (a null pointer).

2) IntPtr is just a simple integer-based struct that can hold a pointer (ie., 32 bit size on 32-bit systems, 64-bit size on 64-bit systems).


Note:
http://msdn.microsoft.com/en-us/library/System(v=vs.110).aspx

http://msdn.microsoft.com/en-us/library/system.intptr(v=vs.110).aspx



No comments:

Post a Comment