BUG: Visual C++ may stop responding when importing a type library (250060)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q250060

SYMPTOMS

When using the #import compile time directive, the Visual C++ IDE stops responding.

CAUSE

The thread that updates the ClassView information has become blocked.

RESOLUTION

To solve this problem, follow these steps to make sure that the #import directive is not preprocessed for ClassView information:
  1. Remove the #import directive from the source file.
  2. Create a new header file and place the #import directive in this file. Do not add this header file to the project.
  3. Include the newly created header file in the source file from step 1.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

ClassView information is updated dynamically each time a file is saved. If the resulting .tlh and .tli files are out-of-date with respect to the type library being imported, LoadTypeLib is called on the type library and the type information is stored in the ncb file.

There are three kinds of type libraries:
  • A stand-alone type library implemented by Typelib.dll.
  • A DLL or an executable that contains a TYPELIBRARY resource.
  • If the file is none of the above, the file name is parsed into a moniker and then bound to the moniker.
The symptoms described in this article can be caused by importing libraries that must be parsed into a moniker.

Note This is a problem with ClassView. The compiler will still generate the correct type information from the type library.

Modification Type:MajorLast Reviewed:4/21/2005
Keywords:kbtshoot kbBug kbide kbnofix KB250060 kbAudDeveloper