_PageCheckLinRange

include vmm.inc

VMMcall _PageCheckLinRange, <HLinPgNum, nPages, flags>

cmp eax, 0 ; zero if not valid

je not_valid

mov [Pages], eax ; actual number of pages in valid range


The _PageCheckLinRange service determines whether all bytes in the specified range of linear addresses are valid. Virtual devices typically use this service to validate an address range before specifying the range in a call to the _LinPageLock or _LinMapIntoV86 service.

Parameters

HLinPgNum

Specifies the linear page number of the first page to check. A linear page number is a ring-0 linear address shifted right by 12 bits.

nPages

Specifies the number of pages to check.

flags

Specifies the operation flags. This parameter must be zero.

Return Value

The EAX register contains the actual number of pages which contain valid addresses. This value is zero if the entire range is invalid.

Uses

EAX

See Also

_LinMapIntoV86, _LinPageLock