Many Application Log Entries Created When a Valid COM Object Is Passed a Pointer (231476)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • 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.

Modification Type:MajorLast Reviewed:11/21/2003
Keywords:kbenv kbinfo kbProgramming KB231476