winapi get the mangled name from a function's address

446 views Asked by At

In my c++ applicatoin I have the virtual addresses of functions and I want to get their mangled names. right now I can get only the unmangled name by using the winapi SymFromAddr function. is there a way to get the mangled names also ?

1

There are 1 answers

1
Hans Passant On BEST ANSWER

Use SymSetOptions(). You want to turn off the SYMOPT_UNDNAME option to see the mangled name.

So, roughly:

  DWORD options = SymGetOptions();
  SymSetOptions(options & ~SYMOPT_UNDNAME);
  if (SymFromAddr(hProcess, dwAddress, &dwDisplacement, pSymbol))
  {
      // etc...
  }
  SymSetOptions(options);