Identifying problems in the registration of third-party ActiveX.

1) Introduction

ActiveX controls are software components based on COM technology (Component Object Model) that can be inserted into an application to perform various tasks. These objects are developed in programming environments such as C/C++, Delphi, and Visual Basic, among others.

Some ActiveX objects are automatically registered on E3: E3Alarm, E3Browser, and E3Chart (developed by Elipse Software); Microsoft Forms (developed by Microsoft); and Report (ActiveReports, developed by Data Dynamics).

Other ActiveX must be registered in E3 to be available at E3 Studio’s “Insert” menu, and this record can present problems for some third-party ActiveX. A common problem, for example, is the inconsistency between ActiveX’s and TypeLib’s versions.

This article shows how to check the versions of ActiveX and TypeLib, and how to change them to work around the problem of the control record at E3.

2) Checking the ActiveX’s versions

To check the consistency of the ActiveX’s versions, you can use development tools such as OLE View, or then directly check the keys created in the Windows registry. Checking via Windows registry is a little different depending on the version of Windows being used (32 or 64 bits). To avoid problems with the version of Windows, use the 32-bit version of the Windows registry editor as follows:

  1. Click Start, and then click Run
  2. In the window that opens, type %systemroot%\syswow64\regedit and click OK.

Go to HKEY_CLASSES_ROOT and right-click it, selecting the option Find…

Search name of the ActiveX you want to check. When locating the folder, it should be presented in this format, with an internal CLSID folder:

Save the value of CLSID for a new search. Locate the folder HKEY_CLASSES_ROOT \ CLSID and, once inside it, look for another folder with the CLSID value. It should look like this:

Here, you should check the following values:

The OCX file path: Check here if the path is actually pointing to the directory where the OCX is located;

The ActiveX’s version;

And the ActiveX’s TypeLib.

Save the value of TypeLib for a new search. Locate the folder HKEY_CLASSES_ROOT\TypeLib and, once inside it, look for another folder with the TypeLib value. It should look like this:

where we can see the TypeLib’s version, and once again the full path of the OCX file.

Make sure this is the correct full path, that is, if it is the same one where the OCX file to be used is. In addition, make sure both the ActiveX’s and the TypeLib’s versions are the same.

Another possible check is regarding internal versions of the TypeLib’s internal interfaces. To do so, go to folder HKEY_CLASSES_ROOT\Interface and look for TypeLib’s value. Multiple occurrences can be found, as shown below:

However, this check helps detect problems, but it should not be a constraint. Interfaces of different versions may occur, especially if you have more than one version of the same ActiveX registered in the machine.

3) Switching the ActiveX’s version

When the ActiveX’s and the TypeLib’s versions are not the same, it represents a problem in the development of ActiveX. In this case, the developer must be notified. However, there is a way to work around the problem so that the E3 and other development software programs can register the ActiveX: by switching the ActiveX’s version directly in the Windows registry. The important thing is to make sure that both have the same version, but as a rule of thumb switching the ActiveX’s version has more chances of being a successful task than switching the TypeLib’s, due to the versions of the internal interfaces that were observed in the previous session.

To switch the ActiveX’s version, you must access the Windows Registry again. Repeat the steps in the beginning of this article, according to the version of Windows installed in your machine, until you find the ActiveX’s CLSID again. Select the folder Version, right-click on the variable Default, and select Modify. In the window that opens, switch the value of the version to the same as TypeLib’s.

After these steps have been completed, the ActiveX can be registered in E3 with no problems.

4) Conclusion

The procedures presented in this article have been created to work around a development problem of third-party ActiveX, and should be used only in cases where either the user cannot contact the developer, or ActiveX is from a version whose technical support is no longer available. However, the proper procedure from the user should always be to contact the ActiveX’s developer to solve the problem.

WARNING: This article contains procedures that explain how to modify the Windows registry. However, serious problems might occur if you modify the registry incorrectly. Hence, follow these procedures very carefully. For added safety, make a backup of the registry before you modify it, so you can restore it if any problem occurs. For more information on how to backup and restore Windows registry, read the Microsoft article “How to back up and restore the registry in Windows“.

Related articles

How to view the system registry by using 64-bit versions of Windows.
http://support.microsoft.com/kb/305097

Registry changes in x64-based versions of Windows Server 2003 and in Windows XP Profesisonal x64 Edition
http://support.microsoft.com/kb/896459

How to back up and restore the registry in Windows
http://support.microsoft.com/kb/322756

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *