USB Host Printer Client Driver (Windows CE 5.0)

Windows CE 5.0
Send Feedback

The universal serial bus (USB) printer client driver is in the the %_WINCEROOT%\Public\Common\Oak\Drivers\USB\Class\Printer directory. The driver DLL is USBPRN.dll. Add the USB host printer client driver to your OS design from the Microsoft® Platform Builder Catalog or by setting SYSGEN_USB_PRINTER.

The USB printer client driver adheres to the USB host class device specifications. This driver provides a universal solution for printing on Microsoft Windows® CE operating systems through a USB port. The goal is to write the USB printer class driver as a transport driver that plugs into the existing print driver architecture.

For each USB printer attached to the USB bus, the USB class driver installs the sample PCL printer driver PCL.dll as the default printer driver. If your printer does not support PCL printing, modify the printer registry keys as described in the Windows CE printer documentation.

The USB printer class driver can support multiple printer devices. It presents each printer device as a single printer port to the system. The printer driver exposes the stream interface. For more information, see Stream Interface Drivers.

The following illustration shows the components of the USB printer class driver in the Windows CE driver architecture.


For information about the USB specification or the USB printer class specification, see the USB Web site.

USB Host Printer Client Driver Interface

The USB printer class driver follows the standard Windows CE USB driver interface functions. The driver is implemented as a USB client driver and it exposes the USBInstallDriver, USBDeviceAttach, and USBUnInstallDriver entry points to support Plug-and-Play functionality.

The USB printer driver is a transport driver similar to the parallel port driver. This driver exposes the stream interface and uses the index LPT for its name. This parallel port interface is also implemented in the USB printer class driver. From the perspective of the Print Monitor on a Windows-based desktop computer, the USB printer driver is just another parallel port printer driver. To implement the USB host printer client driver interface, no changes are needed to the upper level printer architecture.

The USB host printer client driver supports the following IOCTLs, which are defined in Pegdpar.h:


The driver also supports any USB printer device that has the following key parameters in its USB_INTERFACE_DESCRIPTOR.

bInterfaceClass07Base class for printers


Unidirectional interface

Default bidirectional interface

USB Host Printer Client Driver Limitations and Known Issues

The following list shows the limitations and known issues with the USB printer class driver:

  • Because Windows CE has only a PCL printer driver, the following registry key entry is hard-coded into the registry to load the PCL driver. This enables testing all USB printers that support PCL print format.
  • Non-PCL printers still support ASCII-only printing with the default PCL driver.

    To support printing on non-PCL printers, you can load third-party printer drivers.

  • The USB printer driver uses a hard-coded LPT: value in the registry.

    Therefore, the printer driver shows up in Microsoft® WordPad for Windows CE word processing software with two LPT1: ports, even though Device Manager has only started one printer driver: the USB printer driver with the LPT1: name. The printer's IEEE_1284_Device_String appears correctly in WordPad, however.

See Also

Installing the USB Host Printer Client Driver on the Target Device

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.