IDebugHostField2::GetLocation 方法 (dbgmodel.h)
對於具有位址的欄位,不論特定類型實例為何(例如位置種類指出LocationStatic的欄位),GetLocation 方法都會傳回欄位的抽象位置(位址)。
如果指定的欄位沒有靜態位置,GetLocation 方法將會失敗。
語法
HRESULT GetLocation(
Location *location
);
參數
location
欄位的抽象位置(例如位址)將會在這裡傳回。
傳回值
此方法會傳回 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 |