KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Article: Q147312
Product(s): Microsoft C Compiler
Version(s): 4.0
Operating System(s): 
Keyword(s): kberrmsg kbide kbVC kbVC400bug kbGrpDSTools
Last Modified: 30-JUL-2001

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual C++, version 4.0 
-------------------------------------------------------------------------------

SYMPTOMS
========

When you import an OLE Control into the Microsoft Developer Studio, the
Component Gallery reports the following error:

  Unable to import this OLE control. Make sure the control contains a valid
  type library.

CAUSE
=====

The Component Gallery is checking the version of the type library for the
control against the version of the OLE Control itself. If the versions do not
match, the error is generated.

RESOLUTION
==========

The version identification for the control and the control's type library must
be made to match. The version identification for an OLE control written in MFC
is located in .cpp file that contains the CWinApp-derived class and will have
the following format:

     const WORD _wVerMajor = 1;
     const WORD _wVerMinor = 0;

The version identification for the control's type library is located in the .odl
file for the control and will have the following format:

  [ uuid(209E0960-66DC-11CF-8B9A-444553540000), version(1.0),
  helpstring("KBCtl OLE Control module"), control ]
  library KBCTLLib

Notice that in the previous cases, the version of the control and the control's
type library (which is generated from the .odl file) match. The version is 1.0
in both cases.

STATUS
======

This behavior is by design. This error typically occurs when the version
identification of a control is incremented but the version of the control's type
library is not made to match.


Additional query words:

======================================================================
Keywords          : kberrmsg kbide kbVC kbVC400bug kbGrpDSTools 
Technology        : kbVCsearch kbVC400 kbAudDeveloper
Version           : :4.0
Issue type        : kbprb

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.