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 SupportChapter —5
186 700 Series Color Mob ile Computer User’s Manual
NPCP Printer Communications
All NPCP printer communications should be based on the following flow:
1 Use CreateFile(); to open the printer driver.
2 Use I OCTL_NPCP_BIND to bind a session with the printer;
IOCTL_NPCP_ERROR to check for errors on the bind to ensure suc-
cess; and IOCTL_NPCP_CANCEL to cancel any outstanding print
jobs.
3 Use IOCTL_NPCP_FLUSH to poll the printer to free up printer buff-
er resources. Use IOCTL_NPCP_FLUSH to poll the printer’s status. If
an error is reported by the IOCTL, then use IOCTL_NPCP_ERROR
to get the error and determine the correct recovery procedure.
4 Use WriteFile(); to write your data to the printer. Check for errors and
that all data were written. Use IOCTL_NPCP_ERROR to get the ex-
tended error. If the error is critical in nature, use
IOCTL_NPCP_CLOSE, followed by CloseFile(), to end the commu-
nications session. Start a new session, beginning with step 1 to ensure
proper printing. For noncritical errors display the error and retry the
operation.
5 After all data is sent to the printer, ensure that the printer continues to
print the report properly by polling the printer’s status. Use
IOCTL_NPCP_FLUSH to poll the printer’s status. If an error is re-
ported by the IOCTL, then use IOCTL_NPCP_ERROR to get the
error and determine the correct recovery procedure.
Sample Code
See sample code in the “\700C Dev Tools\Installable Drivers\Port
Drivers\Npcp\NPCPPrint\” directory for more details on printing, printer
communications and error code handling.