ActiveComport Manual

© 1999-2011 ActiveXperts Software B.V.  contact@activexperts.com

 

1. Introduction

1.1. What is ActiveComport?

Adding serial communications capabilities to an application is never a simple matter. It requires specialized knowledge that might be outside an individual programmer's expertise. For years, VBScript, Visual Basic and Visual C++ developers have relied upon the power, flexibility and reliability of the ActiveComport serial communications control from ActiveXperts Software. And today, also .NET developers use this control.

ActiveComport is a COM component, that provides an easy-to-use scripting interface for serial, asynchronous communications through a serial port. ActiveComport can control modems, ISDN modems, USB serial devices and other devices and machines that have a serial interface.

Use ActiveComport for different purposes:

  • To control manufacturing machines via the serial port;
  • To configure network devices (like print-servers, routers) via the serial port;
  • To control a modem, connected to the serial/USB port or Bluetooth;
  • To send SMS messages to a mobile telephone using a GSM SmartPhone/Modem connected to the PC (serial/USB port or Bluetooth);
  • To transfer files through a null modem cable;
  • Any other scenario where serial communications is involved.

ActiveComport features the following:

  • Direct COM ports supported (like 'COM2');
  • Windows Telephony Devices supported (like 'Standard 9600 bps Modem');
  • Support for RS-232, RS422 and RS485;
  • Up to 256 ports opened simultaneously;
  • Thread-safe to allow the toolkit in multi-threading environments (multi-threading samples included);
  • Support for Hayes compatible modems, connected via a serial port, USB or Bluetooth;
  • Support for GSM/GPRS modems (serial port, USB or Bluetooth);
  • Support for Virtual COM ports (i.e. COM ports redirected through the network);
  • Hardware flow control (RTS/CTS, DTR/DSR);
  • Software flowcontrol (XON/XOFF);
  • Support for any baudrate;
  • Ability to set baudrates, parity, stopbits;
  • Full buffered data transfer;
  • Text and Binary data transfer;
  • Advanced logging.

ActiveComport includes samples for many development tools, including:

  • Visual Basic .NET - Windows .NET based application;
  • Visual C# .NET - Windows .NET based applications;
  • Visual Basic 5.x or higher - Windows based applications;
  • Visual C++ 5.x or higher - Windows based applications;
  • ASP .NET - Web site based on Active Server Pages and the .NET Framework;
  • ASP 2.x - Web site based on Active Server Pages (server-side scripting);
  • PHP - Embedded HTML scripting;
  • VBScript - Windows based scripts;
  • Java/Javascript - Java based scripts;
  • HTML - Client scripts within HTML pages;
  • Any other development platform that supports ActiveX/COM components.

1.2. ActiveComport Architecture

ActiveComport is built on top of the Microsoft serial device drivers. It just uses these drivers. It neither replaces them, nor does it install any additional serial device drivers.

The core of ActiveComport is an ActiveX/COM component that comes in a 32-bit and a 64-bit version:

  • AComport.dll - the 'ActiveComport COM Component' for 32-bit platforms;
  • AComportx64.dll - the 'ActiveComport COM Component' for 64-bit platforms;

ActiveComport can be distributed easily to many PC's. Once you have purchased the licenses, you copy the AComport.dll (or AComportx64.dll) to the PCs and register the DLL on that PC.

2. System Requirements

2.1. Development Languages

The ActiveComport component can be used by any of these development/scripting languages:

  • ASP .NET;
  • Visual Basic .NET;
  • Visual C# .NET;
  • ASP 2.x
  • VBScript;
  • HTML - Client scripts within HTML pages - requires Internet Explorer 4.x or higher;
  • Visual Basic 5.x/6.x;
  • Visual C++ 5.x/6.x.

2.2. .NET Framework

To use ActiveComport in an ASP .NET, Visual Basic .NET or Visual C#. NET environment, the .NET Framework must be installed on the system. The .NET Framework is part of Windows 2003 server platforms and higher, and on Windows Vista workstation platforms and higher. For other Windows platforms, it's available as a separate installation. Please visit the Technology Information for the .NET Framework page to download the .NET Framework.

2.3. Internet Information Server

Internet Information Server (IIS) Setup installs the Visual Basic Script and Java Script engines.
To run ASP pages on NT4 Servers, IIS 4.x must be installed. IIS 4.x ships with the NT4 Option Pack CD's.
To run ASP pages on Windows 2000 Servers, IIS 5.x must be installed. IIS is part of the Windows 2000 Operating System.

2.4. Internet Explorer 4.x or higher

The Internet Explorer 4.x Setup (or higher) installs the Visual Basic Script and Java Script engines. You can use the ActiveComport component from within the client HTML code.

2.5. Windows Scripting Host

ActiveComport can be used in VBScript scripts. VBScripts can be used by passing the script-file as a parameter to the scripting host ( either 'cscript' or 'wscript').

WSH relies on the Visual Basic Script and Java Script engines provided with Internet Explorer 4.x or later. WSH is also installed as part of Windows 98, Windows 2000, and Internet Information Services 4.0. A separate setup program is provided for Windows 95.

2.6. Visual Basic

ActiveComport can be used in Visual Basic 5.x or higher.

2.7. Visual C++

ActiveComport can be used in Visual C++ 5.x or higher.

3. Installation

3.1. Introduction

The ActiveComport package consists of 3 components; any combination of components can be installed:

  • The ActiveComport COM component - the interface to COM compliant applications;
  • The ActiveComport Help Files - documentation;
  • The ActiveComport Example Files - examples.

3.2. Installation on a single computer

Simply run the AComport.exe Setup program. The InstallShield wizard will guide you through the rest of the setup.
If you choose the ActiveComport COM component, the Setup program can perform the registration of the COM component for you. But it will also give you the opportunity to register the object yourself.

Any subsequent installation of ActiveComport can be performed either manually or by using the Setup program.

3.3. Installation on multiple computers

Any subsequent installations can be performed using the setup program.

But since the installation of the core components is very simple, you may want to do it manually, or integrate it into your companies software distribution program.

If you choose to install the COM component manually on other machines, simply perform the following actions:

  • Copy the AComport.dll (for 32-bit platforms) or AComportx64.dll (for 64-bit platforms) to a destination location on the new machine;
  • Register the COM component by using the following command on 32-bit platforms: REGSVR32 <dest-location>\AComport.dll
  • Register the COM component by using the following command on 64-bit platforms: REGSVR32 <dest-location>\AComportx64.dll

4. How to use ActiveComport

4.1. Introduction

The following code snippets (VBScript) illustrate how to use ActiveComport.

Initialize a modem using a direct COM port

Set objComport = CreateObject( "ActiveXperts.Comport" )    ' Create a new Comport instance

objComport.Device              = "COM1"                    ' Use a COM port directly (no Windows Device Driver)      
objComport.BaudRate            = 56000                     ' Set baudrate (default value: 9600) 
objComport.HardwareFlowControl = asFLOWCONTROL_ENABLE      ' Set Hardware Flow Control (default: On)
objComport.SoftwareFlowControl = asFLOWCONTROL_ENABLE      ' Set Software Flow Control (default: Off)
objComport.Open                                            ' Open the port
Wscript.Echo "Open, result: " & objComport.LastError
If( objComport.LastError <> 0 ) Then
  WScript.Quit
End If

objComport.WriteString( "at&f" )                        ' Write command
str = objComport.ReadString
WScript.Echo "Received: [" & str & "]"              ' Read the response

objComport.Close                                            ' Close the port

Initialize a modem using a Windows Telephony Driver

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Use the Standard 9600 bps Modem Telephony driver      
objComport.Open                                            ' Open the port
Wscript.Echo "Open, result: " & objComport.LastError
If( objComport.LastError <> 0 ) Then
  WScript.Quit
End If

objComport.WriteString( "at&f" )                       ' Write command
str = objComport.ReadString
WScript.Echo "Received: [" & str & "]"             ' Read the response

objComport.Close                                           ' Close the port

Send an SMS using a GSM Modem connected to the PC; Enable logging

Const RECIPIENT                = "+31611223344"
Const MESSAGE                  = "Hello, world!"

Set objComport = CreateObject( "ActiveXperts.Comport" )    ' Create a new Comport instance

objComport.Device              = "Nokia 6680 SmartPhone"   ' Use the Stanrd 9600 bps Modem Telephony driver
objComport.LogFile             = "C:\ActiveComport.log"    ' Enable logging

objComport.Open                                            ' Open the port
Wscript.Echo "Open, result: " & objComport.LastError
If( objComport.LastError <> 0 ) Then
   WScript.Quit
End If

WriteStr objComport, "at+cmgs=" & Chr( 34 ) & strNumber & Chr( 34 )
ReadStr objComport
WriteStr objComport, strMessage
strTermCmd = Chr( 26 )                                     ' Terminate message: [ctrl]z and then [enter]
WriteStr objComport, strTermCmd
objComport.Sleep 3000                                      ' It takes a while before GSM phone responds
ReadStr objComport                                         ' +CMGS: expected
ReadStr objComport                                         ' OK expected
objComport.Close                                           ' Close the port

' ********************************************************************
' Sub Routines
' ********************************************************************
Sub WriteStr( obj, str )
obj.WriteString str
WScript.Echo "-> " & str
End Sub

Sub ReadStr( obj )
str = "notempty"
obj.Sleep 200
Do While str <> ""
str = obj.ReadString
If( str <> "" ) Then
WScript.Echo "<- " & str
End If
Loop
End Sub
' ********************************************************************

4.2. How to use ActiveComport in Visual Basic .NET

First, make sure the ActiveComport component (AComport.dll) is registered on the machine. In case you didn't use the installation program, be sure you used the REGSVR32.EXE program to register to component.

Then, add a reference to the ActiveComport component using the Visual Basic .NET Solution Explorer:

  • Start the Solution Provider, go to the project's 'References' container;
  • Choose 'Add Reference' from the context menu;
  • From the COM components tab, choose the ActiveComport component.

On top of the code, make this declaration:

Imports ACOMPORTLib

and declare and create an object like this:

Dim objComport As ACOMPORTLib.ComPortClass                  ' Declaration
objComport = New ACOMPORTLib.ComPortClass()                 ' Creation

After the declaration and creation of the object, you can use the object in your Visual Basic .NET code. Visual Basic samples are part of the product installation.
They can also be found online: ftp.activexperts-labs.com/samples/network-component.

4.3. How to use ActiveComport in Visual C# .NET

First, make sure the ActiveComport component (AComport.dll) is registered on the machine. In case you didn't use the installation program, be sure you used the REGSVR32.EXE program to register to component.

Then, add a reference to the object using the Visual C# Solution Explorer:

  • Start the Solution Provider, go to the project's 'References' container;
  • Choose 'Add Reference' from the context menu;
  • From the COM components tab, choose the ActiveComport component.

On top of your code, make this declaration:

using ACOMPORTLib;

and declare and create an object like this:

Comport objComport;                                        // Declaration
objComport = new Comport();                                // Creation

After the declaration and creation of the object, you can use the object in your Visual C# .NET code.
Visual C# .NET samples are part of the product installation.
They can also be found online: ftp.activexperts-labs.com/samples/network-component.

4.4. How to use ActiveComportin Visual Basic

ActiveComport can be used in Visual Basic 5.x or higher. In Visual Basic, go to the 'Project/References...' menu item and check the box next to ActiveComport Type Library. Now, you can declare and create ActiveComport objects.

Create a new ActiveComport object using the 'CreateObject' function:

Dim objComport As ACOMPORTLib.Comport                      ' Declaration
Set objComport = CreateObject( "ActiveXperts.Comport")     ' Creation

After the declaration and creation of the object, you can use the object in your Visual Basic code.
Visual Basic samples are part of the product installation.
They can also be found online: ftp.activexperts-labs.com/samples/network-component.

4.5. How to use ActiveComport in Visual C++

ActiveComport can be used in Visual C++ projects. Include the *.h and *.c file provided by ActiveXperts to bind your code to the ActiveComport component. These files are located in the Include directory of the Visual C++ samples directory. These are the files:

  • AComport.h
  • AComport_i.c
  • AComportConstants.h

Create the various ActiveComport object instances like this:

IComPort *pComPort;                                        // Declaration                                         
CoCreateInstance(CLSID_ComPort, NULL, CLSCTX_INPROC_SERVER, IID_IComPort, (void**) &pComPort );   // Creation

After the declaration and creation of the object, you can use the object in your Visual C++ code.
Visual C++ samples are part of the product installation.
They can also be found online: ftp.activexperts-labs.com/samples/network-component.

4.6. How to use ActiveComport in an ASP 2.x environment

<html>
<body>
Version:
<script language=vbscript runat=server>
  Set objComport = CreateObject( "ActiveXperts.Comport" )
  Response.Write objComport.Version
</script>
</body>
</html>

ASP samples are part of the product installation.
They can also be found online: ftp.activexperts-labs.com/samples/network-component.

5. Comport object

5.1. Properties

Properties

Property Type Read/Write Description
Version String Out Version number of ActiveComport
Build String Out Build number of ActiveComport
ExpirationDate String Out Expiration date of ActiveComport
LastError Number In/Out Result of the last called function
Device String In/Out Device name. Either a direct COM port or a Windows Telephony device name
BaudRate Number In/Out The baudrate of the communication session; default: 9600 bps
Databits Number In/Out The number of databits; default: 8
Stopbits Number In/Out The number of stopbits; default: 1
Parity Boolean In/Out Parity; default: False
HardwareFlowControl Number In/Out Use Hardware Flow Control
DTRFlowControl Boolean In/Out Use advanced Hardware Flow Control flag: Data Terminal Ready (default: True)
RTSFlowControl Boolean In/Out Use advanced Hardware Flow Control flag: Request To Send; default: True
CTSFlowControl Boolean In/Out Use advanced Hardware Flow Control flag: Clear To Send; default: False
DSRFlowControl Boolean In/Out Use advanced Hardware Flow Control flag: DSR (Data Set Ready); default: False
SoftwareFlowControl Number In/Out Use Software Flow Control
ComTimeout Number In/Out Timeout of ReadString, ReadByte and ReadBytes functions, in millisec; default: 1000 msecs
IsOpened Boolean Out True if port is opened, otherwise False
PreCommandDelay Number In/Out Pre command delay, in milliseconds. Only used with the WriteString function
InterCharDelay Number In/Out Delay between each character sent, in milliseconds. Only used with the WriteString function
NewLine String In/Out The character sequence that forms a newline
LogFile String In/Out All serial port commands, as well as data transfer, is logged to this file

Version property

Version information of ActiveComport. This property is read-only; you cannot assign a value to it.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
WScript.Echo  "Version: " & objComport.Version

Build property

Build information of ActiveComport. This property is read-only; you cannot assign a value to it.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
WScript.Echo  "Version: " & objComport.Version
WScript.Echo  "Build: " & objComport.Build

ExpirationDate property

Expiration date of ActiveComport. This property is read-only; you cannot assign a value to it.
Once you have registered the product, the property holds the empty string ("") value.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
WScript.Echo "ExpirationDate: " & objComport.ExpirationDate

LastError property

The result of a previous called function. Use it to check the result of your last function call. A zero indicates: success. Any non-zero value means an error.
The GetErrorDescription function provides the error description of an error code.
For a complete list of error codes, check out the following page: www.activexperts.com/support/errorcodes.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
...
objComport.Open                                            ' Open the port
WScript.Echo "LastError: " & objSnmp.LastError         ' Display the result
...

Device property

Description:

Device driver to use.

You can either use a Windows telephony device (recommended) or a physical COM port (directly).

Assign one of the following strings to the 'Device' property:

  • A valid Windows telephony device name - this must be the literal name as it appears in Modems tab of the Phone and Modems Options applet in the Control Panel. For instance: "Standard 9600 bps Modem";
    Use the GetDevice function to retrieve Windows telephony device names;
  • A valid COM port string, formatted as COMx, where x is a valid COM port number. When you assign the 'Device' property with a COM port string, you bypass all Windows telephony intelligence, like dialing rules, port sharing and so on.

Windows telephony devices are highly recommended.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 19200 bps Modem"' Use a Windows telephony device (recommended)
...

BaudRate property

Description:

Baud rate at which the communications device operates. The default value is 0, which means that the baud rate setting is inherited from the Port/Device settings in the Control Panel of Windows.
You should use the UpdateCom function if you want to change the baudrate and the port is already opened.
This property can be one of the following values:

  • 0 (Default - inherit baud rate from the device settings as defined in the Control Panel)
  • 110
  • 300
  • 600
  • 1200
  • 2400
  • 4800
  • 9600
  • 14400
  • 19200
  • 38400
  • 56000
  • 57600
  • 115200
  • 128000
  • 230400
  • 256000
  • 460800
  • 921800

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.BaudRate            = 38400                     ' Use 38400 bps
objComport.Open   
...

Databits property

Description:

Number of databits in a byte. The default value is asDATABITS_DEFAULT, which means that the data bits setting is inherited from the Port/Device settings in the Control Panel of Windows. You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.DataBits            = objComport.asDATABITS_7   ' Use 7 bit data bits
objComport.Open   
...

Stopbits property

Description:

You can configure StopBits to be asSTOPBITS_DEFAULT, asSTOPBITS_1, asSTOPBITS_2 or asSTOPBITS_15.

If StopBits is asSTOPBITS_1, one stop bit is used to indicate the end of data transmission.
If StopBits is asSTOPBITS_2, two stop bits are used to indicate the end of data transmission.
If StopBits is asSTOPBITS_15, the stop bit is transferred for 150% of the normal time used to transfer one bit.

The default value is asSTOPBITS_DEFAULT, which means that the stop bits setting is inherited from the Port/Device settings in the Control Panel of Windows.

You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.StopBits            = objComport.asSTOPBITS_15  ' Use 1.5 stop bits
objComport.Open   
...

Parity property

Description:

Parity checking can detect errors of one bit only. An error in two bits might cause the data to have a seemingly valid parity, when in fact it is incorrect.

You can configure Parity to be none, odd, even, mark, or space.
If Parity is asPARITY_DEFAULT, the parity setting is inherited from the Port/Device settings in the Control Panel of Windows.
If Parity is asPARITY_NONE (=none), parity checking is not performed and the parity bit is not transmitted.
If Parity is asPARITY_ODD (=odd), the number of mark bits (1's) in the data is counted, and the parity bit is asserted or unasserted to obtain an odd number of mark bits.

If Parity is asPARITY_EVEN (=even), the number of mark bits in the data is counted, and the parity bit is asserted or unasserted to obtain an even number of mark bits.
If Parity is asPARITY_MARK (=mark), the parity bit is asserted.
If Parity is asPARITY_SPACE (=space), the parity bit is unasserted.

The default value is asPARITY_DEFAULT.

You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")       ' Create a new Comport instance
objComport.Device              = "COM2"                     ' Set device to COM2
objComport.Parity              = objComport.asPARITY_NONE   ' No parity
objComport.Open   
...

HardwareFlowControl property

Descripton:

Use Hardware Flow Control. The default value is asFLOWCONTROL_DEFAULT, which means that the hardware flow control settings are inherited from the Port/Device settings in the Control Panel of Windows.

This property sets the generic hardware flow control control properties.

When you set 'HardwareFlowControl' to asFLOWCONTROL_ENABLE:

When you set 'HardwareFlowControl' to asFLOWCONTROL_DISABLE:

In most circumstances, it is not necessary to assign DTRFlowControl, RTSFlowControl, CTSFlowControl or DSRFlowControl individually. However, in some situations you want need to assign these properties individually.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.HardwareFlowControl = objComport.asFLOWCONTROL_DISABLE  ' No hardware flow control
objComport.Open   
...

DTRFlowControl property

Descripton:

Advanced Hardware Flow Control. Usually, the HardwareFlowControl property will suffice: it sets all four advanced hardware flow control flags ( DTRFlowControl, RTSFlowControl, CTSFlowControl, DSRFlowControl).
The default value is asFLOWCONTROL_DEFAULT, which means that the DTR flow control settings are inherited from the Port/Device settings in the Control Panel of Windows.

You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.DTRFlowControl      = objComport.asFLOWCONTROL_DISABLE  ' No DTR hardware flow control
objComport.Open   
...

RTSFlowControl property

Description:

Advanced Hardware Flow Control. Usually, the HardwareFlowControl property will suffice: it sets all four advanced hardware flow control flags ( DTRFlowControl, RTSFlowControl, CTSFlowControl, DSRFlowControl).
The default value is asFLOWCONTROL_DEFAULT, which means that the RTS flow control settings are inherited from the Port/Device settings in the Control Panel of Windows.

You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.RTSFlowControl      = objComport.asFLOWCONTROL_DISABLE  ' No RTS
objComport.Open   
...

CTSFlowControl property

Description:

Advanced Hardware Flow Control. Usually, the HardwareFlowControl property will suffice: it sets all four advanced hardware flow control flags ( DTRFlowControl, RTSFlowControl, CTSFlowControl, DSRFlowControl).
The default value is asFLOWCONTROL_DEFAULT, which means that the CTS flow control settings are inherited from the Port/Device settings in the Control Panel of Windows.

You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.CTSFlowControl      = objComport.asFLOWCONTROL_DISABLE ' No CTS hardware flow control
objComport.Open   
...

DSRFlowControl property

Description:

Advanced Hardware Flow Control. Usually, the HardwareFlowControl property will suffice: it sets all four advanced hardware flow control flags ( DTRFlowControl, RTSFlowControl, CTSFlowControl, DSRFlowControl).
The default value is asFLOWCONTROL_DEFAULT, which means that the DSR flow control settings are inherited from the Port/Device settings in the Control Panel of Windows.

You cannot change the value when the port is already opened.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.DSRFlowControl      = objComport.asFLOWCONTROL_DISABLE ' No DSR hardware flow control
objComport.Open   
...

SoftwareFlowControl property

Description:

Software flow control. You should use the UpdateCom function if you want to change the baudrate after you have opened the port.
The default value is asFLOWCONTROL_DEFAULT, which means that the software flow control settings are inherited from the Port/Device settings in the Control Panel of Windows. The other valid values are: asFLOWCONTROL_DISABLE and asFLOWCONTROL_ENABLE.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM2"                    ' Set device to COM2
objComport.SoftwareFlowControl = objComport.asFLOWCONTROL_ENABLE ' Use software flow control
objComport.Open   
...

ComTimeout property

Description:

Timeout of ReadString function, in milliseconds. You can call this function anytime you want.
The default value is 1000.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600bps Modem"  ' Set device to Standard 9600 bps Modem
str                            = objComport.ReadString     ' Blocks until string is read or 1 sec is elapsed
WScript.Echo str
objComport.ComTimeout          = 5000                      ' Set timeout to 5000 msecs
str                            = objComport.ReadString     ' Blocks until string is read or 5 sec is elapsed
WScript.Echo str
objComport.Close                                           ' Close port
...

IsOpened property

Description:

True if port is opened, otherwise False.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
If( objComport.IsOpened ) Then
  WScript.Echo "Port is opened"
  objComport.Close                                         ' Close port
End If

PreCommandDelay property

Description:

Specifies a delay (in milliseconds) used before WriteString actually starts writing the command string. This property was introduced to support slow devices that do not accept a few commands right after eachother. These devices need a small delay between commands, which can be accomplished by setting this 'PreCommandDelay' property.
Note that the property does NOT apply to the WriteBytes and WriteByte functions.
Default value: 0, indicating no delay between commands.

Example:

   
Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then                          
  objComport.PreCommandDelay   = 500                       ' WriteString will use a delay of 500 msecs
                                                           ' before the command string is sent
  objComport.InterCharDelay    = 10                        ' A delay of 10 milliseconds between each character
                                                           ' Transmitted by the WriteString function
  ...
  objComport.WriteString "AT&F"
  ...
  objComport.Close                                         ' Close the port
End If

InterCharDelay property

Description:

Specifies a delay (in milliseconds) used in WriteString between each character transmitted. This property was introduced to support slow devices that do not allow each character tranmitted right after eachother in command mode. These devices need a small delay between characters, which can be accomplished by setting this 'InterCharDelay' property.
Note that the property does NOT apply to the WriteBytes function.
Default value: 0, indicating no delay between characters.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then
  objComport.PreCommandDelay = 500                         ' WriteString will use a delay of 500 msecs
                                                           ' before the command string is sent
  ...
  objComport.InterCharDelay  = 10                          ' Delay of 10 milliseconds between each character
                                                           ' transmitted by the WriteString function
  objComport.WriteString "AT&F"
  ...
  objComport.Close                                         ' Close the port
End If

NewLine property

Description:

The character sequence that forms a newline. Default value: the CR (carriage return) string. Most frequent used newline strings:

  • CR (carriage return) - a string containing only the ASCII-13 character (in C: "\r"; in VB: vbCr )
  • LF (linefeed) - a string containing only the ASCII-10 character (in C: "\n"; in VB: vbLf )
  • CRLF (carriage return / linefeed) - a string containing the ASCII-13, ASCII-10 sequence (in C: "\r\n"; in VB: vbCrLf )

A newline is used internally by two functions:

  • ReadString - bytes are read from the port until a newline is detected;
  • WriteString - bytes are written to the port. Finally a newline is sent.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then
  objComport.NewLine           = vbCrLf                    ' Use CRLF in the subsequent ReadBytes/WriteBytes calls
                                                           ' transmitted by the WriteString function
  objComport.WriteString "AT&F"                        ' AT&F is sent, followed by a CRLF
  ...
  objComport.Close                                         ' Close the port
End If

LogFile property

Description:

By default, LogFile holds the empty string and nothing is logged. If you assign a valid file name to it, all device commands and responses will be written to this log file.

Output is always appended.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.LogFile             = "C:\MyLogFile.txt"        ' All operations are logged here
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Open the port
...

5.2. Functions

Functions

Function Description
Clear Reset all properties to the default values
GetDeviceCount Return the number of Windows telephony devices installed on the local computer
GetDevice Retrieve a Windows telephony device name
Open Open a comport
Close Close a comport
ClearTX Clears the output buffer
ClearRX Clears the input buffer
ReadString Read an ASCII string from the comport
ReadByte Read a (binary) byte from the comport
ReadBytes Read a stream of (binary) bytes from the comport
WriteString Write an ASCII string to the comport
WriteByte Write a (binary) byte to the comport
WriteBytes Write a stream of (binary) bytes to the comport
UpdateCom Update the comport with new configuration settings
RaiseRTS Raise the RTS signal
RaiseDTR Raise the DTR signal
QueryCTS Query the CTS signal
QueryDSR Query the DSR signal
QueryDCD Query the DCD signal
QueryRI Query the RI signal
Sleep Be idle for some time
GetErrorDescription Get error description
Activate Activate the product

Clear function

Description:

Reset all properties to their initial values.

Description:

None.

Return value:

Always 0.

Example:

Set objComport  = CreateObject("ActiveXperts.Comport")     ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                              
...
objComport.Close                                            
objComport.Clear                                           ' Clear all properties
objComport.Device              = "COM1"                    ' Set device to COM1:
objComport.Open                                              
...

GetDeviceCount function

Description:

Returns the number of installed Windows telephony devices on the local computer.

Description:

  • None

Return value:

The number of installed Windows telephony devices. Check the LastError property to see if the function was completed successfully.

NOTE: The number of Windows telephony devices does not include the number installed COM ports.

Example:

Set objComport = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
WScript.Echo "Number of installed Windows telephony devices: " & objComport.GetDeviceCount()

GetDevice function

Description:

Returns the n-th telephony device of the system. The number n can be between 0 and GetDeviceCount()-1.

Description:

  • Zero based index, to iterate over all telephony devices.

Return value:

The name of the device. Call the LastError function to see if the function was completed successfully.
The name of the device can be assigned to the Device property to open a Windows telephony device.

Example:

Set objComport      = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
n = objComport.GetDeviceCount()
For i = 0 to n-1
   WScript.Echo "Device " & i & ": " & objComport.GetDevice( i )
Next

Example:

Set objComport      = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
If( objComport.GetDeviceCount() > 0 )
   objComport.Device = objComport.GetDevice( 0 )  ' Use the first telephony device
   objComport.WriteByte 32
End If

Open function

Description:

Open the comport. The Device indicates to port to open.

Description:

None.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
...

Close function

Description:

Close the COM port.

Description:

None.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device     = "Standard 9600 bps Modem"          ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then                          
  ...
  objComport.Close                                         ' Close the port
End If

ClearTX function

Description:

Clears the output buffer (if the device or UART has one).

Description:

None.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device     = "Standard 9600 bps Modem"          ' Set device to COM2
objComport.Open                                            ' Now open the Standard 9600 bps Modem
If( objComport.LastError = 0 ) Then                          
  ...
  objComport.ClearTX                                       ' Clear transmission queue                 
  objComport.WriteString "AT&F"
  ...
  objComport.Close                                         ' Close the port
End If

ClearRX function

Description:

Clears the input buffer (if the device or UART has one).

Description:

None.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then                          
  ...
  objComport.ClearTX                                       ' Clear transmission queue                 
  objComport.ClearRX                                       ' Clear transmission queue          
  ...       
  objComport.WriteString "AT&F"
  WScript.Echo objComport.ReadString                       ' Read incoming data  
  ...
  objComport.Close                                         ' Close the port
End If

ReadString function

Description:

This function reads a string of data from the device.
The function returns when either a string, terminated by a NewLine, is read from the device, or when the time specified by ComTimeout has elapsed.
In case of a timeout, the empty string will be returned and LastError will indicate a time-out.

Description:

None.

Return value:

The string that was read from the device.
Check LastError property to see if the function was completed successfully.
In case of a timeout, the empty string is returned, and LastError will indicate a time-out.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.ComTimeout        = 2000
  str = objComport.ReadString                              ' Function will timeout after 2000 msec
  WScript.Echo "String read: " & str
  ...
  objComport.Close
End If

ReadByte function

Comport.WriteBytes function

Description:

Send a stream of binary data to the device.

Description:

  • Stream of binary data

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

    
Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then                          
...
data                         = Chr( 1 ) & Chr( 2 ) & Chr( 253 ) & Chr( 254 ) & Chr( 255 )
objComport.WriteBytes data                               ' Write stream of data
...
objComport.Close                                         ' Close the port
End If

ReadBytes function

Description:

This function sends a (binary) byte to the device.

Description:

  • One byte

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then                          
  ...
  objComport.WriteByte 97                                  ' [A]
  objComport.WriteByte 116                                 ' [T]
  objComport.WriteByte 122                                 ' [Z]
  objComport.WriteByte 13                                  ' [<CR>]; ATZ issued.
  ...
  objComport.Close                                         ' Close the port
End If

WriteString function

Description:

This function sends a string of ASCII data to the device. Finally NewLine is sent to the device.

Description:

  • ASCII string to send

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If( objComport.LastError = 0 ) Then                          
  ...
  objComport.WriteString "AT&F"
  ...
  objComport.Close                                         ' Close the port
End If

WriteByte function

Description:

This function reads one byte of data from the device.
The function returns when either a byte is read from the device, or when the time specified by ComTimeout has elapsed. In case of a timeout, LastError will indicate a time-out.

Description:

None.

Return value:

The byte that was read from the device.
Check LastError property to see if the function was completed successfully.
In case of a timeout, the LastError will be set to indicate a timeout.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device     = "Standard 9600 bps Modem"          ' Set device to COM2
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.ComTimeout        = 2000
..
  bt = objComport.ReadByte
  If( objComport.LastError = 0 ) Then                      ' Function will timeout after 2000 msec
    WScript.Echo "Byte read: " & bt
  End If
  ...
  objComport.Close
End If

WriteBytes function

Description:

This function reads a stream of binary data from the device.
The function returns when when the time specified by ComTimeout has elapsed.

Description:

None.

Return value:

The function returns when when the time specified by ComTimeout has elapsed.
If data was read from the port, 0 will be returned; in case of a timeout without data being read from the port, the LastError property will indicate a timeout.

Example:

Set objComport  = CreateObject("ActiveXperts.Comport")     ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.ComTimeout        = 2000
  ...
  btData = objComport.ReadBytes                            ' Read stream of binary data
  If( objComport.LastError = 0 ) Then                      ' Function will timeout after 2000 msec
    WScript.Echo "Number of bytes read: " & Len( btData )
  End If
  ...
  objComport.Close
End If

UpdateCom function

Description:

If a COM port is already opened and you changed the baudrate or Software Flow Control, you must this function to let the changes take effect. of the comport.

Description:

None.

Return value:

The function returns when when the time specified by ComTimeout has elapsed.
If data was read from the port, 0 will be returned; in case of a timeout without data being read from the port, the LastError property will indicate a timeout.

Example:

Set objComport  = CreateObject("ActiveXperts.Comport")     ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.BaudRate          = 57600                     ' Use different baudrate
  objComport.SoftwareFlowControl = asFLOWCONTROL_ENABLE    ' Use software flow control
  objComport.UpdateCom                                     ' Update COM port
  ...
  objComport.Close
End If

RaiseRTS function

Comport.RaiseRTS function

Description:

Raise (or lower) the RTS (Request-To-Send) signal. Raising this signal has nothing to do with the HardwareFlowControl property: 'RaiseRTS' just raises (or lowers) the RTS signal, regardless of the hardware flow control used.

Description:

Boolean: True to raise the signal, or False to lower the signal.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.RaiseRTS( True )                              ' Raise RTS
  ...
  objComport.RaiseRTS( False )                             ' Lower RTS
  ...
  objComport.Close
End If

RaiseDTR function

Description:

Raise (or lower) the DTR (Data-Terminal-Ready) signal. Raising this signal has nothing to do with the HardwareFlowControl property: 'RaiseDTR' just raises (or lowers) the DTR signal, regardless of the hardware flow control used.

Description:

  • Boolean: True to raise the signal, or False to lower the signal.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.RaiseDTR( True )                              ' Raise DTR
  ...
  objComport.RaiseDTR( False )                             ' Lower DTR
  ...
  objComport.Close
End If

QueryCTS function

Description:

Query the actual value of the CTS (Clear-To-Send) signal.

Description:

None.

Return value:

True if CTS is raised, otherwise: False

Example:

Set objComport = CreateObject("ActiveXperts.Comport")       ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem"  ' Set device to Standard 9600 bps Modem
objComport.Open                                             ' Now open the port
If objComport.LastError = 0 Then
...
bVal                         = objComport.QueryCTS()      ' Query CTS signal
WScript.Echo "CTS: " & bVal
...
objComport.Close
End If

QueryDSR function

Description:

Query the actual value of the DSR (Data-Set-Ready) signal.

Description:

None.

Return value:

True if DSR is raised, otherwise: False

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  ...
  bVal                         = objComport.QueryDSR()     ' Query DSR signal
  WScript.Echo "DSR: " & bVal
  ...
  objComport.Close
End If

QueryDCD function

Description:

Query the actual value of the DCD (Data-Carrier-Detect) signal.

Description:

None.

Return value:

True if DCD is raised, otherwise: False

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  ...
  bVal = objComport.QueryDCD()                             ' Query DCD signal
  WScript.Echo "DCD: " & bVal
  ...
  objComport.Close
End If

QueryRI function

Description:

Query the actual value of the RI (Ring-Indicator) signal.

Description:

None.

Return value:

True if RI is raised, otherwise: False

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "Standard 9600 bps Modem" ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  ...
  bVal = objComport.QueryRI()                              ' Query RI signal
  WScript.Echo "RI: " & bVal
  ...
  objComport.Close
End If

Sleep function

Comport.Sleep function

Description:

This function can be used in your script anywhere you want; it will suspend the program. One paramter is required: the number of milliseconds you want to suspend.

Description:

  • Number of milliseonds to suspend

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device     = "Standard 9600 bps Modem"          ' Set device to Standard 9600 bps Modem
objComport.Open                                            ' Now open the port
If objComport.LastError = 0 Then
  objComport.WriteString( "AT&F" )                         ' Suspend for 1000 msecs, then resume
  objComport.Sleep( 1000 )
  WScript.Echo objComport.ReadString
  objComport.Close
End If

GetErrorDescription function

Comport.GetErrorDescription function

Description:

GetErrorDescription provides the error description of a given error code.

Description:

  • Error code.

Return value:

The error description that is associated with the given error code.

Example:

Set objComport = CreateObject("ActiveXperts.Comport")      ' Create a new Comport instance
objComport.Device              = "COM9"                    ' Set device to COM9
...
WScript.Echo "LastError: " & objComport.LastError
WScript.Echo "Error description: " & objComport.GetErrorDescription( objComport.LastError )
...

Activate function

Description:

This function activates the ActiveComport product. A valid registration key is required.

Description:

  • The registration key
  • Persistent - this optional Boolean variable (default: True) specifies whether you want to add the registration key to the registry.
    If you pass 'True', you need to call the 'Activate' function only once for that computer.
    If you pass 'False', you need to call 'Activate' each time you create the object on that computer. This can be useful for customers who own a Distribution License of the product but do not want to show the registration key to their customers.

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:

Set objComport = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
objComport.Activate "xxxxx-xxxxx-xxxxx", True ' Use a valid registration code
                                          ' Pass True to make the activation persistent, so you need to call
                                          ' Activate only once. If you pass False, you need to call Activate 
                                          ' each time the product is started.

5.3. Flags

Flow Control definitions

Constant Value Description
asFLOWCONTROL_DEFAULT 0 Flow Control setting is inherited from the Port/Device settings in the Control Panel of Windows.
asFLOWCONTROL_DISABLE 1 Disable Flow Control
asFLOWCONTROL_ENABLE 2 Enable Flow Control

Data Bit Flags definitions

Constant Value Description
asDATABITS_DEFAULT 0 Stop bits setting is inherited from the Port/Device settings in the Control Panel of Windows.
asDATABITS_7 7 7 data bits
asSTOPBITS_8 8 8 data bits

Stop Bit Flags definitions

Constant Value Description
asSTOPBITS_DEFAULT 0 Stop bits setting is inherited from the Port/Device settings in the Control Panel of Windows.
asSTOPBITS_1 1 1 bit stop bit (default)
asSTOPBITS_2 2 2 bit stop bit
asSTOPBITS_15 15 1.5 bit parity

Parity Codes definitions

Constant Value Description
asPARITY_DEFAULT 0 No parity bits
asPARITY_NONE 1 No parity bits
asPARITY_ODD 2 Odd parity
asPARITY_EVEN 3 Even parity bits
asPARITY_MARK 4 Mark parity
asPARITY_SPACE 5 Space parity

6. Error Codes

6.1. Introduction

When a function is called, the result of the function is stored in the object's LastError property. When LastError is 0, it means that the last called function completed successfully; otherwise, an error occured.

The value of the LastError tells you why the function failed. All error codes are listed on the ActiveXperts web site:

www.activexperts.com/support/errorcodes (list of error codes).

Here, you can also lookup a specific error to find its description.

You can also call the GetErrorDescription function to find the error description.

7. Samples

7.1. Introduction

Samples for Visual Basic, Visual Basic .NET, Visual C++, Visual C# .NET, ASP and VBScript are included as part of the installation. You can also find the samples on our website at ftp.activexperts-labs.com/samples/network-component.

8. Troubleshooting

8.1. FAQ's

Visit our website for a complete list of FAQ's at: http://www.activexperts.com/support

8.2. Contact us

Please contact our website for support questions about this product, or send an email to our support-staff:

Website: http://www.activexperts.com/support

E-mail: support@activexperts.com

9. Purchase and Product Activation

9.1. Purchase

Please visit www.activexperts.com/sales to buy the product. Here, you can also find the latest prices.

You can also contact us via email: sales@activexperts.com

After you purchase the product, you will receive one or more product registration keys.

9.2. Purchase Product Activation

After you purchase the product, you will receive a registration code. This code must be entered on the target computer(s).

You can do this by using the component's 'Activate' function:

Set objComport = CreateObject("ActiveXperts.Comport") ' Create a new Comport instance
objComport.Activate XXXXX-XXXXX-XXXXX", True  
    ' Replace XXXXX-XXXXX-XXXXX by your own registration code
    ' Pass True to make the activation persistent, so you need to call Activate 
    ' only once. If you pass False, you need to call Activate each time the 
    ' product is started.

Or you can activate by (re)installing the product using the Setup program. The InstallShield wizard will prompt for the registration code.

Or you can activate by editing the registry:

  • Start the registry editor (either REGEDT32.EXE or REGEDIT.EXE);
  • open the 'HKEY_LOCAL_MACHINE\Software\ActiveXperts\ActiveComport' key;
  • Add/modify the 'RegistrationKey' value: Type: REG_SZ, Value: XXXXX-XXXXX-XXXXX

For information about how to use the registration code with a Distribution License, please read the following document: How to distribute an ActiveXperts Toolkit

Appendix A License Agreement

PLEASE READ THIS SOFTWARE LICENSE AGREEMENT CAREFULLY BEFORE 
DOWNLOADING OR USING THE SOFTWARE.  BY CLICKING ON THE 
"ACCEPT" BUTTON, OPENING THE PACKAGE, DOWNLOADING THE PRODUCT, 
OR USING THE EQUIPMENT THAT CONTAINS THIS PRODUCT, YOU ARE 
CONSENTING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE 
TO ALL OF THE TERMS OF THIS AGREEMENT, CLICK THE "DO NOT 
ACCEPT" BUTTON AND THE INSTALLATION PROCESS WILL NOT CONTINUE, 
RETURN THE PRODUCT TO THE PLACE OF PURCHASE FOR A FULL REFUND, 
OR DO NOT DOWNLOAD THE PRODUCT.

GENERAL
In this Software License Agreement:
(i) "ActiveXperts" means ActiveXperts Software B.V.
(ii) "Customer" means the individual(s), organization or business entity 
buying a license of the Software from ActiveXperts or its Distributors 
or its Resellers.
(iii) "Software" means computer programs (and their storage medium) 
supplied by ActiveXperts and known collectively as "ActiveComport" 
in which ActiveXperts has property rights and any user manuals, 
operating instructions, brochures and all other documentation relating 
to the said computer programs (the expression "Software" to include all 
or any part or any combination of Software).

1. LICENSE GRANT
ActiveXperts grants Customer the following rights provided that you 
comply with all terms and conditions of this License Agreement:

(a) Installation and use. Customer may install, use, access, display and 
run one copy of the Software on a single computer, such as a 
workstation, terminal or other device ("Workstation Computer"). A 
"License Pack" allows you to install, use, access, display and run 
additional copies of the Software up to the number of "Licensed Copies" 
specified above.

(b) Reservation of Rights. ActiveXperts reserves all rights not 
expressly granted to you in this License Agreement.

2. UPGRADES AND SUPPLEMENTS
To use a product identified as an upgrade, you must first be licensed 
for the Software as eligible for the upgrade. After upgrading, Customer 
may no longer use the product that formed the basis for Customer's 
upgrade eligibility.

This License Agreement applies to updates or supplements to the original 
Software provided by ActiveXperts, unless we provide other terms along 
with the update or supplement.

3. LIMITATION ON REVERSE ENGINEERING,DECOMPILATION, AND DISASSEMBLY
Customer may not reverse engineer, decompile, or disassemble the 
Software, except and only to the extent that it is expressly permitted 
by applicable law notwithstanding this limitation.

4. TERMINATION
Without prejudice to any other rights, ActiveXperts may cancel this 
License Agreement if Customer does not abide by the terms and conditions 
of this License Agreement, in which case you must destroy all copies of 
the Software and all of its component parts.

5. NOT FOR RESALE SOFTWARE
Software identified as "Not for Resale" or "NFR," may not be resold, 
transferred or used for any purpose other than demonstration, test or 
evaluation.

6. LIMITED WARRANTY
ActiveXperts warrants that for a period of ninety (90) days from the 
date of shipment from ActiveXperts: (i) the media on which the Software 
is furnished will be free of defects in materials and workmanship under 
normal use; and (ii) the Software substantially conforms to its 
published specifications. Except for the foregoing, the Software is 
provided AS IS. This limited warranty extends only to Customer as the 
original licensee. Customer's exclusive remedy and the entire liability 
of ActiveXperts and its suppliers under this limited warranty will be, 
at ActiveXperts or its service center's option, repair, replacement, or 
refund of the Software if reported (or, upon request, returned) to the 
party supplying the Software to Customer. In no event does ActiveXperts 
warrant that the Software is error free or that Customer will be able to 
operate the Software without problems or interruptions.
This warranty does not apply if the software (a) has been altered, 
except by ActiveXperts, (b) has not been installed, operated, repaired, 
or maintained in accordance with instructions supplied by ActiveXperts, 
(c) has been subjected to abnormal physical or electrical stress, 
misuse, negligence, or accident, or (d) is used in ultrahazardous 
activities.


7. LIMITATION OF LIABILITY AND REMEDIES.
Notwithstanding any damages that you might incur for any reason 
whatsoever (including, without limitation, all damages referenced above 
and all direct or general damages), the entire liability of ActiveXperts 
and any of its suppliers under any provision of this License Agreement 
and your exclusive remedy for all of the foregoing (except for any 
remedy of repair or replacement elected by ActiveXperts with respect to 
any breach of the Limited Warranty) shall be limited to the greater of 
the amount actually paid by you for the Software or U.S.$5.00. The 
foregoing limitations, exclusions and disclaimers (including Sections 4, 
5 and 6 above) shall apply to the maximum extent permitted by applicable 
law, even if any remedy fails its essential purpose.

8. ENTIRE AGREEMENT

This License Agreement (including any addendum or amendment to this 
License Agreements which is included with the Software) are the entire 
agreement between you and ActiveXperts relating to the Software and the 
support services (if any) and they supersede all prior or 
contemporaneous oral or written communications, proposals and 
representations with respect to the Software or any other subject matter 
covered by this License Agreement. To the extent the terms of any 
ActiveXperts policies or programs for support services conflict with the 
terms of this License Agreement, the terms of this License Agreement 
shall control.

This Agreement shall be construed in accordance with the laws of The 
Netherlands and the Dutch courts shall have sole jurisdiction in any 
dispute relating to these conditions. If any part of these conditions 
shall be or become invalid or unenforceable in any way and to any extent 
by any existing or future rule of law, order, statute or regulation 
applicable thereto, then the same shall to the extent of such invalidity 
or enforceability be deemed to have been deleted from the conditions 
which shall remain in full force and effect as regards all other 
provisions.

9. Copyright
The Software is protected by copyright and other intellectual property 
laws and treaties. ActiveXperts or its suppliers own the title, 
copyright, and other intellectual property rights in the Software. The 
Software is licensed, not sold.