Highlighted
Absent Member.
Absent Member.
1379 views

[archive] More problem with ActiveX

[Migrated content. Thread originally posted on 05 February 2003]

In my application I have ActiveX control. Now I want to distrubute my application. I have the ActiveX control in the directory where my appication will be installed on the user?s hard disk and I want to call regsvr32 automatically when I use the application and the control is not installed and registrated in the user?s hard disk.
When I try to call the control in my application this message is displaying ?Error creating AcviteX control COBOL error att 00F3C9 in programx.cbl?, because the control is not registred. How I can register the control automatically when I call this in my program?
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] More problem with ActiveX

In your Form-Bef-Create try this:

CALL "C$SYSTEM" USING "REGSVR32 /S MSCAL.OCX"
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] More problem with ActiveX

Can I check with a system?s command if the control is installed and registred before I use "REGSVR32. Can I check the errors when I am creating the activeX and then if an error occurs use the program for registration??
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] More problem with ActiveX

Here is example code to check if a control is already registered and if it is not then register it...

call "REG_OPEN_KEY" using HKEY_CLASSES_ROOT,
"CLSID\{35053A22-8589-11D1-B16A-00C0F0283628}",
subkey-handle, GIVING RegOpenStat.
if RegOpenStat > 0
call "c$system" using "regsvr32 /s mscomctl.ocx".
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] More problem with ActiveX

Edith400,

if you use the exception handler I showed you in another thread here, you can use that one to determine that an object is not installed, just the way you would deal with a non present file when you are trying to open it. look at the thread "Calendar again" in which I posted an example using an exception handler in the DECLARATIVES section.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.