Npcp Driver I/O Controls - Intermec 700 Series User Manual

Color mobile computer
Hide thumbs Also See for 700 Series:
Table of Contents

Advertisement

Printer Support

NPCP Driver I/O Controls

An application uses the DeviceIoControl() function to specify an printer operation
to be performed. Certain I/O controls are required to bind and close
communication sessions with the printer, and must be completed before any
other commands to the driver can execute properly.
The function returns TRUE to indicate the device successfully completed its
specified I/O control operation, otherwise it returns FALSE. The following I/O
control codes are defined:
#define IOCTL_NPCP_CANCEL
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x400,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_NPCP_BIND
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x401,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_NPCP_CLOSE
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x402,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_NPCP_ERROR
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x403,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_NPCP_FLUSH
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x404,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_NPCP_IOCTL
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x405,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_NPCP_PRTVER
CTL_CODE(FILE_DEVICE_SERIAL_PORT,0x406,METHOD_BUFFERED,FILE_ANY_ACCESS)
5-4
700 Series Color Mobile Computer User's Manual
IOCTL_NPCP_CANCEL
This command cancels all printing at the printer. It flushes the printer
buffers and reinitializes the printer to its default state. No parameters are
required.
IOCTL_NPCP_BIND
This command is required before any data is sent or received by the printer.
Once the driver is opened, the application must bind the communications
session with the printer before any data can be sent or received by the
printer. If an error occurs during the bind, the application may use
IOCTL_NPCP_ERROR to get the current extended error code. No parame-
ters are required.
IOCTL_NPCP_CLOSE
This command closes the current session with the printer. This function
always returns TRUE. No parameters are required.
IOCTL_NPCP_ERROR
This command returns the extended NPCP error code in PL/N format. The
word returned will contain the PL/N compatible error code in the low byte
and completion flags in the high byte. If the frame that returned an error
was not received correctly by the printer the FRAME_NOT_ACKED bit will
be set in the high byte. This operation always returns TRUE. An output
buffer of at least 2 bytes is required. See "NPCP Error Codes" on page 5-5.
IOCTL_NPCP_FLUSH
This command allows the application to poll the printer for errors while the
report is completing the print process at the printer. If an error occurs dur-
ing the polling process, the operation will return FALSE and the applica-
tion can get the extended error code by using IOCTL_NPCP_ERROR. No
parameters are required.
SECTION 5

Advertisement

Table of Contents
loading

Table of Contents