Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the handle associated with the specified pointer to a local memory object.
Syntax
HLOCAL LocalHandle(
[in] LPCVOID pMem
);
Parameters
[in] pMem
A pointer to the first byte of the local memory object. This pointer is returned by the LocalLock function.
Return value
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.
Remarks
When the LocalAlloc function allocates a local memory object with LMEM_MOVEABLE, 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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winbase.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |