WdfDmaTransactionSetTransferCompleteCallback - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdmatransaction.h

VOID WdfDmaTransactionSetTransferCompleteCallback(
  [in]           WDFDMATRANSACTION                             DmaTransaction,
  [in, optional] PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE DmaCompletionRoutine,
  [in, optional] PVOID                                         DmaCompletionContext
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdmatransaction-wdfdmatransactionsettransfercompletecallback)

WdfDmaTransactionSetTransferCompleteCallback function

Description

[Applies to KMDF only]

The WdfDmaTransactionSetTransferCompleteCallback method registers a transfer completion event callback function for a system-mode DMA transaction.

Parameters

DmaTransaction [in]

A handle to an initialized DMA transaction object for which to set or clear the transfer completion callback.

DmaCompletionRoutine [in, optional]

A pointer to the driver's EvtDmaTransactionDmaTransferComplete event callback function, or NULL to clear a previously set callback function.

DmaCompletionContext [in, optional]

A pointer to a buffer containing the driver-specified context to be provided to the driver's EvtDmaTransactionDmaTransferComplete event callback function, or NULL.

Remarks

The driver calls this method to set a completion routine that the framework calls after the system DMA controller completes a transfer. The framework calls the driver's EvtDmaTransactionDmaTransferComplete callback once for each transfer in the transaction.

Typically from within an I/O queue event callback function, a driver performs the following steps, in this order:

  1. Calls WdfDmaTransactionInitializeUsingRequest, WdfDmaTransactionInitialize, or WdfDmaTransactionInitializeUsingOffset to initialize the transaction object.
  2. Calls WdfDmaTransactionSetTransferCompleteCallback on the transaction object.
  3. Calls WdfDmaTransactionExecute.

If the driver has specified an EvtDmaTransactionDmaTransferComplete event callback function by calling WdfDmaTransactionSetTransferCompleteCallback and the driver subsequently calls WdfDmaTransactionRelease, the callback is cleared.

WdfDmaTransactionSetTransferCompleteCallback can only be used with a DMA enabler that specifies a system-mode DMA profile.

If your driver calls this method on an operating system earlier than Windows 8, the framework's verifier reports an error.

See also

EvtDmaTransactionDmaTransferComplete

WdfDmaTransactionRelease