DWORD GlobalSize(hglb) | |||||
HGLOBAL hglb; | /* handle of memory object to return size of | */ |
The GlobalSize function retrieves the current size, in bytes, of the given global memory object.
hglb
Identifies the global memory object.
The return value specifies the size, in bytes, of the memory object. It is zero if the specified handle is not valid or if the object has been discarded.
The size of a memory object is sometimes larger than the size requested at the time the memory was allocated.
An application should call the GlobalFlags function prior to calling the GlobalSize function, to verify that the specified memory object was not discarded. If the memory object has been discarded, the return value for GlobalSize is meaningless.