Microsoft KB Archive/279703

= FIX: Access Violation When You Pass Interfaces Between Components in Component Services Objects Program =

Article ID: 279703

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Service Pack 1

-



This article was previously published under Q279703



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
An access violation may occur during an IDispatch::Invoke call when interfaces are passed between components in the same Component Services Objects program.



CAUSE
This problem occurs because the Component Services Objects IDispatch interceptor is releasing an interface (that is passed as a parameter to Invoke) on which it does not use the AddRef method.



RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack

WORKAROUND
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To work around this problem, follow these steps:  Start Registry Editor (Regedt32.exe). Locate the following key in the registry:

HKEY_LOCAL_MACHINE\Software\Classes\Interface

 On the Edit menu, click Add Value, and then add the following registry value:

Value Name: InterfaceHelperDisableAllForOle32

Data Type: REG_SZ

Radix: Decimal

Value: 1

 Quit Registry Editor.

Using this registry value disables lightweight proxy and stubs and should prevent this problem from occurring. However, using this value slows down the program because a full NDR marshal is performed, which makes method calls across a context boundary.



STATUS
Microsoft has confirmed that this is a problem in Microsoft Windows 2000. This problem was first corrected in Windows 2000 Service Pack 2.

Additional query words: gpf com+ AV

Keywords: kbbug kbfix kbwin2000presp2fix kbqfe KB279703

-

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

© Microsoft Corporation. All rights reserved.