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).