다음을 통해 공유


WdfDmaTransactionGetCurrentDmaTransferLength 함수(wdfdmatransaction.h)

[KMDF에만 적용]

WdfDmaTransactionGetCurrentDmaTransferLength 메서드는 현재 DMA 전송의 크기를 반환합니다.

구문론

size_t WdfDmaTransactionGetCurrentDmaTransferLength(
  [in] WDFDMATRANSACTION DmaTransaction
);

매개 변수

[in] DmaTransaction

WdfDmaTransactionCreate에 대한 이전 호출에서 드라이버가 가져온 DMA 트랜잭션 개체에 대한 핸들은.

반환 값

WdfDmaTransactionGetCurrentDmaTransferLength 현재 DMA 전송의 길이를 반환합니다.

드라이버에서 잘못된 개체 핸들을 제공하면 버그 검사가 수행됩니다.

비고

드라이버가 WdfDmaTransactionGetCurrentDmaTransferLength호출하는 경우 현재 DMA 전송을 완료하려면 WdfDmaTransactionDmaCompleted같은 전송 완료 루틴 중 하나를 호출하기 전에 호출해야 합니다. 일반적으로 드라이버는 EvtInterruptDpc 이벤트 콜백 함수 내에서 WdfDmaTransactionGetCurrentDmaTransferLength 호출합니다.

일반적으로 드라이버는 잔여 DMA 전송 길이(즉, 전송되지 않은 데이터의 바이트 수)를 보고하는 디바이스에 대해 WdfDmaTransactionGetCurrentDmaTransferLength 호출합니다. WdfDmaTransactionGetCurrentDmaTransferLength 반환된 값에서 잔여 전송 길이를 빼면 드라이버는 실제 전송 길이를 결정할 수 있습니다. 그런 다음 드라이버는 WdfDmaTransactionDmaCompletedWithLength 호출하여 프레임워크에 디바이스가 실제로 전송한 바이트 수를 알립니다.

전체 DMA 전송에 대한 자세한 내용은 DMA 전송완료를 참조하세요.

예시

WdfDmaTransactionGetCurrentDmaTransferLength사용하는 코드 예제는 WdfDmaTransactionDmaCompletedWithLength참조하세요.

요구 사항

요구 사항 가치
대상 플랫폼 보편적
최소 KMDF 버전 1.0
헤더 wdfdmatransaction.h(Wdf.h 포함)
라이브러리 Wdf01000.sys(프레임워크 라이브러리 버전 관리 참조)
IRQL <=DISPATCH_LEVEL
DDI 규정 준수 규칙 DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

참고하십시오

EvtInterruptDpc

WdfDmaTransactionCreate

WdfDmaTransactionDmaCompleted

WdfDmaTransactionDmaCompletedWithLength