ICorDebugILFrame4::GetCodeEx 方法ICorDebugILFrame4::GetCodeEx Method

[.NET Framework 4.5.2 與更新版本提供支援][Supported in the .NET Framework 4.5.2 and later versions]

取得此堆疊框架執行之程式碼的指標。Gets a pointer to the code that this stack frame is executing.

語法Syntax

HRESULT GetCodeEx(  
   [in] ILCodeKind flags,
   [out] ICorDebugCode **ppCode  
);  

參數Parameters

flags
ILCodeKind 列舉成員,這個成員會指定程式碼剖析工具的 ReJIT 要求所定義的中繼語言 (IL) 是否包含在框架中。[in] An ILCodeKind enumeration member that specifies whether the intermediate language (IL) defined by the profiler's ReJIT request is included in the frame.

ppCode
擴展代表這個堆疊框架正在執行之程式碼的 "ICorDebugCode" 物件位址的指標。[out] A pointer to the address of an "ICorDebugCode" object that represents the code that this stack frame is executing.

備註Remarks

這個方法類似于 ICorDebugFrame:: GetCode 方法,不同之處在于它會選擇性地存取分析工具的 ReJIT 要求所定義的程式碼。This method is similar to the ICorDebugFrame::GetCode method, except that it optionally accesses code defined by the profiler's ReJIT request. 使用的值呼叫這個方法 flags ILCODE_ORIGINAL_IL 相當於呼叫 GetCode; 如果已檢測方法,將無法存取其 IL。Calling this method with a flags value of ILCODE_ORIGINAL_IL is equivalent to calling GetCode; if the method is instrumented, its IL will not be accessible. ILCODE_REJIT_IL 可讓偵錯工具存取分析工具的 ReJIT 要求所定義的 IL。ILCODE_REJIT_IL allows the debugger to access the IL defined by the profiler's ReJIT request. 如果未檢測 IL, ppCode 則為 null,而且方法會傳回 S_OKIf the IL is not instrumented, ppCode is null, and the method returns S_OK.

需求Requirements

平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4.5.2 起可用Available since 4.5.2.NET Framework Versions: 自 4.5.2 起可用Available since 4.5.2

另請參閱See also