ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo Method

Specifies the profiler-implemented functions that will be called on the FunctionEnter3WithInfo, FunctionLeave3WithInfo, and FunctionTailcall3WithInfo hooks of managed functions.

Syntax

HRESULT SetEnterLeaveFunctionHooks3WithInfo(  
            [in] FunctionEnter3WithInfo    *pFuncEnter3,  
            [in] FunctionLeave3withInfo    *pFuncLeave3,  
            [in] FunctionTailcall3WithInfo *pFuncTailcall3);  

Parameters

pFuncEnter3
[in] A pointer to the implementation to be used as the FunctionEnter3WithInfo callback.

pFuncLeave3
[in] A pointer to the implementation to be used as the FunctionLeave3WithInfo callback.

pFuncTailcall3
[in] A pointer to the implementation to be used as the FunctionTailcall3WithInfo callback.

Remarks

The FunctionEnter3WithInfo, FunctionLeave3WithInfo, and FunctionTailcall3WithInfo hooks provide stack frame and argument inspection. To access that information, the COR_PRF_ENABLE_FUNCTION_ARGS, COR_PRF_ENABLE_FUNCTION_RETVAL, and/or COR_PRF_ENABLE_FRAME_INFO flags have to be set. The profiler can use the ICorProfilerInfo::SetEventMask method to set the event flags, and then use the SetEnterLeaveFunctionHooks3WithInfo method to register your implementation of this function.

Only one set of callbacks may be active at a time, and the newest version takes precedence. Therefore, if a profiler calls both SetEnterLeaveFunctionHooks2 and SetEnterLeaveFunctionHooks3WithInfo, SetEnterLeaveFunctionHooks3WithInfo is used.

The SetEnterLeaveFunctionHooks3WithInfo method may be called only from the profiler's ICorProfilerCallback::Initialize callback.

Requirements

Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 4

See also