WdfDmaTransactionInitializeUsingOffset function (wdfdmatransaction.h)

[Applies to KMDF only]

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

Syntax

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
);

Parameters

[in] DmaTransaction

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

[in] EvtProgramDmaFunction

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

[in] DmaDirection

A WDF_DMA_DIRECTION-typed value.

[in] Mdl

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.

[in] Offset

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

[in] Length

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

Return value

WdfDmaTransactionInitializeUsingOffset returns STATUS_SUCCESS if the operation succeeds. Otherwise, the method might return one of the values described in the Return values section of WdfDmaTransactionInitialize.

This method also might return other NTSTATUS values.

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

Remarks

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.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.11
Header wdfdmatransaction.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
IRQL <=DISPATCH_LEVEL
DDI compliance rules DriverCreate(kmdf)

See also

WdfDmaTransactionInitialize