WdfDmaTransactionCreate function

[Applies to KMDF only]

The WdfDmaTransactionCreate method creates a DMA transaction.

Syntax

NTSTATUS WdfDmaTransactionCreate(
  WDFDMAENABLER          DmaEnabler,
  PWDF_OBJECT_ATTRIBUTES Attributes,
  WDFDMATRANSACTION      *DmaTransaction
);

Parameters

DmaEnabler

A handle to a DMA enabler object that the driver obtained from a previous call to WdfDmaEnablerCreate.

Attributes

A pointer to a WDF_OBJECT_ATTRIBUTES structure that specifies object attributes for the new DMA transaction object. (The structure's ParentObject member must be NULL.) This parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

DmaTransaction

A handle to a DMA transaction object.

Return value

WdfDmaTransactionCreate returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return one of the following values:

Return code Description
STATUS_INVALID_PARAMETER
An invalid parameter was detected.
STATUS_INSUFFICIENT_RESOURCES
There was insufficient memory to create a new DMA transaction object.
 

For a list of other return values that the WdfDmaTransactionCreate method might return, see Framework Object Creation Errors.

This method also might return other NTSTATUS values.

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

Remarks

After your driver calls WdfDmaTransactionCreate, it must call WdfDmaTransactionInitialize or WdfDmaTransactionInitializeUsingRequest before calling WdfDmaTransactionExecute.

The specified DMA enabler object becomes the parent of the new DMA transaction object. The driver cannot change this parent, and the ParentObject member or the WDF_OBJECT_ATTRIBUTES structure must be NULL.

For more information about DMA transactions, see Creating and Initializing a DMA Transaction.

Examples

For a code example that uses WdfDmaTransactionCreate, see WdfDmaTransactionExecute.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.0
Header wdfdmatransaction.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
IRQL <=DISPATCH_LEVEL
DDI compliance rules DriverCreate, KmdfIrql, KmdfIrql2

See also

WDF_OBJECT_ATTRIBUTES

WdfDmaEnablerCreate

WdfDmaTransactionExecute

WdfDmaTransactionInitialize

WdfDmaTransactionInitializeUsingRequest