Hi all
I’m developing an HID lower filter driver to intercept data from an usb touchscreen (because I need to change some data before reach the touch driver). I started by this example and changed some data in the .inf file. My problem is after installed the filter driver if I connect the usb touchscreen I can see my driver showed into device manager but with the orange sign informing that the driver can not be loaded cause an error (error 10). From debug print I can see the function inside the driver are called by the system but after a couple of call the system stop interacting and show the error. Also system touchscreen driver is not loaded. If I uninstall my driver all go back to work again. Follow my .inf file, someone can help me in know wat I’m doing wrong?
Thank you
[Version]
Signature="$WINDOWS NT$"
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%ManufacturerName%
CatalogFile=TouchFilter.cat
DriverVer=03/02/2022,1.0.0.0
PnpLockdown=1
[DestinationDirs]
DefaultDestDir = 12
TouchFilter_Device_CoInstaller_CopyFiles = 11
[SourceDisksNames]
1 = %DiskName%,,,""
[SourceDisksFiles]
TouchFilter.sys = 1,,
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames
;*****************************************
; Install Section
;*****************************************
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%TouchFilter.DeviceDesc%=TouchFilter_Device, USB\VID_03EB&PID_215D
[TouchFilter_Device.NT]
Include=INPUT.INF
Needs=HID_Inst.NT
CopyFiles=Drivers_Dir
[Drivers_Dir]
TouchFilter.sys
[TouchFilter_Device.NT.HW]
Include=INPUT.INF
Needs=HID_Inst.NT.HW
AddReg=TouchFilter_Device.NT.HW.AddReg
[TouchFilter_Device.NT.HW.AddReg]
HKR,,"LowerFilters",0x00010000,"TouchFilter"
;-------------- Service installation
[TouchFilter_Device.NT.Services]
AddService=TouchFilter,,TouchFilter_Service_Inst
Include=INPUT.INF
Needs=HID_Inst.NT.services
; -------------- TouchFilter driver install sections
[TouchFilter_Service_Inst]
DisplayName = %TouchFilter.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\TouchFilter.sys
;
;--- TouchFilter_Device Coinstaller installation ------
;
[TouchFilter_Device.NT.CoInstallers]
AddReg=TouchFilter_Device_CoInstaller_AddReg
CopyFiles=TouchFilter_Device_CoInstaller_CopyFiles
[TouchFilter_Device_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
[TouchFilter_Device_CoInstaller_CopyFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll
[TouchFilter_Device.NT.Wdf]
KmdfService = TouchFilter, TouchFilter_wdfsect
[TouchFilter_wdfsect]
KmdfLibraryVersion = $KMDFVERSION$
[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="XXX"
DiskName = "TouchFilter Installation Disk"
TouchFilter.DeviceDesc = "TouchFilter Device"
TouchFilter.SVCDESC = "TouchFilter Service"