Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo Method

.NET Framework 4.6 and 4.5

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

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

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.

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.

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4.6, 4.5.2, 4.5.1, 4.5, 4

Show:
© 2015 Microsoft