Intermec 700 Laptop User Manual


 
Printer SupportChapter 5
199700 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 fu nctions to access the drive rs. Basic op-
erations are easily implemented by applications through the CreateFile(),
WriteFile(), ReadFile(), DeviceIO Control(), 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
UseLPT9:fortheNPCPprinterdeviceandCOM1forthelastparame-
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() f u nction 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
duringthecall.Thefirstparameter“LPT”(DeviceName)andthesecond
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);
}