Microsoft KB Archive/231476

= Many Application Log Entries Created When a Valid COM Object Is Passed a Pointer =

Article ID: 231476

Article Last Modified on 2/27/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server

-



This article was previously published under Q231476



SUMMARY
When a valid COM object passes an interface pointer to a recorder, many identical application log entries are created in Event Viewer.



MORE INFORMATION
The COM object does not support IpersistStream or IMarshal. Microsoft does not marshal such an object. Consequently, an entry is logged twice in the application log in the Event Viewer.

This occurs because the interface manager calls pICallFrame->Marshal. If this call does not succeed, Windows logs a generic event indicating a marshalling error in something (for example, E1). This error states that Marshal did not succeed. Note that the problem may have propagated from callframe code (OLE32 or OLEAUT).

If the method called has an interface pointer, Windows call Microsoft's MarshalInterceptor, which can return an error as well. Specifically, it contains the information that the object reference does not support both relevant interfaces, so it logs this error (for example, E2). Note that E2 is more detailed than E1 in this case.

Event E1 catches all errors in the pICallFrame->Marshal code path, and E2 catches any error in the marshaling interfaces. Windows can set a state when E2 is logged and check the state before logging E1. However, this state has to be set per instance of the interface manager. Therefore, the only way to accomplish this is to store a reference to the interface manager in MarshalInterceptor and have MarshalInterceptor call back and set the state.

Keywords: kbenv kbinfo kbprogramming KB231476

-

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

© Microsoft Corporation. All rights reserved.