


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 along with the bitmap, ".wav", xfd, and configuration files required by your application. In addition, you will need to modify your installation program to install and register the controls on the end-user's machine. Typically, you can accomplish this by copying the ActiveX control files (at least a ".ocx" or ".dll" file) to the directory where your application will be installed on the user's hard disk and calling the following command from your install shield script or batch file:
regsvr32 <ocx or dll name>
"regsvr32.exe" is normally located in the user's \windows\system directory. Do not assume that it is in the user's search path.
Complex controls may have more complicated installation and registration procedures. If this is the case, the control vendor typically provides instructions on distributing their controls. Look for instructions in the form of "readme" files or online help files in the directory where your control is stored. You can also refer to the vendor's Web site for instructions.
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, for more information on using the LICENSE-KEY property.