WdfDmaTransactionRelease function

[Applies to KMDF only]

The WdfDmaTransactionRelease method terminates a specified DMA transaction without deleting the associated DMA transaction object.

Syntax

NTSTATUS WdfDmaTransactionRelease(
  WDFDMATRANSACTION DmaTransaction
);

Parameters

DmaTransaction

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

Return Value

WdfDmaTransactionRelease returns STATUS_SUCCESS if the operation succeeds. Otherwise, the method might return the following value:

Return code Description
STATUS_INVALID_DEVICE_STATE
The driver has already released or deleted the transaction object that the DmaTransaction parameter specified.
 

This method also might return other NTSTATUS values.

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

Remarks

The WdfDmaTransactionRelease method flushes transfer buffers and releases all of the system resources that are associated with the DMA transaction. The transaction object is not deleted and can be reused. For more information about reusing transaction objects, see Reusing DMA Transaction Objects.

      If <b>WdfDmaTransactionInitialize<i>Xxx</i></b> returns success but <a href="https://docs.microsoft.com/windows-hardware/drivers/ddi/content/wdfdmatransaction/nf-wdfdmatransaction-wdfdmatransactionexecute">WdfDmaTransactionExecute</a> returns an error value, your driver must call <b>WdfDmaTransactionRelease</b>.

Examples

The following code example terminates the DMA transaction that the specified DMA transaction object represents, but it does not delete the DMA transaction object.

NTSTATUS  status;

status = WdfDmaTransactionRelease(dmaTransaction);

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

WdfDmaTransactionCreate