Bewerken

Delen via


WdfDmaTransactionCreate function (wdfdmatransaction.h)

[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

[in] DmaEnabler

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

[in, optional] 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.

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

Requirement Value
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(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

See also

WDF_OBJECT_ATTRIBUTES

WdfDmaEnablerCreate

WdfDmaTransactionExecute

WdfDmaTransactionInitialize

WdfDmaTransactionInitializeUsingRequest