The GlobalHandle function retrieves the handle associated with the specified pointer to a global memory block.
This function is provided only for compatibility with 16-bit versions of Windows.
HGLOBAL GlobalHandle(
LPCVOID pMem // pointer to the global memory block
);
If the function succeeds, the return value is a handle to the specified global memory object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
When the GlobalAlloc function allocates a memory object with the GMEM_MOVEABLE flag, it returns a handle to the object. The GlobalLock function converts this handle into a pointer to the memory block, and GlobalHandle converts the pointer back into a handle.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Memory Management Overview, Memory Management Functions, GlobalAlloc, GlobalLock