UINT GlobalPageUnlock(hglb) | |||||
HGLOBAL hglb; | /* selector of global memory to unlock | */ |
The GlobalPageLock function decrements (decreases by one) the page-lock count for the memory associated with the specified global selector. When the page-lock count reaches zero, the data that the selector references is no longer guaranteed to remain in memory at the same physical address.
hglb
Specifies the selector of the memory to be page-unlocked.
The return value specifies the page-lock count after the function has decremented it. If the function fails, the return value is zero.
Because using this function violates preferred Windows programming practices, an application should not use it unless absolutely necessary. The function is intended to be used for dynamically allocated data that must be accessed at interrupt time. For this reason, it must only be called from a dynamic-link library (DLL).
The GlobalPageLock function increments the page-lock count for the block of memory, and the GlobalPageUnlock function decrements the page-lock count. Page-locking operations can be nested, but each page-locking must be balanced by a corresponding unlocking.