Identifiers Generated by USBPRINT.SYS
Starting with Windows 2000, the operating system provides a kernel-mode USB print driver, usbprint.sys that connects the printer subsystem to the USB stack. The native USB printer driver frees vendors from the need for developing their own kernel-mode USB printer drivers. This allows vendors to develop high-level user-mode printer drivers that work with both USB and parallel printers.
The usbprint.inf installation file contains a compatible ID that matches all USB class 7 printer devices. If the USB hub driver enumerates one of these devices, the operating system will find a match for the ID that the hub driver generates in usbprint.inf and will load the USB printer driver, usbprint.sys. The compatible ID found in usbprint.inf has the following form:
class 07h = devices that belong to the USB printer class
As soon as it is loaded, the USB printer driver creates a new PDO for the printer device. When the Plug and Play (PnP) manager queries for the device identification strings of the newly created PDO, the USB printer driver creates a new hardware ID, derived from the device's IEEE 1284 string that is compatible with the string identifiers generated by the parallel bus enumerator. This hardware ID has the following format:
NameModel(20) is the concatenation of the manufacturer name and the model of the device, truncated to a maximum of 20 characters.
Checksum(4) is a 4-character cyclic redundancy check (CRC) code calculated from the manufacturer name and the model name.
Spaces in the string are replaced with underscores. For example, if the manufacturer's name is "Hewlett-Packard," the model name is "HP Color LaserJet 550," and the checksum is 3115, the hardware ID would be as follows:
In the previous example, the space between "HP" and "Color" in the model name was replaced with an underscore to produce the truncated make/model string "Hewlett-PackardHP_Co."
Note The CRC that is generated by the operating system may not match the CRC that is calculated as described in the preceding section, or by any other CRC algorithm. As a result of this, your printer driver may not be able to calculate the correct hardwareID to use with the INF file for the printer driver.
To retrieve the hardwareID, it is better to search the setupapi.dev.log file that is associated with the USB printer that is being installed.