次の方法で共有


ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 メソッド

更新 : 2007 年 11 月

マネージ関数の "enter"、"leave"、および "tailcall" フックの更新バージョンで呼び出される、プロファイラによって実装される関数を指定します。

HRESULT SetEnterLeaveFunctionHooks2(
    [in] FunctionEnter2    *pFuncEnter,
    [in] FunctionLeave2    *pFuncLeave,
    [in] FunctionTailcall2 *pFuncTailcall);

パラメータ

  • pFuncEnter
    [入力] FunctionEnter2 コールバックとして使用される実装へのポインタ。

  • pFuncLeave
    [入力] FunctionLeave2 コールバックとして使用される実装へのポインタ。

  • pFuncTailcall
    [入力] FunctionTailcall2 コールバックとして使用される実装へのポインタ。

解説

SetEnterLeaveFunctionHooks2 メソッドは、ICorProfilerInfo::SetEnterLeaveFunctionHooks メソッドと似ています。新しいバージョンの enter/leave/tailcall コールバックとして使用される関数を指定する場合は前者を使用し、古いバージョンの enter/leave/tailcall コールバックとして使用される関数を指定する場合は後者を使用します。

一度にアクティブになるコールバックは 1 セットだけです。したがって、プロファイラが ICorProfilerInfo::SetEnterLeaveFunctionHooksSetEnterLeaveFunctionHooks2 の両方を呼び出す場合は、SetEnterLeaveFunctionHooks2 が使用されます。

SetEnterLeaveFunctionHooks2 メソッドを呼び出すことができるのは、プロファイラの ICorProfilerCallback::Initialize コールバックだけです。

必要条件

プラットフォーム : 「.NET Framework システム要件」を参照

ヘッダー : CorProf.idl

ライブラリ : CorGuids.lib

.NET Framework のバージョン : 3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0

参照

参照

ICorProfilerInfo

ICorProfilerInfo2