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.

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

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
STATUS_INVALID_PARAMETER

An invalid parameter was detected.

STATUS_INSUFFICIENT_RESOURCES

A scatter/gather list could not be allocated.

STATUS_WDF_TOO_FRAGMENTED

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.

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

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

See also

WdfDmaTransactionInitialize

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft