- Linux MultiMedia Studio Computer Accessories User Manual
Using the Library with Various Languages
MN1278 05.2001
25
3.2.2 The ActiveX Control and Error Handling.
The ActiveX control produces COM (ActiveX) errors (exceptions) if any function fails. These will be trapped by
whatever exception handling method is implemented in that language (error handling in Visual Basic is
described in more detail in 3.3.1 ) The meaning of the error code can be found as follows:
•
Mask off the top 16 bits ( or 17 in VB ) as the actual error code is only contained in the lower 16 bits.
• If the number is 200 hex ( 512 ) or greater it is a Mint Interface Library error.
•
If the number is less than 200 hex ( 512 ) it is a standard COM error created by the framework, not the
Mint Interface Library.
3.2.3 The ActiveX Control and Serial Controllers.
One instance of (part of) the ActiveX control will be shared by all applications that use it. This means that more
than one application can access the same serial controller. This is not true of applications written with the C++
source code, where only one application can access a serial controller.
3.2.4 The ActiveX Control and RS485 Networks.
To access several nodes on an RS485 network, create one MintController object for each controller. The Visual
Basic RS485 example shows how Immediate commands can be performed and also how the command line of
each controller can be accessed.
When using controllers on an RS485 link, remember to call
setHandShakeMode(0)
to disable hardware
handshaking. If there are several
MintController
sharing the port,
setHandShakeMode(0)
only has to be
called for one.
3.2.5 Distributing an Executable Which Uses The ActiveX
Control.
When distributing a program which uses the ActiveX control, the files MILOCXZZZZ.OCX and
MILSERVERZZZZ.OCX (where ZZZZ is the version number) must be installed in the windows\system directory
and registered. Microsoft DCOM95 must also be installed. The easiest way to do this is to use a package such as
InstallShield Express and install MDAC2.0 which forces installation of DCOM95.
3.2.6 ‘Server Busy” / “Component Request Pending” Errors.