Failed to install lower filter driver

Trying to install a lower HID filter on Win 7. Here’s my inf file

[Version]
Signature   = "$WINDOWS NT$"
Class       = HIDClass
ClassGuid   = {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider    = %ProviderName%
DriverVer=11/29/2021,6.1.7600.16385
CatalogFile = lectouch.cat

[SourceDisksFiles]
lectouch.sys = 99
WdfCoInstaller01009.dll=99

[SourceDisksNames]
99 = %DISK_NAME%,,,""

[DestinationDirs]
CopyFilterDriver = 12
lectouch.Inst_CoInstaller_CopyFiles = 11

[Manufacturer]
%ManufacturerName%  = Standard,NTx86
%ManufacturerName%  = Standard,NTx86,NTx86.6.1

; For XP and later
[Standard.NTx86]
%lectouch%         = lectouch.Inst, USB\VID_05FF&PID_002A

; For Win7 and later
[Standard.NTx86.6.1]
%lectouch%         = lectouch.Inst.Win7, USB\VID_05FF&PID_002A

;===============================================================
;   Install section for XP thru Vista
;===============================================================
[lectouch.Inst.NT]
CopyFiles = CopyFilterDriver

[lectouch.Inst.NT.HW]
AddReg = lectouch_Parameters.AddReg 

[lectouch.Inst.NT.Services]
AddService = lectouch,, lectouch_Service_Inst,
AddService = HidUsb, 0x000001fa, HidUsb_AddService  ; flag 0x2 sets this as the service for the device

[lectouch_Parameters.AddReg]
HKR,,"LowerFilters",0x00010008,"lectouch"

;===============================================================
;   Install section for Win7 and later
;===============================================================
[lectouch.Inst.Win7.NT]
CopyFiles = CopyFilterDriver

[lectouch.Inst.Win7.NT.HW]
AddReg = lectouch_Win7_Parameters.AddReg 

[lectouch.Inst.Win7.NT.Services]
AddService = lectouch,, lectouch_Service_Inst,
AddService = HidUsb, 0x000001fa, HidUsb_AddService  ; flag 0x2 sets this as the service for the device

[lectouch_Win7_Parameters.AddReg]
HKR,,"LowerFilters",0x00010008,"lectouch"

[CopyFilterDriver]
lectouch.sys

[HidUsb_AddService]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\HidUsb.sys

;===============================================================
;   Service section (common to all OS versions)
;===============================================================

[lectouch_Service_Inst]
DisplayName    = %lectouch%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_DEMAND_START% 
ErrorControl   = %SERVICE_ERROR_IGNORE% 
ServiceBinary  = %12%\lectouch.sys 

;================================================================
; WDF Coinstaller installation
;===============================================================

[lectouch.Inst.NT.CoInstallers]
AddReg=lectouch.Inst_CoInstaller_AddReg
CopyFiles=lectouch.Inst_CoInstaller_CopyFiles

[lectouch.Inst_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller"

[lectouch.Inst_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll,,,0x00000010    ;COPYFLG_NO_OVERWRITE (for win2k)

[lectouch.Inst.NT.Wdf]
KmdfService = lectouch, lectouch_wdfsect

[lectouch_wdfsect]
KmdfLibraryVersion = 1.9

;================================================================
; Strings section
;===============================================================

[Strings] 
;Localizable
ProviderName        = "perdrix.co.uk"
ManufacturerName    = "LeCroy"
lectouch            = "LeCroy Front Panel" 
DISK_NAME           = "LeCroy Front Panel Device Install Disk"

;Non-Localizable
SERVICE_BOOT_START     = 0x0 
SERVICE_SYSTEM_START   = 0x1 
SERVICE_AUTO_START     = 0x2 
SERVICE_DEMAND_START   = 0x3 
SERVICE_DISABLED       = 0x4 

SERVICE_KERNEL_DRIVER  = 0x1 
SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2 
SERVICE_ERROR_CRITICAL = 0x3 

REG_EXPAND_SZ          = 0x00020000 
REG_DWORD              = 0x00010001 
REG_MULTI_SZ           = 0x00010000
REG_BINARY             = 0x00000001
REG_SZ                 = 0x00000000

and here’s what setupapi.dev.log had to say:

[Device Install (DiShowUpdateDevice) - HID\VID_05FF&PID_002A\6&2858845A&0&0000]
Section start 2021/11/29 14:23:23.137
cmd: “C:\Windows\system32\mmc.exe” “C:\Windows\system32\compmgmt.msc” /s
dvi: {DIF_UPDATEDRIVER_UI} 14:23:23.140
dvi: No class installer for ‘HID-compliant device’
dvi: No CoInstallers found
dvi: Default installer: Enter 14:23:23.145
dvi: Default installer: Exit
dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 14:23:23.147
ndv: {Update Driver Software Wizard for HID\VID_05FF&PID_002A\6&2858845A&0&0000}
inf: Opened PNF: ‘C:\Windows\INF\input.inf’ ([strings.0409])
ndv: {Update Driver Software Wizard exit(00000000)}
<<< Section end 2021/11/29 14:23:36.946
<<< [Exit status: SUCCESS]

The file WdfCoInstaller01009.dll is in the same directory as the inf file and the filter driver.

Where am I going wrong?

Thanks
David

Your running the driver update wizard on the child HID device, as indicated by the hwid HID\VID_05FF&PID_002A\6&2858845A&0&0000 in the log. You want to update the parent device which has a usb hwid of USB\VID_05FF&PID_002A

I though that was exactly what I’d asked to update in the inf file? How do I change it to make it work?

PS This is my first ever driver attempt, so be gentle!
Thanks
David

A HID device is split into two: the parent device is the transport, the child device represents the HID TLC (IOW, HID as a protocol independent of transport). Change the device manager view to “By connection” and you will see the hierarchy. Better yet, just use devcon to update the driver on the parent device and skip the update driver wizard completely.

devcon update USB\VID_05FF&PID_002A

https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon-general-commands
https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon-update

Yes, but If I want to distribute the driver, I need to be able to install it using the inf file (ideally by r-clicking on the inf and selecting “Install”). Not sure why this inf file doesn’t allow that. So how can I change that inf to make it work.?

Devcon says:

C:\WinDDK\7600.16385.1\tools\devcon\i386>devcon driverfiles "USB\VID_05FF&PID_00
2A"
USB\VID_05FF&PID_002A\5&24F02AB7&0&1
    Name: USB Input Device
    Driver installed from C:\Windows\INF\input.inf [HID_Inst]. 3 file(s) used by
 driver:
        C:\Windows\system32\DRIVERS\hidusb.sys
        C:\Windows\system32\DRIVERS\hidclass.sys
        C:\Windows\system32\DRIVERS\hidparse.sys
1 matching device(s) found.

Right-click install is not used for hardware-based drivers. You either write a mini-installer, or you provide instructions on how to update via Device Manager.

So how do you install using Device Manager in this case?

Thanks

Update Driver wizard. You are asking lots of questions and jumping the gun a little bit. First, you should successfully install the INF. I suggested devcon update […] to use on the command line to validate your INF. What did setupapi.dev.log say when you tried to apply your INF to the USB\xxxx HWID? After you get the INF to install, you can worry about the official install process and signing the driver package.

See my first post for what setupapi had to say

  1. See my first response for what to do. You ran the update on the wrong device.
  2. My second response told you how to find the parent device using the device manager UI or skip that altogether and do it from the command line (devcon update USB\VID_05FF&PID_002A )
  3. So now for the third time in this thread: RUN THE UPDATE ON THE USB (parent) DEVICE, and not the child HID device. See points 1 and 2.

I’m sorry that this wasn’t clear to me on the first time around - please remember this is all new to me, so the stuff the is obvious to you can often be missed by this bear of very little brain.

D.

Now tried again with an updated inf file.

Here’s the updated inf:

[Version]
Signature   = "$WINDOWS NT$"
Class       = HIDClass
ClassGuid   = {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider    = %ProviderName%
DriverVer=12/02/2021,6.1.7600.16385
CatalogFile = LecTouch_Inst.cat

[SourceDisksFiles]
lectouch.sys = 99
WdfCoInstaller01009.dll=99

[SourceDisksNames]
99 = %DISK_NAME%,,,""

[DestinationDirs]
CopyFilterDriver = 12
LecTouch_Inst.CoInstaller_CopyFiles = 11

[Manufacturer]
; Touch Screen
;
%LeCroyMfg%=LecroyTouch, NTx86

; For Win7 and later
[LecroyTouch.NTx86]
%USB\VID_05FF&PID_001A.DeviceDesc%=LecTouch_Inst, USB\VID_05FF&PID_001A
%USB\VID_05FF&PID_002A.DeviceDesc%=LecTouch_Inst, USB\VID_05FF&PID_002A

;===============================================================
;   Install section for Win7 and later
;===============================================================
[LecTouch_Inst.NT]
CopyFiles = CopyFilterDriver

[LecTouch_Inst.NT.HW]
DelReg = LecTouch_Inst.DelReg.NT.HW
AddReg = LecTOuch_Inst.AddReg.NT.HW

[LecTouch_Inst.DelReg.NT.HW]
; remove the selective suspend enable flag in case it is present from a previous install
HKR,,"SelectiveSuspendEnabled"

[LecTouch_Inst.AddReg.NT.HW]
HKR,,"LowerFilters",0x00010008,"lectouch"

[LecTouch_Inst.NT.Services]
AddService = lectouch,, lectouch_Service_Inst,
AddService = HidUsb, 0x000001fa, HidUsb_AddService  ; flag 0x2 sets this as the service for the device

[LecTouch_Inst.AddReg.NT.HW]
HKR,,"LowerFilters",0x00010008,"lectouch"

[CopyFilterDriver]
lectouch.sys

[HidUsb_AddService]
DisplayName    = %HID.SvcDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_IGNORE%
ServiceBinary  = %12%\hidusb.sys
LoadOrderGroup = extended base

;===============================================================
;   Service section (common to all OS versions)
;===============================================================

[lectouch_Service_Inst]
DisplayName    = %lectouch%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_DEMAND_START% 
ErrorControl   = %SERVICE_ERROR_IGNORE% 
ServiceBinary  = %12%\lectouch.sys 

;================================================================
; WDF Coinstaller installation
;===============================================================

[LecTouch_Inst.NT.CoInstallers]
AddReg=LecTouch_Inst.Inst_CoInstaller_AddReg
CopyFiles=LecTouch_Inst.CoInstaller_CopyFiles

[LecTouch_Inst.Inst_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller"

[LecTouch_Inst.CoInstaller_CopyFiles]
WdfCoInstaller01009.dll,,,0x00000010    ;COPYFLG_NO_OVERWRITE (for win2k)

;================================================================
; Strings section
;===============================================================

[Strings] 
;Localizable
ProviderName        = "perdrix.co.uk"
;ManufacturerName    = "Teledyne LeCroy Inc."
lectouch            = "LeCroy Touch Screen" 
DISK_NAME           = "LeCroy Touch Screen Device Install Disk"

LeCroyMfg = "Teledyne LeCroy Inc."

USB\VID_05FF&PID_001A.DeviceDesc = "Lecroy Touch Screen - V1"
USB\VID_05FF&PID_002A.DeviceDesc = "Lecroy Touch Screen - V2"

HID.SvcDesc           = "Microsoft HID Class Driver"

;Non-Localizable
SERVICE_BOOT_START     = 0x0 
SERVICE_SYSTEM_START   = 0x1 
SERVICE_AUTO_START     = 0x2 
SERVICE_DEMAND_START   = 0x3 
SERVICE_DISABLED       = 0x4 

SERVICE_KERNEL_DRIVER  = 0x1 
SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2 
SERVICE_ERROR_CRITICAL = 0x3 

REG_EXPAND_SZ          = 0x00020000 
REG_DWORD              = 0x00010001 
REG_MULTI_SZ           = 0x00010000
REG_BINARY             = 0x00000001
REG_SZ                 = 0x00000000

The setupapi.dev.log is a bit large and is here:

perdrix.co.uk/logs/setupapi.dev.log

Any help appreciated.

setupapi.dev.log tries to make it easy for you to find declarative errors in the INF, it encodes warning lines with a !, error lines with !!!. So,

     dvi:           {DIF_INSTALLDEVICE} 12:21:12.791
     dvi:                No class installer for 'Lecroy Touch Screen - V2'
     dvi:                CoInstaller 1: Enter 12:21:12.793
     inf:                     Opened PNF: 'C:\Windows\INF\oem22.inf' ([strings])
!!!  dvi:                CoInstaller 1: failed(0xe0000101)!
!!!  dvi:                Error 0xe0000101: The required section was not found in the INF.
     dvi:           {DIF_INSTALLDEVICE - exit(0xe0000101)} 12:21:13.284
!!!  ndv:           Error(e0000101) installing device!

For reference, Coinstaller 1 is defined immediately before in the log

 dvi:                Using exported function 'WdfCoInstaller' in module 'C:\Windows\system32\WdfCoInstaller01009.dll'.
 dvi:                CoInstaller 1 == WdfCoInstaller01009.dll,WdfCoInstaller

You are missing the .Wdf section in your INF, read https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/installing-the-framework-s-co-installer#inf-file-sections-for-the-co-installer for what you need to add . If your min OS target includes the version of WDF you want to use, remove the coinstaller entirely. Later OS versions ignore the coinstaller since Windows stopped allowing the KMDF version to be updated outside of the main OS servicing.

https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/installation-components-for-kmdf-drivers
https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/building-and-loading-a-kmdf-driver

Later OS versions ignore the coinstaller since Windows stopped allowing the KMDF version to be updated outside of the main OS servicing

How did I not know that? So… how does that work, if I have a driver that wants a later version of KMDF than what’s on the box?

Peter

It doesn’t load. That is why the guidance is now to use the lowest version of WDF based on the min OS version you require and the WDF version it ships.

So if I have understood your reply and have read the online docs correctly, Windows 7 systems will already have the WdfCoInstaller01009.dll supplied with the system, so I should remove ALL three co-installer stanzas from the .inf, and I should add the .Wdf section saying:

[Lectouch_Inst.NT.Wdf]
KmdfService = lectouch, LecTouch_Inst_wdfsect

[LecTouch_Inst_wdfsect]
KmdfLibraryVersion = $KMDFVERSION$

Is that right?

Thank you
David

Woohoo! As they say - it installed! Mostly working too!!!

Here’s the log file in case there’s anything I need to worry about…

perdrix.co.uk/logs/setupapi.success.dev.log

D.

1 Like