Share via


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

  • pFuncEnter
    [in] A pointer to the implementation to be used as the FunctionEnter2 callback.

  • pFuncLeave
    [in] A pointer to the implementation to be used as the FunctionLeave2 callback.

  • pFuncTailcall
    [in] A pointer to the implementation to be used as the FunctionTailcall2 callback.

Remarks

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.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

See Also

Reference

ICorProfilerInfo Interface

ICorProfilerInfo2 Interface