Microsoft KB Archive/249626

From BetaArchive Wiki
Knowledge Base


BUG: Word 2000 Version Key Doesn't Match Its Type Library Version

Article ID: 249626

Article Last Modified on 3/14/2001



APPLIES TO

  • Microsoft Word 2000 Standard Edition



This article was previously published under Q249626

SYMPTOMS

Traditionally, clients that support Object Linking and Embedding (OLE) can use both the TypeLib key and Version key in the registry (under the CLSID for an embeddable object) to locate the type library that describes the object and its methods.

In Word 2000, the value for the Version key does not match the version number of its type library. Consequently, clients that rely on this behavior may fail to identify the correct type library for Word 2000 when using the registry.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The Word 2000 type library is an enhanced version of the 8.0 type library that shipped with Word 97. It has a version number of 8.1, and its location can be found in the registry under the key:

HKEY_CLASSES_ROOT\TypeLib\{00020905-0000-0000-C000-000000000046}\8.1
                

However, the Word Document object lists the TypeLib and Version as:

HKEY_CLASSES_ROOT\CLSID\{00020906-0000-0000-C000-000000000046}
...
TypeLib = "{00020905-0000-0000-C000-000000000046}"
Version = "9"
...
                

So, if you use these keys to to locate the type library in the registry, and/or use these keys to call the LoadRegTypeLib API, it will fail to find the library since the code will be asking for a non-existent registry key:

  HKEY_CLASSES_ROOT\TypeLib\{00020905-0000-0000-C000-000000000046}\9
                

Clients are advised to handle any missing entry in the registry as an unregistered type library. To get the type information for an OLE object that is not registered in the type library, clients can create an instance of the object and ask for its ITypeInfo using IDispatch::GetTypeInfo() or IProvideClassInfo::GetClassInfo().


Additional query words: OLE2 TypeInfo

Keywords: kbbug kbpending KB249626