Share via

SymFromAddr api returning 487 error code

Ashutosh Kumar Verma 0 Reputation points
2024-12-16T10:59:03.4833333+00:00

SymFromAddr api returning 487 error codex for the following code:

C++Copy

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:

[Error:]Error
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.