문제

When handling DeviceIoControl requests in a WDF driver what is the correct way to get the size of the input/output buffer.

It seems to be both passed as a parameter:

VOID
EvtIoDeviceControl(IN WDFQUEUE Queue, IN WDFREQUEST Request,
                   IN size_t OutputBufferLength,
                   IN size_t InputBufferLength,
                   IN ULONG IoControlCode)

But also available through WdfRequestRetrieveInputBuffer which is required in order to gain access to the request buffer.

I am therefore wondering if there is a difference between the InputBufferLength parameter and the value set by WdfRequestRetrieveInputBuffer (the Length parameter).

도움이 되었습니까?

해결책

There is no difference between those two. The guy who designed the interface thought it would be convenient to have the parameter in both places. I've never found that to be the case, myself, but it's there in case you do.

Jake Oshins

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top