VOID
MmProbeAndLockPages(
IN OUT PMDL MemoryDescriptorList,
IN KPROCESSOR_MODE AccessMode,
IN LOCK_OPERATION Operation
);
MmProbeAndLockPages probes specified pages, makes them resident, and locks the physical pages mapped by the virtual address range in memory. The MDL is updated to describe the physical pages.
The highest-level driver in a chain of layered drivers that use direct I/O calls this routine. Drivers that use buffered I/O never call MmProbeAndLockPages.
If this routine fails, an exception is raised. Any driver that calls MmProbeAndLockPages must handle such an exception.
A lower-level driver cannot attempt to pass such an exception on to a higher-level driver. It cannot assume anything about a higher-level driver’s exception handling capabilities. In particular, the driver cannot call ExRaiseStatus to pass on such an exception.
Callers of MmProbeAndLockPages must be running at IRQL < DISPATCH_LEVEL for pageable addresses, or at IRQL <= DISPATCH_LEVEL for nonpageable addresses.