Microsoft Windows CE 3.0  

Global Printer Settings

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The global printer settings that are stored in the registry list the I/O ports to use for printing, provide a global time-out value, and store which printer driver currently is selected as the default. The default printer driver is stored as a value for DefaultPrinter. The printer ports are stored as values in the \Portssubkey.

The following registry file excerpt defines five printer ports, two time-out values, and the default printer driver.

[HKEY_LOCAL_MACHINE\Printers\Ports]
"Port1"="COM1: 9600" "Port2"="COM1: 57600" "Port3"="IRDA"
"Port4"="LPT1:" "Port5"="NET0:"
[HKEY_LOCAL_MACHINE\Printers\Settings] "TimeOut"=dword:1E
[HKEY_LOCAL_MACHINE\PrintSettings] "TimeOut"=dword:2D
[HKEY_LOCAL_MACHINE\Printers] "DefaultPrinter"="PCL Laser"

The values correspond to serial ports at 9,600 baud and 57,600 baud, an infrared port, a parallel port, and a network printer port. For the two COM1: ports, a baud is also specified. The port monitor parses the values to extract the baud and device file name. In Windows CE 2.0, COM3: is assumed to be an infrared port. However, in Windows CE 2.10 and later the new file name "IRDA" is reserved for the infrared port, whereas COM3: is used for an additional serial port. When assigning an infrared port for printing, the value of the key for the port must be the literal string "IRDA" even though this value is not in the standard format for special device file names. The names "LPT1:" and "NET0:" are reserved for parallel and network printing, respectively, although the device file name indexesin those names can be any valid value.

Windows CE versions 2.02 and later use the HKEY_LOCAL_MACHINE\Printers\Settings\TimeOutkey. This value is a hexadecimal number that is measured in seconds; the example is for a 30-second time-out. After the time-out period, the printer driver can display a dialog box to give the user the option to retry or cancel.

For a printer that does not use the parallel port, such as an infrared or serial printer, it is difficult for Windows CE to determine whether the printer has received all the data to be printed. Therefore, a time-out parameter is used to detect and report printing errors if the printer fails to give any signal that it is still active. This time-out value is stored in the PrintSettings\TimeOutkey. The default value is 45 seconds.

The value stored in the DefaultPrinterkey lists the printer that is preselected in the common print dialog box that applications display to users. T default printer driver, "PCL Laser", is the name of a subkey within HKEY_LOCAL_MACHINE\Printers\where Windows CE can find settings for the Printer Control Language (PCL) laser printer driver.



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.