ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 Method
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);
Parameters
Parameter | Description |
---|---|
pFuncEnter |
[in] A pointer to the implementation to be used as the FunctionEnter2 Function callback. |
pFuncLeave |
[in] A pointer to the implementation to be used as the FunctionLeave2 Function callback. |
pFuncTailcall |
[in] A pointer to the implementation to be used as the FunctionTailcall2 Function callback. |
Remarks
The SetEnterLeaveFunctionHooks2 method is similar to the ICorProfilerInfo::SetEnterLeaveFunctionHooks Method 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 Method and SetEnterLeaveFunctionHooks2, SetEnterLeaveFunctionHooks2 is used.
The SetEnterLeaveFunctionHooks2 method may be called only from the profiler's ICorProfilerCallback::Initialize Method callback.
Requirements
Platforms: Windows 2000, Windows XP, Windows Server 2003 family
Header: CorProf.idl
Library: CorGuids.lib
.NET Framework Version: 2.0