User's Manual
Table Of Contents
- Legal Information
- Document Change Record
- Contents
- Before You Begin
- Chapter 1 - Introduction
- Chapter 2 - Windows Mobile 2003
- Software Builds
- Where to Find Information
- Basic Skills
- Microsoft ActiveSync
- Microsoft Pocket Outlook
- Calendar: Scheduling Appointments and Meetings
- Synchronizing Calendar
- Why Use Categories in the Calendar?
- What’s an All Day Event?
- What’s a Recurrence Pattern?
- Viewing Appointments
- Creating or Changing an Appointment
- Creating an All Day Event
- Setting a Reminder for an Appointment
- Adding a Note to an Appointment
- Making an Appointment Recurring
- Assigning an Appointment to a Category
- Sending a Meeting Request
- Finding an Appointment
- Deleting an Appointment
- Changing Calendar Options
- Contacts: Tracking Friends and Colleagues
- Tasks: Keeping a To Do List
- Notes: Capturing Thoughts and Ideas
- Inbox: Sending and Receiving E-mail Messages
- Calendar: Scheduling Appointments and Meetings
- Companion Programs
- Pocket Internet Explorer
- Getting Connected
- Chapter 3 - Installing Applications
- Chapter 4 - Network Support
- CORE
- Network Adapters
- Ethernet Communications
- 802.11b Communications
- No Networking
- Network Selection APIs
- Network Connections
- WWAN Radio Options
- Wireless Personal Area Networking
- AutoIP/DHCP
- SNMP Configuration on the 700 Series Computer
- Chapter 5 - Printer Support
- Chapter 6 - Scanner Support
Printer Support—Chapter 5
185700 Series Color Mobile Computer User’s Manual
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)
S IOCTL_NPCP_CANCEL
This cancels all printing at the printer. It flushes the printer buffers and
reinitializes the printer to its default state. No parameters are required.
S IOCTL_NPCP_BIND
This command is required bef ore any data is sent or received by the
printer. Once the driver is opened, the application must bind the com-
munications session with the printer before any data can be sent or re-
ceived 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 parameters are required.
S IOCTL_NPCP_CLOSE
This command closes the current session with the printer. This function
always returns TRUE. No parameters are required.
S IOCTL_NPCP_ERROR
This command returns the extended NPCP error code in PL/N format.
The word returned will contain the PL/N compatible e rror code in the
low byte and completion flags in the high byte. If the frame that re-
turned 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 187.
S 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 oc-
curs during the polling process, the operation will return FALSE and
the application can get the extended error code by using
IOCTL_NPCP_ERROR. No parameters are required.