void GlobalFix(hMem)
This function prevents the global memory block identified by the hMem parameter from moving in linear memory. The block is locked into linear memory at its current address and its lock count is increased by one. Locked memory is not subject to moving or discarding except when the memory block is being reallocated by the GlobalReAlloc function. The block remains locked in memory until its lock count is decreased to zero.
Each time an application calls GlobalFix for a memory object, it must eventually call GlobalUnfix for the object. The GlobalUnfix function decreases the lock count for the object. Other functions also can affect the lock count of a memory object. See the description of the GlobalFlags function for a list of the functions that affect the lock count.
Parameter | Type/Description |
hMem | HANDLE Identifies the global memory block. |
None.
Calling this function interferes with Windows memory management and results in linear-address fragmentation. Very few applications need to fix memory in linear address space.