ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 Method

Specifies the profiler-implemented functions that will be called on the FunctionEnter3, FunctionLeave3, and FunctionTailcall3 functions.

Syntax

HRESULT SetEnterLeaveFunctionHooks3(  
            [in] FunctionEnter3    *pFuncEnter3,  
            [in] FunctionLeave3    *pFuncLeave3,  
            [in] FunctionTailcall3 *pFuncTailcall3);  

Parameters

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

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

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

Remarks

FunctionEnter3, FunctionLeave3, and FunctionTailcall3 hooks do not 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 ICorProfilerInfo3::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 the SetEnterLeaveFunctionHooks2 Method and the SetEnterLeaveFunctionHooks3 method, SetEnterLeaveFunctionHooks3 is used.

The SetEnterLeaveFunctionHooks3 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

SetEnterLeaveFunctionHooks3WithInfo
FunctionEnter3
FunctionLeave3
FunctionTailcall3
FunctionEnter3WithInfo
FunctionLeave3WithInfo
FunctionTailcall3WithInfo
Profiling Global Static Functions
ICorProfilerInfo3
Profiling Interfaces
Profiling