My company has a USB driver in the wild which I would like to put a user-mode filter over the top of. I am skeptically comfortable enough writing the code aspects of this project, but where I keep running into problems is with the installation side of things. The INF files I try to create to install this filter keep coming up non-functional. It doesn’t help that this would be my first attempt at writing a driver.
So I have a few questions for brighter minds to ponder:
-
I am trying to catch all device open and close events (ie: CreateFile and CloseHandle) for a specific device class. Is a user mode filter even the correct way to go?
-
Can I create a “stand-alone” INF file to install my filter, knowing the device class description of the devices I am targeting? Or do I have to modify the existing INF files to add in my filter sections? This would be difficult for me to do, as I have to deal with drivers already installed in the wild.
-
Is there a resource I can read for the syntax and semantics of an INF file? My copy of Developing Drivers w/WDF discusses INF files very briefly, but I’ve not found any in-depth discussion on the topic of how to do what I’m after properly.
Thank you in advance for any insight you can provide. If you need more information, I’d be happy to give it.