GlobalHandle function
Retrieves the handle associated with the specified pointer to a global memory block.
Note The global functions have greater overhead and provide fewer features than other memory management functions. New applications should use the heap functions unless documentation states that a global function should be used. For more information, see Global and Local Functions.
Syntax
HGLOBAL WINAPI GlobalHandle( _In_ LPCVOID pMem );
Parameters
- pMem [in]
-
A pointer to the first byte of the global memory block. This pointer is returned by the GlobalLock function.
Return value
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.
Remarks
When the GlobalAlloc function allocates a memory object with GMEM_MOVEABLE, 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.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012