新手学驱动编程win7加载 WDM驱动失败
教材:Windows驱动开发技术详解代码:用的书上的代码
驱动:WDM
INF:INF文件是在附加里面拷贝下来的(具体见下面)
////////////////////////////////////////////////// INF文件内容 ////////////////////////////////////////////////////////
;; The Win2K DDK documentation contains an excellent INF reference.
;--------- Version Section ---------------------------------------------------
Signature="$CHICAGO$"
Provider=Zhangfan_Device
DriverVer=11/1/2007,3.0.0.3
; 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}
;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
; These sections identify source disks and files for installation. They are
; shown here as an example, but commented out.
1 = "HelloWDM",Disk1,,
HelloWDM.sys = 1,MyDriver_Check,
;--------- ClassInstall/ClassInstall32 Section -------------------------------
; Not necessary if using a standard class
; 9X Style
Addreg=Class_AddReg
; NT Style
Addreg=Class_AddReg
HKR,,,,%DeviceClassName%
HKR,,Icon,,"-5"
;--------- DestinationDirs Section -------------------------------------------
YouMark_Files_Driver = 10,System32\Drivers
;--------- Manufacturer and Models Sections ----------------------------------
%MfgName%=Mfg0
; PCI hardware Ids use the form
; PCI\VEN_aaaa&DEV_bbbb&SUBSYS_cccccccc&REV_dd
;改成你自己的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
CopyFiles=YouMark_Files_Driver
AddReg=YouMark_9X_AddReg
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,HelloWDM.sys
HKR, "Parameters", "BreakOnEntry", 0x00010001, 0
; --------- Windows NT -----------------
CopyFiles=YouMark_Files_Driver
AddReg=YouMark_NT_AddReg
Addservice = HelloWDM, 0x00000002, YouMark_AddService
DisplayName = %SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\HelloWDM.sys
HKLM, "System\CurrentControlSet\Services\HelloWDM\Parameters",\
"BreakOnEntry", 0x00010001, 0
; --------- Files (common) -------------
HelloWDM.sys
;--------- Strings Section ---------------------------------------------------
ProviderName="Zhangfan."
MfgName="Zhangfan Soft"
DeviceDesc="Hello World WDM!"
DeviceClassName="Zhangfan_Device"
SvcDesc="Zhangfan"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
请教大神指点。。。。QQ 495939792。 有偿
看字面意思是“找不到驱动文件”,就是说你可能没把文件的位置放对。最好去问问这个教材的作者。
页:
[1]