The LocalHandle function retrieves the handle associated with the specified pointer to a local memory object.
This function is provided only for compatibility with 16-bit versions of Windows.
HLOCAL LocalHandle(
LPCVOID pMem // pointer to the local memory object
);
If the function succeeds, the return value is a handle to the specified local memory object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
When the LocalAlloc function allocates a local memory object with the LMEM_MOVEABLE flag, it returns a handle to the object. The LocalLock function converts this handle into a pointer to the object's memory block, and LocalHandle 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, LocalAlloc, LocalLock