Reputation: 2963
Does someone know how to obtain the mangled symbol name based on a given C++ function signature? e.g.:
__stdcall unsigned char MyClass::MyFunc(const int param1, int param2);
would become:
?MyFunc@MyClass@@QGE@?BHH@Z
when using the Microsoft Visual C++ Compiler.
I was thinking about some WINAPI-function, but I did not find any...
GetMangledName("__stdcall unsigned char MyClass::MyFunc(const int param1, int param2);");
// Returns "?MyFunc@MyClass@@QGE@?BHH@Z"
Upvotes: 1
Views: 276
Reputation: 7476
I believe the name mangling is compiler dependent and not part of the c++ specification. So as far as I can see the only reliable way is to invoke the actual compiler that you are using and get back a mapping of how the source names map to the mangled names.
Upvotes: 1