ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 方法
指定要在 FunctionEnter3、FunctionLeave3 和 FunctionTailcall3 函数上调用的探查器实现函数。
HRESULT SetEnterLeaveFunctionHooks3(
[in] FunctionEnter3 *pFuncEnter3,
[in] FunctionLeave3 *pFuncLeave3,
[in] FunctionTailcall3 *pFuncTailcall3);
参数
pFuncEnter3
[in] 一个指向要用作 FunctionEnter3 回调的实现的指针。pFuncLeave3
[in] 一个指向要用作 FunctionLeave3 回调的实现的指针。pFuncTailcall3
[in] 一个指向要用作 FunctionTailcall3 回调的实现的指针。
备注
FunctionEnter3 FunctionLeave3 和 FunctionTailcall3 挂钩并不提供堆栈帧和参数检查。 若要访问该信息,必须设置 COR_PRF_ENABLE_FUNCTION_ARGS、COR_PRF_ENABLE_FUNCTION_RETVAL 和/或 COR_PRF_ENABLE_FRAME_INFO 标志。 探查器可以使用 ICorProfilerInfo::SetEventMask 方法设置事件标志,然后使用 ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo 方法注册此函数的实现。
一次只有一组回调可能处于活动状态,并且最新版本优先。 因此,如果探查器同时调用 ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 方法 和 SetEnterLeaveFunctionHooks3 方法,则使用 SetEnterLeaveFunctionHooks3。
SetEnterLeaveFunctionHooks3 方法只能从该探查器的 ICorProfilerCallback::Initialize 回调中调用。
要求
**平台:**请参见 .NET Framework 系统要求。
**头文件:**CorProf.idl、CorProf.h
**库:**CorGuids.lib
**.NET Framework 版本:**4
请参见
参考
SetEnterLeaveFunctionHooks3WithInfo