- Since it is a c library it should probably read cdecl (not stdcall)
That it's a C-library does not
necessarily mean that it's
cdecl as one can decorate the C function with
__declspec(stdcall) as well. In the specific example it's indeed
cdecl (except if set to another default in the project settings).
- Since it is a c library it should probably read cdecl (not stdcall)
Which also changes its exported name, unless you use a .DEF file to set the exported name explicitly.
For the example as is that is not relevant. The default calling convention in MSVC is
cdecl, thus the mangled name will indeed be the same (on 64-bit Windows at least). And changing the calling convention of the function pointer on the Pascal side (which is what
TRon suggested) will not influence the mangling in any way.