Expand Minimize

WdfDmaTransactionInitializeUsingOffset method

[Applies to KMDF only]

The WdfDmaTransactionInitializeUsingOffset method initializes a specified DMA transaction by using a byte offset into an MDL chain.


NTSTATUS WdfDmaTransactionInitializeUsingOffset(
  [in]  WDFDMATRANSACTION DmaTransaction,
  [in]  PFN_WDF_PROGRAM_DMA EvtProgramDmaFunction,
  [in]  WDF_DMA_DIRECTION DmaDirection,
  [in]  PMDL Mdl,
  [in]  size_t Offset,
  [in]  size_t Length


DmaTransaction [in]

A handle to a DMA transaction object that the driver obtained from a previous call to WdfDmaTransactionCreate.

EvtProgramDmaFunction [in]

A pointer to the driver's EvtProgramDma event callback function.

DmaDirection [in]

A WDF_DMA_DIRECTION-typed value.

Mdl [in]

A pointer to a memory descriptor list (MDL) that describes the buffer that will be used for the DMA transaction. See more information in Remarks.

Offset [in]

The byte offset into the MDL chain for the current transaction.

Length [in]

The number of bytes to be transferred. This value must be greater than zero.

Return value

WdfDmaTransactionInitialize returns STATUS_SUCCESS if the operation succeeds. Otherwise, the method might returns one of the following values.

Return codeDescription

An invalid parameter was detected.


A scatter/gather list could not be allocated.


The number of scatter/gather elements that was needed to handle the transaction was greater than the value that the driver's call to WdfDmaEnablerSetMaximumScatterGatherElements specified.


This method also might return other NTSTATUS values.

A bug check occurs if the driver supplies an invalid object handle.


WdfDmaTransactionInitializeUsingOffset is equivalent to WdfDmaTransactionInitialize except that it takes an offset into the buffer described by the MDL chain rather than a virtual address.

The driver can specify an MDL chain in the Mdl parameter of this method. An MDL chain is a sequence of MDL structures that the driver chained together using the Next member of the MDL structure.


Minimum KMDF version



Wdfdmatransaction.h (include Wdf.h)


Wdf01000.sys (see Framework Library Versioning.)



DDI compliance rules


See also




Send comments about this topic to Microsoft

© 2014 Microsoft