Loading And Unloading A Protocol Handler With A Batch File - Intermec Janus 2010 User Manual

Intermec janus 2010: user guide
Hide thumbs Also See for Janus 2010:
Table of Contents

Advertisement

nugget

Loading and Unloading a Protocol Handler With a Batch File

If you create your own application or use software that does not have built-in
protocol handlers, you can create a batch file that automatically loads and
unloads the protocol handler whenever you enter and exit the application.
Note: Name the batch file carefully. COMMAND.COM executes files in this order:
.COM, .EXE, .BAT. If a batch file (.BAT) and an application (.EXE) have the same
filename, when you type the filename the reader runs the application instead of the
batch file. Therefore, the batch file that loads the protocol handlers for your application
should have a different filename than the application itself.
This batch file loads PHIMEC and PHPCSTD, runs Communications Manager,
and unloads the protocol handlers when you exit Communications Manager.
You can edit this batch file to load only one protocol handler, freeing some
conventional memory for the application.
Example Batch File
Command Line
set CMPCST=
set CMUSER=
phimec 1
if not errorlevel 1 set CMUSER=1
phpcstd 1
if not errorlevel 1 set CMPCSTD=1
cmanager %1 %2 %3
if not "%CMPCSTd%"=="1" goto :nopcstd
unload phpcstd 1
if errorlevel 1 echo unload failure
on pcstd
:nopcstd
if not "%CMUSER%"=="1" goto :nouser
unload phimec 1
if errorlevel 1 echo unload failure
on userdef
:nouser
3 9
helconital
Networking the Reader
Definition
Clears the environment variables used by this batch
file.
Loads the Intermec protocol handler for COM1.
If the Intermec protocol handler is already loaded,
an error is returned and the variable is not set.
Loads the PC Standard protocol handler for COM1.
If the PC Standard protocol handler is already
loaded, an error is returned and the variable is not
set.
Executes Communications Manager. You can
replace this with your application executable.
Unloads the PC Standard protocol handler if it was
loaded by this batch file.
Checks for failure to unload the PC Standard
protocol handler.
Unloads the Intermec protocol handler if it was
loaded by this batch file.
Checks for failure to unload the Intermec protocol
handler.
6
6-17

Advertisement

Table of Contents
loading

Table of Contents