The only way to get really unshared names using __declspec (dllexport) is to export them using the __cdecl calling convention. CALLBACK becomes __stdcall, which adorns the "C" form of the name with leading _ and trailing @bytes.
Otherwise, you can use the .DEF file, which is a pain. Another way for MSVC is to insert the / EXPORT directive in the object file (or pass it as an explicit linker setting)
#pragma comment(linker, "/EXPORT:ExportSymbol=DecoratedName");
For some reason, part = directive is not listed in the help
source share