For my win32 code, I want to do without windows typedefs. Perusing Windows Data Types shows HINSTANCE to be a void *. As I know MSDN can get out of date, inspecting shared\wtypes.h inside of Windows 10 SDK reveals typedef void *HINSTANCE.
Compiling the following fails, returning error: conflicting types in WinMain:
int __stdcall
WinMain(void *instance, void *prev_instance, char *cmd_line , int cmd_show)
{
return 0;
}
I compile with clang++ and windows headers.
Changing the void * to HINSTANCE of course fixes the issue. However, why is this the case?