GlobalDiscard macro
Discards the specified global memory block. The lock count of the memory object must be zero.
Syntax
HGLOBAL WINAPI GlobalDiscard(
[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 function succeeds, the return value is a handle to the memory object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
Although GlobalDiscard discards the object's memory block, the handle to the object remains valid. The process can subsequently pass the handle to the GlobalReAlloc function to allocate another global memory block identified by the same handle.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
See also