PrinterSupportChapter 5
199700Series Color Mobile Computer User’sManual
NPCP Printer Driver
The NPCP printer communications driver (NPCPPO RT.DLL) is a
Stream Device Driver built into theoperating system. The driver supports
only NPCP communications to and from the 6820 and 4820 printers over
a selected serial port.
All applicationsuse WIN32 API functions to access the drivers. Basic op-
erations are easily implemented by applications through the Cre ateFile(),
WriteFile(), ReadFile(), DeviceIOControl(), and CloseHandle() Win32
APIs.
Operations to upgrade printer modules, perform printer diagnostics, and
get printerconfiguration are performed largely via DeviceIOControl()
functions.

About NPCP

NPCP (Norand
®
PortableCommunications Protocol) is a proprietary
protocol that provides session, network, and datalink services f or Intermec
mobile computers in the Intermec LAN environment used with pri nters
and data communications.

NPCP Driver Installation and Removal

UseLPT9:fortheNPCPprinterdeviceandCOM1forthelastparame-
ter. COM1 is the connectionavailable via the 700 Color Computer.
Applicationsuse the RegisterDevice() function to install the driver.
DeregisterDevice() uninstallsthe device driver and frees memory space
when the driver is notrequired. Use the HANDLE returned by
RegisterDevice() as the parameterto DeregisterDevice().
Use the RegisterDevice()fu nctioncall as demonstrated below. Specify the
full path name to the driver starting at the root for the RegisterDevice ()
function to work properly. The last parameter to RegisterDevice () is a
DWORD that represents the name of the port for the NPCP stream
driver to use. Build this parameter on the stack if it is not to be pagedout
duringthecall.Thefirstparameter“LPT”(DeviceName)andthesecond
parameter “9’ (index), indicate the name of the registe red device, such as
LPT9. This is used in the CreateFile() function call.
Install()
{HANDLE hDevice;
TCHAR port[6];
port[0] = TCHAR(‘C’);
port[1] = TCHAR(‘O’);
port[2] = TCHAR(‘M’);
port[3] = TCHAR(‘1’);
port[4] = TCHAR(‘:’);
port[5] = TCHAR(0);
hDevice = RegisterDevice ( (TEXT(”LPT”), 9,
TEXT(“\\STORAGE CARD\\WINDOWS\\NPCPPORT.dll”), (DWORD)port);
}