Declare Function GetCurrentProcess Lib "kernel32.dll" () As IntPtr
Notes:
With Version 2.0 of the .NET Framework, SafeWaitHandle is recommended as the return type in place of IntPtr. SafeWaitHandle is one of many types derived from the SafeHandle abstract class, which did not exist before Version 2.0. SafeWaitHandle is publicly exposed and is in the Microsoft.Win32.SafeHandles namespace.
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.