Partilhar 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

Parameter Description

pFuncEnter

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

pFuncLeave

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

pFuncTailcall

[in] A pointer to the implementation to be used as the FunctionTailcall Function 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 Method, then SetEnterLeaveFunctionHooks2 takes precedence.

The SetEnterLeaveFunctionHooks method can 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: 1.0, 2.0

See Also

Reference

ICorProfilerInfo Interface