The IoBuildPartialMdl routine maps a portion of a buffer described by another MDL into an MDL.
VOID
IoBuildPartialMdl(
IN PMDL SourceMdl,
IN OUT PMDL TargetMdl,
IN PVOID VirtualAddress,
IN ULONG Length
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
IoBuildPartialMdl maps a subrange of a buffer currently mapped by SourceMdl. The VirtualAddress and Length parameters describe the subrange to be mapped from the SourceMdl into the TargetMdl.
Drivers that must split large transfer requests can use this routine. The caller must release the partial MDL it allocated when it has transferred all the requested data or completed the IRP with an error status.
Callers of IoBuildPartialMdl can be running at IRQL <= DISPATCH_LEVEL.
IoAllocateMdl, IoCallDriver, IoFreeMdl, IoSetCompletionRoutine