On 7/19/11, Johann MacDonagh <[email protected]> wrote: > If you export it like this, it will be exported as the C++ mangled name. > If you have extern(C) it will be cdecl "_SetInt" and extern(Windows) > will be stdcall "_SetInt@4".
Right, that's all pretty standard stuff. :) > >> I don't know why, but if you use a .def file instead of `export` the >> function will be exported as a C function with no name mangling. > > If you look at dumpbin /exports you'll see something like this: > > ordinal hint RVA name > > 1 0 0000306C SetInt = ?SetInt@@YAXPAH@Z (void __cdecl > SetInt(int *)) > > So the symbol still has C++ name mangling but its exported as whatever > name you want. > See I tried using dumpbin, but apparently I wiped it from my PATH so I had to rely on DLL Export viewer (because I'm lazy and it had an icon on my desktop!) which doesn't even show this. I had a hunch that was happening behind the scenes. Thanks for the info regardless hehe.
