------------------inf文件找不到指定的驱动问题,哭求大神打救----------------
开发环境VS2012 + WDK8(创建空的WDM项目,win7 64位debug编译),win7 64位系统,inf文件如下:
;--------- Version Section ---------------------------------------------------
[Version]
Signature="$CHICAGO$";
Provider=Zhangfan_Device
DriverVer=10/04/2013,19.8.17.864
; If device fits one of the standard classes, use the name and GUID here,
; otherwise create your own device class and GUID as this example shows.
Class=ZhangfanDevice
ClassGUID={EF2962F0-0D55-4bff-B8AA-2221EE8A79B0}
CatalogFile=C7151587.CAT
;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
; These sections identify source disks and files for installation. They are
; shown here as an example, but commented out.
[SourceDisksNames]
1 = "HelloWDM",Disk1,,
[SourceDisksFiles]
HelloWDM.sys = 1,HelloWDM,
;--------- ClassInstall/ClassInstall32 Section -------------------------------
; Not necessary if using a standard class
; 9X Style
[ClassInstall]
Addreg=Class_AddReg
; NT Style
[ClassInstall32]
Addreg=Class_AddReg
[Class_AddReg]
HKR,,,,%DeviceClassName%
HKR,,Icon,,"-5"
;--------- DestinationDirs Section -------------------------------------------
[DestinationDirs]
YouMark_Files_Driver = 10,SysWOW64\Drivers
;--------- Manufacturer and Models Sections ----------------------------------
[Manufacturer]
%MfgName%=Mfg0, NTamd64.6.1, NTamd64.6.0
[Mfg0]
; PCI hardware Ids use the form
; PCI\VEN_aaaa&DEV_bbbb&SUBSYS_cccccccc&REV_dd PCI\VEN_9999&DEV_9999
;改成你自己的ID
%DeviceDesc%=YouMark_DDI, PCI\VEN_9999&DEV_9999
;---------- DDInstall Sections -----------------------------------------------
; --------- Windows 9X -----------------
; Experimentation has shown that DDInstall root names greater than 19 characters
; cause problems in Windows 98
[YouMark_DDI]
CopyFiles=YouMark_Files_Driver
AddReg=YouMark_9X_AddReg
[YouMark_9X_AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,HelloWDM.sys
HKR, "Parameters", "BreakOnEntry", 0x00010001, 0
; --------- Windows NT -----------------
[YouMark_DDI.NT]
CopyFiles=YouMark_Files_Driver
AddReg=YouMark_NT_AddReg
[YouMark_DDI.NT.Services]
Addservice = HelloWDM, 0x00000002, YouMark_AddService
[YouMark_AddService]
DisplayName = %SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\SysWOW64\drivers\HelloWDM.sys
[YouMark_NT_AddReg]
HKLM, "System\CurrentControlSet\Services\HelloWDM\Parameters",\
"BreakOnEntry", 0x00010001, 0
; --------- Files (common) -------------
[YouMark_Files_Driver]
HelloWDM.sys
;--------- Strings Section ---------------------------------------------------
[Strings]
ProviderName="Zhangfan."
MfgName="Zhangfan Soft"
DeviceDesc="Hello World WDM!"
DeviceClassName="Zhangfan_Device"
SvcDesc="Zhangfan"
这个文件参照的是 windows驱动编程技术详解 哩的inf文件,跟sys文件放于C盘(卷标Disk1)一个HelloWDM的一个文件夹下,如图:
用EzDriverInstaller加载inf时,hardware中为空白:
用添加硬件的方法安装,出现提示:
在VS下编译都通过的,项目结构如下:
编译提示消息:
但是安装就出现了以上的问题,应该不是sys文件出了问题?应该是inf文件没有明确到sys文件所在的位置吧?网上找了很多关于inf文件的介绍,未能找到原因,小弟跪求各位大神帮忙!!!!!!!!!!!!!!!!
kernel 硬件 vs2012 EzDriverInstaller inf
[解决办法]
你的INF文件是WDM架构驱动程序的INF文件格式,而不是WDK架构下的INF文件格式;
建议你在WDK的例子目录下找个修改一下。
WDK里面附带一个工具Chkinf, 用来检查INF文件格式是否规范。
[解决办法]
你的inf,sys,cat是配套过了微软的认证的么?没有的话,在64位下必须禁用“强制驱动签名”才可以成功安装的;
[解决办法]
重启计算机,F8禁用启动签名,就可以了。64位驱动不签名无法加载