BOOL VirtualUnlock(lpvMem, cbMem) | |||||
LPVOID lpvMem; | /* address of first byte of range to unlock | */ | |||
DWORD cbMem; | /* number of bytes in range to unlock | */ |
The VirtualUnlock function unlocks the specified range of the processes address space from memory. The range specified need not match a range passed to a previous VirtualLock call, but it must specify a locked range for this API to be successful.
lpvMem
Points to the first byte in the range to be unlocked.
cbMem
Specifies the number of bytes to unlock.
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
The specified range is used to compute the range of pages covered by the unlock. A two-byte lock that straddles a page boundary unlocks both of the pages covered by the range.
VirtualLock