ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 メソッド
マネージ関数の "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::SetEnterLeaveFunctionHooks と SetEnterLeaveFunctionHooks2 の両方を呼び出す場合は、SetEnterLeaveFunctionHooks2 が使用されます。
SetEnterLeaveFunctionHooks2 メソッドを呼び出すことができるのは、プロファイラーの ICorProfilerCallback::Initialize コールバックだけです。
必要条件
プラットフォーム: 「.NET Framework システム要件」を参照
ヘッダー: CorProf.idl、CorProf.h
ライブラリ: CorGuids.lib
.NET Framework のバージョン: 4、3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0