Post by b***@coolfone.comze.comCan someone help me understand why the entry point of Windows programs is Winmain instead of main?
excerpts from Raymond Chen's blog http://blogs.msdn.com/b/oldnewthing/archive/2007/12/03/6644060.aspx
Why wasn't the application entry point called main? Well, for one
thing, the name main was already taken, and Windows didn't have the
authority to reserve an alternate definition. There was no C language
standardization committee back then; C was what Dennis said it was,
and it was hardly guaranteed that Dennis would take any special steps
to preserve Windows source code compatibility in any future version of
the C language. Since K&R didn't specify that implementations could
extend the acceptable forms of the main function, it was entirely
possible that there was a legal C compiler that rejected programs that
declared main incorrectly. The current C language standard explicitly
permits implementation-specific alternate definitions for main, but
requiring all compilers to support this new Windows-specific version
in order to compile Windows programs would gratuitously restrict the
set of compilers you could use for writing Windows programs.