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
189700 Series Color Mobile Computer User’s Manual
Opening the DTR Driver
The application opens the DTR driver by using the CreateFile() function.
The call can be implemented as follows:
hFile = CreateFile(_T(”DTR1:”), GENERIC_WRITE, 0, NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
The first parameter “DTR1:” must reflect the device name and index used
in the RegisterDevice() function call.
The function call will fail for any of the following reasons:
S The port associated with the device during RegisterDevice() is currently
in use.
S The DTR device is already open.
S The share mode is not set to zero. The device cannot be shared.
S Access permissions are not set to GENERIC_WRITE.
Closing the DTR Driver
Using the CloseHandle() (hFile) f u nction closes the DTR driver. Where
hFile is the handle returned by the CreateFile() function call.
S TRUE indicates the device is successfully closed.
S FALSE indicates an attempt to close a NULL HANDLE or an already
closed device.
Writing to the DTR Driver
You can use the WriteFile() function to send all Print data to the printer.
The print data being written must contain the proper formatting printer
commands.
DTR Printer Communications
All DTR printer communications should be based on the following flow:
1 Use CreateFile(); to open the printer driver.
2 Use WriteFile() to write your data to the printer. Check for errors and
that all data were written.
3 Use CloseHandle() to close the driver.