Host On-Demand and Personal Communications provide a set of Host Access ActiveX Controls for use in ActiveX development environments. The following controls are available:
The controls function and behave identically to the Host Access Beans, so the beans documentation can also be used as a reference for the controls. See Introduction to the Host Access Beans for descriptions of the controls, as well as the properties and methods of each. See your ActiveX development tool documentation for help on using ActiveX controls.
The same ActiveX controls are installed by Personal Communications and Host On-Demand, so only one set of controls from either Host On-Demand or Personal Communications will function on a single workstation. If the controls are installed by both products, the controls from the last product installed will be used. In addition, if the last product installed is later removed, the controls will be disabled until either Host On-Demand or Personal Communications is reinstalled.
The ActiveX controls were generated by wrapping the Host Access Beans for Java in ActiveX wrappers using Sun's ActiveX Bridge technology. The controls have registry entries like normal ActiveX controls, and they have a common OCX file called beans.ocx. Beans.ocx is a thin ActiveX wrapper around the beans which interfaces with the beans as they run inside a Java Runtime Environment or JRE.
To copy the ActiveX controls from a Host On-Demand installation to another Windows 9x or Windows NT (4.0 or higher) workstation, do the following steps on the target workstation:
Note: You must have the appropriate licensing to run the ActiveX controls on each workstation. See the licensing agreement of the installing product for more information.
To connect to a host, your program must first create either a Terminal or Session ActiveX control. A Terminal control would be used when you want a visible display of the session. A Session control should be used when you don't want the session to be visible. The Terminal/Session is the connection to your host. You need to set the Host property of Terminal/Session control to the name of the host to which you want to connect.
Host = ralvm17
See your ActiveX tool documentation for help on setting ActiveX control properties.
Once the host name is set, communications with the host can be started by calling the startCommunication method.
Terminal1.startCommunication
In the example above, 'Terminal1' is the name given to the first instance of the Terminal Control in a Visual Basic application. See your ActiveX tool documentation for the appropriate syntax for invoking methods.
If you are using Visual Basic, you will receive the following error message if the controls are not set up properly.
If you are using Visual C++, you will receive the following error message if the controls are not set up properly.
When automatically installed, you should not see these problems, but if you have manually installed the controls on a workstation these errors may occur if you have set them up incorrectly. These problems are usually caused if the .jar files required by the Host Access Controls cannot be found or if the registry entries are incorrect. Retrace the steps for manually installing the controls on a new workstation, and double-check the directory paths. Be sure that you correctly updated the registry files and ran register.bat.