Article ID: 152392 - Last Review: June 2, 2005 - Revision: 4.0 You receive an "Unable to import OLE control" error message when you try to import an ActiveX controlThis article was previously published under Q152392 SYMPTOMS
Microsoft Developer Studio with Visual C++, versions 4.0 and 4.1, reports
the error message:
Unable to import OLE control.
In Visual C++, version 4.2, the error states:
The OLE control is not registered properly or its type library version
is incorrect.
Unable to open this ActiveX Control. Make sure the control contains a
valid type library.
CAUSE
By default, MFC applications use ID binding to call methods in ActiveX
controls. Because of this behavior, Developer Studio checks to make sure
that the version of the type library is the same as that of the control. If
the versions are not the same, Developer Studio reports an error. This error is usually caused by incrementing the version of the ActiveX Control but not the version of the type library. For more information on ID binding, please see the following article in the Microsoft Knowledge Base: 138138
(http://support.microsoft.com/kb/138138/EN-US/
)
Three Binding Types (Late, ID, Early) Possible in VB for Apps
RESOLUTION
Make sure that the version of the ActiveX control matches the version of
its type library. In an MFC control, the version of the control is represented by constants found in the implementation file for the OLE control class: const WORD _wVerMajor = 1; const WORD _wVerMinor = 0; STATUS
This behavior is by design. MORE INFORMATION
An updated version of this control would have version identifiers similar
to the following:
APPLIES TO
| Article Translations
|
Back to the top
