GlobalFlags

2.x

  UINT GlobalFlags(hglb)    
  HGLOBAL hglb; /* handle of global memory object */

The GlobalFlags function returns information about the given global memory object.

Parameters

hglb

Identifies the global memory object.

Return Value

The return value specifies the memory-allocation flag and the lock count for the memory object, if the function is successful.

Comments

When an application masks out the lock count in the low-order byte of the return value, the return value contains one of the following allocation flags:

Value Meaning

GMEM_DISCARDABLE Object can be discarded.
GMEM_DISCARDED Object has been discarded.

The low-order byte 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.

The following functions can affect the lock count of a global memory object:

Increments lock count Decrements lock count

GlobalFix GlobalUnfix
GlobalLock GlobalUnlock

See Also

GlobalFix, GlobalLock, GlobalUnfix, GlobalUnlock