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



The information in this article applies to:

  • Microsoft COM+ 1.5, when used with:
    • Microsoft Windows Server 2003, Standard Edition
    • Microsoft Windows Server 2003, Enterprise Edition
    • Microsoft Windows Server 2003, Datacenter Edition
    • Microsoft Windows Server 2003, Web Edition
    • Microsoft Windows Server 2003, Standard x64 Edition
    • Microsoft Windows Server 2003, Enterprise x64 Edition
    • Microsoft Windows Server 2003, Datacenter x64 Edition
    • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
    • Microsoft Windows Server 2003, Datacenter Edition for Itanium-based Systems
    • Microsoft Windows XP Home Edition
    • Microsoft Windows XP Professional
    • Microsoft Windows XP Professional x64 Edition

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.

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.

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.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows Server 2003 or Windows XP service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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, 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

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.

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.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" 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


Modification Type:MinorLast Reviewed:7/26/2006
Keywords:kbfix kbBug kbHotfixServer kbQFE kbpubtypekc KB895321 kbAudDeveloper