_LinPageLock

include vmm.inc

VMMCall _LinPageLock, <page, npages, flags>
or      eax, eax                ; nonzero if locked, zero if error
jz      not_locked


#include <vmm.h>

ULONG EXTERNAL _LinPageLock(ULONG page, ULONG npages, ULONG flags);
 

Locks one or more pages starting at the specified linear page number. Locking a page forces it to become physically present and to remain so until it is unlocked. This service is similar to the _PageLock service. Uses EAX, ECX, EDX, and Flags.

page and npages
Linear page number of the first page in the range, and the number of pages in the range. All of the pages in the range must be committed.
flags
Zero or one of these values:
PAGELOCKEDIFDP Lock the pages only if the virtual pageswap device uses MS-DOS or BIOS functions to write pages to the hardware.
PAGEMAPGLOBAL Map a global linear address to the locked range so that the memory can be accessed out of the current context. Cannot be specified with PAGELOCKEDIFDP.
PAGEMARKDIRTY Mark the pages as if they have been written to. This flag is intended for a VxD that needs to modify the pages, but the CPU doesn't recognize the modifications. For example, the CPU may not recognize DMA write operations, or write operations using the address returned when the PAGEMAPGLOBAL flag is used.

A page can be locked more than once, in which case it must be unlocked once for each time it is locked. Unlock pages using the _LinPageUnLock service.

See Also

_LinMapIntoV86, _LinPageUnLock, _PageLock