ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo 方法

更新:2010 年 10 月

指定要在托管函数的 FunctionEnter3WithInfoFunctionLeave3WithInfoFunctionTailcall3WithInfo 挂钩上调用的探查器实现函数。

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

参数

  • pFuncEnter3
    [in] 一个指向要用作 FunctionEnter3WithInfo 回调的实现的指针。

  • pFuncLeave3
    [in] 一个指向要用作 FunctionLeave3WithInfo 回调的实现的指针。

  • pFuncTailcall3
    [in] 一个指向要用作 FunctionTailcall3WithInfo 回调的实现的指针。

备注

FunctionEnter3WithInfoFunctionLeave3WithInfoFunctionTailcall3WithInfo 挂钩并不提供堆栈帧和参数检查。 若要访问该信息,必须设置 COR_PRF_ENABLE_FUNCTION_ARGS、COR_PRF_ENABLE_FUNCTION_RETVAL 和/或 COR_PRF_ENABLE_FRAME_INFO 标志。 探查器可以使用 ICorProfilerInfo::SetEventMask 方法设置事件标志,然后使用 SetEnterLeaveFunctionHooks3WithInfo 方法注册此函数的实现。

一次只有一组回调可能处于活动状态,并且最新版本优先。 因此,如果探查器同时调用 SetEnterLeaveFunctionHooks2SetEnterLeaveFunctionHooks3WithInfo,则使用 SetEnterLeaveFunctionHooks3WithInfo

SetEnterLeaveFunctionHooks3WithInfo 方法只能从该探查器的 ICorProfilerCallback::Initialize 回调中调用。

要求

**平台:**请参见 .NET Framework 系统要求

**头文件:**CorProf.idl、CorProf.h

**库:**CorGuids.lib

**.NET Framework 版本:**4

请参见

参考

SetEnterLeaveFunctionHooks3

FunctionEnter3

FunctionLeave3

FunctionTailcall3

FunctionEnter3WithInfo

FunctionLeave3WithInfo

FunctionTailcall3WithInfo

ICorProfilerInfo3 接口

其他资源

分析全局静态函数

分析接口

分析(非托管 API 参考)

修订记录

Date

修订记录

原因

2010 年 10 月

更正了语法和固定的错误链接。

内容 Bug 修复