PRB: Error Messages When Recompiling ActiveX Component with Binary Compatibility (258192)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q258192 SYMPTOMS
A run-time error is raised when an ActiveX component is recompiling in Visual Basic, as follows.
When recompiling a Visual Basic ActiveX EXE or ActiveX DLL, the client application may display the following error message:
Run-Time Error '430':
Class Does not support Automation or does not support expected interface
When a Visual Basic UserControl is recompiled, the client application may display the following error message:
Failed to activate control 'VB.UserControl'. This control may be incompatible with your application. Make sure that you are using the version of the control that was provided with your application.
CAUSE
These errors occur if Public Methods or Properties are added to the ActiveX component after making a copy for Binary Compatibility and then recompiling the component a second time.
When new Public Methods or Properties are added to an ActiveX .exe, ActiveX .dll, or a UserControl with Binary Compatibility set, Visual Basic adds a new Interface to the second version for new client applications to use, and creates a pointer from the old interface to the new Interface so that old clients continue to work.
However, a problem occurs when a third version of this new ActiveX component is compiled without resetting the Binary Compatible file to the second version of the ActiveX .exe, .dll, or .ocx file. When this occurs, a new universally unique identifier (UUID) and Interface are generated and any client applications compiled against the second version fail.
RESOLUTION
Ensure that the Binary Compatibility is always set to the latest version of your ActiveX component, or a version that includes all Public Methods and Properties.
STATUS
This behavior is by design.
REFERENCES161137 HOWTO: Use Project and Binary Compatibility
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbCtrlCreate kbDLL kbInprocSvr kbLocalSvr kbprb KB258192 |
---|
|