The MethodExit2 method of the IJavaEventMonitor2 interface is called by the Microsoft VM to notify the profiler when a method is about to be exited. The Microsoft VM passes in the MethodID for caller and a StackID of the calling frame that the method is exiting to. At the topmost method return, MethodExit2 is called with a NULL MethodID and a NULL StackID. The profiler must have saved the MethodID or StackID passed to a MethodEntry call to know which method is about to be exited.
The MethodExit2 method is supported only by the IJavaEventMonitor2 interface.
HRESULT MethodExit2(MethodID method_id StackID stack_id);
[in] method_id | The MethodID of the method that is about to exit. |
[in] stack_id | The StackID for this method call. |
Note that the MethodExit2 method will be called by the Microsoft VM if the profiler implements the IJavaEventMonitor2 interface. The MethodExit method will not be called under these circumstances.