GlobalUnlock

  BOOL GlobalUnlock(hglb)    
  HGLOBAL hglb; /* handle of global memory to unlock */

The GlobalUnlock function unlocks the specified global memory object. This function has no effect on fixed memory.

Parameters

hglb

Identifies the global memory block to be unlocked.

Return Value

The return value is zero if the object's lock count was decremented to zero. Otherwise, the return value is nonzero.

Comments

With movable or discardable memory, this function decrements (decreases by one) the object's lock count. The object is completely unlocked, and subject to moving or discarding, if the lock count is decreased to zero.

This function returns nonzero if the specified memory block is fixed. An application should not rely on the return value to determine the number of times it must subsequently call GlobalUnlock for the memory block.

Each time an application calls GlobalLock for an object, it must eventually call GlobalUnlock for the object.

See Also

GlobalFlags, GlobalLock