Assignment Hbml 1203-Usb

INF Validation Errors and Warnings

  • 6 minutes to read
  • Contributors

This topic describes driver installation errors and warnings that can appear as a result of the automatic INF verification that Microsoft Visual Studio performs, or when you run the InfVerif tool.

Starting in Visual Studio 2015 with WDK 10, when you build your driver, the following INF file errors can appear in the Error List pane. If you are running InfVerif.exe from the command line, the tool displays these errors at the command prompt, or in the HTML version of the results.

Syntax errors in the INF file (1200-1299)

When you install a driver, Windows skips lines in the INF file that contain errors, but does not fail driver installation due to errors in this range. If the driver installs successfully, you might not notice that some lines were skipped.

Errors in the 1200-1299 range correspond to lines in the INF file that would be ignored at driver installation. As such, they do not prevent the installation of your driver. But because they are skipped, your INF file may not be doing all the things that you expected.

1203: Section not found

For example, the following INF syntax causes error 1203:

[MyInstallSection] CopyFiles=driverFile.sys

This error is reported because the CopyFiles directive expects a section name (that specifies the list of files to copy). However, the CopyFiles directive can specify a file name. To differentiate between a section name and a file name, preface a file name with the @ token as shown here:

[MyInstallSection] CopyFiles=@driverFile.sys

1204: Provider cannot be Microsoft

The Provider field in the [Version] section cannot specify Microsoft.

[Version] Signature="$Windows NT$" Class=Sample ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} Provider="Microsoft"

1220: Cannot directly reference a section defined in an included INF

If your INF file references a DDInstall section in an included INF, you must use the Needs directive. Any other directive that references a section from an included INF causes error 1220.

In this example, the install section of A.INF references an equivalent install section in B.INF.

A.INF contains:

A.INF [InstallSectionA] Include = B.INF Needs = InstallSectionB AddReg = AddRegB ; WARNING 1220 [InstallSectionA.Services] Include = B.INF Needs = InstallSectionB.Services

B.INF contains:

B.INF [InstallSectionB] AddReg = AddRegB [InstallSectionB.Services] ... [AddRegB] ...

The Needs directive must reference an equivalent install section to process in the current install section. For example, a Needs directive in [InstallSectionA.Services] should point to the .Services of another install section. The Needs directive may also be used to include the behavior of another DDInstall section of the same INF. Using the Needs directive on other types of sections may result in undesired behavior.

1221: Cannot modify services regkey, must use HKR

This error indicates that the INF file references a location in the services registry key, for example HKLM\SYSTEM\CurrentControlSet\Services\Service Name. When accessing the services key, you should instead use the relative root (HKR) to associate the registry value with the device or driver instance.

When you use HKR, the registry value will not be present until the device is installed.

1230: Missing file 'xxxx' under [SourceDisksFiles] section.

This indicates that a file was specified as part of the driver package, but the source location of the file relative to the INF was not specified in a [SourceDisksFiles] section.

[SourceDisksFiles] filename=disk id

Note that this error frequently occurs if architecture-decorated versions of [SourceDisksFiles] are specified (such as [SourceDisksFiles.amd64], but not all architectures supported by the INF have a [SourceDisksFiles] section.

1233: Missing directive required for signature

In the [Version] section, you must specify a CatalogFile directive (and associated catalog file) to receive a signature on a driver package.

1235: String token not defined in [Strings]

A specified string token has no definition in the [Strings] section. For example, the INF file specifies %REG_DWORD% in an add-registry section specified by an AddReg directive, but there is no corresponding REG_DWORD = 0x00010001 in the [Strings] section.

This error frequently occurs if your INF file specifies a registry value that contains an environment variable. For example:

[MyAddReg] HKR,,DllPath,%SystemRoot%\System32\myDll.sys

This line causes the INF parser to attempt to locate the token "SystemRoot" from the [Strings] section, rather than the intended behavior of storing the literal "%SystemRoot%" in the registry. To use the literal value %SystemRoot% rather than perform a string replacement, use the escape sequence %%.

[MyAddReg] HKR,,DllPath,%%SystemRoot%%\System32\myDll.sys

Universal INF errors (1300-1309)

Important If you do not get any errors or warnings with error number 130x and error text ("Found legacy Xxx operation..."), your driver INF file is universal.

The following errors and warnings are related to INF configurability:

1301: Found legacyXxx

You'll see this error if you use deprecated sections or directives such as LogConfig or DDInstall.CoInstallers.

1302: Found legacyXxxoperationXxx

You'll see this error if you use deprecated sections or directives such as LogConfig or DDInstall.CoInstallers.

1303: Found legacyXxxoperation forXxx

This error occurs when the operation affects something external to the driver package, like deleting a service or deleting a file.

1304: Found legacy operation defining co-installers

Error 1304 indicates that an AddReg operation is specifying a coinstaller. For example:

AddReg = HKR,,CoInstallers32,0x00010000,"MyCoinstaller.dll"

1305: Found legacy operation using non-relative key

Error 1305 indicates that a registry operation uses a registry root other than HKR.

1306: Found legacy operation using appendable multi-sz value

Error 1306 indicates that the INF deletes a value from a REG_MULTI_SZ or appends a value to an existing REG_MULTI_SZ.

1307: Found legacy operation with non-system target path

Error 1307 indicates that a file copy specifies a target that is not under %SystemRoot%.

Whether these issues appear as errors or warnings depends on the following:

  • Issues with configurability are reported as errors if:
    • In Visual Studio, you build your driver with target platform set to Universal or Mobile.
    • You run InfVerif.exe from the command line and specify the /c flag.
  • Issues with configurability are reported as warnings if:
    • In Visual Studio, you build your driver with target platform set to Desktop.
    • You run InfVerif.exe from the command line and do not specify the /c flag.

Installation warnings (2000-2999)

Issues in the 2000-2999 range appears as warnings. Possible values include the following.

2083: Section not referenced or used

This warning indicates that the INF file provides a section that is not referenced. When the driver is installed, the contents of the section referenced in the warning are not evaluated.

2222: Legacy directive will be ignored.

This warning indicates that the INF specifies a deprecated directive. When the driver is installed, the directive referencing the section is not evaluated. For example, the INF LogConfig Directive directive is no longer supported, so the following section results in this warning.

[InstallSection.LogConfigOverride] LogConfig=LogConfigSection ...

For information about which INF directives are deprecated, see INF Directives.

2223: Section should have an architecture decoration

This warning indicates that the INF file contains an INF Manufacturer Section that specifies a model section with no architecture decoration. For example, the following INF syntax would result in warning 2223:

[Manufacturer] %MfgName% = InstallSection [InstallSection] ...

When you install the driver, the preceding INF syntax defaults to x86.

Instead, declare all supported architectures and provide a corresponding install section for each:

[Manufacturer] %MfgName% = InstallSection, NTX86, NTAMD64 [InstallSection.NTAMD64] ... [InstallSection.NTX86] ...

If the INF file specifies a decorated section for x86 and an undecorated section, the undecorated section is ignored when you install your driver.

Send comments about this topic to Microsoft

Red Backlit CFA631 USB LCD 20x2 Character LCD with four button keypad and transmissive polarizer, 0°C to +50°C Operating temperature, 12:00 viewing angle

Features:
  • The only 20x2 USB LCD with keypad designed to fit in a PC's 3.5" floppy disk drive bay.
  • USB interface (115200 baud throughput)
  • LED backlit negative mode STN 20x2 LCD
  • Integrated LED backlit 4-button translucent silicon keypad
  • "key legends" allows user assignment of soft keys to be shown easily on the LCD
  • LCD characters are contiguous in both X and Y directions to allow the host software to display "gapless" bar graphs in horizontal or vertical directions
  • Fully decoded keypad: any key combination is valid and unique
  • Robust packet-based communications protocol with 16-bit CRC
  • Built-in re-programmable microcontroller (factory operation)
  • Non-volatile memory capability ("EEPROM"):
    • Customize the "power-on" display settings
    • 16-byte "scratch" register for storing IP, netmask, system serial number
  • RoHS / REACH compliant
  • Available in a LCD drive bay kit

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *