IDebugHostPublic::GetLocation 方法 (dbgmodel.h)

對於具有地址的數據,GetLocation 方法會傳回欄位) 的抽象位置 (位址。

如果指定的公用沒有靜態位置,GetLocation 方法將會失敗。

語法

HRESULT GetLocation(
  Location *location
);

參數

location

此處會傳回抽象位置 (例如:數據的位址) 。

傳回值

這個方法會傳回 HRESULT,表示成功或失敗。

備註

範例程式碼

ComPtr<IDebugHostPublic> spPublic; /* get a public symbol (see EnumerateChildren) */

Location publicLocation;
if (SUCCEEDED(spPublic->GetLocation(&publicLocation)))
{
    // For public symbols which indicate they have a static location 
    // via GetLocationKind, publicLocation will be the location of the symbol
}

規格需求

需求
標頭 dbgmodel.h

另請參閱

IDebugHostPublic 介面