Hi all.
I’m fairly new to KMDF development, but I do have experience with WDM, and I’m trying to develop a USB filter driver in KMDF, which is added to every device stack of certain USB devices (e.g. storage).
1.How should I register and install it?
- as of now, I tried adding it manually to the registry, as one of the Net class’s LowerFilters, and setting the INF to show that it was of the “Filter” load order group.
2.Is there a way to add it as a filter to a specific device in a certain Class? say I want to filter just one type of USB devices, according to it’s vendor and product ID.
3.After being added as a device in the net class, and adding a USB device, my driver recieved an internal IOCTL of “IOCTL_INTERNAL_USB_SUBMIT_URB”.
This is supposed to happen, and the request I receive hold a large buffer for the output result. I send the request down the stack (without allocating additional memory) to the default WDFIOTARGET and the sending returns a success status.
I tried allocating additional memory before the send, in a similar way to what Doron Holan has shown in his article titled “Formatting a WDFREQUEST for any IRP_MJ code”. but when I call send the request, I get a BUGCODE_USB_DRIVER bug check.
When I tried sending the request without formatting it or allocating a WDFMEMORY object, I do get to the completion routing during which, when I try to extract the output buffer, I get a NULL buffer pointer.
What am I doing wring?
Thank you all,
Ariel.