Device Driver inf guidelines for Windows xp june 30, 2006 archive



Download 107.39 Kb.
Page1/5
Date31.07.2017
Size107.39 Kb.
#25735
  1   2   3   4   5



Device Driver INF Guidelines for Windows XP

June 30, 2006  - ARCHIVE



Abstract

This paper collects articles about creation and management of INF files for device driver installation for the Microsoft® Windows® XP and Microsoft Windows Server® 2003 family of operating systems. This paper provides an archive of information published in 2001–2003 and has not been updated or corrected.

For current information for Microsoft Windows Vista™ and later versions of Windows operating systems, refer to the Windows Driver Kit.

The current version of this paper is maintained on the Web at:


http://www.microsoft.com/whdc/driver/install/XPinfguide.mspx

Contents

ChkINF Enhancements for Windows XP 3

Introduction to INF File Syntax Checker 3

ChkINF Enhancements 3

Device Class-Specific Modules for ChkINF 4

ChkINF Support for Include and Needs Directives 6

Running the ChkINF Tool 6

ChkINF Output 7

ChkINF Limitations 7

ChkINF and the Windows Logo Program 7

Resources for ChkINF 7

INF Platform Extension for 64-bit Versions of Windows XP 8

Introduction to INF Platform Extensions 8

Using the .ntia64 Platform Extension 8

Backward Compatibility 9

Resources for INF Files for 64-bit Windows XP 9

Operating-System Versioning for Drivers under Windows XP 9

Background for Operating-System Versioning 10

Windows XP Changes to the INF [Manufacturer] Section 10

About the [Manufacturer] Section 11

About the TargetOSVersion 11

About the [Models] Sections 12

Using Operating System-Versioning Decorations 12

Excluding a Specific Operating System Version 12

Selecting the Most Appropriate TargetOSVersion 12

Windows XP Driver Ranking and Operating System-Version Decorations 13

Examples of Decorated [Models] Sections 14

Example 1: 15

Example 2: 15

Resources for Driver Versioning 15

Multifunction Device Installation and Windows XP 16

Background for Multifunction Device Installation 16

INF CopyINF Directive 16

Copying INFs 17

Sample Co installer for Copying INF Files 18

Resources for Multifunction Devices 18



Disclaimer
This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.
The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.
This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred.
© 2001–2006 Microsoft Corporation. All rights reserved.
Microsoft, MS-DOS, Win32, Windows, Windows NT, Windows Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

ChkINF Enhancements for Windows XP


For Microsoft® Windows® XP, the ChkINF tool has been enhanced to support additional device classes and to handle new platform extensions, INF sections, and directives. This article describes these capabilities.

This article was previously published at this URL: http://www.microsoft.com/whdc/driver/install/ChkINF-XP.mspx


Introduction to INF File Syntax Checker


ChkINF is a Perl script that checks the structure and syntax of Windows 2000 and Windows XP device driver INF files. Results are presented in HTML format and include a list of the errors and warnings detected in each INF file, with each error and warning shown next to the errant INF file entry.

This article describes the capabilities of ChkINF, emphasizing enhancements provided under Windows XP. ChkINF is provided in the Windows DDK.


ChkINF Enhancements


For Windows XP, ChkINF provides new support, including:

  • Handling new INF sections and directives related to new Windows XP features, including:

  • ChkINF support for specific directives, as summarized later in this section.

  • New platform extension for Intel-Itanium-based system: .ntIA64.

  • Operating-system versioning for drivers through decorated [Models] sections.

  • Multifunction device installation improvements through the new CopyINF directive.

  • Complete information for these changes is provided in the Windows DDK and in the following sections:
    Multifunction Device Installation and Windows XP
    Operating-System Versioning for Drivers under Windows XP
    INF Platform Extension for 64-bit Versions of Windows XP

  • Providing device class-specific support for all device classes except Printers, as listed in the following table. Highlighted device classes indicate the classes for which device class-specific support was provided under Windows 2000.

Device Classes Supported in ChkINF under Windows XP

Device

Class




Device

Class

1394 Host Bus Controllers

1394




Monitors

Monitor

Battery Devices

Battery




Multifunction Devices

Multifunction

CD-ROM Drivers

CDROM




Multimedia

Media

Disk Drives

DiskDrive




Multi-port Serial Adapters

MultiportSerial

Display Adapters

Display




Network Adapters

Net

Dot4 Devices

Dot4




Network Clients

NetClient

Floppy Disk Controllers

FDC




Network Service

NetService

Floppy Disk Drives

FloppyDisk




Network Transport

NetTrans

Hard Disk Controllers

HDC




PCMCIA Adapters

PCMCIA

Human Input Devices

HIDClass




Ports - COM & LPT ports

Ports

Imaging Devices

Image




SCSI and RAID Controllers

SCSIAdapter

IrDA Devices

Infrared




Smart Card Readers

SmartCardReader

Keyboards

Keyboard




Storage Volumes

Volume

Medium Changers

MediumChanger




System Devices

System

Memory Technology Drivers

MTD




Tape Drives

TapeDrive

Mice

Mouse




USB

USB

Modems

Modem









Filesystem filter modules are also supported in ChkINF for the following classes:


ActivityMonitor, AntiVirus, CFSMetaDataServer, Compression, ContentScreener, ContinuousBackup, CopyProtection, Encryption, FSFilterSystem, HSM, Infrastructure, OpenFileBackup, QuotaManagement, Replication, SecurityEnhancer, Undelete.

ChkINF does not check device-specific INF extensions for Printer INF files (class = Printer). See the discussion on printers in the Device Classes with INF Extensions later in this paper.



Note: ChkINF does not support Windows 98 or Windows Millennium Edition (Windows Me) INF files.

Device Class-Specific Modules for ChkINF


ChkINF handles device class-specific modules as follows:

  1. Examines the [Version] section (specifically the ClassGUID value) and determines the device setup class.

  2. If a class-specific module for that device class exists, loads it to handle device class-specific sections and directives.

Otherwise, the generic module is loaded.

The generic module, first provided with the Windows 2000 version of ChkINF, has no knowledge of device class-specific information in the INF file. Therefore, it logs more generic error messages, such as Warning Error 2202 Unrecognized directive: %s (may be device class specific).

In the version provided for use with Windows XP, ChkINF includes a basic module for each system-defined device class (except for Printers). These modules do the following:



  • Check usage for new INF extensions and sections defined in Windows XP.

  • Allow ChkINF to provide a specific "unrecognized directive" error for each device class.

The existing generic device-class module will only detect that the directive is not a general directive common across all device classes.
Each basic class-specific module is named "%Class%.pm" and includes class-specific versions of the generic error and warning messages. The generic module has been retained for nonsystem-defined device classes, such as device classes defined by vendors.

Device Classes without INF Extensions The following device classes have no device-specific extensions to the INF definition, but are supported using basic modules:

Battery

CD-ROM


Disk Drivers

Dot4


Floppy Disk Controllers

Floppy Disk Drives



Hard Disk Controllers

HID


IEEE 1394

Memory Technology Drivers

Multifunction

Multi-port Serial Adapters

PCMCIA


Ports

SCSI/RAID

Smart Card Readers

Storage Volumes

System Devices

USB


Device Classes with INF Extensions The following device classes have device class-specific extensions to the INF definition.

Multimedia Multimedia includes the Audio, GamePort, Motion Video, and Video Capture technology areas. Complete information about these extensions is provided in the Windows DDK.

The AddInterface directive for audio adapter interfaces is used to assign a unique reference string to each interface, which the adapter driver can use to distinguish between instances of each interface class.



Keyboard and Mouse The INF extensions for each of these classes are limited to the following extensions, which apply to both the Keyboard and Mouse class installers, except as noted.

  • MigrateToDevnode
    This is intended for legacy (Microsoft Windows NT® 4.0) drivers that are now Plug and Play and power-aware drivers. The format is as follows:

ServiceName = value-name[,value-name] ...

The class installer will open the following key: HKLM\ System\ CurrentControlSet\ Services\ ServiceName\ Parameters

Then the class installer will copy each value-name specified in the list to the device node of the device being installed before the device stack is started. The type and data of each value-name can be any valid registry type. The value-names listed will not be deleted from the Parameters key upon completion.


  • SharedDriver
    This is used for PS/2-compatible keyboards and mouse devices only. The format is as follows:

[ControlFlags] SharedDriver=%DDInstall Section%,%Warning Text String%

  • PS2_Inst.NoInterruptInit.Bioses

This is intended for use only with PS/2-compatible mouse devices. If the PS/2 controller on the system cannot handle the initialization of the PS/2-compatible mouse by using the device interrupt, enter the name of the machine BIOS. The mouse class installer retrieves the name of the machine BIOS that the value named "SystemBiosVersion" under the key HKLM\Hardware\Description\System. If a match is found, the INF commands specified in the section [PS2_Inst.NoInterruptInit] are executed.

Printer
The extensive INF extensions for printers are documented in the
Windows DDK.

ChkINF checks any INF syntax in Printer INF files that is common to all INF files.



Medium Changers
The INF extensions for medium changers are limited to MC_EventLog_Inst.

This is an AddReg section that defines the entries for event logging. For a sample usage, see Mchgr.inf in Windows XP.



Network Client
Network Service
Network Transport
The extensive INF extensions for these classes are documented in the Windows DDK.

Tape Drives
The INF extensions for tape drives are limited to USEINFDEVICEDESC.

This directive is TapeDrive class-specific and directs the tape class installer to not apply its default behavior of storing the enumerator-reported device description into the FriendlyName property. This causes Windows 2000 and Windows XP to display the tape drive with its INF-specific device description instead of the description retrieved from the hardware. For example, CompanyA can use this in an INF file to cause its tape drive to be displayed as "CompanyA Tape Drive" instead of the SCSI inquiry data-based "IHV Tape Drive" description.


ChkINF Support for Include and Needs Directives


For accurate checking of sections included from other INF files by way of the Include and Needs directives, ChkINF must be run on the target platform, including:

  • Windows 2000

  • Windows 2000 Datacenter Server

  • All versions of Windows XP and Microsoft Windows Server® 2003

This limitation is a direct result of the state of the INF files in each platform. For example, many INF files have been modified or removed for the Windows 2000 Datacenter release. Accurate parsing and verification of included INF files is only feasible when ChkINF is run on the target platform.




Download 107.39 Kb.

Share with your friends:
  1   2   3   4   5




The database is protected by copyright ©ininet.org 2024
send message

    Main page