次の方法で共有


ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo メソッド

マネージド関数の FunctionEnter3WithInfo フック、FunctionLeave3WithInfo フック、FunctionTailcall3WithInfo フックで呼び出されるプロファイラー実装関数を指定します。

構文

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_ARGSCOR_PRF_ENABLE_FUNCTION_RETVAL、および/または COR_PRF_ENABLE_FRAME_INFO フラグを設定する必要があります。 プロファイラーでは、ICorProfilerInfo::SetEventMask メソッドを使用してイベント フラグを設定してから、SetEnterLeaveFunctionHooks3WithInfo メソッドを使用してこの関数の実装を登録できます。

コールバックのセットは一度に 1 つしかアクティブにできず、最新バージョンが優先されます。 したがって、プロファイラーで SetEnterLeaveFunctionHooks2SetEnterLeaveFunctionHooks3WithInfo の両方を呼び出すと、SetEnterLeaveFunctionHooks3WithInfo が使用されます。

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

必要条件

:システム要件」を参照してください。

ヘッダー : CorProf.idl、CorProf.h

ライブラリ: CorGuids.lib

.NET Framework のバージョン: 4 以降で使用可能

関連項目