I apologize for yet another post, hopefully this will be my last. I have spent few hours and can’t figure out why I cannot install my driver using my INF file.
The error message I receive:
“The specified location does not contain information about your hardware”
I use the Add Hardware Wizzard, and I specify ‘Have a Disk’ and pick the vjoy.inf file manually.
This is a virtual device driver, there’s no physcial device attached. I know I could try devcon but I want to be able to use the WinXP Add Hardware wizzard unless that’s not possible … ??
FYI:
By looking at the examples, the drivers have .rc file - for my driver I did not create.rc file, but do I really need that file? Is that what is causing the error?
Details:
- HID Class miniport Virtual Joystick Driver (check build, compiled for WinXP 32-bit)
- Target machine VM WinXP x86
- Driver, and related files copied to target machine on desktop (vjoy.inf, hidkmdf.sys, vjoy.sys, WdfCoInstaller01009_chk.dll)
- Vendor ID, Product ID do match between the descriptor and the INF file:
They are defined in the header as:
#define VENDOR_ID 0x1234
#define PRODUCT_ID 0xABCD
#define VERSION_NO 0x0001
Here’s my inf file (based on hidusbfx2\sys):
[Version]
Signature=“$CHICAGO$”
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%VENDOR%
LayoutFile=layout.inf
DriverVer=07/05/2011,6.1.7600.16385
CatalogFile=kmdfsamples.cat
[SourceDisksFiles]
vjoy.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]
%vjoy% = vjoy.Inst, HID\VID_1234&PID_ABCD&REV_0001
; For XP and later
[Vendor.NTx86]
%vjoy% = vjoy.Inst,HID\VID_1234&PID_ABCD&REV_0001
; For Win7 and later so that we can use inbox HID-KMDF mapper
[Vendor.NTx86.6.1]
%vjoy% = vjoy.Inst.Win7, HID\VID_1234&PID_ABCD&REV_0001
;===============================================================
; vjoy for Win2K thru Vista
;===============================================================
[vjoy.Inst.NT]
CopyFiles = CopySystemSysFiles, CopyFunctionDriver, CopyFilterDriver, CopyFilesDLL
[vjoy.Inst.NT.HW]
AddReg = vjoy_Parameters.AddReg
;
; hidkmdf is the function driver and vjoy is the lower filter
;
[vjoy.Inst.NT.Services]
AddService = hidkmdf,hidkmdf_Service_Inst,
AddService = vjoy,0x00000002, vjoy_Service_Inst
[CopyFunctionDriver]
hidkmdf.sys
[vjoy_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
;===============================================================
; vjoy for Win7
; Instead of using hidkmdf.sys as a filter, use the inbox
; mshidkmdf.sys as a mapper filter
;===============================================================
[vjoy.Inst.Win7.NT]
; Just copy the driver. No neeed to copy other system binaries.
CopyFiles = CopyFunctionDriver
[vjoy.Inst.Win7.NT.HW]
AddReg = vjoy_Win7_Parameters.AddReg
;
; hidkmdf is the function driver and vjoy is the lower filter
;
[vjoy.Inst.Win7.NT.Services]
AddService = vjoy,0x00000002, vjoy_Service_Inst
[vjoy_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]
vjoy.sys
[CopyFilesDLL]
Hid.dll,0x00000010 ;COPYFLG_NO_OVERWRITE (for win2k)
[vjoy_Service_Inst]
DisplayName = %vjoy%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_IGNORE%
ServiceBinary = %12%\vjoy.sys
;================================================================
;— WDF Coinstaller installation ------
;
[DestinationDirs]
vjoy.Inst_CoInstaller_CopyFiles = 11
[vjoy.Inst.NT.CoInstallers]
AddReg=vjoy.Inst_CoInstaller_AddReg
CopyFiles=vjoy.Inst_CoInstaller_CopyFiles
[vjoy.Inst_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009_chk.dll,WdfCoInstaller”
[vjoy.Inst_CoInstaller_CopyFiles]
WdfCoInstaller01009_chk.dll,0x00000010 ;COPYFLG_NO_OVERWRITE (for win2k)
[SourceDisksFiles]
WdfCoInstaller01009_chk.dll=99 ; make sure the number matches with SourceDisksNames
[vjoy.Inst.NT.Wdf]
KmdfService = vjoy, vjoy_wdfsect
[vjoy_wdfsect]
KmdfLibraryVersion = 1.9
[Strings]
; *******Localizable Strings*******
VENDOR = “HTML Splash”
vjoy = “Virtual Joystick Device”
DISK_NAME = “Virtual Joystick Device 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