From 60c8ed51b0069b1d60ffb455da9ebe48c9b3b29c Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Wed, 19 Aug 2026 11:43:51 -0400 Subject: [PATCH] fix(driver): add Win10 WUDFRd driver path Update the Windows driver INF to register WUDFRd explicitly for Windows 10 2004+ while keeping the inbox WUDFRD sections for Windows 11. Document Windows 11 as the supported target and note the Win10 compatibility path as best effort. --- docs/windows-driver.md | 5 ++ .../windows/driver/libvirtualhid.inf.in | 46 +++++++++++++++---- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/docs/windows-driver.md b/docs/windows-driver.md index 4fdf57d..96aea99 100644 --- a/docs/windows-driver.md +++ b/docs/windows-driver.md @@ -5,6 +5,11 @@ HID Framework. The driver package is separate from the normal C++ library build: the library remains consumable from MSVC and MinGW/UCRT64, while the driver package is built with the Microsoft SDK/WDK toolchain. +Windows 11 version 21H2 and later is the supported driver target. The INF also +provides a best-effort compatibility path for Windows 10 version 2004 and later +by using explicit `WUDFRd` service registration, but Windows 10 is not an +officially supported driver target. + ## Microsoft Store Listing Text The Windows driver package is not the same product surface as the C++ library, diff --git a/src/platform/windows/driver/libvirtualhid.inf.in b/src/platform/windows/driver/libvirtualhid.inf.in index 4817dbf..fcfaa34 100644 --- a/src/platform/windows/driver/libvirtualhid.inf.in +++ b/src/platform/windows/driver/libvirtualhid.inf.in @@ -17,11 +17,16 @@ CatalogFile=libvirtualhid.cat PnpLockdown=1 [Manufacturer] -%ManufacturerName%=Standard,NT@LIBVIRTUALHID_INF_ARCH@ +; Windows 10 requires explicit WUDFRd service registration. Windows 11 can use +; the inbox WUDFRD.NT sections instead. +%ManufacturerName%=Standard,NT@LIBVIRTUALHID_INF_ARCH@.10.0...19041,NT@LIBVIRTUALHID_INF_ARCH@.10.0...22000 -[Standard.NT@LIBVIRTUALHID_INF_ARCH@] +[Standard.NT@LIBVIRTUALHID_INF_ARCH@.10.0...19041] %DeviceName%=DeviceInstall,ROOT\LIBVIRTUALHID +[Standard.NT@LIBVIRTUALHID_INF_ARCH@.10.0...22000] +%DeviceName%=DeviceInstall_Win11,ROOT\LIBVIRTUALHID + [DestinationDirs] UMDriverCopy=13 @@ -33,13 +38,9 @@ libvirtualhid_umdf.dll=1 [DeviceInstall.NT] CopyFiles=UMDriverCopy -Include=wudfrd.inf -Needs=WUDFRD.NT [DeviceInstall.NT.HW] AddReg=DeviceInstall_Device_AddReg,DeviceInstall_Vhf_AddReg -Include=wudfrd.inf -Needs=WUDFRD.NT.HW [UMDriverCopy] libvirtualhid_umdf.dll @@ -52,20 +53,47 @@ HKR,,"LowerFilters",0x00010008,"vhf" HKR,,VhfMode,0x00010001,0x1 [DeviceInstall.NT.Services] +AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall + +[DeviceInstall.NT.Wdf] +UmdfService=libvirtualhid_umdf,libvirtualhid_umdf_Install +UmdfServiceOrder=libvirtualhid_umdf +UmdfHostProcessSharing=ProcessSharingDisabled +UmdfHostPriority=PriorityHigh + +[WUDFRD_ServiceInstall] +DisplayName=%WudfRdDisplayName% +ServiceType=1 +StartType=3 +ErrorControl=1 +ServiceBinary=%12%\WUDFRd.sys + +[DeviceInstall_Win11.NT] +CopyFiles=UMDriverCopy +Include=wudfrd.inf +Needs=WUDFRD.NT + +[DeviceInstall_Win11.NT.HW] +AddReg=DeviceInstall_Device_AddReg,DeviceInstall_Vhf_AddReg +Include=wudfrd.inf +Needs=WUDFRD.NT.HW + +[DeviceInstall_Win11.NT.Services] Include=wudfrd.inf Needs=WUDFRD.NT.Services -[DeviceInstall.NT.Wdf] +[DeviceInstall_Win11.NT.Wdf] UmdfService=libvirtualhid_umdf,libvirtualhid_umdf_Install UmdfServiceOrder=libvirtualhid_umdf +UmdfHostProcessSharing=ProcessSharingDisabled +UmdfHostPriority=PriorityHigh [libvirtualhid_umdf_Install] UmdfLibraryVersion=@LIBVIRTUALHID_UMDF_LIBRARY_VERSION@ -UmdfHostProcessSharing=ProcessSharingDisabled -UmdfHostPriority=PriorityHigh ServiceBinary=%13%\libvirtualhid_umdf.dll [Strings] ManufacturerName="LizardByte" DiskName="libvirtualhid UMDF Driver Install Disk" DeviceName="libvirtualhid Virtual HID Control Device" +WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"