共用方式為


IDebugHostPublic::GetLocation 方法 (dbgmodel.h)

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

如果指定的公用沒有靜態位置,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 介面