Consultor Eletrônico



Kbase P48546: An error occurred opening the type library for the control, custom made OCX in Visual Basic
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Verified

FACT(s) (Environment):

Windows
Progress 9.x

SYMPTOM(s):

An error occurred opening the type library for the control

OCX is registered under HKEY_CLASSES_ROOT and is listed under HKEY_LOCAL_MACHINE

CHANGE:

Modified a custom made OCX object by adding a function to it

CHANGE:

Custom OCX is written in Visual Basic

CAUSE:

Did not set the Binary Compatibility of the OCX that to preserve the class ID

FIX:

According to Microsoft's Visual Basic documentation, maintaining the Binary Compatibility of an OCX or DLL is the only way to preserve the class IDs of objects or controls in a project. Once you have deployed the OCX, you need to use the deployed version of the OCX as a comparison file for Binary Compatibility:

1) Make a copy of the deployed OCX or DLL with a different extension
2) Select properties from the Project menu to open the Project Properties dialog
3) Select Binary Compatibility in the Version Compatibility box of the Component tab
4) Enter the path and name of the file created in Step 1 in the Version Compatibility box of the Component tab

The above steps ensure that in all future modifications of the OCX object, the class ID of the object will be preserved as long as these modifications are compatible.