You should not be copying hid.dll at all.
It is copying hidkmdf because of these lines
[SourceDisksFiles]
hidusbfx2.sys = 99
hidkmdf.sys = 99
CopyFiles = CopySystemSysFiles, CopyFunctionDriver, CopyFilterDriver, CopyFilesDLL
[CopyFunctionDriver]
hidkmdf.sys
on the other hand, you are not installing hidkmdf as the upper filer, you are using the in box driver
HKR,“UpperFilters”,0x00010000,“mshidkmdf”
So either change the “UpperFilters” to hidkmdf or remove all other references to hidkmdf from the copy file sections
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Wednesday, June 13, 2012 1:48 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] question about vhidmini
Hi Doron,
i have modified hidusbfx2 sample into a keyboard miniport. However i cannot install it in win7 x32 system.
install command: devcon install hidusbfx2 {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
Here is my inf, which is the same as that in WDK except for hardware id:
[Version]
Signature=“$CHICAGO$”
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%VENDOR%
LayoutFile=layout.inf
DriverVer=06/13/2012,6.1.7600.16385
CatalogFile=kmdfsamples.cat
;
; Layout.inf (etc.) list all files shipped with the operating system so the
; source description sections are only needed if other files are needed.
;
; In order to use IHV drivers, the SourceDisksNames section must list the
; disk(s) containing the drivers and the SourceDisksFiles section must list
; which disk number each file to be copied is found on.
; Disk number 99 is used to avoid a conflict with the disk numbers defined
; in layout.inf
;
; Files used in a driver installation need to be digitally signed otherwise
; installation may fail. See documentation elsewhere in the DDK regarding
; driver signing.
[SourceDisksFiles]
hidusbfx2.sys = 99
hidkmdf.sys = 99
[SourceDisksNames]
99 = %DISK_NAME%,“”
[DestinationDirs]
CopySystemSysFiles = 12
CopyFunctionDriver = 12
CopyFilterDriver = 12
CopyFilesDLL = 11
[Manufacturer]
%VENDOR%=Vendor, NTx86, NTx86.6.1
; For Win2K
[Vendor]
%hidusbfx2% = hidusbfx2.Inst, {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%customCollection% = customCollection.Inst, HID\MyVirtualHidDevice
; For XP and later
[Vendor.NTx86]
%hidusbfx2% = hidusbfx2.Inst, {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%customCollection% = customCollection.Inst, HID\MyVirtualHidDevice
; For Win7 and later so that we can use inbox HID-KMDF mapper [Vendor.NTx86.6.1]
%hidusbfx2% = hidusbfx2.Inst.Win7, {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%customCollection% = customCollection.Inst, HID\MyVirtualHidDevice
;===============================================================
; hidusbfx2 for Win2K thru Vista
;===============================================================
[hidusbfx2.Inst.NT]
CopyFiles = CopySystemSysFiles, CopyFunctionDriver, CopyFilterDriver, CopyFilesDLL
[hidusbfx2.Inst.NT.HW]
AddReg = hidusbfx2_Parameters.AddReg
;
; hidkmdf is the function driver and hidusbfx2 is the lower filter ; [hidusbfx2.Inst.NT.Services] AddService = hidkmdf,hidkmdf_Service_Inst, AddService = hidusbfx2,0x00000002, hidusbfx2_Service_Inst
[CopyFunctionDriver]
hidkmdf.sys
[hidusbfx2_Parameters.AddReg]
HKR,“UpperFilters”,0x00010000,“hidkmdf”
[hidkmdf_Service_Inst]
DisplayName = %hidkmdf.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\hidkmdf.sys
LoadOrderGroup = PNP Filter
;===============================================================
; hidusbfx2 for Win7
; Instead of using hidkmdf.sys as a filter, use the inbox
; mshidkmdf.sys as a mapper filter
;===============================================================
[hidusbfx2.Inst.Win7.NT]
; Just copy the driver. No neeed to copy other system binaries.
CopyFiles = CopyFunctionDriver
[hidusbfx2.Inst.Win7.NT.HW]
AddReg = hidusbfx2_Win7_Parameters.AddReg
;
; hidkmdf is the function driver and hidusbfx2 is the lower filter ; [hidusbfx2.Inst.Win7.NT.Services] AddService = hidusbfx2,0x00000002, hidusbfx2_Service_Inst
[hidusbfx2_Win7_Parameters.AddReg]
HKR,“UpperFilters”,0x00010000,“mshidkmdf”
;===============================================================
; Sections common to all OS versions
;===============================================================
[CopySystemSysFiles]
HidClass.sys,0x00000010 ;COPYFLG_NO_OVERWRITE (for win2k)
HidParse.sys,0x00000010 ;COPYFLG_NO_OVERWRITE (for win2k)
[CopyFunctionDriver]
hidusbfx2.sys
[CopyFilesDLL]
Hid.dll,0x00000010 ;COPYFLG_NO_OVERWRITE (for win2k)
[hidusbfx2_Service_Inst]
DisplayName = %hidusbfx2%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_IGNORE%
ServiceBinary = %12%\hidusbfx2.sys
;===============================================================
; Custom Collection install section
; - Only a Null service is installed.
;===============================================================
[customCollection.Inst.NT]
; NULL section
[customCollection.Inst.NT.HW]
AddReg = customCollection.Inst.AddReg.NT.HW
[customCollection.Inst.AddReg.NT.HW]
HKR,“SelectiveSuspendEnabled”,0x00000001,0x1
[customCollection.Inst.NT.Services]
AddService = ,0x00000002, ; NULL Service
;================================================================
;— WDF Coinstaller installation ------ ; [DestinationDirs] hidusbfx2.Inst_CoInstaller_CopyFiles = 11
[hidusbfx2.Inst.NT.CoInstallers]
AddReg=hidusbfx2.Inst_CoInstaller_AddReg
CopyFiles=hidusbfx2.Inst_CoInstaller_CopyFiles
[hidusbfx2.Inst_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
[hidusbfx2.Inst_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll,0x00000010 ;COPYFLG_NO_OVERWRITE (for win2k)
[SourceDisksFiles]
WdfCoInstaller01009.dll=99 ; make sure the number matches with SourceDisksNames
[hidusbfx2.Inst.NT.Wdf]
KmdfService = hidusbfx2, hidusbfx2_wdfsect [hidusbfx2_wdfsect] KmdfLibraryVersion = 1.9
[Strings]
; *******Localizable Strings*******
VENDOR = “Vendor Name”
hidusbfx2 = “KMDF HID Minidriver for OSR USB-FX2 Device”
customCollection = “HID Vendor-defined Collection for OSR USB-FX2”
DISK_NAME = “HID USB FX2 Device Sample Install Disk”
hidkmdf.SVCDESC= “Filter Driver Service for HID-KMDF Interface layer”
; *******Non Localizable Strings*******
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 this is setup log:
>> [Device Install (UpdateDriverForPlugAndPlayDevices) -
>> {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE]
>> Section start 2012/06/13 01:36:41.559
cmd: “C:\Users\Administrator\Desktop\sys\objchk_win7_x86\i386\devcon.exe” install hidusbfx2.inf {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
dvi: Set selected driver complete.
dvi: {Build Driver List} 01:36:41.575
dvi: Searching for hardware ID(s):
dvi: {d49f883c-6486-400a-8c22-1a9ef48577e4}\hid_device
cpy: Policy is set to make all digital signatures equal.
dvi: Processing a single INF: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’
inf: Opened INF: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’ ([strings])
sig: {_VERIFY_FILE_SIGNATURE} 01:36:41.590
sig: Key = hidusbfx2.inf
sig: FilePath = c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf
sig: Catalog = c:\users\administrator\desktop\sys\objchk_win7_x86\i386\kmdfsamples.cat
! sig: Verifying file against specific (valid) catalog failed! (0x00000057)
! sig: Error 87: The parameter is incorrect.
sig: {_VERIFY_FILE_SIGNATURE exit(0x00000057)} 01:36:41.606
sig: {_VERIFY_FILE_SIGNATURE} 01:36:41.606
sig: Key = hidusbfx2.inf
sig: FilePath = c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf
sig: Catalog = c:\users\administrator\desktop\sys\objchk_win7_x86\i386\kmdfsamples.cat
! sig: Verifying file against specific Authenticode™ catalog failed! (0x80092003)
! sig: Error 0x80092003: An error occurred while reading or writing to a file.
sig: {_VERIFY_FILE_SIGNATURE exit(0x80092003)} 01:36:41.606
dvi: Created Driver Node:
dvi: HardwareID - {D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
dvi: InfName - c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf
dvi: DevDesc - KMDF HID Minidriver for OSR USB-FX2 Device
dvi: DrvDesc - KMDF HID Minidriver for OSR USB-FX2 Device
dvi: Provider - Vendor Name
dvi: Mfg - Vendor Name
dvi: ModelsSec - Vendor.NTx86.6.1
dvi: InstallSec - hidusbfx2.Inst.Win7
dvi: ActualSec - hidusbfx2.Inst.Win7.NT
dvi: Rank - 0x80ff0000
dvi: Signer - Not digitally signed
dvi: Signer Score - Not digitally signed
dvi: DrvDate - 06/13/2012
dvi: Version - 6.1.7600.16385
dvi: {Build Driver List - exit(0x00000000)} 01:36:41.622
dvi: {DIF_SELECTBESTCOMPATDRV} 01:36:41.622
dvi: No class installer for ‘Human Interface Devices’
dvi: No CoInstallers found
dvi: Default installer: Enter 01:36:41.637
dvi: {Select Best Driver}
dvi: Selected driver installs from section [hidusbfx2.Inst.Win7] in ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’.
dvi: Class GUID of device remains: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.
dvi: Set selected driver complete.
dvi: Selected:
dvi: Description - [KMDF HID Minidriver for OSR USB-FX2 Device]
dvi: InfFile - [c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf]
dvi: Section - [hidusbfx2.Inst.Win7]
dvi: Signer - [Not digitally signed]
dvi: Rank - [0x80ff0000]
dvi: {Select Best Driver - exit(0x00000000)}
dvi: Default installer: Exit
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 01:36:41.637
inf: {SetupCopyOEMInf: c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf} 01:36:41.653
sto: {Import Driver Package: c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf} 01:36:41.653
sto: Importing driver package into Driver Store:
sto: Driver Store = C:\Windows\System32\DriverStore (Online | 6.1.7137)
sto: Driver Package = c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf
sto: Architecture = x86
sto: Locale Name = neutral
sto: Flags = 0x00000000
sto: Copying driver package files to ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}’.
inf: Opened INF: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’ ([strings])
! inf: Could not find include INF file “layout.inf”. Error = 0x00000002
inf: Opened INF: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’ ([strings])
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386’
flq: SourceFilename - ‘WdfCoInstaller01009.dll’
flq: TargetDirectory- ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386’
flq: SourceFilename - ‘hidkmdf.sys’
flq: TargetDirectory- ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386’
flq: SourceFilename - ‘hidusbfx2.inf’
flq: TargetDirectory- ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {FILE_QUEUE_COPY}
flq: CopyStyle - 0x00000000
flq: SourceRootPath - ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386’
flq: SourceFilename - ‘hidusbfx2.sys’
flq: TargetDirectory- ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}’
flq: {FILE_QUEUE_COPY exit(0x00000000)}
flq: {_commit_file_queue}
flq: CommitQ DelNodes=0 RenNodes=0 CopyNodes=4
flq: {_commit_copy_subqueue}
flq: subqueue count=4
flq: source media:
flq: SourcePath - [c:\users\administrator\desktop\sys\objchk_win7_x86\i386]
flq: SourceFile - [WdfCoInstaller01009.dll]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
flq: CopyFile: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\WdfCoInstaller01009.dll’
flq: to: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\SET542C.tmp’
flq: MoveFile: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\SET542C.tmp’
flq: to: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\WdfCoInstaller01009.dll’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’
flq: to: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\SET544C.tmp’
flq: MoveFile: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\SET544C.tmp’
flq: to: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\hidusbfx2.inf’
flq: {_commit_copyfile exit OK}
flq: {_commit_copyfile}
flq: CopyFile: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.sys’
flq: to: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\SET545D.tmp’
flq: MoveFile: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\SET545D.tmp’
flq: to: ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\hidusbfx2.sys’
flq: {_commit_copyfile exit OK}
flq: source media:
flq: SourcePath - [c:\users\administrator\desktop\sys\objchk_win7_x86\i386]
flq: SourceFile - [hidkmdf.sys]
flq: Flags - 0x00000000
flq: {_commit_copyfile}
!!! flq: Error installing file (0x00000002)
!!! flq: Error 2: The system cannot find the file specified.
! flq: SourceFile - ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidkmdf.sys’
! flq: TargetFile - ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\hidkmdf.sys’
flq: {SPFQNOTIFY_COPYERROR}
!!! sto: Failed to copy file ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidkmdf.sys’ to ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}\hidkmdf.sys’. Error = 0x00000002
flq: {SPFQNOTIFY_COPYERROR - returned 0x00000000}
!!! flq: SPFQNOTIFY_COPYERROR: returned SPFQOPERATION_ABORT.
!!! flq: Error 995: The I/O operation has been aborted because of either a thread exit or an application request.
flq: {_commit_copyfile exit(0x000003e3)}
flq: {_commit_copy_subqueue exit(0x000003e3)}
!!! flq: FileQueueCommit aborting!
!!! flq: Error 995: The I/O operation has been aborted because of either a thread exit or an application request.
flq: {_commit_file_queue exit(0x000003e3)}
!!! sto: Failed to copy driver package to ‘C:\Users\ADMINI~2\AppData\Local\Temp{3ef8a2e1-25ef-4a52-8dca-fc0934085148}’. Error = 0x00000002
sto: {Import Driver Package: exit(0x00000002)} 01:36:42.028
inf: Opened INF: ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’ ([strings])
! inf: Add to Driver Store unsuccessful
! inf: Error 2: The system cannot find the file specified.
!!! inf: returning failure to SetupCopyOEMInf
inf: {SetupCopyOEMInf exit (0x00000002)} 01:36:42.122 !!! ndv: Driver Package import failed for new device…installing NULL driver.
!!! ndv: Error 2: The system cannot find the file specified.
dvi: {Plug and Play Service: Device Install for ROOT\HIDCLASS\0004}
ump: Creating Install Process: DrvInst.exe 01:36:42.122
! ndv: Installing NULL driver!
dvi: Set selected driver complete.
dvi: {DIF_ALLOW_INSTALL} 01:36:42.153
dvi: No class installer for ‘Human Interface Devices’
dvi: No CoInstallers found
dvi: Default installer: Enter 01:36:42.153
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 01:36:42.153
dvi: {DIF_INSTALLDEVICE} 01:36:42.153
dvi: No class installer for ‘Human Interface Devices’
dvi: Default installer: Enter 01:36:42.153
! dvi: Installing NULL driver!
! dvi: A NULL driver installation is not allowed for this type of device!
!!! dvi: Cleaning up failed installation (e0000219)
!!! dvi: Default installer: failed!
!!! dvi: Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
dvi: {DIF_INSTALLDEVICE - exit(0xe0000219)} 01:36:42.169
ump: Server install process exited with code 0xe0000219 01:36:42.169
ump: {Plug and Play Service: Device Install exit(e0000219)}
dvi: {Build Driver List} 01:36:42.184
! dvi: Driver list already built
dvi: {Build Driver List - exit(0x00000000)} 01:36:42.184
dvi: {DIF_SELECTBESTCOMPATDRV} 01:36:42.184
dvi: No class installer for ‘KMDF HID Minidriver for OSR USB-FX2 Device’
dvi: Default installer: Enter 01:36:42.184
dvi: {Select Best Driver}
dvi: Selected driver installs from section [hidusbfx2.Inst.Win7] in ‘c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf’.
dvi: Class GUID of device remains: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.
dvi: Set selected driver complete.
dvi: Selected:
dvi: Description - [KMDF HID Minidriver for OSR USB-FX2 Device]
dvi: InfFile - [c:\users\administrator\desktop\sys\objchk_win7_x86\i386\hidusbfx2.inf]
dvi: Section - [hidusbfx2.Inst.Win7]
dvi: Signer - [Not digitally signed]
dvi: Rank - [0x80ff0000]
dvi: {Select Best Driver - exit(0x00000000)}
dvi: Default installer: Exit
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 01:36:42.200
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 01:36:42.200
dvi: No class installer for ‘KMDF HID Minidriver for OSR USB-FX2 Device’
dvi: Default installer: Enter 01:36:42.200
dvi: Default installer: Exit
dvi: {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 01:36:42.200 <<< Section end 2012/06/13 01:36:42.215 <<< [Exit status: SUCCESS]
I wonder why it is trying to copy hidkmdf.sys in win7? i think it should use mshidkmdf instead.
Regards
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