Forward the read request from raw pdo

xxxxx@hotmail.com wrote:

I have an HID upper filter driver on top of the HID enumerated device.

The driver creates a raw pdo. It forwards the Read request to its parent queue. The parent queue receives the read request.

I’m not sure what you mean by “parent queue”. Are you sending the
request to the next driver in line, or do you actually have another
queue in your driver?

However, the EvtIoRead tries to call status = WdfRequestRetrieveOutputMemory(Request, &hMemory), the calling returns error code

Error code: (NTSTATUS) 0xc0000023 (3221225507) - {Buffer Too Small} The buffer is too small to contain the entry. No information has been written to the buffer.

The read request from the raw pdo has 256 bytes but the hid device input report size is only 0x6. Why does that happen? How can I fix it? Or I can’t do that like that way.

If the request is 256 bytes but the report is 6 bytes, I hope it’s clear
that you would not get “buffer too small”.

Calling WdfDeviceInitSetIoType(pDeviceInit, WdfDeviceIoDirect) can fix this issue, but later the read complete routine returns the IoStatus = 0xc0000061.

C0000061 is “STATUS_PRIVILEGE_NOT_HELD”. As I understand it, HID device
requests requires a file object. Your raw PDO request has a file
object, but it’s not one that the HID driver knows about.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.