Share via


ICorProfilerInfo::SetEnterLeaveFunctionHooks Method

Specifies profiler-implemented functions to be called on "enter", "leave", and "tailcall" hooks of managed functions.

HRESULT SetEnterLeaveFunctionHooks(
    [in] FunctionEnter    *pFuncEnter,
    [in] FunctionLeave    *pFuncLeave,
    [in] FunctionTailcall *pFuncTailcall);

Parameters

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

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

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

Remarks

In the .NET Framework version 1.0, each function pointer can be null to disable that corresponding callback.

Only one set of callbacks can be active at a time. Thus, if a profiler calls both SetEnterLeaveFunctionHooks and ICorProfilerInfo2::SetEnterLeaveFunctionHooks2, then SetEnterLeaveFunctionHooks2 takes precedence.

The SetEnterLeaveFunctionHooks method can 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, 1.1

See Also

Reference

ICorProfilerInfo Interface