IDebugHostModule::FindSymbolByRVA 方法 (dbgmodel.h)

FindSymbolByRVA 方法會在模組內的指定相對虛擬位址找到單一相符符號。 如果提供的 RVA (沒有單一符號,例如:有多個相符專案) ,此方法會傳回錯誤。 請注意,這個方法會偏好傳回私用符號,而非 publics 數據表中的符號。

語法

HRESULT FindSymbolByRVA(
  ULONG64          rva,
  IDebugHostSymbol **symbol
);

參數

rva

相對虛擬位址 (位移) 在模組的符號資訊中找到相符符號的模組內。

symbol

找到的符號將會在這裡傳回。

傳回值

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

備註

範例程式碼

ComPtr<IDebugHostModule> spModule;

// Find the symbol which is at 0x100000 within the module
ComPtr<IDebugHostSymbol> spSymbol;
if (SUCCEEDED(spModule->FindSymbolByRVA(0x100000, &spSymbol)))
{
    // spSymbol contains the symbol which is at RVA 0x100000 within the
    // module.  Note that it may be any kind of symbol
}

規格需求

需求
標頭 dbgmodel.h

另請參閱

IDebugHostModule 介面