Export (0) Print
Expand All

ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 Method

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

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

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.

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 ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 Method and the SetEnterLeaveFunctionHooks3 method, SetEnterLeaveFunctionHooks3 is used.

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

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4

Community Additions

ADD
Show:
© 2014 Microsoft