共用方式為


ICorProfilerInfo2::GetContextStaticAddress 方法

更新:2007 年 11 月

取得指定之內容範圍中指定之內容靜態欄位的位址。

HRESULT GetContextStaticAddress(
    [in] ClassID classId,
    [in] mdFieldDef fieldToken,
    [in] ContextID contextId,
    [out] void **ppAddress);

參數

  • classId
    [in] 包含所要求之內容靜態欄位的類別 ID。

  • fieldToken
    [in] 所要求之內容靜態欄位的中繼資料語彙基元。

  • contextId
    [in] 內容的 ID,其為所要求之內容靜態欄位的範圍。

  • ppAddress
    [out] 指定之內容中靜態欄位的位址指標。

備註

如果在指定的內容中尚未指派位址給指定的靜態欄位,GetContextStaticAddress 方法可能會傳回 CORPROF_E_DATAINCOMPLETE HRESULT。

需求

**平台:**請參閱 .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