Chapter
5
—
Printer Support
Closing the DTR Driver
Writing to the DTR Driver
DTR Printer Communications
Configuring PB42 Printers Via Intermec Settings
168
The function call will fail for any of the following reasons:
S Port associated with device during RegisterDevice() is currently in use.
S The DTR device is already open.
S The share mode is not set to zero. The device cannot be shared.
S Access permissions are not set to GENERIC_WRITE.
Using the CloseHandle() (hFile) function closes the DTR driver. Where
hFile is the handle returned by the CreateFile() function call.
S TRUE indicates the device is successfully closed.
S FALSE indicates an attempt to close a NULL HANDLE or an already
closed device.
Use the WriteFile() function to send all print data to the printer. The data
must contain the proper formatting printer commands.
All DTR printer communications should be based on the following flow:
1 Use CreateFile() to open the printer driver.
2 Use WriteFile() to write your data to the printer. Check for errors and
that all data were written.
3 Use CloseHandle() to close the driver.
Tap Start > Settings > the System tab > the Intermec Settings icon to ac-
cess the applet. Tap (+) to expand the Printers option, then tap (+) to ex-
pand the PB42 Settings option and make your adjustments.
700 Series Color Mobile Computer User's Manual