Am 21.01.2022 um 11:47 schrieb Giovanni Mascellani gmascellani@codeweavers.com:
Hi,
Il 21/01/22 05:32, Jinoh Kang ha scritto:
"CurrentIP@0" is a mangled symbol. The "@0" suffix means "this function follows the __stdcall calling convention, and it accepts 0 bytes of arguments." However, export symbols are usually exported as unmangled names. Try: DECLSPEC_IMPORT extern void *WINAPI CurrentIP(void);
Trying this on top of Mohamad's v3 patch doesn't fix the problem:
You can always resolve it manually it with GetProcAddress. Afaiu that's preferred anyway, especially for undocumented functions. A quick grep over the Wine code finds only one case of a WINAPI extern void thing in a test:
stefan@retina wine % grep -r "extern " . | grep tests | grep WINAPI ./dlls/imagehlp/tests/testdll.c:extern DWORD WINAPI StrCmpCA(const char *, const char *);
And looking at the file, StrCmpCA isn't used at all in this file, so this line is dead code - unless there is some PE file inspection magic I missed with my (terrible) grep-foo.
If you import things via the import library (wdscore.lib, if it exists), it connects the decorated import to the undecorated export: https://stackoverflow.com/questions/38710243/dll-using-stdcall-without-name-...
Afaiu linking at build time to a .dll without a .lib is a gcc/mingw-ism anyway. Visual Studio wouldn't allow you to do that. You either need a .lib file or use LoadLibrary + GetProcAddress. Wine doesn't build a libwdscore.a and I can't find a wdscore.lib in my Visual Studio installation.