Npcp printer driver, About npcp, Npcp driver installation and removal – Intermec 700 User Manual

Page 223

Advertising
background image

Printer Support

Chapter 5

199

700 Series Color Mobile Computer User’s Manual

NPCP Printer Driver

The NPCP printer communications driver (NPCPPORT.DLL) is a
Stream Device Driver built into the operating system. The driver supports
only NPCP communications to and from the 6820 and 4820 printers over
a selected serial port.

All applications use WIN32 API functions to access the drivers. Basic op-
erations are easily implemented by applications through the CreateFile(),
WriteFile(), ReadFile(), DeviceIOControl(), and CloseHandle() Win32
APIs.

Operations to upgrade printer modules, perform printer diagnostics, and
get printer configuration are performed largely via DeviceIOControl()
functions.

About NPCP

NPCP (Norand

®

Portable Communications Protocol) is a proprietary

protocol that provides session, network, and datalink services for Intermec
mobile computers in the Intermec LAN environment used with printers
and data communications.

NPCP Driver Installation and Removal

Use LPT9: for the NPCP printer device and COM1 for the last parame-
ter. COM1 is the connection available via the 700 Color Computer.

Applications use the RegisterDevice() function to install the driver.
DeregisterDevice() uninstalls the device driver and frees memory space
when the driver is not required. Use the HANDLE returned by
RegisterDevice() as the parameter to DeregisterDevice().

Use the RegisterDevice() function call 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 paged out
during the call. The first parameter “LPT” (Device Name) and the second
parameter “9’ (index), indicate the name of the registered 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);

}

Advertising