Bewerken

Delen via


MmGetSystemAddressForMdl macro (wdm.h)

The MmGetSystemAddressForMdl routine is obsolete. Use MmGetSystemAddressForMdlSafe instead.

MmGetSystemAddressForMdl is a macro that returns a nonpaged system-space virtual address for the buffer described by the MDL. It maps the physical pages described by a given MDL into system space, if they are not already mapped to system space.

Syntax

PVOID MmGetSystemAddressForMdl(
   MDL
);

Parameters

[in] MDL

Pointer to a buffer whose corresponding base virtual address is to be mapped.

Return value

None

Remarks

MmGetSystemAddressForMdl returns the base system-space virtual address that maps the physical pages described by the given MDL.

Drivers of PIO devices call this routine to translate a virtual address range, described by the MDL at Irp->MdlAddress, for a user buffer to a system-space address range.

The MDL must describe nonpageable memory. In other words, the input MDL must describe an already locked-down user-space buffer returned by MmProbeAndLockPages, a locked-down buffer returned by MmBuildMdlForNonPagedPool, or system-space memory allocated from nonpaged pool, contiguous memory, or non-cached memory.

The returned base address has the same offset as the virtual address in the MDL.

Window issues a bug check if the attempt to map to system space fails. Therefore, you should use MmGetSystemAddressForMdlSafe instead).

Requirements

Requirement Value
Minimum supported client Obsolete. Use MmGetSystemAddressForMdlSafe instead.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL IRQL <= DISPATCH_LEVEL

See also

MmBuildMdlForNonPagedPool

MmGetSystemAddressForMdlSafe

MmProbeAndLockPages