Expand Minimize

WdfDmaTransactionCreate method

[Applies to KMDF only]

The WdfDmaTransactionCreate method creates a DMA transaction.

Syntax


NTSTATUS WdfDmaTransactionCreate(
  [in]            WDFDMAENABLER DmaEnabler,
  [in, optional]  PWDF_OBJECT_ATTRIBUTES Attributes,
  [out]           WDFDMATRANSACTION *DmaTransaction
);

Parameters

DmaEnabler [in]

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

Attributes [in, optional]

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 [out]

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 codeDescription
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

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

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft