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.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Resolution

Windows Server 2003

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

Hotfix information

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
   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
   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
   Date         Time   Version        Size     File name
--------------------------------------------------------
29-Jun-2005 05:16 5.2.3790.2476 556,032 Oleaut32.dll

Windows XP

Hotfix information

A supported hotfix is 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 software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if 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. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
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
   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
   Date         Time   Version        Size     File name
--------------------------------------------------------
08-Mar-2005 08:24 5.1.2600.2626 549,376 Oleaut32.dll

↑ Back to the top


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:
  1. Click Start, click Run, type Regedit in the Open box, and then click OK.
  2. Locate the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
  3. Right-click the registry key that you located in step 2, click New, and then click Key.
  4. Type OleAut, and then press ENTER.
  5. Right-click OleAut, click
    New, and then click DWORD Value.
  6. Type DisableBSTRValidation, and then press ENTER.
  7. Right-click DisableBSTRValidation, and then click Modify.
  8. In the Value data box, type
    00000001, and then click OK.
  9. On the File menu, click
    Exit to quit Registry Editor.

↑ Back to the top


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:
  1. Click Start, click Run, type Regedit in the Open box, and then click OK.
  2. Locate the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
  3. Right-click the registry key that you located in step 2, click New, and then click Key.
  4. Type OleAut, and then press ENTER.
  5. Right-click OleAut, click
    New, and then click DWORD Value.
  6. Type DisableShield, and then press ENTER.
  7. Right-click DisableShield, and then click
    Modify.
  8. In the Value data box, type
    00000001, and then click OK.
  9. On the File menu, click
    Exit to quit Registry Editor.
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.

↑ 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. This problem was first corrected in Windows Server 2003 Service Pack 2.

↑ Back to the top


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

↑ Back to the top


Keywords: kb, kbautohotfix, kbwinserv2003sp2fix, kbfix, kbbug, kbpubtypekc, kbhotfixserver, kbqfe

↑ Back to the top

Article Info
Article ID : 895321
Revision : 4
Created on : 3/30/2017
Published on : 3/30/2017
Exists online : False
Views : 496