Ways to get rid of mangling: (assuming MSVC is a build environment)
Export via .DEF file.
Export as extern "C" to use the __cdecl calling convention. __stdcall adds _ and produces exported @on dll functions, even when extern "C" is used.
extern "C" __declspec(dllexport) int __cdecl MyFunc(int Param1, int Param2);
Export using the #pragma directive. You need to pass a completely distorted name on the other side of this. __FUNCDNAME__ is a useful directive to add a macro to a function to list its decorated name,
#pragma comment(linker, "/EXPORT: MyFunc=_MyFunc@8 ");
Chris becke
source share