xxxxx@gmail.com wrote:
- INF Files
What you said seems to reflect what I’m seeing in my target machine after I’ve deployed my driver. For example, in my INF file I tried to use the HW ID of the “HID-compliant pen” that was a child of “Wacom Device”. This resulted in the “HID-compliant pen” entry in device manager to be replaced by my “KmdfHelloWorld Device”, whose device stack now looks like (from top to bottom): KmdfHelloWorld, mshidkmdf. Seeing this, I thought that I’ve successfully put my filter driver between the HIDclass (which I understand to be the HID bus driver, and uses mshidkmdf as a miniport driver) and Win32k (the OS kernel), which is what I thought I wanted (I’ll explain later in part 3 what I’m trying to do).
You should go read the INF file for your Wacom device and see what
driver they install.
a) After reading your post, I’m now confused whether this is the case, or if I’m going in the wrong direction in the bigger problem that I’m trying to tackle.
b) Also, how do I obtain and include the standard HID driver (hidkmdf or mshidkmdf? I see either one on different machines) on my project? Or do I just have to add the appropriate sections/text in the INF file?
As far as I know, those drivers are merely adapters that allow KMDF
drivers to be used in the HID stack. They are not the HID drivers
themselves
Remember that a HID driver stack consists of a number of different
drivers, each one operating at a different level of abstraction. A USB
mouse, for example, starts with the USB system, then hidusb.sys, then
hidclass.sys, then mouhid.sys, then mouclass.sys, and finally into
Win32K. You need to know which layer you want to intercept.
IF you truly need to replace the INF, then you would use Needs/Includes
statements in your INF to invoke the sections in the standard INF files
- Installing a filter driver without using an INF
I understand that you mean that I can write a separate application that will install the driver, and so I don’t have to use an INF file (which means that I’ll exclude the INF file from the build if I go this route)?
Right. You wouldn’t be creating a driver package at all. All you need
is the signed SYS file, and an appropriate installer application.
- My main problem
I’m trying to capture the input report data of a pen (coordinates, pressure, etc) before it gets to the OS - if possible, in any generic machine that has pen and touch hardware.
You’re making a huge assumption that all pen devices act identically.
I’m not convinced that’s true.
Additionally, I’m trying to modify that pen data and and submit that modified data to the OS. Hence why I’m trying to get in between the uppermost driver in the pen’s driver stack and the OS. From what I’ve read, I can only do this using a KMDF filter driver, but please correct me if I’m wrong? Since I’m only targeting Windows 8.1 and later versions of Windows, UMDF 2.0 seems like a very good alternative.
UMDF can be used to create complete HID minidrivers, but UMDF filter
drivers require special registry magic. Remember that every UMDF driver
in a stack means a kernel/user transition, and if you aren’t the top
device in the stack, another user/kernel transition after. That adds
overhead.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.