-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the Virtual Hid Device KMDF-only? #13
Comments
I now see that a HID minidriver (in the referenced sample) is not the same as using the Virtual Hid Framework, and that the Virtual Hid Framework does not work in UMDF. Still, having something in DMF that works for HID in UMDF-mode would be nice, because it allows people to develop on their own computer without the need for a corporate developer account and without needing to go through the signing / submission process. |
I believe the PortableDeviceButtons module uses VirtualHidDevice, but that is KMDF-only, too, since it depends on VirtualHidDevice. Eventually I’d like to create a solution to this, which I’m really struggling with, and I had hoped that DMF would eventually make it less difficult. |
I remember why DMF does not support VHF in User-mode: In Vhf.h this code exits: #ifndef _KERNEL_MODE The underlying DDK does not support VHF in User-mode so DMF will not either. If that support is added in the future, then DMF will do so also. Most Modules work for both Kernel and User-modes. The goal is that Modules should be agnostic to whether they run in Kernel or User-mode (when it is possible). As for an example that uses DMF_VirtualHidDeviceVhf see DMF_HidPortableDeviceButtons which is in in the Library right now. Disclaimer: All my comments are my own opinion and not official Microsoft statements. This posting is provided "AS IS" with no warranties, and confers no rights. |
Yes, that’s what I meant with
That’s what I meant with
Do you know whether there are any plans to add a HID minidriver module to provide a UMDF solution? |
Three things...
Re: It sounds like you are asking if VHF will support User-mode eventually. I do not know the answer to this. Disclaimer: All my comments are my own opinion and not official Microsoft statements. This posting is provided "AS IS" with no warranties, and confers no rights. |
@samtertzakian thanks for thinking along!
About a HID minidriver - as I understood it, a HID minidriver is the older, but UMDF-supported way to emulate a HID device. VHF is KMDF-only indeed. I also would prefer VHF to support UMDF. My issue with KMDF drivers is that you cannot develop, run and distribute them as a private person (because you'll need a corporate developer account to get Microsoft to sign it, otherwise it won't work when Secure Boot is enabled). |
Original question for this issue has been answered above (VHF is only supported in Kernel-mode by DDK) so this issue will be closed. |
The Virtual Hid Device module is KMDF-only:
https://github.com/Microsoft/DMF/blob/8d126adc31c7c9d925dce7caa8ca016290babe79/Dmf/Modules.Library/Dmf_VirtualHidDeviceVhf.h#L24
However, the vhidmini2 sample is also supported in UMDF.
The difference seems to be in the code in kmdf/util.c and umdf2/util.c, but I don't see similar code in the DMF module.
Is there a reason for which the Virtual Hid module is implemented as KMDF-only?
The text was updated successfully, but these errors were encountered: