Re: Silly WinMain question
Its just a macro that defines a calling convention best suited to the situation....Its just a way of telling the compiler/linker how the function works
Originally posted by Magos
What is the thing that stands right in front of WinMain? I've really never thought of it. It seems weird if it has two return values :). Is it like unsigned that modifies a type, or something?
I've also seen PASCAL used. What's the difference?
int WINAPI WinMain(...)
It normally choses __stdcall....which basically means push the params of the function on the stack and the function will pop them off or restore the stack before return...Also it tells the compiler that the params will be passed to it right to left
The PASCAL convention is like STDCALL, but passes left to right....PASCAL convention was used in 16bit windows....I think these days its just a define for STDCALL if you are using normal post 95 windows (so you still see it in code and it still works)........Best ignore it these days though and stick with WINAPI.