次の方法で共有


IDebugHostField::GetLocation メソッド (dbgmodel.h)

特定の型インスタンスに関係なくアドレスを持つフィールド (場所の種類が LocationStatic を示すフィールドなど) の場合、GetLocation メソッドはフィールドの抽象位置 (アドレス) を返します。

指定されたフィールドに静的な場所がない場合、GetLocation メソッドは失敗します。

構文

HRESULT GetLocation(
  Location *location
);

パラメーター

location

フィールドの抽象的な場所 (例: address) がここに返されます。

戻り値

このメソッドは、成功または失敗を示す HRESULT を返します。

備考

サンプル コード *

ComPtr<IDebugHostField> spField; /* get a field symbol (see EnumerateChildren) */

Location fieldLocation;
if (SUCCEEDED(spField->GetLocation(&fieldLocation)))
{
    // For fields which have a static location as determined by GetLocationKind, 
    // the location of the field will be in fieldLocation.
}

必要条件

要件 価値
ヘッダー dbgmodel.h

関連項目

IDebugHostField インターフェイス