Table of contents
TOC
Collapse the table of content
Expand the table of content

The Sample Driver Setup Information (.inf) File

Last Updated: 1/24/2017

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.

SectionDirective or parameterDescription
Basic_Install.CoInstaller_AddRegThis 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.wdfUmdfService directiveThis 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.ServicesIncludes directiveThis 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, and WpdUsb.sys). 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).)

DDInstall.ServicesNeeds directiveThis 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, and WpdUsb.sys). 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).)

Device_AddRegEnableDefaultAutoPlaySupport directiveThis 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_AddRegEnableLegacySupport directiveThis 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_AddRegUseWiaAutoPlay directiveThis directive is optional.
  • The reg root must be "HKR".
  • The type must be 0x10001.
  • A valid value (0 or 1) must be set.
InstallUmdfLibraryVersion directiveThis directive is required.

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

Example: [WpdHelloWorldDriver_Install]

UmdfLibraryVersion=1.0.0

ServiceInstallErrorControl directiveThis directive is required.

This directive must specify a value of 1.

Example: [WUDFRD_ServiceInstall]

ErrorControl=1

ServiceInstallServiceType directiveThis directive is required.

This directive must specify a value of 1.

Example:

[WUDFRD_ServiceInstall]

ServiceType=1

ServiceInstallStartType directiveThis directive is required.

This directive must specify a value of 3.

Example:

[WUDFRD_ServiceInstall]

StartType=3

VersionClass parameterThis parameter is required. Must be set to "WPD".

Example:

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

Example:

[Version]
ClassGuid={EEC5AD98-8080-425f-922A-DABF3DE3F69A}
WpdHelloWorldDriver_InstallDriverCLSID directiveThis directive is required.

This directive must specify a well-formed GUID.

Example:

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

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

Example:

[WUDFRD_ServiceInstall]

ServiceBinary=%12%\WUDFRd.sys

Send comments about this topic to Microsoft

© 2017 Microsoft