stdcall name mangling using extern c and dllexport vs module definitions (msvc++)

后端 未结 2 1631
粉色の甜心
粉色の甜心 2020-12-10 12:09

I was trying to export a simple test function for a dll to work with an application (fyi: mIRC) that specifies the calling convention as:

int __stdcall test_         


        
2条回答
  •  Happy的楠姐
    2020-12-10 12:37

    dllexport/import are designed to be loaded back by themselves, not an old C library using GetProcAddress. The mangling you have seen is what all Microsoft compilers have done for a long time for __stdcall functions. Most likely, your target either expects a __cdecl function, not __stdcall, but if not, you will need to use a .def file to specifically un-mangle the name.

提交回复
热议问题