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 |