Hi,
Il 28/01/22 00:20, Mohamad Al-Jaf ha scritto:
Since WINAPI cleans the stack, it doesn't make sense to use it in this context.
Calling conventions are not just about cleaning the stack, though it's true that for a function that takes no argument and just return a pointer most of the differences make little sense. Name mangling is something that (on i386) changes between WINAPI and CDECL, but I don't know how that appears in DLL linking, so I don't know how to help you.
BTW, you mention bug https://bugs.winehq.org/show_bug.cgi?id=51850 in your patch description. Does the patch solve the bug? Is there any different if you use STDCALL/WINAPI or CDECL? If there is, choose the alternative that fixes the application. If they are the same, I guess I'd choose WINAPI.
Giovanni.