CmriVB.dll is a library of APIs (Application Programming Interface) that
allow an application written in Visual Basic to easily communicate with
the serial-based C/MRI (Computer Model Railroad Interface) system from JLC
This DLL will permit communication with the C/MRI from any computer
running the Windows 95 or newer operating system.
You will find that this code looks radically different from the
original QBASIC C/MRI code, but don't let this alarm you as it is actually
quite simple once you look it over.
Full communications port functionality has been built into the DLL,
leaving only the necessary serial port, USIC configuration components
and the USIC APIs exposed to make the DLL functional.
CmriVB.dll supports the 24-bit Legacy USIC, SMINI USIC and 32-bit
SUSIC nodes types.
communications port functionality, therefore, no need to use MSComm or
DLL was written with Microsoft’s Visual C++ 6.0 using Microsoft’s
COM (Component Object Model) platform interface standard.
COM technology allows a seamless integration between the Visual
C++ platform and the Visual Basic development environment.
In addition, using the C++ language allows the processor
intensive encoding and decoding of the USIC protocol to execute
faster, versus an all BASIC coded routine, since less language
interpretation takes place with C++.
CmriVB DLL is structured so that bit packing/unpacking within your
application is no longer necessary.
You can now read or write the status of each individual data
Please note, however, that bit packing/unpacking does have its
advantages in that you can quickly read and write multiple data lines
with a single variable.
If you prefer, you can perform localized bit packing and
unpacking inside your application’s real-time loop, but this will
slightly impact execution speed.
addition, you no longer need to calculate Card Type (CT) values, since
these values are now calculated within the CmriVB.DLL based upon the
node configuration data setup by the user.
This includes not needing to calculate the CT values for the
SMINI oscillating signals.