The Component Object Model (COM) is capable of generating Visual Studio Analyzer events. You can use these events to trace how COM executes within your applications. You can see the following occurrences.
Other Microsoft-supplied technologies are also capable of generating Visual Studio Analyzer events; see Microsoft Components That Generate Visual Studio Analyzer Events for a complete list.
Note On Windows 95 machines, only processes started after the Visual Studio Analyzer server starts will report COM events. This means that you might need to add the Visual Studio Analyzer Server program, vales.exe, to your startup group. vales.exe starts the Visual Studio Analyzer server. You can find vales.exe in Program Files\Microsoft Visual Studio\Common\ide\ide98.
Visual Studio Analyzer Events Generated by COM
Event | Event description | Event data |
COM Class Registration | Indicates that a COM component registered itself. COM generates this event when a COM object is created. Under normal circumstances, you can match this event with a ClassRevocation event to confirm that the COM object was created and released without errors. | Handle to the source component, in the form of a class identifier (CLSID). Correlation ID, for use in matching with ClassRevocation events. Default Visual Studio Analyzer values for the source component. |
COM Class Revokation | Indicates that a COM component has been released. COM generates this event when processing is complete and the object is no longer needed. Under normal circumstances, you can match this event with a ClassRegistration event to confirm that the COM object was created and released without errors. | Handle to the source component, in the form of a class identifier (CLSID). Correlation ID, for use in matching with ClassRegistration events. Default Visual Studio Analyzer values for the source component. |
COM Client Call | Indicates that a COM object has called an interface method. You can match this event with a Return event to confirm that the method received the call and returned a value. The timestamps on the Call and Return events tell you how long it took for the call to execute, including network travel time. You can also examine the values for the Enter and Leave events, which can tell you how long it took for the call to execute, without including the time it took for the call to arrive or the time it took for the results to return. | Handle to the target component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the object that called the interface method. Correlation ID, for use in matching with ClientReturn events. ID of the interface being called. Number of the method being called. Default Visual Studio Analyzer values for the source component. |
COM Client Return | Indicates that an interface method returned the results of a call to the object that called it. You can match this event with a Call event to confirm that the method received the call and returned a value. The timestamps on the Call and Return events tell you how long it took for the call to execute, including network travel time. You can also examine the values for the Enter and Leave events, which can tell you how long it took for the call to execute, without including the time it took for the call to arrive or the time it took for the results to return. | Handle to the target component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the object that called the interface method. Correlation ID, for use in matching with ClientCall events. ID of the interface being called. Number of the method being called. Default Visual Studio Analyzer values for the source component. |
COM Log Session | Indicates that COM is present and ready to start logging events for a particular session. | None. |
COM Stub Enter | Indicates that an interface method received a call and started processing. You can match this event with the StubLeave and StubException events, which tell you whether the method completed without errors. You can also compare the timestamps on the StubEnter and StubLeave events to determine how long the method took to complete its processing. | Handle to the target component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the object doing the processing. Correlation ID, for use in matching with StubLeave and StubException events. ID of the interface being called. Number of the method being called. Default Visual Studio Analyzer values for the target component. |
COM Stub Leave | Indicates that an interface method completed processing. You can match this event with the StubEnter event to determine how long the processing took to complete. | Handle to the target component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the object doing the processing. Correlation ID, for use in matching with StubEnter events. ID of the interface being called. Number of the method being called. Default Visual Studio Analyzer values for the target component. |
COM Stub Exception | Indicates that an interface method encountered an error during processing. You can match this event with a StubEnter event. | Handle to the target component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the object doing the processing. Correlation ID, for use in matching with StubEnter events. ID of the interface being called. Number of the method being called. Win32 exception code. Default Visual Studio Analyzer values for the target component. |
COM Marshall | Indicates that the server created a stub to handle communication from a proxy on the client. You can match this event with an Unmarshal event to confirm whether client (proxy) and stub (server) communication was established. | Handle to the source component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the server object. Correlation ID, for use in matching Unmarshal events. ID of the interface being called. Default Visual Studio Analyzer values for the target component. |
COM Disconnect Marshall | Indicates that the server released a stub, because communication with a proxy is no longer necessary. You can match this event with a DisconnectUnmarshal event to determine whether the client released the proxy. | Correlation ID, for use in matching DisconnectUnmarshal events. Default Visual Studio Analyzer values for the target component. |
COM Unmarshall | Indicates that the client created a proxy to handle communication from a stub on the server. You can match this event with a Marshal event to confirm whether client (proxy) and stub (server) communication was established. | Handle to the source component, in the form of an interface pointer identifier (IPID). Apartment ID, which helps to uniquely identify the client object. Correlation ID, for use in matching Marshal events. ID of the interface being called. Default Visual Studio Analyzer values for the source component. |
COM Disconnect Unmarshall | Indicates that the client released a proxy because communication with a stub on the server is no longer necessary. You can match this event with a DisconnectMarshal event to determine whether the server has released the stub. | Correlation ID, for use in matching DisconnectMarshal events. |