Microsoft KB Archive/895321

= FIX: You may receive a 0x800706F7 error message when you make a COM method call that has a BSTR parameter =

Article ID: 895321

Article Last Modified on 12/5/2007

-

APPLIES TO

 Microsoft COM+ 1.5, when used with:  Microsoft Windows Server 2003, Standard Edition (32-bit x86)

 Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)

 Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)

 Microsoft Windows Server 2003, Web Edition</li></ul>

 Microsoft Windows Server 2003, Standard x64 Edition</li></ul>

 Microsoft Windows Server 2003, Enterprise x64 Edition</li></ul>

 Microsoft Windows Server 2003, Datacenter x64 Edition</li></ul>

 Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems</li></ul>

 Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems</li></ul>

 Microsoft Windows XP Home Edition</li></ul>

 Microsoft Windows XP Professional</li></ul>

 Microsoft Windows XP Professional x64 Edition</li></ul> </li></ul>

-

<div class="notice_section">

<div class="notice_section">

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

Important This article contains information that shows you how to help lower security settings or how to turn off security features on a computer. You can make these changes to work around a specific problem. Before you make these changes, we recommend that you evaluate the risks that are associated with implementing this workaround in your particular environment. If you implement this workaround, take any appropriate additional steps to help protect your system.

<div class="symptoms_section">

SYMPTOMS
When you make a COM method call that has a BSTR as a parameter, you may receive an error message that is similar to the following:

0x800706F7 (The stub received bad data)

For example, you may experience this problem when you call the IClassFactory::CreateInstanceLic COM method.

<div class="cause_section">

CAUSE
This problem occurs if you marshal a BSTR from a Microsoft Windows 2000-based computer to a Microsoft Windows Server 2003-based computer or to a Microsoft Windows XP-based computer. There is additional validation of BSTR data on Windows Server 2003-based computers and on Windows XP-based computers. This additional validation may make BSTR data appear to be invalid.

<div class="resolution_section">

Service pack information
To resolve this problem, obtain the latest service pack for Windows Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

889100 How to obtain the latest service pack for Windows Server 2003

Prerequisites
You must have Microsoft Windows Server 2003 Service Pack 1 (SP1) or Microsoft Windows XP Service Pack 2 (SP2) installed to apply this hotfix.

Restart requirement
You must restart the computer after you apply this hotfix

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Windows Server 2003, Itanium-based versions <pre class="fixed_text">  Date         Time   Version        Size       File name     Platform 29-Jun-2005 05:57  5.2.3790.2476  3,931,136  Oleaut32.dll  IA-64

Windows Server 2003, x64-based versions <pre class="fixed_text">  Date         Time   Version        Size       File name --  29-Jun-2005  05:57  5.2.3790.2476  1,116,160  Oleaut32.dll

Windows Server 2003, x86-based versions <pre class="fixed_text">  Date         Time   Version        Size     File name 29-Jun-2005 05:16  5.2.3790.2476  556,032  Oleaut32.dll

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
You must have Microsoft Windows Server 2003 Service Pack 1 (SP1) or Microsoft Windows XP Service Pack 2 (SP2) installed to apply this hotfix.

Restart requirement
You must restart the computer after you apply this hotfix

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Windows XP, x64-based versions <pre class="fixed_text">  Date         Time   Version        Size       File name --  29-Jun-2005  05:57  5.2.3790.2476  1,116,160  Oleaut32.dll Windows XP, x86-based versions <pre class="fixed_text">  Date         Time   Version        Size     File name 08-Mar-2005 08:24  5.1.2600.2626  549,376  Oleaut32.dll

Registry information
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

This hotfix provides backward compatibility with Windows 2000-based computers when validating BSTR data. You must create a registry entry to enable this hotfix. To create this registry entry on a Windows Server 2003-based computer or on a Windows XP-based computer, follow these steps: <ol> <li>Click Start, click Run, type Regedit in the Open box, and then click OK.</li> <li>Locate the following registry key:

</li> <li>Right-click the registry key that you located in step 2, click New, and then click Key.</li> <li>Type OleAut, and then press ENTER.</li> <li>Right-click OleAut, click New, and then click DWORD Value.</li> <li>Type DisableBSTRValidation, and then press ENTER.</li> <li>Right-click DisableBSTRValidation, and then click Modify.</li> <li>In the Value data box, type 00000001, and then click OK.</li> <li>On the File menu, click Exit to quit Registry Editor.</li></ol>

<div class="workaround_section">

WORKAROUND
Warning This workaround may make your computer or your network more vulnerable to attack by malicious users or by malicious software such as viruses. We do not recommend this workaround but are providing this information so that you can implement this workaround at your own discretion. Use this workaround at your own risk.

To work around this issue, follow these steps: <ol> <li>Click Start, click Run, type Regedit in the Open box, and then click OK.</li> <li>Locate the following registry key:

</li> <li>Right-click the registry key that you located in step 2, click New, and then click Key.</li> <li>Type OleAut, and then press ENTER.</li> <li>Right-click OleAut, click New, and then click DWORD Value.</li> <li>Type DisableShield, and then press ENTER.</li> <li>Right-click DisableShield, and then click Modify.</li> <li>In the Value data box, type 00000001, and then click OK.</li> <li>On the File menu, click Exit to quit Registry Editor.</li></ol>

Note This workaround disables some security checks that have been implemented in the Windows Server 2003 and Windows XP operating systems. Therefore, we recommend that you use this workaround to test whether the hotfix that this article describes will resolve the problem that you are experiencing. We do not recommend that you use this workaround as a permanent resolution for this problem.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in Windows Server 2003 Service Pack 2.

<div class="moreinformation_section">

MORE INFORMATION
For more information, 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

Keywords: kbwinserv2003sp2fix kbfix kbbug kbpubtypekc kbhotfixserver kbqfe KB895321

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.