Edit

Share via


The Sample Driver Setup Information (.inf) File

The WpdHelloWorldDriver project contains a setup information (.inf) file named WpdHelloWorldDriver.inf. This file contains the UMDF parameters and directives that are required by the WUDF co-installer. However, this file also contains parameters and directives that are exclusive to WPD. The following table lists these WPD-specific parameters, directives, and sections.

Section Directive or parameter Description
Basic_Install.CoInstaller_AddReg This section is required.
  • WudfCoInstaller.dll must be listed as a co-installer.
  • The reg root must be "HKR".
  • The type must be 0x10000.
  • The registry directive must be present.

Example: [Basic_Install.CoInstallers_AddReg]

HKR,,CoInstallers32,0x00010000,"WUDFCoInstaller.dll"

Basic_Install.wdf UmdfService directive This directive is required.
  • This directive is of the form: "UmdfService=ServiceName, ServiceInstallSection".
  • The referenced section ("ServiceInstallSection") must exist.
  • The specified service name ("ServiceName") must be used by the UmdfServiceOrder directive.

Example: [Basic_Install.Wdf]

UmdfService=WpdHelloWorldDriver, WpdHelloWorldDriver_Install

UmdfServiceOrder=WpdHelloWorldDriver

DDInstall.Services Includes directive This directive is required if the driver reuses the MTP class driver components. Otherwise, it should not appear.

The necessary system files must be referenced by using the appropriate Includes or Needs directives. (These files are WpdMtpDr.dll, WpdMtp.dll, WpdMtpUs.dll, WpdConns.dll (for Windows Vista), and either WpdUsb.sys (for Windows Vista) or WinUsb.sys (for Windows 7 and later)). The necessary service files must also be referenced. (The single service file that requires reference is WpdUsb.sys (for Windows Vista) or WinUSB.sys (for Windows 7 and later).)

DDInstall.Services Needs directive This directive is required if the driver reuses the MTP class driver components. Otherwise, it should not appear.

The necessary system files must be referenced by using the appropriate Includes or Needs directives. (These files are: WpdMtpDr.dll, WpdMtp.dll,WpdMtpUs.dll, WpdConns.dll (for Windows Vista), and either WpdUsb.sys (for Windows Vista) or WinUsb.sys (for Windows 7 and later)). The necessary service files must also be referenced. (The single service file that requires reference is WpdUsb.sys (for Windows Vista) or WinUSB.sys (for Windows 7 and later).)

Device_AddReg EnableDefaultAutoPlaySupport directive This directive is required.
  • The reg root must be "HKR".
  • The type must be 0x10001.
  • A valid value (0 or 1) must be set.

Example:

[Device_AddReg]

HKR,,"EnableDefaultAutoPlaySupport",0x10001,1

Device_AddReg EnableLegacySupport directive This directive is required.
  • The reg root must be "HKR".
  • The type must be 0x10001.
  • A valid value (0, 1, 2, or 3) must be set.

Example:

[Device_AddReg]

HKR,,"EnableLegacySupport",0x10001,1

Device_AddReg UseWiaAutoPlay directive This directive is optional.
  • The reg root must be "HKR".
  • The type must be 0x10001.
  • A valid value (0 or 1) must be set.
Install UmdfLibraryVersion directive This directive is required.

This directive must be of the form: n.n.n

Example: [WpdHelloWorldDriver_Install]

UmdfLibraryVersion=1.0.0

ServiceInstall ErrorControl directive This directive is required.

This directive must specify a value of 1.

Example: [WUDFRD_ServiceInstall]

ErrorControl=1

ServiceInstall ServiceType directive This directive is required.

This directive must specify a value of 1.

Example:

[WUDFRD_ServiceInstall]

ServiceType=1

ServiceInstall StartType directive This directive is required.

This directive must specify a value of 3.

Example:

[WUDFRD_ServiceInstall]

StartType=3

Version Class parameter This parameter is required. Must be set to "WPD".

Example:

[Version]
Class=WPD
Version ClassGuid parameter This parameter is required. Must be set to a valid GUID.

Example:

[Version]
ClassGuid={EEC5AD98-8080-425f-922A-DABF3DE3F69A}
WpdHelloWorldDriver_Install DriverCLSID directive This directive is required.

This directive must specify a well-formed GUID.

Example:

[WpdHelloWorldDriver_Install]
DriverCLSID="{EC7445EE-BC00-4CED-AFE7-A52849F10239}"
WpdHelloWorldDriver_Install ServiceBinary directive This directive is required.

This directive must specify a path of the form: "%12%\wudfrd.sys"

Example:

[WUDFRD_ServiceInstall]

ServiceBinary=%12%\WUDFRd.sys