Intermec 6100 Reference Guide

Page of 328
SECTION 3
Supporting Windows Applications
3-32    PEN*KEY
R
 6100 Computer Programmer’s Reference Guide
UARTIRQ= sets the IRQ line on which the UART interrupts.  The default setĆ
ting is 3 (COM2).  Other valid settings: 4 (COM1), 14.  Required setting for the
6100 Computer: 14.
Technology= sets the type of the handĆheld computer.  The default setting is
PENKEY.  Required setting for the 6100 Computer is: 6100.
PrinterFlush= tells Windows to flush the printer's input buffer, as part of the
printer initialization stream.
PrtPort=  PrtPort specifies the printer port to use; 0=LPT1, 1=LPT2, 2=LPT3.
This option must match the options set in CONFIG.SYS and WIN.INI.
The following section of the SYSTEM.INI file sets up the parameters for the
NORAND 6805 printer:
[NORAND 6805 Printer]
DoGraphicsOnly=FALSE
Timeout=10
WakeupChars=200
DoGraphicsOnly= forces the drivers to use Graphics commands for the entire
document.  The default value is FALSE.  Valid settings are TRUE and FALSE
(that is, graphics commands are used whenever device fonts are not used).
Timeout= sets idle time in seconds for a period of printer inactivity, after which a
wakeup is issued to the printer.  Default  is 10.  Valid settings are 10 to 50.
WakeupChars= controls the number of NULL characters sent to the printer after
the Initialize command, for it to wake up properly.  Default is 200.  Valid settings
are 200 to 500.  Setting a lower value may disrupt graphics printing, resulting in
garbled output to printer.
Usage
Default Error-Handling Mode
Once the drivers are loaded as defined in the preceding paragraphs, no special
processing by the application is needed.  This makes it possible for offĆtheĆshelf
packages to take advantage of the IrDA protocol.  In this mode, all printerĆreĆ
lated errors are handled by the IrDA driver.  A message is displayed and the user
has the ability to Cancel or Retry.  If the user selects Retry, the driver attempts
to continue printing.  If the user selects Cancel, the driver attempts to clean up.
The standard Windows API returns a standard error, indicating that a problem
occurred.  This is the application's signal to abort the print job.
Application-Defined Error-Handling Mode
This is probably the most common mode of operation.  In this mode, the applicaĆ
tion can link to the IrDA driver in the same manner that it would link to any
Windows DLL.  Once linked, the application can use the driver's API to perform
various operations.  The application registers a callback with the driver.
The application needs to perform these actions to define a new error handler:
1. Link to driver and obtain PrtService entry point.
2. Call PrtService to enable the driver, using PRT_ENABLE (0x0001).
3. Call PrtService to register the new handler, using PRT_SETPROC (0x0010)
and the address of the new handler.  The new handler should have the
following prototype:
extern “C” WORD _export FAR PASCAL ShowPrtError( WORD wCurErr )
3. Windows
Applications