_PageResetHandlePAddr


include vmm.inc

VMMcall _PageResetHandlePAddr, <hMem, PgOff, nPages, PhysPgNum, flags>

or      eax, eax                ; nonzero if substituted, zero if error
jz      not_substituted

Substitutes one or more pages in a memory block with physical pages not previously available to the system. This service is similar to the _AddFreePhysPage service, but allows memory to be used in a slightly different way. Uses EAX, ECX, EDX and Flags.

hMem

Handle (base linear address) of a memory block. This handle must have been previously created using the _PageAllocate or _PageReAllocate service.

PgOff

Offset in pages from the start of the memory block to the first page to be substituted.

nPages

Number of pages to substitute.

PhysPgNum

Number of the first physical page to substitute into the memory block. The page number must be greater than or equal to 110h; only extended memory pages may be added to the block. The specified pages must be read/write physical memory pages, and must be available for use at any time.

flags

Operation flags. Must be 0.

This service is only available for Windows version 3.1 and later.

This service returns an error if the sum of the PgOff and nPages parameters is greater than the size of the memory block.

A virtual device must not attempt to use pages once it has added them to the free pool, or attempt to add pages that are already available to the system.

This service returns an error if the number of pages to add exceeds the limit of the internal data structure the system uses the manage the free pool. The internal data structure is allocated during initialization and cannot be modified.

This service converts pages that are substituted into the block to fixed pages. These pages are always locked, and cannot be unlocked.

This service maps a new physical page in at the specified locations and puts the existing physical memory in the free list. The contents of the freed pages are not preserved.

Most virtual devices do not need to use this service.

See also _AddFreePhysPage