开发者

WDF EvtIoDeviceControl buffer lengths

开发者 https://www.devze.com 2023-01-17 08:14 出处:网络
When handling DeviceIoControl requests in a WDF driver what is the correct way to get the size of the input/output buffer.

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 thro开发者_如何学JAVAugh 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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号