Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,902 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
SymFromAddr api returning 487 error codex for the following code:
DWORD64 dwDisplacement = 0;
char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(CHAR)];
PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)buffer;
pSymbol->SizeOfStruct = sizeof(SYMBOL_INFO);
pSymbol->MaxNameLen = MAX_SYM_NAME;
if (SymFromAddr(hProcess, dwAddress, &dwDisplacement, pSymbol) && pSymbol->NameLen > 0 && pSymbol->Name[0] != 0)
{
// SymFromAddr returned success
return std::string(pSymbol->Name, pSymbol->NameLen);
}
else
{
// SymFromAddr failed
AI_HANG_MONITOR_LOG_ERROR("Error Getting Symbol name from Address:" + std::to_string(GetLastError()) );
}
Error that I see, is this:
Dec 13 14:19:32 [ Error: ] Error Getting Symbol name from Address:487 (at D:\Jenkins\ws\ilst_rel_28\app\Framework\UI\app_only\AIHangMonitor.cpp:128)