TdiCopyMdlChainToMdlChain function
The TdiCopyMdlChainToMdlChain function copies data from a set of buffers mapped by a given source MDL chain into the given destination MDL chain.
Syntax
NTSTATUS TdiCopyMdlChainToMdlChain(
_In_ PMDL SourceMdlChain,
_In_ ULONG SourceOffset,
_In_ PMDL DestinationMdlChain,
_In_ ULONG DestinationOffset,
_Out_ PULONG BytesCopied
);
Parameters
SourceMdlChain [in]
Pointer to the initial MDL in a chain of MDLs mapping buffers that contain the data to be copied.SourceOffset [in]
Specifies the byte offset within the mapped source buffers at which to begin the copy. Effectively, this is the number of mapped source bytes to skip before beginning the copy.DestinationMdlChain [in]
Pointer to the initial MDL in a chain of MDLs mapping buffers into which the data is to be copied.DestinationOffset [in]
Specifies the byte offset within the mapped destination buffers at which to begin the copy. Effectively, this is the number of mapped destination bytes to skip before beginning the copy.BytesCopied [out]
Pointer to a caller-supplied variable in which TdiCopyMdlChainToMdlChain returns the number of bytes it copied.
Return value
Return code | Description |
---|---|
STATUS_SUCCESS | The function call succeeded and * BytesCopied contains the number of bytes copied. |
STATUS_BUFFER_OVERFLOW | There is not sufficient space in the destination MDL chain, or one or both the offsets does not lie within the corresponding MDL chains. |
STATUS_INSUFFICIENT_RESOURCES | TDI failed to get the system address for one or more of the MDLs in the source or destination chains |
Remarks
TdiCopyMdlChainToMdlChain copies data from SourceMdlChain to DestinationMdlChain. SourceOffset indicates the zero-based offset, from the beginning of the data pointed to by SourceMdlChain, at which data source copying starts. DestinationOffset indicates the zero-based offset, from the beginning of data pointed to by DestinationMdlChain, at which TdiCopyMdlChainToMdlChain writes the copied data.
The caller must pass in valid MDL pointers for SourceMdlChain and DestinationMdlChain.
Both transports and their kernel-mode clients can call TdiCopyMdlChainToMdlChain.
Callers of TdiCopyMdlChainToMdlChain must be running at IRQL <= DISPATCH_LEVEL if the source and destination buffers are resident. If either is pageable, the caller must be running at IRQL < DISPATCH_LEVEL.
Note The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).
Requirements
Target platform |
Universal |
Header |
Tdikrnl.h (include TdiKrnl.h) |
Library |
Tdi.lib |
IRQL |
See Remarks section. |
See also