Even with WINAPI defined in this scenario, WinMain still needs to have the params I listed above to work, including using LPSTR.
Oddly enough, I have to explicitly use HINSTANCE, and not void*. It seems that HINSTANCE is a “struct” in this case, setup as such:
Here’s what I have, which works for me for every case that <windows.h> is included…
#if defined(_UNICODE)
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (void*, void*, const wchar_t*, int)
#elif defined(WINAPI)
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (HINSTANCE, HINSTANCE, const LPTSTR, int)
#else
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (HINSTANCE, HINSTANCE, const LPSTR, int)
#endif