GlobalFree

Syntax

HANDLE GlobalFree(hMem)

This function frees the global memory block identified by the hMem parameter and invalidates the handle of the memory block.

Parameter Type/Description  

hMem HANDLE Identifies the global memory block to be freed.  

Return Value

The return value identifies the outcome of the function. It is NULL if the function is successful. Otherwise, it is equal to hMem.

Comments

The GlobalFree function must not be used to free a locked memory block, that is, a memory block with a lock count greater than zero. See the description of the GlobalFlags function for a list of the functions that affect the lock count.