是必需的,x、y、z是可选的,w、x、y、z都是大于等于0小于65535的整数。从Windows 2000开始,INF文件在Version section中必须包含DriverVer,为整个INF指定版本信息,DDInstall sections也可以包含DriverVer,且比前者更明确,优先级更高。
(5)DriverPackageDisplayName指定驱动显示的名称,%driver-package-description%在Strings section中定义。
(6)DriverPackageType指定驱动的类型。
2.设备ID、操作系统、硬件平台、驱动特征的提取
(1)从Manufacturer section中提取所有的Models section name。
[Manufacturer]
manufacturer-identifier
[manufacturer-identifier]
[manufacturer-identifier]
...
manufacturer-identifier格式如下:
manufacturer-name |
%strkey%=models-section-name |
%strkey%=models-section-name [,TargetOSVersion] [,TargetOSVersion] ... (Windows XP and later versions of Windows)
提取manufacturer-name或models-section-name作为Models section name。
(2)TargetOSVersion提取规则
nt[Architecture][.[OSMajorVersion][.[OSMinorVersion][.[ProductType][.SuiteMask]]]]
nt 指定操作系统是基于NT的,Windows 2000及以后的版本都是基于NT的。
Architecture 指定硬件平台,若指定,必须为x86, ia64, or amd64。Windows Server 2003 SP1以前的版本,若Architecture未指定,Model section可用于任何硬件平台;Windows Server 2003 SP1及以后的版本,非x86的操作系统必须指定Architecture,x86的操作系统是可选的。
OSMinorVersion 操作系统的主版本号。
Windows version |
Major version |
Windows 8 |
6 |
Windows Server 2008 R2 |
6 |
Windows 7 |
6 |
Windows Server 2008 |
6 |
Windows Vista |
6 |
Windows Server 2003 R2 |
5 |
Windows Server 2003 |
5 |
Windows XP |
5 |
Windows 2000 |
5 |
OSMinorVersion 操作系统的子版本号。
Windows version |
Minor version |
Windows 8 |
2 |
Windows Server 2008 R2 |
1 |
Windows 7 |
1 |
Windows Server 2008 |
0 |
Windows Vista |
0 |
Windows Server 2003 R2 |
2 |
Windows Server 2003 |
2 |
Windows XP |
1 |
Windows 2000 |
0 |
ProductType 在Winnt.h文件中定义的VER_NT_xxxx,若指定,操作系统的ProductType必须与之匹配。
SuiteMask 在Winnt.h文件中定义的VER_SUITE_xxxx,若指定,操作系统的SuiteMask必须与之匹配。
TargetOSVersion的提取规则如下:
1)TargetOSVersion若指定,必须以nt开头
2)TargetOSVersion的Architecture若指定,则为指定的硬件平台;若未指定,对于Windows Server 2003 SP1以前的版本的操作系统,为任何硬件平台,对于Windows Server 2003 SP1及以后版本的操作系统,为x86硬件平台。
3)TargetOSVersion的OSMajorVersion[.OSMinorVersion]指定该section适用的操作系统的最低版本;若OSMajorVersion指定而OSMinorVersion未指定,则OSMinorVersion为0;若OSMajorVersion和OSMinorVersion都未指定,则为Windows 2000及以后所有版本。
(3)从Model section中提取操作系统版本,硬件平台,设备ID,设备描述,DDInstall section name
[models-section-name] |
[models-section-name.TargetOSVersion] (Windows XP and later versions of Windows)
device-description=install-section-name[,hw-id][,compatible-id...]
[device-description=install-section-name[,hw-id][,compatible-id]...] ...
一个models-section-name可能有多个Models section,带有不同的TargetOSVersion,每一个Models section的操作系统版本和硬件平台需要结合所有同名(名称为models-section-name. [TargetOSVersion])section确定,规则如下:
1)按TargetOSVersion的提取规则获取每个section的操作系统版本区间和硬件平台。
2)对于任何一个section,在同一个硬件平台下,如果任何两个同名section的版本区间存在交集,则以起始版本高的区间为准,从起始版本低的区间中移去交集。
从Model section的每一行提取一个指定的设备,device-description为设备描述,hw-id为hardware ID, compatible-id为compatible ID,install-section-name为该设备对应的DDInstall section name。
(3)从DDInstall section name提取对应某一设备的驱动特征和驱动版本。
[install-section-name] |
[install-section-name.nt] |
[install-section-name.ntx86] |
[install-section-name.ntia64] | (Windows XP and later versions of Windows)
[install-section-name.ntamd64] (Windows XP and later versions of Windows)