#include <winmem32.h> |
WORD Global32Free(wSelector, wFlags) | |||||
WORD wSelector; | /* selector of object to free | */ | |||
WORD wFlags; | /* reserved, must be zero | */ |
The Global32Free function frees an object previously allocated by the Global32Alloc function.
wSelector
Specifies the selector of the object to be freed. This must be the selector returned by a previous call to the Global32Alloc function.
wFlags
Reserved; must be zero.
The return value is zero if the function is successful. Otherwise, it is an error value, which can be one of the following:
WM32_Insufficient_Mem
WM32_Insufficient_Sels
WM32_Invalid_Arg
WM32_Invalid_Flags
WM32_Invalid_Func
The Global32Alloc function frees the object itself; it also frees all aliases created for the object by the 32-bit memory application programming interface (API).
Note:
Before terminating, an application must call this function to free each object allocated by the Global32Alloc function to ensure that all aliases created for the object are freed.