none
WIN7/WIN10 hid driver RRS feed

  • Question

  • Hi all,

    I am writing a virtual HID driver for both WIN7 and WIN10. the full scenario of the application is list below:

    1. we have a USB hardware input device sending data to the PC through HID. (DONE)

    2. we have a software reading the data from the USB hardware through HID. (DONE)

    3. the software processes the data and send it to our virtual HID driver through HID write report. (DONE)

    4. the virtual HID driver works as a pass through driver which sends out the data received from the software.

    the driver is develop with VS2017, in KMDF. I have already install the WDK8.0 and WDK10.0. I am using the sample of the HID/vhidmini2 in the windows driver samples from github. I did some modification to full fill the pass through function. I take some reference of the vmulti project form github

    and now I have meet the following problem:

    1. the driver is working on WIN10 both 32bit and 64bit. but I need to install the driver by using devcon because the driver path is set to root\mydriver, is there a better way to do this because I need to release the driver to the customer.

    2. the driver is not working on WIN7. it is said the device failed to start in the driver property in the device manager.

    3. I failed get the vmulti sample work because I failed to compile the code of the driver under the sys folder. I think it would be fastest way to get this done if I can compile the driver and have it working on both WIN7 and WIN10.

    I am looking forward to your kindly suggestion of this driver development.

    Regards

    Daniel


    Monday, May 6, 2019 7:04 AM

All replies

  • 1. For win10, you may consider using software device to enumerate the device.

    https://docs.microsoft.com/en-us/windows/desktop/swdevice/software-device-api-portal

    2. I assume the vhidmini sample works on win7 without modification. If yes, please try to narrow down the issue on win7 into a particular driver modification of yours.

    3. unfortunately, vmulti is not owned by microsoft. 

    Another option for virtual hid device solutions in win10 is the virtual hid framework. Like vhidmini, it still needs a device to be enumerated though. And it also needs to install a system filter driver vhf.sys on that device. The benefit is that it's just a set of API/callbacks, thus easier to implement than a hid mini driver.  

    https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/virtual-hid-framework--vhf- 

    Monday, May 6, 2019 4:55 PM
  • You might consider changing the hardware identifier to something a little less generic than root\mydriver.  For example, it is common to generate a GUID and use SW\{12345678-1234-1234-1234-1234567890AB}.

    Did you compile the driver to target Windows 7?  If you compiled it for Windows 10, it's possible that the driver is referring to some API that doesn't exist yet.  As a general rule, you should always target your driver for the oldest operating system you need to support.

    I don't understand your point #3.  Are you just saying the project didn't build?  That code is VERY old, and still uses the old DDK command-line "build" scheme.  You would to create your own Visual Studio project to build it.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Monday, May 6, 2019 6:24 PM