USB Function Printer Client Driver Development Concepts (Windows Embedded CE 6.0)

1/6/2010

The universal serial bus (USB) function printer driver is a USB function client driver that covers the USB printer specification. This driver, designed to help you build a Windows Embedded CE based USB printer, acts as a bridge between an attached printer and a USB function port. The USB function printer driver is made up of two components, the USB function printer class and the USB function data pipe class. The driver is in the %_WINCEROOT%\Public\Common\Oak\Drivers\USBFN\Class\UFNPRN directory.

Note

The USB function printer client driver uses a new sysgen flag. The new sysgen flag is SYSGEN_USBFN_PRINTER.

Note

This driver does not support raster based printer data. The USB function printer client driver will only deliver data into a Windows Embedded CE based system.

USB Function Printer Class

The USB function printer class handles all class specific transfers. This class carries out required actions and forwards requests to the attached printer using file handle based APIs. It is also responsible for printer data conversion.

The USB function printer client driver uses the standard USB function client driver functions to issue USB transfers. For more information, see USB Function Client Driver Functions. The following registry key entry illustrates how to specify the specific printer device whose requests should be forwarded.

HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\UFN_PRINTER_Class\USBFNPrinter:"LPTx"

USB Function Data Pipe Class

The USB function data pipe class handles data transfers. This class carries out required actions and forwards data requests to the attached printer using file handle APIs. Specifically, the USB function data pipe class uses the WriteFile and ReadFile APIs. WriteFile is used to deliver received data from the host machine to the attached printer. ReadFile is used to receive data from the attached printer if the printer is bidirectional. For more information, see WriteFile and ReadFile.

During CableAttached event handling an instance of this class is constructed. A data pipe from the attached device to the desktop host is only created when bidirectional functionality is enabled.

See Also

Other Resources

USB Function Printer Client Driver
USB Function Client Drivers