The MmProbeAndLockSelectedPages routine probes the selected virtual memory pages, makes them resident, and locks them in memory.
VOID MmProbeAndLockSelectedPages ( _Inout_ PMDLX MemoryDescriptorList, _In_ PFILE_SEGMENT_ELEMENT SegmentArray, _In_ KPROCESSOR_MODE AccessMode, _In_ LOCK_OPERATION Operation );
- MemoryDescriptorList [in, out]
A pointer to a memory descriptor list (MDL) that specifies a virtual memory buffer. If the routine successfully locks the pages in memory, the MDL is updated to describe the underlying physical pages.
- SegmentArray [in]
A pointer to an array of buffer segments that contain the virtual memory pages.
- AccessMode [in]
Specifies the access mode in which to probe the arguments, either KernelMode or UserMode.
- Operation [in]
Specifies the type of operation for which the caller wants the access rights probed and the pages locked. Set this parameter to IoReadAccess, IoWriteAccess, or IoModifyAccess. IoReadAccess indicates that the driver can examine the contents of the buffer but cannot change the contents. IoWriteAccess and IoModifyAccess, which are equivalent, indicate that the driver has both read and write access to the buffer.
Calls to MmProbeAndLockSelectedPages must be enclosed in a try/except block. If the pages do not support the specified operation, the routine raises the STATUS_ACCESS_VIOLATION or other exceptions. For more information, see Handling Exceptions.
|Available starting with Windows 2000.|
Build date: 2/11/2014