ContentsIndexPreviousNext

6.10.9 Distributing Applications Containing ActiveX Controls

To distribute your application, you need the object files and the resources they use. If you have added ActiveX controls to your application, this means you need to distribute files associated with the ActiveX controls in addition to the bitmap, ".wav", xfd, and configuration files required by your application. The ActiveX controls must be installed and registered on the user's machine to enable your application to use them. This is usually accomplished by copying the ActiveX control files (at least a ".ocx" or ".dll" file) to the hard disk and executing the following command:

regsvr32 <ocx or dll name>

(regsvr32.exe is normally located in the windows/system directory).

Some controls require a license file as well, while others check the system registry or hard disk for other properly installed and licensed software. When an ActiveX control requires a license, the distributor of the control provides a license key. This license key is a text string usually located in a ".lic" file. When distributing your application, you do not send the ".lic" file or license key to the end user directly. Instead, you set the value of the LICENSE-KEY property for the control to this license key, thereby embedding this license key in your COBOL program. Then, when a user runs your COBOL program, the license key is passed to the ActiveX control for verification. If the control's license is missing or invalid, the following message displays:

Class is not licensed for use.
COBOL error at xxxxx in xxxxx.

Refer to Section 5.16 of Book 2, "User Interface Programming Guide" for more information on using the LICENSE-KEY property.