UINT GlobalFlags(hglb) | |||||
HGLOBAL hglb; | /* global memory block to return info for | */ |
The GlobalFlags function returns information about the specified global memory block.
hglb
Identifies the global memory block. This handle must have been created by a previous call to the GlobalAlloc or GlobalReAlloc function.
The return value specifies the allocation flags and the lock count for the memory block, if the function is successful. If the global handle is not valid, the return value is GMEM_INVALID_HANDLE.
The high byte of the low word of the return value contains one of the following allocation flags:
Value | Meaning |
GMEM_DDESHARE | Allocates memory to be used in a dynamic data exchange (DDE) conversation using the DDE functions. This memory is not actually shared globally (unlike Win 3.x). However, this flag is available for compatibility purposes and may be used by some implementations to enhance the performance of DDE operations. Thus, it should be set if the memory is to be used for DDE. |
Only applications that use (DDE) or the clipboard for interprocess communication should specify this flag. | |
GMEM_DISCARDABLE | The object can be discarded. |
GMEM_DISCARDED | The object has been discarded. |
The low byte of the low word of the return value contains the lock count of the object. Use the GMEM_LOCKCOUNT mask to retrieve the lock count from the return value.
GlobalAlloc, GlobalLock, GlobalReAlloc, GlobalUnlock, LocalFlags