void GlobalFix(hglb) | |||||
HGLOBAL hglb; | /* handle of object to fix | */ |
The GlobalFix function prevents the given global memory object from moving in linear memory.
This function interferes with effective Windows memory management and can result in linear-address fragmentation. Few applications need to fix memory in linear address space.
hglb
Identifies the global memory object to be fixed in linear memory.
This function does not return a value.
The object is locked into linear memory at its current address, and its lock count is incremented (increased by one). Locked memory is not subject to moving or discarding except when the memory object is being reallocated by the GlobalReAlloc function. The object remains locked in memory until its lock count is decreased to zero.
Each time an application calls the GlobalFix function for a memory object, it must eventually call the GlobalUnfix function, which decrements (decreases by one) the lock count for the object. Other functions also can affect the lock count of a memory object. For a list of these functions, see the description of the GlobalFlags function.