Hi Doron,
first I want to thank you. I’ve been following this forum for some time now and I’ve got really valuable help from you and others and never stopped to thank you.
At the bottom of this post you’ll find my current inf file. Actually this one is the first one I tried and it’s the one that still makes the most sense to me. To be honest I have some experience in writing drivers for the HID stack but I never attempted anything like this and some things are probably not really clear in my mind. One for example is, you said that I should write a lower filter for hidusb and not an upperfilter for ubshub if I want to see the URBs. I can see the reason in this specific case but in general, for a generic USB device, wouldn’t an upperfilter of usbhub a more general approach?
Thanks,
Marco.
; INF file
[Version]
Signature=“$Windows NT$”
Provider=%Company%
ClassGUID={745A17A0-74D3-11D0-B6FE-00A0C90F57DA}
Class=HIDClass
CatalogFile=cntmou.cat
LayoutFile=layout.inf
DriverPackageType=PlugAndPlay
DriverVer=07/17/2010,2.0.0.0
[DestinationDirs]
DefaultDestDir = 12
;
; Driver information
;
[Manufacturer]
%Company% = Company.Mfg,NTx86
; For Win2K
[Company.Mfg]
%USB\Vid_feed&Pid_beef.DeviceDesc%=cntmou_Inst, USB\Vid_feed&Pid_beef
; For XP and above
[Company.Mfg.NTx86]
%USB\Vid_feed&Pid_beef.DeviceDesc%=cntmou_Inst, USB\Vid_feed&Pid_beef
;
; General installation section
;
[cntmou_Inst.NT]
; Copy the driver over
CopyFiles=cntmou_Inst.CopyFiles
;
; File sections
;
[cntmou_Inst.CopyFiles]
cntmou.sys
;
; Service Installation
;
[cntmou_Inst.NT.Services]
AddService = cntmou,2,cntmou_Service_Inst
Include=input.inf
Needs=HID_Inst.NT.Services
[cntmou_Service_Inst]
DisplayName = %cntmou.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_IGNORE
ServiceBinary = %12%\cntmou.sys
[cntmou_Inst.NT.HW]
; Add the device filter
AddReg = cntmou_Inst.HW.AddReg
[cntmou_Inst.HW.AddReg]
HKR,“LowerFilters”,0x00010000,“cntmou”
;
; Source file information
;
[SourceDisksNames]
1 = %DiskId1%,
[SourceDisksFiles]
cntmou.sys = 1,
;
;— cntmou Coinstaller installation ------
;
[DestinationDirs]
cntmou_CoInstaller_CopyFiles = 11
[cntmou_Inst.NT.CoInstallers]
AddReg=cntmou_CoInstaller_AddReg
CopyFiles=cntmou_CoInstaller_CopyFiles
[cntmou_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
[cntmou_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with SourceDisksNames
[cntmou_Inst.NT.Wdf]
KmdfService = cntmou, cntmou_wdfsect
[cntmou_wdfsect]
KmdfLibraryVersion = 1.9
[Strings]
;
; Non-Localizable Strings
;
REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
SERVICEROOT = “System\CurrentControlSet\Services”
;
; Localizable Strings
;
DiskId1 = “Test installation disk”
Company = “My Company”
cntmou.SvcDesc = “Test driver”
USB\Vid_feed&Pid_beef.DeviceDesc = “My test HID device”