The WdfDmaTransactionGetBytesTransferred method returns the total number of bytes that have been transferred for a specified DMA transaction.
size_t WdfDmaTransactionGetBytesTransferred( [in] WDFDMATRANSACTION DmaTransaction );
- DmaTransaction [in]
A handle to a DMA transaction object that the driver obtained from a previous call to WdfDmaTransactionCreate.
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.
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.
For a code example that uses WdfDmaTransactionGetBytesTransferred, see WdfDmaTransactionDmaCompleted.
|Available in version 1.0 and later versions of KMDF.|
|Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)|