Expand Minimize

MmGetMdlPfnArray macro

The MmGetMdlPfnArray macro returns a pointer to the beginning of the array of physical page numbers that are associated with a memory descriptor list (MDL).

Syntax


PPFN_NUMBER MmGetMdlPfnArray(
  [in]  PMDL Mdl
);

Parameters

Mdl [in]

A pointer to an MDL.

Return value

A pointer to the beginning of the array of physical page numbers associated with the MDL. The number of entries in the array is ADDRESS_AND_SIZE_TO_SPAN_PAGES(MmGetMdlVirtualAddress(Mdl), MmGetMdlByteCount(Mdl)). Each array element is an integer value of type PFN_NUMBER, which is defined in Wdm.h as follows:


typedef ULONG PFN_NUMBER, *PPFN_NUMBER;

Remarks

Note  Changing the contents of the array can cause subtle system problems that are difficult to diagnose. We recommend that you do not read or change the contents of this array.

For pageable memory, the contents of the array are valid only for a buffer locked with MmProbeAndLockPages. For nonpaged pool, the contents of the array are valid only for an MDL updated with MmBuildMdlForNonPagedPool, MmAllocatePagesForMdlEx, or MmAllocatePagesForMdl.

For more information about MDLs, see Using MDLs.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

Any level

DDI compliance rules

MdlAfterReqCompletedIntIoctlA, MdlAfterReqCompletedIoctlA, MdlAfterReqCompletedReadA, MdlAfterReqCompletedWriteA

See also

ADDRESS_AND_SIZE_TO_SPAN_PAGES
MmAllocatePagesForMdl
MmAllocatePagesForMdlEx
MmBuildMdlForNonPagedPool
MmGetMdlByteCount
MmGetMdlVirtualAddress
MmProbeAndLockPages

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft