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.
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.
_AddFreePhysPage