I have a HID DEVICE with 2 function on it - keyboard and mouse
compisited chip.
I only use the keyboard function and my driver is simply a keyboard
filter.
When I plug DEVICE into system without my filter driver, system treat
it as a HID_KEYBOARD and HID_MOUSE.
the question is:
1. If I have a valid .cat file, after perform SetupCopyOEMInf, will
XP/2000 load my driver(oemxx.inf) prior to
system-supplied keyboard.inf (HID_DEVICE)? ( as I know before have
.cat file - won't!)
I am very worry about the 'Rank' (to match an best .inf) will larger
than keyboard.inf, that's mean my filter driver will never been chosen.
Here 's my attachment information, thanks for your comments.
Assume the pid/vid is:
vid = 1234
pid = 5678
The HardwareId (retrieve from actual devnode):
HID\Vid_1234&Pid_5678&Rev_0100&MI_00
HID\Vid_1234&Pid_5678&MI_00
HID_DEVICE_SYSTEM_KEYBOARD (I think it's create by HIDClass)
HID_DEVICE_UP:0001_U:0006
HID_DEVICE
The .Inf file (simply kbfiltr version):
//--------------------------------------------------------------------------------------------
; Hid device filtr.inf
;
; Installation inf for the Device that needs filtering adapter.
;
[Version]
Signature="$Windows NT$"
Provider=%DDK_Ex%
ClassGUID={4D36E96B-E325-11CE-BFC1-08002BE10318}
Class=Keyboard
;CatalogFile=Flagfiltr.cat - I am trying to obtain one from WHQL...
DriverVer=01/01/2005, 1.0.0.0
[DestinationDirs]
DefaultDestDir = 12
[ControlFlags]
ExcludeFromSelect = HID\Vid_1234&Pid_5678&Rev_0100&MI_00
ExcludeFromSelect = HID\Vid_1234&Pid_5678&MI_00
; Driver information
;
[Manufacturer]
%DDK_Ex% = DDK_Ex.Mfg
[DDK_Ex.Mfg]
"TEST_1" = Flagfiltr, HID\Vid_1234&Pid_5678&Rev_0100&MI_00
"TEST_2" = Flagfiltr, HID\Vid_1234&Pid_5678&MI_00
;
; General installation section
;
[Flagfiltr.NT]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=
; Copy the driver over
CopyFiles=Flagfiltr.CopyFiles.NT
;
; File sections
;
[Flagfiltr.CopyFiles.NT]
Flagfiltr.sys
;
; Service Installation
;
[Flagfiltr.NT.Services]
AddService = Flagfiltr, , Flagfiltr_Service_Inst
; Install the port driver and mouclass from keyboard.inf
Include=keyboard.inf
Needs=
[Flagfiltr_Service_Inst]
DisplayName = %Flagfiltr.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 0 ; SERVICE_ERROR_IGNORE
LoadOrderGroup = Keyboard Port
ServiceBinary = %12%\Flagfiltr.sys
[Flagfiltr.NT.HW]
; Add the device upper filter
AddReg = Flagfiltr.NT.HW.AddReg
; run the directives need by the port driver
Include=keyboard.inf
Needs=
[Flagfiltr.NT.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"Flagfiltr"
;
; Source file information
;
; use [SourceDisksNames.x86] for x86 only installs
; use [SourceDisksNames.alpha] for alpha only installs
[SourceDisksNames]
1 = %DiskId1%,,,
[SourceDisksFiles]
Flagfiltr.sys = 1,,
[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"
DDK_Ex = "TEST"
Flagfiltr.SvcDesc= "TEST"