⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 computer00usb.inf

📁 usb自定义设备编程
💻 INF
字号:
;
; File Name: Computer00Usb.inf
; Install information file for Computer00Usb Driver
;
; Generated by C DriverWizard 3.2.0 (Build 2485)
; Requires DDK Only
; File created on 8/22/2008
;

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

[Version]
Signature="$WINDOWS NT$"
;设备的类名,将出现在设备管理器中
Class=Computer00Usb
;安装类GUID,注意同接口GUID区分开来。
;可以在注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class下找到它
ClassGUID={4731A720-D55A-4583-84F9-29144E14D709}
;驱动的供应商,由下面的字符串Provider决定
Provider=%Provider%
;驱动的日期和版本
DriverVer=8/22/2008,1.00.0000
CatalogFile=Computer00Usb.cat

[ControlFlags]
; Pnp drivers should not be installable via non-PnP hardware dialogs
ExcludeFromSelect = *

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

; Not necessary if using a standard class

; 9X Style
[ClassInstall]
Addreg=Computer00UsbClassAddReg

; NT Style
[ClassInstall32]
Addreg=Computer00UsbClassAddReg

;增加注册表项
[Computer00UsbClassAddReg]
;reg-root,[subkey],[value-entry-name],[flags],[value]
HKR,,,%REG_SZ%,%DeviceClassName%
;设置设备类的图标,这里改成USB的图标,为-20
;HKR,,Icon,,"-18" ;原来的图标为-18,是黄色的问号
HKR,,Icon,,"-20"
HKR,,DeviceCharacteristics,%REG_DWORD%,0x100                    ; FILE_DEVICE_SECURE_OPEN
HKR,,Security,,"D:P(A;;GR;;;WD)(A;;GA;;;SY)(A;;GA;;;BA)"        ; generic read - everybody
                                                                ; generic all access - system and admin

;--------- DestinationDirs Section -------------------------------------------
;复制驱动文件的目标地址
[DestinationDirs]
DefaultDestDir = 10
Computer00Usb_Files_Driver = 12


;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
; These sections identify source disks and files for installation.

[SourceDisksNames]
1 = %DiskId1%,,,""

;这个就是我们的生成的驱动文件了
[SourceDisksFiles]
Computer00Usb.sys  = 1,,


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

[Manufacturer]
%MfgName% = Computer00Usb_Mfg

[Computer00Usb_Mfg]
; DisplayName               Section           DeviceId
%Computer00Usb_DeviceDesc%=Computer00Usb_DDI, USB\VID_8888&PID_000B

;---------- DDInstall Sections -----------------------------------------------
; --------- Windows 98 -----------------

; Experimentation has shown that DDInstall root names greater than 19 characters
; cause problems in Windows 98

[Computer00Usb_DDI]
CopyFiles=Computer00Usb_Files_Driver
AddReg=Computer00Usb_9X_AddReg

[Computer00Usb_9X_AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,Computer00Usb.sys
HKR,,Description,,%Computer00Usb_DeviceDesc%

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

[Computer00Usb_DDI.NT]
CopyFiles=Computer00Usb_Files_Driver
AddReg=Computer00Usb_NT_AddReg

[Computer00Usb_DDI.NT.Services]
Addservice = Computer00Usb, %FLG_ADDREG_NOCLOBBER%, Computer00Usb_Service

; --------- Registry ----------------------
;这里就是用户指定的增加注册表内容
[Computer00Usb_NT_AddReg]
;reg-root,[subkey],[value-entry-name],[flags],[value]
;我们增加了一个子键MyUsbDevice,并在其下增加了一个DeviceName的表项
HKR,MyUsbDevice,DeviceName,%REG_SZ%,"Computer00'Usb Device"

; --------- Service ----------------------

[Computer00Usb_Service]
DisplayName    = %Computer00Usb_SvcDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\Computer00Usb.sys
LoadOrderGroup = Extended Base

; --------- Files ----------------------

[Computer00Usb_Files_Driver]
Computer00Usb.sys,,,2

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

[Strings]
Provider = "Http://computer00.21ic.org"
MfgName = "Http://computer00.21ic.org"
Computer00Usb_DeviceDesc = "Computer00Usb Device"
DeviceClassName="Class for Computer00Usb devices"
Computer00Usb_SvcDesc = "Driver for Computer00Usb Device"
DiskId1 = "Computer00Usb Device Installation Disk #1"

REG_SZ                      = 0x00000000
REG_MULTI_SZ                = 0x00010000
REG_EXPAND_SZ               = 0x00020000
REG_BINARY                  = 0x00000001
REG_DWORD                   = 0x00010001
REG_NONE                    = 0x00020001

SERVICE_KERNEL_DRIVER       = 0x00000001
SERVICE_FILE_SYSTEM_DRIVER  = 0x00000002
SERVICE_ADAPTER             = 0x00000004
SERVICE_RECOGNIZER_DRIVER   = 0x00000008

SERVICE_BOOT_START          = 0x0
SERVICE_SYSTEM_START        = 0x1
SERVICE_AUTO_START          = 0x2
SERVICE_DEMAND_START        = 0x3
SERVICE_DISABLED            = 0x4

SERVICE_ERROR_IGNORE        = 0x00000000
SERVICE_ERROR_NORMAL        = 0x00000001
SERVICE_ERROR_SEVERE        = 0x00000002
SERVICE_ERROR_CRITICAL      = 0x00000003

FLG_ADDREG_NOCLOBBER        = 0x00000002
FLG_ADDREG_DELVAL           = 0x00000004
FLG_ADDREG_APPEND           = 0x00000008
FLG_ADDREG_KEYONLY          = 0x00000010
FLG_ADDREG_OVERWRITEONLY    = 0x00000020
FLG_ADDREG_64BITKEY         = 0x00001000
FLG_ADDREG_KEYONLY_COMMON   = 0x00002000
FLG_ADDREG_32BITKEY         = 0x00004000

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -