Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The QueryPathOfRegTypeLib function does not return the correct path for a 32-bit version of an application in a 64-bit edition of Windows 7 or in Windows Server 2008 R2


View products that this article applies to.

Symptoms

You have a computer that is running a 64-bit edition of Windows 7 or Windows Server 2008 R2. You run a 32-bit version of an application that uses the QueryPathOfRegTypeLib function to retrieve the path of a registered type library. However, the QueryPathOfRegTypeLib function does not return the correct path. The path of the 64-bit version of the type library is returned instead of the path of the 32-bit of the type library.

For sample code to reproduce this issue, see the "More information" section.

↑ Back to the top


Resolution

Update information

How to obtain this update

Microsoft Update
This update is available from the Microsoft Update website:
Microsoft Download Center
The following files are available for download from the Microsoft Download Center:
Operating systemUpdate
All supported x86-based versions of Windows 7Download Download the update package now.
All supported x64-based versions of Windows 7 Download Download the update package now.
All supported x64-based versions of Windows Server 2008 R2Download Download the update package now.
All supported IA-64-based versions of Windows Server 2008 R2Download Download the update package now.
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Prerequisites

There are no prerequisites.

Registry information

To use the update in this package, you do not have to make any changes to the registry.

Restart requirement

You may have to restart the computer after you apply this update.

Update replacement information

This update does not replace a previously released update.

File information

The global version of this update installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.
Windows 7 and Windows Server 2008 R2 file information notes
  • The files that apply to a specific product, milestone (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table:
    VersionProductMilestoneService branch
    6.1.760
    0.16xxx
    Windows 7 and Windows Server 2008 R2RTMGDR
    6.1.760
    0.20xxx
    Windows 7 and Windows Server 2008 R2RTMLDR
  • GDR service branches contain only those fixes that are widely released to address widespread, extremely important issues. LDR service branches contain updates in addition to widely released fixes.
  • The MANIFEST files (.manifest) that are installed for each environment are listed separately in the "Additional file information for Windows Server 2008 R2 and for Windows 7" section. MANIFEST files and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.
For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
File nameFile versionFile sizeDateTimePlatform
Oleaut32.dll6.1.7600.16567861,18407-Apr-201007:37x64
Oleaut32.dll6.1.7600.20685861,18407-Apr-201007:46x64
Oleaut32.dll6.1.7600.16567571,90407-Apr-201007:10x86
Oleaut32.dll6.1.7600.20685571,90407-Apr-201007:33x86
For all supported IA-64-based versions of Windows Server 2008 R2
File nameFile versionFile sizeDateTimePlatform
Oleaut32.dll6.1.7600.165672,038,78407-Apr-201006:27IA-64
Oleaut32.dll6.1.7600.206852,039,29607-Apr-201006:15IA-64
Oleaut32.dll6.1.7600.16567571,90407-Apr-201007:10x86
Oleaut32.dll6.1.7600.20685571,90407-Apr-201007:33x86

↑ Back to the top


Status

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

↑ Back to the top


More Information

Sample code to reproduce this issue

For example, the following sample code develops a 32-bit version of an application:
#include "windows.h"
#include "Oleauto.h"

int _tmain(int argc, _TCHAR* argv[])
{
GUID guid;
//OLE Automation(2.0)
IIDFromString(L"{00020430-0000-0000-C000-000000000046}", &guid);

DWORD lcid = 0x0409;
BSTR str;
QueryPathOfRegTypeLib(guid, 2, 0, lcid, &str);

wprintf(L"%s\n",(LPCTSTR)str);

::SysFreeString(str);
return 0;
}
When you run the application in a 64-bit edition of Windows 7, you expect to receive the following output:
C:\Windows\SysWoW64\stdole2.tlb 
However, you receive the following output:
C:\Windows\system32\stdole2.tlb 

For more information about the QueryPathOfRegTypeLib function, visit the following Microsoft website:For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional file information

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
File nameAmd64_5f0224883f1e3f45f188d955acd5b319_31bf3856ad364e35_6.1.7600.20685_none_c73d9dc5cd4cf33e.manifest
File versionNot applicable
File size706
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameAmd64_6b59bf1cd819ae9ea3518c7fbaf0c41f_31bf3856ad364e35_6.1.7600.16567_none_c1f8f7f01cc04c9f.manifest
File versionNot applicable
File size706
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameAmd64_cb6ff6bc1d40ee81862267567358a60c_31bf3856ad364e35_6.1.7600.20685_none_97d7af021628a60b.manifest
File versionNot applicable
File size706
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameAmd64_f425ab8a4e3417e884da49f61bed5d2f_31bf3856ad364e35_6.1.7600.16567_none_9df88a761d9814a3.manifest
File versionNot applicable
File size706
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameAmd64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.16567_none_190cc06d15192ee9.manifest
File versionNot applicable
File size49,750
Date (UTC)07-Apr-2010
Time (UTC)08:45
PlatformNot applicable
File nameAmd64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.20685_none_197ebccc2e48d3e7.manifest
File versionNot applicable
File size49,750
Date (UTC)07-Apr-2010
Time (UTC)09:05
PlatformNot applicable
File nameWow64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.16567_none_23616abf4979f0e4.manifest
File versionNot applicable
File size47,158
Date (UTC)07-Apr-2010
Time (UTC)07:33
PlatformNot applicable
File nameWow64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.20685_none_23d3671e62a995e2.manifest
File versionNot applicable
File size47,158
Date (UTC)07-Apr-2010
Time (UTC)07:57
PlatformNot applicable
Additional files for all supported IA-64-based versions of Windows Server 2008 R2
File nameIa64_5f0224883f1e3f45f188d955acd5b319_31bf3856ad364e35_6.1.7600.20685_none_6b20a63814ed8b04.manifest
File versionNot applicable
File size705
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameIa64_7282cf41f4460fcddc317480f8ebfc27_31bf3856ad364e35_6.1.7600.20685_none_766c04d51f0d7c5d.manifest
File versionNot applicable
File size704
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameIa64_e64017c9d87c7f5789e5a7764094b15d_31bf3856ad364e35_6.1.7600.16567_none_9bdc591049e8e5a5.manifest
File versionNot applicable
File size704
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameIa64_f425ab8a4e3417e884da49f61bed5d2f_31bf3856ad364e35_6.1.7600.16567_none_41db92e86538ac69.manifest
File versionNot applicable
File size705
Date (UTC)07-Apr-2010
Time (UTC)16:02
PlatformNot applicable
File nameIa64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.16567_none_bcefc8df5cb9c6af.manifest
File versionNot applicable
File size49,749
Date (UTC)07-Apr-2010
Time (UTC)08:38
PlatformNot applicable
File nameIa64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.20685_none_bd61c53e75e96bad.manifest
File versionNot applicable
File size49,749
Date (UTC)07-Apr-2010
Time (UTC)09:05
PlatformNot applicable
File nameWow64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.16567_none_23616abf4979f0e4.manifest
File versionNot applicable
File size47,158
Date (UTC)07-Apr-2010
Time (UTC)07:33
PlatformNot applicable
File nameWow64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7600.20685_none_23d3671e62a995e2.manifest
File versionNot applicable
File size47,158
Date (UTC)07-Apr-2010
Time (UTC)07:57
PlatformNot applicable

↑ Back to the top


Keywords: kb, kbprb, kbsurveynew, atdownload, kbfix, kbexpertiseinter, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 982110
Revision : 5
Created on : 4/10/2020
Published on : 4/10/2020
Exists online : False
Views : 199