ContentsIndexPreviousNext

3.7 AXDEFGEN Utility

The ActiveX Definitions Generator (AXDEFGEN) utility is a dialog-based application designed to facilitate the addition of ActiveX controls and OLE objects to Windows-based ACUCOBOL-GT programs. The role of AXDEFGEN is to locate the names of ActiveX controls and OLE objects currently registered on the system and generate a COBOL copybook for the control or object that you select. This copybook is used by the ACUCOBOL-GT compiler for syntax and parameter type checking as well as efficient code generation.

AXDEFGEN is located in the \AcuGT\bin directory wherever you installed ACUCOBOL-GT on your machine (\acucorp\acucbl500\AcuGT\bin by default). If you run AXDEFGEN without command line parameters, a dialog box displays.

The dialog box lists all ActiveX controls and other OLE objects that have registered type libraries. Select the name of an ActiveX control or OLE object that you want to include in your COBOL program, then browse to choose an output path and filename for the copybook file. (The extension ".def" is automatically appended to the filename you specify.) When done, press "OK" to generate the copybook.

Many ActiveX controls and OLE objects have documentation available. If they do, the "ActiveX Help" button on the right of this box is enabled. Click the button to read the help file for the selected ActiveX control or OLE object. If the "ActiveX Help" button is disabled, it means that AXDEFGEN could not locate a help file for the selected control.

If desired, you can execute AXDEFGEN from the command line. It takes two optional command line parameters. The first is the registry name of an ActiveX control or other OLE object. The second is the name of the copybook file you want AXDEFGEN to create. For example:

AXDEFGEN MSCAL.Calendar CAL.DEF

creates a copybook file named CAL.DEF in the current directory containing the definitions for the Microsoft Calendar Control which is an ActiveX control registered as MSCAL.Calendar in the system registry. Likewise:

AXDEFGEN Word.Application WORD.DEF

creates a copybook file named WORD.DEF in the current directory containing the definitions for Microsoft Word which is registered as Word.Application in the system registry.

For more information on ActiveX and OLE Programming, including instructions on what to do with the copybooks generated by AXDEFGEN, refer to section 6.10 of this book (the ACUCOBOL-GT User's Guide).

More:

3.7.1 AXDEFGEN Copybooks