WdfDmaTransactionGetBytesTransferred - NtDoc

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

size_t WdfDmaTransactionGetBytesTransferred(
  [in] WDFDMATRANSACTION DmaTransaction
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

WdfDmaTransactionGetBytesTransferred function

Description

[Applies to KMDF only]

The WdfDmaTransactionGetBytesTransferred method returns the total number of bytes that have been transferred for a specified DMA transaction.

Parameters

DmaTransaction [in]

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

Return value

WdfDmaTransactionGetBytesTransferred returns the total number of bytes that have been transferred for the DMA transaction that the DmaTransaction parameter specified.

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

Remarks

Framework-based drivers typically call WdfDmaTransactionGetBytesTransferred from within an EvtInterruptDpc event callback function, after all DMA transfers are complete, to obtain the final transferred byte count. Drivers typically use the final byte count as input to the WdfRequestCompleteWithInformation method. For more information about this method, see Completing a DMA Transaction.

Examples

For a code example that uses WdfDmaTransactionGetBytesTransferred, see WdfDmaTransactionDmaCompleted.

See also

EvtInterruptDpc

WdfDmaTransactionCreate

WdfDmaTransactionDmaCompleted

WdfRequestCompleteWithInformation