PREAD_DMA_COUNTER callback function (wdm.h)

The ReadDmaCounter routine returns the number of bytes remaining to be transferred during the current subordinate DMA operation.

Syntax

PREAD_DMA_COUNTER PreadDmaCounter;

ULONG PreadDmaCounter(
  [in] PDMA_ADAPTER DmaAdapter
)
{...}

Parameters

[in] DmaAdapter

Pointer to the adapter object previously returned by IoGetDmaAdapter representing the system DMA controller channel currently in use.

Return value

ReadDmaCounter returns the number of bytes remaining to be transferred in the current DMA operation.

Remarks

ReadDmaCounter is not a system routine that can be called directly by name. This routine is callable only by pointer from the address returned in a DMA_OPERATIONS structure. Drivers obtain the address of this routine by calling IoGetDmaAdapter.

ReadDmaCounter can be called only by drivers of subordinate DMA devices. Usually, the caller is the driver of a subordinate device that uses a system DMA controller's autoinitialize mode.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL <= DISPATCH_LEVEL
DDI compliance rules IrqlDispatch(wdm)

See also

AllocateCommonBuffer

DMA_ADAPTER

FlushAdapterBuffers

IoGetDmaAdapter

MapTransfer