WdfDmaTransactionGetBytesTransferred function (wdfdmatransaction.h)
[Applies to KMDF only]
The WdfDmaTransactionGetBytesTransferred method returns the total number of bytes that have been transferred for a specified DMA transaction.
size_t WdfDmaTransactionGetBytesTransferred(
[in] WDFDMATRANSACTION DmaTransaction
);
[in] DmaTransaction
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.
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) |