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, 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 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>

The "regsvr32.exe" file is normally located in the user's \windows\system directory. It is also included on the ACUCOBOL-GT Windows installation CD. Do not assume that it is in the user's search path or that it is pre-installed on Windows 98 and Windows NT 4.

Note: We recommend that you test your component installation by using the Declaratives section to catch exceptions when creating an instance of an ActiveX control. See C$EXCEPINFO for details. In addition, note that "regsvr32" can be used to unregister a control as well as register it. This may be useful if you want to test whether or not your installation script is properly registering the control. When you type "regsvr32" with no command-line options, a list of available options is displayed.

Complex controls may have more complicated installation and registration procedures. If this is the case, control vendors typically provide 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 a vendor's Web site for instructions.

Some ActiveX controls require a deployment license that is different than the development license. The vendor may or may not include that deployment license as part of the control's installation, depending on the ability of the appropriate development tool to discover that deployment license and embed it in the application. AXDEFGEN is able to discover the deployment license, and set a LICENSE-KEY property in the generated COPY file. In this case, your application is ready for distribution with only the ActiveX control.