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