inf创建与修改须知

来源:百度文库 编辑:神马文学网 时间:2024/04/28 16:43:02

inf添加新类硬件需要修改项(充分非必要条件)

 

1。类别项(Class)

 

2。硬件厂商(Manufacturer)

 

3。硬件设备号

 

4。各字符串项(ProviderName,MfgName,DeviceDesc,DeviceClassName,SvcDesc)

 

5。在[YouMark_DDI.Services]项中改为现有文件名

 

6。硬件厂商节中后续各项均不要有NT节

 

;--------- Version Section ---------------------------------------------------

 

[Version]

Signature="$CHICAGO$";

Provider=zenghui41

DriverVer=12/31/2010,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=zenghui41_01

ClassGUID={B526F264-9C58-445a-9358-4529C1579B8E}

 

 

;--------- SourceDiskNames and SourceDiskFiles Section -----------------------

 

; These sections identify source disks and files for installation. They are

; shown here as an example, but commented out.

 

[SourceDisksNames]

0 = "SCUT"

 

[SourceDisksFiles]

HelloWDM.sys = 0,\Windows驱动开发技术详解[1]\Windows驱动开发技术详解\chapter15\Test5\NT_Driver\MyDriver_Check,

 

;--------- ClassInstall/ClassInstall32 Section -------------------------------

 

; Not necessary if using a standard class

 

; NT Style

[ClassInstall32]

Addreg=Class_AddReg

 

[Class_AddReg]

HKR,,,,%DeviceClassName%

HKR,,Icon,,"-5"

 

;--------- DestinationDirs Section -------------------------------------------

 

[DestinationDirs]

YouMark_Files_Driver = 12

 

;--------- Manufacturer and Models Sections ----------------------------------

 

[Manufacturer]

%MfgName%=Mfg4110

 

[Mfg4110]

 

; PCI hardware Ids use the form

; PCI\VEN_aaaa&DEV_bbbb&SUBSYS_cccccccc&REV_dd

;改成你自己的ID

%DeviceDesc%=YouMark_DDI, PCI\VEN_4444&DEV_4444

 

;---------- DDInstall Sections -----------------------------------------------

 

[YouMark_DDI]

CopyFiles=YouMark_Files_Driver

; --------- Windows NT -----------------

 

 

 

[YouMark_DDI.Services]

Addservice = HelloDDK, 0x00000002, YouMark_AddService

 

[YouMark_AddService]

DisplayName = %SvcDesc%

ServiceType = 1 ; SERVICE_KERNEL_DRIVER

StartType = 3 ; SERVICE_DEMAND_START

ErrorControl = 1 ; SERVICE_ERROR_NORMAL

ServiceBinary = %10%\System32\Drivers\HelloDDK.sys

 

 

 

; --------- Files (common) -------------

 

[YouMark_Files_Driver]

HelloDDK.sys

 

;--------- Strings Section ---------------------------------------------------

 

[Strings]

ProviderName="zenghui_01"

MfgName="zenghui_01"

DeviceDesc="Hello World DDK_01!"

DeviceClassName="zenghui_Device_01"

SvcDesc="zenghui_01"