FDO of the HID Raw PDO

Hi,

I has one simple KMDF function driver from Toaster for the HIDClass enumerated Raw PDO. I had it installed successfully but I didn’t see the driver got loaded. When I connect the debugger, I couldn’t see the DriverEntry is called. Do you know why?

The INF file is as below:

[Version]
Signature = “$WINDOWS NT$”
Class = HIDClass
ClassGuid = {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider = %MSFT%
DriverVer = 06/16/1999,5.00.2064
;CatalogFile = KmdfSamples.cat

[DestinationDirs]
DefaultDestDir = 12

[Manufacturer]
%Razer%=Razer,NT$ARCH$.6.1

; For Win7 and later
[Razer.NT$ARCH$.6.1]
%Razer.DeviceDesc%=RzTouch, HID\VID_17EF&PID_6018&REV_0090&MI_01&Col01

[RzTouch.NT]
CopyFiles=RzTouch.NT.Copy

[RzTouch.NT.Copy]
rztouch_func.sys

;*****************************************
; RzTouch Device Filter Service Section
;*****************************************

[RzTouch.NT.Services]
;Do not specify SPSVCINST_ASSOCSERVICE on filter drivers.
AddService = rztouch_func, RzTouch_Service_Inst

[RzTouch_Service_Inst]
DisplayName = %RzTouch.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\rztouch_func.sys

;*************************
; Source file information
;*************************

[SourceDisksNames]
1 = %DiskId1%,“”

[SourceDisksFiles]
rztouch_func.sys = 1,

;
;— RzTouch Coinstaller installation ------
;
[DestinationDirs]
RzTouch_CoInstaller_CopyFiles = 11

[RzTouch.NT.CoInstallers]
AddReg = RzTouch_CoInstaller_AddReg
CopyFiles = RzTouch_CoInstaller_CopyFiles

[RzTouch_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller”

[RzTouch_CoInstaller_CopyFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll

[SourceDisksFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames

[RzTouch.NT.Wdf]
KmdfService = rztouch_func, RzTouch_WdfSect

[RzTouch_WdfSect]
KmdfLibraryVersion = $KMDFVERSION$

The SetupApi.dev.log also indicates the driver gets installed successfully.

>> [Device Install (DiShowUpdateDevice) - HID\VID_17EF&PID_6018&MI_01&COL01\7&3DC4F60&0&0000]
>> Section start 2012/07/24 15:06:49.186
cmd: “C:\Windows\system32\mmc.exe” C:\Windows\system32\devmgmt.msc
dvi: {DIF_UPDATEDRIVER_UI} 15:06:49.186
dvi: No class installer for ‘HID-compliant device’
dvi: No CoInstallers found
dvi: Default installer: Enter 15:06:49.186
dvi: Default installer: Exit
dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 15:06:49.186
ndv: {Update Driver Software Wizard for HID\VID_17EF&PID_6018&MI_01&COL01\7&3DC4F60&0&0000}
dvi: Set selected driver complete.
dvi: {DIF_SELECTDEVICE} 15:06:50.434
dvi: No class installer for ‘HID-compliant device’
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 15:06:50.434
ui : Prompting user for disk…
ui : DPROMPT result = 0
dvi: {DIF_SELECTDEVICE} 15:06:57.641
dvi: No class installer for ‘HID-compliant device’
dvi: {DIF_SELECTDEVICE - exit(0xe000020e)} 15:06:57.641
inf: {SetupCopyOEMInf: e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf} 15:07:00.152
sto: {Import Driver Package: e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf} 15:07:00.152
sto: Importing driver package into Driver Store:
sto: Driver Store = C:\Windows\System32\DriverStore (Online | 6.1.7600)
sto: Driver Package = e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf
sto: Architecture = x86
sto: Locale Name = neutral
sto: Flags = 0x00000000
sto: Copying driver package files to ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’.
inf: Opened INF: ‘e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf’ ([strings])
inf: Opened INF: ‘e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf’ ([strings])
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘e:\work\touchfilter\bin\debug\32bit\func’
flq: SourceFilename - ‘WdfCoInstaller01009.dll’
flq: TargetDirectory- ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘e:\work\touchfilter\bin\debug\32bit\func’
flq: SourceFilename - ‘rztouch_func.inf’
flq: TargetDirectory- ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘e:\work\touchfilter\bin\debug\32bit\func’
flq: SourceFilename - ‘rztouch_func.sys’
flq: TargetDirectory- ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=3
flq: {_commit_copy_subqueue}
flq: subqueue count=3
flq: source media:
flq: SourcePath - [e:\work\touchfilter\bin\debug\32bit\func]
flq: SourceFile - [WdfCoInstaller01009.dll]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
flq: CopyFile: ‘e:\work\touchfilter\bin\debug\32bit\func\WdfCoInstaller01009.dll’
flq: to: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\SET2A41.tmp’
flq: MoveFile: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\SET2A41.tmp’
flq: to: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\WdfCoInstaller01009.dll’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf’
flq: to: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\SET2A52.tmp’
flq: MoveFile: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\SET2A52.tmp’
flq: to: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.inf’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.sys’
flq: to: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\SET2A62.tmp’
flq: MoveFile: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\SET2A62.tmp’
flq: to: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.sys’
flq: {_commit_copyfile exit OK}
flq: {_commit_copy_subqueue exit OK}
flq: {_commit_file_queue exit OK}
pol: {Driver package policy check} 15:07:00.293
pol: {Driver package policy check - exit(0x00000000)} 15:07:00.308
sto: {Stage Driver Package: C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.inf} 15:07:00.308
inf: Opened INF: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.inf’ ([strings])
inf: Opened INF: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.inf’ ([strings])
sto: Copying driver package files:
sto: Source Path = C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}
sto: Destination Path = C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000010
flq: SourceRootPath - ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’
flq: SourceFilename - ‘WdfCoInstaller01009.dll’
flq: TargetDirectory- ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000010
flq: SourceRootPath - ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’
flq: SourceFilename - ‘rztouch_func.inf’
flq: TargetDirectory- ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000010
flq: SourceRootPath - ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}’
flq: SourceFilename - ‘rztouch_func.sys’
flq: TargetDirectory- ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=3
flq: {_commit_copy_subqueue}
flq: subqueue count=3
flq: source media:
flq: SourcePath - [C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}]
flq: SourceFile - [WdfCoInstaller01009.dll]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
flq: CopyFile: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\WdfCoInstaller01009.dll’
flq: to: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\SET2ABB.tmp’
flq: MoveFile: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\SET2ABB.tmp’
flq: to: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\WdfCoInstaller01009.dll’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.inf’
flq: to: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\SET2ABC.tmp’
flq: MoveFile: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\SET2ABC.tmp’
flq: to: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\rztouch_func.inf’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘C:\Users\marshall\AppData\Local\Temp{3827c229-4e76-27c8-7679-d8712019572c}\rztouch_func.sys’
flq: to: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\SET2ABD.tmp’
flq: MoveFile: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\SET2ABD.tmp’
flq: to: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\rztouch_func.sys’
flq: {_commit_copyfile exit OK}
flq: {_commit_copy_subqueue exit OK}
flq: {_commit_file_queue exit OK}
sto: {DRIVERSTORE_IMPORT_NOTIFY_VALIDATE} 15:07:00.324
! sto: Driver package does not contain a catalog file, but user wants to install anyway.
sto: {DRIVERSTORE_IMPORT_NOTIFY_VALIDATE exit(0x00000000)} 15:07:01.556
sto: Verified driver package signature:
sto: Digital Signer Score = 0xFF000000
sto: Digital Signer Name =
sto: {DRIVERSTORE_IMPORT_NOTIFY_BEGIN} 15:07:01.556
inf: Opened INF: ‘C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}\rztouch_func.inf’ ([strings])
sto: Create system restore point:
sto: Description = Device Driver Package Install: Razer Human Interface Devices
sto: Time = 6739ms
sto: Status = 0x00000000 (SUCCESS)
sto: {DRIVERSTORE_IMPORT_NOTIFY_BEGIN: exit(0x00000000)} 15:07:08.311
sto: Importing driver package files:
sto: Source Path = C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}
sto: Destination Path = C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35
sto: {Copy Directory: C:\Windows\System32\DriverStore\Temp{33c859f0-3ba5-1b4a-211f-9a0df9873c5b}} 15:07:08.327
sto: Target Path = C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35
sto: {Copy Directory: exit(0x00000000)} 15:07:08.327
sto: {Index Driver Package: C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf} 15:07:08.327
idb: Registered driver store entry ‘rztouch_func.inf_x86_neutral_69336e432d917b35’.
idb: Published ‘rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ to ‘C:\Windows\INF\oem7.inf’
idb: Published driver store entry ‘rztouch_func.inf_x86_neutral_69336e432d917b35’.
sto: Published driver package INF ‘oem7.inf’ was changed.
sto: Active published driver package is ‘rztouch_func.inf_x86_neutral_69336e432d917b35’.
sto: {Index Driver Package: exit(0x00000000)} 15:07:09.185
sto: {DRIVERSTORE_IMPORT_NOTIFY_END} 15:07:09.185
sto: Commit system restore point:
sto: Description = Device Driver Package Install: Razer Human Interface Devices
sto: Time = 0ms
sto: Status = 0x00000000 (SUCCESS)
sto: {DRIVERSTORE_IMPORT_NOTIFY_END: exit(0x00000000)} 15:07:09.185
sto: {Stage Driver Package: exit(0x00000000)} 15:07:09.216
ndv: Doing device matching lookup!
inf: Opened INF: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
inf: Saved PNF: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.PNF’ (Language = 0409)
sto: Driver package was staged to Driver Store. Time = 9048 ms
sto: Imported driver package into Driver Store:
sto: Filename = C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf
sto: Time = 9158 ms
sto: {Import Driver Package: exit(0x00000000)} 15:07:09.309
inf: Opened INF: ‘e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf’ ([strings])
inf: Driver Store location: C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf
inf: Published Inf Path: C:\Windows\INF\oem7.inf
inf: Opened INF: ‘e:\work\touchfilter\bin\debug\32bit\func\rztouch_func.inf’ ([strings])
inf: OEM source media location: e:\work\touchfilter\bin\debug\32bit\func<br> inf: {SetupCopyOEMInf exit (0x00000000)} 15:07:09.419
dvi: Searching for hardware ID(s):
dvi: hid\vid_17ef&pid_6018&rev_0090&mi_01&col01
dvi: hid\vid_17ef&pid_6018&mi_01&col01
dvi: hid_device_system_control
dvi: hid_device_up:0001_u:0080
dvi: hid_device
inf: Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
sig: {_VERIFY_FILE_SIGNATURE} 15:07:09.419
sig: Key = rztouch_func.inf
sig: FilePath = C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf
! sig: No installed catalogs matching catalog name ‘’ were found that validated the file.
! sig: Error 1168: Element not found.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 15:07:09.434
dvi: Selected driver installs from section [RzTouch] in ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’.
dvi: Class GUID of device remains: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.
dvi: Set selected driver complete.
dvi: {Plug and Play Service: Device Install for HID\VID_17EF&PID_6018&MI_01&COL01\7&3DC4F60&0&0000}
ump: Creating Install Process: DrvInst.exe 15:07:09.450
ndv: Infpath=C:\Windows\INF\oem7.inf
ndv: DriverNodeName=rztouch_func.inf:Razer.NTx86.6.1:RzTouch:6.1.7600.16385:hid\vid_17ef&pid_6018&rev_0090&mi_01&col01
ndv: DriverStorepath=C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf
ndv: Building driver list from driver node strong name…
dvi: Searching for hardware ID(s):
dvi: hid\vid_17ef&pid_6018&rev_0090&mi_01&col01
dvi: hid\vid_17ef&pid_6018&mi_01&col01
dvi: hid_device_system_control
dvi: hid_device_up:0001_u:0080
dvi: hid_device
inf: Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
sig: {_VERIFY_FILE_SIGNATURE} 15:07:09.481
sig: Key = rztouch_func.inf
sig: FilePath = C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf
! sig: No installed catalogs matching catalog name ‘’ were found that validated the file.
! sig: Error 1168: Element not found.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 15:07:09.497
dvi: Selected driver installs from section [RzTouch] in ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’.
dvi: Class GUID of device remains: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.
dvi: Set selected driver complete.
ndv: {Core Device Install} 15:07:09.497
inf: Opened INF: ‘C:\Windows\INF\oem7.inf’ ([strings])
inf: Saved PNF: ‘C:\Windows\INF\oem7.PNF’ (Language = 0409)
dvi: {DIF_ALLOW_INSTALL} 15:07:09.497
dvi: No class installer for ‘Razer Touch Function’
dvi: No CoInstallers found
dvi: Default installer: Enter 15:07:09.512
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 15:07:09.512
ndv: Installing files…
dvi: {DIF_INSTALLDEVICEFILES} 15:07:09.512
dvi: No class installer for ‘Razer Touch Function’
dvi: Default installer: Enter 15:07:09.512
dvi: {Install FILES}
inf: Opened PNF: ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
inf: {Install Inf Section [RzTouch.NT]}
inf: CopyFiles=RzTouch.NT.Copy (rztouch_func.inf line 33)
cpy: Open PnpLockdownPolicy: Err=2. This is OK. Use LockDownPolicyDefault
flq: QueueSingleCopy…
flq: Inf : ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’
flq: SourceInf: ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’
flq: SourceSection: [sourcedisksfiles]
flq: Source root path based on SourceInf
flq: SourceRootPath: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35’
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35’
flq: SourceFilename - ‘rztouch_func.sys’
flq: TargetDirectory- ‘C:\Windows\system32\DRIVERS’
flq: TargetFilename - ‘rztouch_func.sys’
flq: SourceDesc - ‘Razer Touch Function Driver Installation Disk #1
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY exit(0x00000000)}
inf: {Install Inf Section [RzTouch.NT] exit (0x00000000)}
dvi: Processing co-installer registration section [RzTouch.NT.CoInstallers].
inf: {Install Inf Section [RzTouch.NT.CoInstallers]}
inf: CopyFiles=RzTouch_CoInstaller_CopyFiles (rztouch_func.inf line 71)
flq: QueueSingleCopy…
flq: Inf : ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’
flq: SourceInf: ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’
flq: SourceSection: [sourcedisksfiles]
flq: Source root path based on SourceInf
flq: SourceRootPath: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35’
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35’
flq: SourceFilename - ‘WdfCoInstaller01009.dll’
flq: TargetDirectory- ‘C:\Windows\system32’
flq: TargetFilename - ‘WdfCoInstaller01009.dll’
flq: SourceDesc - ‘Razer Touch Function Driver Installation Disk #1
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY exit(0x00000000)}
inf: {Install Inf Section [RzTouch.NT.CoInstallers] exit (0x00000000)}
dvi: Co-installers registered.
dvi: {Install INTERFACES}
dvi: Installing section [RzTouch.NT.Interfaces]
dvi: {Install INTERFACES exit 00000000}
dvi: {Install FILES exit (0x00000000)}
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICEFILES - exit(0x00000000)} 15:07:09.528
ndv: Pruning file queue…
dvi: {_SCAN_FILE_QUEUE}
flq: ScanQ flags=620
flq: SPQ_SCAN_PRUNE_COPY_QUEUE
flq: SPQ_SCAN_FILE_COMPARISON
flq: SPQ_SCAN_ACTIVATE_DRP
flq: ScanQ number of copy nodes=2
flq: File ‘C:\Windows\system32\WdfCoInstaller01009.dll’ pruned from copy.
cpy: DrpSetRegFileProt ‘C:\Windows\system32\WdfCoInstaller01009.dll’ Status=0 Class=OEM Legacy
flq: ScanQ action=200 DoPruning=32
flq: ScanQ end Validity flags=620 CopyNodes=1
dvi: {_SCAN_FILE_QUEUE exit(0, 0x00000000)}
ndv: Committing file queue…
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=1
flq: {SPFILENOTIFY_STARTQUEUE}
flq: {SPFILENOTIFY_STARTQUEUE - exit(0x00000001)}
flq: {_commit_copy_subqueue}
flq: subqueue count=1
flq: {SPFILENOTIFY_STARTSUBQUEUE}
flq: {SPFILENOTIFY_STARTSUBQUEUE - exit(0x00000001)}
flq: source media:
flq: Description - [Razer Touch Function Driver Installation Disk #1]
flq: SourcePath - [C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35]
flq: SourceFile - [rztouch_func.sys]
flq: Flags - 0x00000000
flq: {SPFQNOTIFY_NEEDMEDIA}
flq: {SPFILENOTIFY_NEEDMEDIA}
flq: {SPFILENOTIFY_NEEDMEDIA - exit(0x00000001)}
flq: {SPFQNOTIFY_NEEDMEDIA - returned 0x00000001}
flq: source media: SPFQOPERATION_DOIT
flq: {_commit_copyfile}
flq: {SPFILENOTIFY_STARTCOPY}
ndv: Saving LastKnownGood file C:\Windows\system32\DRIVERS\rztouch_func.sys (copy)
flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000001)}
flq: CopyFile: ‘C:\Windows\System32\DriverStore\FileRepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.sys’
flq: to: ‘C:\Windows\system32\DRIVERS\SET4F99.tmp’
cpy: CopyFile Drp is active
cpy: Source File ‘C:\Windows\system32\DRIVERS\SET4F99.tmp’ is NOT signed NT5 Crypto.
cpy: DrpGetFileProt Status=2 dwClass=0
flq: MoveFile: ‘C:\Windows\system32\DRIVERS\SET4F99.tmp’
flq: to: ‘C:\Windows\system32\DRIVERS\rztouch_func.sys’
cpy: DrpSetRegFileProt ‘C:\Windows\system32\DRIVERS\rztouch_func.sys’ Status=0 Class=OEM Legacy
flq: Caller applied security to file ‘C:\Windows\system32\DRIVERS\rztouch_func.sys’.
flq: {SPFILENOTIFY_ENDCOPY}
flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)}
flq: {_commit_copyfile exit OK}
flq: {SPFILENOTIFY_ENDSUBQUEUE}
flq: {SPFILENOTIFY_ENDSUBQUEUE - exit(0x00000001)}
flq: {_commit_copy_subqueue exit OK}
flq: {SPFILENOTIFY_ENDQUEUE}
flq: {SPFILENOTIFY_ENDQUEUE - exit(0x00000001)}
flq: {_commit_file_queue exit OK}
ndv: Registering CoInstallers…
dvi: {DIF_REGISTER_COINSTALLERS} 15:07:09.777
dvi: No class installer for ‘Razer Touch Function’
dvi: Default installer: Enter 15:07:09.777
inf: Opened PNF: ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
inf: {Install Inf Section [RzTouch.NT.CoInstallers]}
inf: AddReg=RzTouch_CoInstaller_AddReg (rztouch_func.inf line 70)
inf: {Install Inf Section [RzTouch.NT.CoInstallers] exit (0x00000000)}
dvi: Co-installers registered.
dvi: Default installer: Exit
dvi: {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 15:07:09.777
ndv: Installing interfaces…
dvi: {DIF_INSTALLINTERFACES} 15:07:09.777
dvi: No class installer for ‘Razer Touch Function’
dvi: Using exported function ‘WdfCoInstaller’ in module ‘C:\Windows\system32\WdfCoInstaller01009.dll’.
dvi: CoInstaller 1 == WdfCoInstaller01009.dll,WdfCoInstaller
dvi: CoInstaller 1: Enter 15:07:09.777
dvi: CoInstaller 1: Exit
dvi: Default installer: Enter 15:07:09.777
dvi: {Install INTERFACES}
inf: Opened PNF: ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
dvi: Installing section [RzTouch.NT.Interfaces]
dvi: {Install INTERFACES exit 00000000}
dvi: Default installer: Exit
dvi: {DIF_INSTALLINTERFACES - exit(0x00000000)} 15:07:09.793
ndv: Installing device…
dvi: {DIF_INSTALLDEVICE} 15:07:09.793
dvi: No class installer for ‘Razer Touch Function’
dvi: CoInstaller 1: Enter 15:07:09.793
inf: Opened PNF: ‘C:\Windows\INF\oem7.inf’ ([strings])
dvi: CoInstaller 1: Exit
dvi: Default installer: Enter 15:07:10.526
dvi: {Install DEVICE}
inf: Opened PNF: ‘c:\windows\system32\driverstore\filerepository\rztouch_func.inf_x86_neutral_69336e432d917b35\rztouch_func.inf’ ([strings])
dvi: Processing Registry/Property directives…
inf: {Install Inf Section [RzTouch.NT]}
inf: {Install Inf Section [RzTouch.NT] exit (0x00000000)}
inf: {Install Inf Section [RzTouch.NT.Hw]}
inf: Empty section
inf: {Install Inf Section [RzTouch.NT.Hw] exit (0x00000000)}
dvi: {Writing Device Properties}
dvi: Provider name=Razer
dvi: DriverDate 07/24/2012
dvi: DriverVersion=6.1.7600.16385
dvi: Class name=HIDClass
dvi: Manufacturer=Razer USA
dvi: Matching DeviceID=hid\vid_17ef&pid_6018&rev_0090&mi_01&col01
dvi: Strong Name=oem7.inf:Razer.NTx86.6.1:RzTouch:6.1.7600.16385:hid\vid_17ef&pid_6018&rev_0090&mi_01&col01
dvi: {Writing Device Properties - Complete}
inf: {Install Inf Section [RzTouch.NT.Services]}
inf: AddService=rztouch_func,RzTouch_Service_Inst (rztouch_func.inf line 44)
inf: ServiceType=1 (rztouch_func.inf line 48)
inf: StartType=3 (rztouch_func.inf line 49)
inf: ErrorControl=1 (rztouch_func.inf line 50)
inf: ServiceBinary=C:\Windows\system32\DRIVERS\rztouch_func.sys (rztouch_func.inf line 51)
inf: DisplayName=“Razer Touch Function Driver” (rztouch_func.inf line 47)
dvi: Add Service: Created service ‘rztouch_func’.
inf: {Install Inf Section [RzTouch.NT.Services] exit(0x00000000)}
dvi: Updated reflected section names for: oem7.inf
dvi: {Install DEVICE exit (0x00000000)}
dvi: Writing common driver property settings.
dvi: DriverDescription=Razer Touch Function
dvi: DeviceDisplayName=Razer Touch Function
dvi: {Restarting Devices} 15:07:11.384
dvi: Query-remove: HID\VID_17EF&PID_6018&MI_01&COL01\7&3DC4F60&0&0000
dvi: Query-remove complete
dvi: Restart: HID\VID_17EF&PID_6018&MI_01&COL01\7&3DC4F60&0&0000
dvi: Restart complete.
dvi: Restart verified: HID\VID_17EF&PID_6018&MI_01&COL01\7&3DC4F60&0&0000
dvi: {Restarting Devices exit} 15:07:11.571
dvi: Default installer: Exit
dvi: CoInstaller 1: Enter (Post Processing) 15:07:11.571
dvi: CoInstaller 1: Exit (Post Processing)
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 15:07:12.383
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 15:07:12.383
dvi: No class installer for ‘Razer Touch Function’
dvi: CoInstaller 1: Enter 15:07:12.383
dvi: CoInstaller 1: Exit
dvi: Default installer: Enter 15:07:12.383
dvi: Default installer: Exit
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 15:07:12.383
ndv: Device install status=0x00000000
ndv: Performing device install final cleanup…
ndv: {Core Device Install - exit(0x00000000)} 15:07:12.383
dvi: {DIF_DESTROYPRIVATEDATA} 15:07:12.383
dvi: CoInstaller 1: Enter 15:07:12.383
dvi: CoInstaller 1: Exit
dvi: Default installer: Enter 15:07:12.383
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 15:07:12.398
ump: Server install process exited with code 0x00000000 15:07:12.398
ump: {Plug and Play Service: Device Install exit(00000000)}
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 15:07:12.414
dvi: No class installer for ‘Razer Touch Function’
dvi: Using exported function ‘WdfCoInstaller’ in module ‘C:\Windows\system32\WdfCoInstaller01009.dll’.
dvi: CoInstaller 1 == WdfCoInstaller01009.dll,WdfCoInstaller
dvi: CoInstaller 1: Enter 15:07:12.414
dvi: CoInstaller 1: Exit
dvi: Default installer: Enter 15:07:12.414
dvi: Default installer: Exit
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 15:07:12.414
ndv: {Update Driver Software Wizard exit(00000000)}
<<< Section end 2012/07/24 15:07:16.953
<<< [Exit status: SUCCESS]

xxxxx@hotmail.com wrote:

I has one simple KMDF function driver from Toaster for the HIDClass enumerated Raw PDO. I had it installed successfully but I didn’t see the driver got loaded. When I connect the debugger, I couldn’t see the DriverEntry is called. Do you know why?

Yes. It’s because you did not register your driver as an upper filter.
You installed your driver as a “non-primary” driver (because the
AddService line does not have a “2” in the flags, but that’s it.
Without that, your driver will never be loaded.

You need something like this:

[RzTough.NT.HW]
AddReg = AddFilter

[AddFilter]
HKR,UpperFilters,0x00010008,“rztouch_func”


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi,

Thanks a lot, Tim. Adding the flag 2 to the AddService, the driver can be installed on the Raw PDO now. However, another issue comes. One of our application registers the device notification for this HID device. But after installing the driver on that device, the application nevers gets the arrival notification for that device.

Do you know why and how I can do to make the arrival notication can be still received by the application?

Thanks,
Marshall

In addition, I’ve called the following the code to register the device as one instance of the HID class.

status = WdfDeviceCreateDeviceInterface(
hDevice,
(LPGUID)&GUID_DEVINTERFACE_HID,
NULL // ReferenceString
);

Do I need to call WdfDeviceSetDeviceInterfaceState to enable it?

By default kmdf will manage the state of the device interface for you, no need to callWdfDeviceSetDeviceInterfaceState. Furthermore, the hidclass pdo enables the god device interface for the stack, not your driver. You are in an undefined state by registering the same interface guid twice. Dont do that

d

debt from my phone


From: xxxxx@hotmail.com
Sent: 7/26/2012 3:27 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] FDO of the HID Raw PDO

In addition, I’ve called the following the code to register the device as one instance of the HID class.

status = WdfDeviceCreateDeviceInterface(
hDevice,
(LPGUID)&GUID_DEVINTERFACE_HID,
NULL // ReferenceString
);

Do I need to call WdfDeviceSetDeviceInterfaceState to enable it?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Doron,

The problem is that the application can’t never get notified with the HID device arrival event. Is it by design? How can we work arround this?

Thanks,
Marshall

Do you have source to the app? Do you know if the notification is not showing up or if the handle can’t be opened? Does your driver send all of the hid IOCTLs and reads/writes down the stack?

d

debt from my phone


From: xxxxx@hotmail.com
Sent: 7/26/2012 7:27 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] FDO of the HID Raw PDO

Hi Doron,

The problem is that the application can’t never get notified with the HID device arrival event. Is it by design? How can we work arround this?

Thanks,
Marshall


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Doron,

The application part is maintained by another team so I may need some time to know if the notification is not showing up or the handle is not open. However, in my driver, I have the event callback functions for read/write and IOCTLs. They all pass the request down to the stack. The IO target that the WdfRequestSend uses is obtained bycalling fdoData->hDefaultIoTarget = WdfDeviceGetIoTarget(hDevice); in the EvtDeviceAdd. Is it correct or I should send the request to the PDO?

NTSTATUS
ToasterForwardRequest(
IN WDFDEVICE hDevice,
IN WDFREQUEST hRequest
)
{
NTSTATUS status = STATUS_SUCCESS;
PFDO_DATA pFdoData = NULL;
BOOLEAN bRetVal = FALSE;
WDF_REQUEST_SEND_OPTIONS options = {0};

pFdoData = ToasterFdoGetData(hDevice);

WdfRequestFormatRequestUsingCurrentType(hRequest);

//
// Forward the request unmodified.
//
WDF_REQUEST_SEND_OPTIONS_INIT(
&options,
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET
);

bRetVal = WdfRequestSend(
hRequest,
pFdoData->hDefaultIoTarget,
&options
);

//
// Just complete the request ourselves since something went horribly wrong.
//
if (bRetVal == FALSE)
{
status = WdfRequestGetStatus(hRequest);
KdPrint((“Failed in calling WdfRequestSend due to 0x%x”, status));

WdfRequestComplete(hRequest, status);
}

return status;
}

VOID
ToasterEvtIoDeviceControl(
IN WDFQUEUE Queue,
IN WDFREQUEST Request,
IN size_t OutputBufferLength,
IN size_t InputBufferLength,
IN ULONG IoControlCode
)
{
UNREFERENCED_PARAMETER(Queue);
UNREFERENCED_PARAMETER(OutputBufferLength);
UNREFERENCED_PARAMETER(InputBufferLength);

PAGED_CODE();

hDevice = WdfIoQueueGetDevice(Queue);
ToasterForwardRequest(hDevice, Request);
}

VOID ToasterEvtI oWrite (WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
{
UNREFERENCED_PARAMETER(Queue);
UNREFERENCED_PARAMETER(Length);

PAGED_CODE();

hDevice = WdfIoQueueGetDevice(Queue);
ToasterForwardRequest(hDevice, Request);
}

VOID ToasterEvtIoRead (WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
{
UNREFERENCED_PARAMETER(Queue);
UNREFERENCED_PARAMETER(Length);

PAGED_CODE();

hDevice = WdfIoQueueGetDevice(Queue);
ToasterForwardRequest(hDevice, Request);
}

Thanks,
Marshall

If all you are doing is sending io down the stack , just call WdfFdoInitSetFilter and kmdf will everything down the stack. If you are going to do this manually, WdfDeviceGetIoTarget is the right target

d

debt from my phone


From: xxxxx@hotmail.com
Sent: 7/26/2012 3:56 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] FDO of the HID Raw PDO

Hi Doron,

The application part is maintained by another team so I may need some time to know if the notification is not showing up or the handle is not open. However, in my driver, I have the event callback functions for read/write and IOCTLs. They all pass the request down to the stack. The IO target that the WdfRequestSend uses is obtained bycalling fdoData->hDefaultIoTarget = WdfDeviceGetIoTarget(hDevice); in the EvtDeviceAdd. Is it correct or I should send the request to the PDO?

NTSTATUS
ToasterForwardRequest(
IN WDFDEVICE hDevice,
IN WDFREQUEST hRequest
)
{
NTSTATUS status = STATUS_SUCCESS;
PFDO_DATA pFdoData = NULL;
BOOLEAN bRetVal = FALSE;
WDF_REQUEST_SEND_OPTIONS options = {0};

pFdoData = ToasterFdoGetData(hDevice);

WdfRequestFormatRequestUsingCurrentType(hRequest);

//
// Forward the request unmodified.
//
WDF_REQUEST_SEND_OPTIONS_INIT(
&options,
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET
);

bRetVal = WdfRequestSend(
hRequest,
pFdoData->hDefaultIoTarget,
&options
);

//
// Just complete the request ourselves since something went horribly wrong.
//
if (bRetVal == FALSE)
{
status = WdfRequestGetStatus(hRequest);
KdPrint((“Failed in calling WdfRequestSend due to 0x%x”, status));

WdfRequestComplete(hRequest, status);
}

return status;
}

VOID
ToasterEvtIoDeviceControl(
IN WDFQUEUE Queue,
IN WDFREQUEST Request,
IN size_t OutputBufferLength,
IN size_t InputBufferLength,
IN ULONG IoControlCode
)
{
UNREFERENCED_PARAMETER(Queue);
UNREFERENCED_PARAMETER(OutputBufferLength);
UNREFERENCED_PARAMETER(InputBufferLength);

PAGED_CODE();

hDevice = WdfIoQueueGetDevice(Queue);
ToasterForwardRequest(hDevice, Request);
}

VOID ToasterEvtI oWrite (WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
{
UNREFERENCED_PARAMETER(Queue);
UNREFERENCED_PARAMETER(Length);

PAGED_CODE();

hDevice = WdfIoQueueGetDevice(Queue);
ToasterForwardRequest(hDevice, Request);
}

VOID ToasterEvtIoRead (WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
{
UNREFERENCED_PARAMETER(Queue);
UNREFERENCED_PARAMETER(Length);

PAGED_CODE();

hDevice = WdfIoQueueGetDevice(Queue);
ToasterForwardRequest(hDevice, Request);
}

Thanks,
Marshall


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer