UnlockPages (Compact 2013)

3/28/2014

This function unlocks a specified range of pages in the virtual address space of a process, enabling the system to swap the pages out, if necessary. This function can be called only in kernel mode.

Syntax

BOOL UnlockPages(
  LPVOID lpvAddress,
  DWORD cbSize
);

Parameters

  • lpvAddress
    [in] Address of the start of a region of committed pages that are to be unlocked.
  • cbSize
    [in] Number of bytes to unlock.

Return Value

TRUE indicates success FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

LockPages is referenced counted, so if the same thread does a LockPages twice, the second UnlockPages unlocks the pages.

Requirements

Header

pkfuncs.h

Library

coredll.lib

See Also

Reference

Kernel Functions
LockPages