Bewerken

Delen via


MmPrepareMdlForReuse function (wdm.h)

The MmPrepareMdlForReuse macro releases the resources that are associated with a partial MDL so that the MDL can be reused.

Syntax

void MmPrepareMdlForReuse(
  [in] PMDL MDL
);

Parameters

[in] MDL

A pointer to a partial MDL that is to be prepared for reuse.

Return value

None

Remarks

This macro is used by drivers that repeatedly use the same allocated MDL for the TargetMdl parameter in calls to the IoBuildPartialMdl routine. If, in a call to MmPrepareMdlForReuse, the specified partial MDL has an associated mapping to system address space, MmPrepareMdlForReuse releases the mapping so that the MDL can be reused.

MmPrepareMdlForReuse accepts only partial MDLs that are built by IoBuildPartialMdl. If MmPrepareMdlForReuse receives an MDL that is mapped to the system address space but was not built by IoBuildPartialMdl, MmPrepareMdlForReuse does not release the mapping.

For more information about partial MDLs, see Using MDLs.

Requirements

Requirement Value
Minimum supported client Windows 2000
Header wdm.h
IRQL <= DISPATCH_LEVEL
DDI compliance rules MdlAfterReqCompletedIntIoctlA(kmdf), MdlAfterReqCompletedIoctlA(kmdf), MdlAfterReqCompletedReadA(kmdf), MdlAfterReqCompletedWriteA(kmdf)