Specifies profiler-implemented functions to be called on the updated versions of the "enter", "leave", and "tailcall" hooks of managed functions.
HRESULT SetEnterLeaveFunctionHooks2( [in] FunctionEnter2 *pFuncEnter, [in] FunctionLeave2 *pFuncLeave, [in] FunctionTailcall2 *pFuncTailcall);
[in] A pointer to the implementation to be used as the FunctionEnter2 callback.
[in] A pointer to the implementation to be used as the FunctionLeave2 callback.
[in] A pointer to the implementation to be used as the FunctionTailcall2 callback.
The SetEnterLeaveFunctionHooks2 method is similar to the ICorProfilerInfo::SetEnterLeaveFunctionHooks method. Use the former to specify functions to be used as the newer versions of the enter/leave/tailcall callbacks, and the latter to specify functions to be used as the older versions of the enter/leave/tailcall callbacks.
Only one set of callbacks may be active at a time. Thus, if a profiler calls both ICorProfilerInfo::SetEnterLeaveFunctionHooks and SetEnterLeaveFunctionHooks2, SetEnterLeaveFunctionHooks2 is used.
The SetEnterLeaveFunctionHooks2 method may be called only from the profiler's ICorProfilerCallback::Initialize callback.
Platforms: See .NET Framework System Requirements.
Header: CorProf.idl, CorProf.h
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0