Intermec 6100 Reference Guide

Page of 328
SECTION 3
Supporting Windows Applications
PEN*KEY
R
 6100 Computer Programmer’s Reference Guide    3-27
The value returned by PrtService depends on the option selected.  See specific
options for more details.  The entry point can be called just like any Windows
procedure, as shown in the following fragment:
if ( lpfnPrtService (hInst, PRT_ENABLE, (LPARAM)NULL, 
                      (LPARAM)NULL) < 1) { 
  MessageBox( NULL, 
              ”Unable to enable printer driver”, 
              ”ERROR”,
              MB_OK | MB_ICONEXCLAMATION );
  return FALSE;
}
Supported PrtService Options
PrtService provides the following services:
"
Enable Driver.  Enables the driver and installs the default error handler.
wOpt should be PRT_ENABLE (0x0001)
1Param1 should be 0
1Param2 should be 0
"
Disable Driver:  Disables the driver.
wOpt should be PRT_DISABLE (0x0002)
lParam1 should be 0
lParam2 should be 0
"
Query Driver for support of an option:  Determines whether the driver supĆ
ports a particular feature.
wOpt should be PRT_GETSUPPORT (0x0003)
lParam1 should be the value of the option you want to check.
lParam2 should be 0
"
Install/Remove External Error handler:  Installs or removes the applicaĆ
tions error handler.
wOpt should be PRT_SETPROC (0x0010)
lParam1 should be far pointer to your error handling procedure.  A value
of 0 removes the handler.  Call MakeProcInstance(...) to obtain the value.
lParam2 should be 0
"
Flush Driver:  Flushes all the data buffers so that everything that has been
sent to the printer actually gets printed.
wOpt should be PRT_FLUSH (0x0020)
lParam1 should be 0
lParam2 should be 0
"
Forward:  Advances the paper a certain number of lines.  Use this option
with caution because Windows is not aware of the paper movement.
wOpt should be PRT_FORWARD(0x0030)
lParam1 should be the number of lines to advance
lParam2 should be 0
"
Rewind:  Rewinds the paper back into the printer a certain number of lines.
Use this option with caution because Windows is not aware of the paper
movement.  It may also cause a head jam.
wOpt should be PRT_REVERSE(0x0040)
lParam1 should be the number of lines to advance
lParam2 should be 0
3. Windows
Applications