GlobalUnlock
Jump to navigation
Jump to search
Description
Decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE. This function has no effect on memory objects allocated with GMEM_FIXED.
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.
Syntax
BOOL WINAPI GlobalUnlock(
_In_ HGLOBAL hMem
);
Parameters
- hMem [in]
- A handle to the global memory object. This handle is returned by either the GlobalAlloc or GlobalReAlloc function.
Return value
If the memory object is still locked after decrementing the lock count, the return value is a nonzero value. If the memory object is unlocked after decrementing the lock count, the function returns zero and GetLastError returns NO_ERROR.
If the function fails, the return value is zero and GetLastError returns a value other than NO_ERROR.