UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:memoryapi.VirtualUnlock |
VirtualUnlock function (memoryapi.h) |
Unlocks a specified range of pages in the virtual address space of a process, enabling the system to swap the pages out to the paging file if necessary. |
|
base\virtualunlock.htm |
base |
cb868c8a-ac0d-42ad-bf72-2ae617bc0427 |
12/05/2018 |
VirtualUnlock, VirtualUnlock function, _win32_virtualunlock, base.virtualunlock, winbase/VirtualUnlock |
memoryapi.h |
Windows.h, Memoryapi.h |
Windows |
Windows XP [desktop apps \| UWP apps] |
Windows Server 2003 [desktop apps \| UWP apps] |
onecore.lib |
Kernel32.dll |
Windows |
19H1 |
|
|
|
|
|
|
Unlocks a specified range of pages in the virtual address space of a process, enabling the system to swap the pages out to the paging file if necessary.
A pointer to the base address of the region of pages to be unlocked.
The size of the region being unlocked, in bytes. The region of affected pages includes all pages containing one or more bytes in the range from the lpAddress parameter to (lpAddress+dwSize)
. This means that a 2-byte range straddling a page boundary causes both pages to be unlocked.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
For the function to succeed, the range specified need not match a range passed to a previous call to the VirtualLock function, but all pages in the range must be locked. If any of the pages in the specified range are not locked, VirtualUnlock removes such pages from the working set, sets last error to ERROR_NOT_LOCKED, and returns FALSE.
Calling VirtualUnlock on a range of memory that is not locked releases the pages from the process's working set.