This is called "entry point": http://en.wikipedia.org/wiki/Entry_point
In Windows, the conventional entry point is
In an MFC application, the entry point is hidden in the library, reportedly, in the file "Appmodule.cpp". Actually, the entry point name is defined as
, which is a generic name for Unicode ("wide"
) and non-Unicode (
) entry-point names, a way to abstract out from Unicode option.
This CodeProject article explains how it works with MFC: MFC under the hood
See the section "So, what happened to good old WinMain?"… :-)
Now, some advanced background information:
We can see that different platforms based on PE files (http://en.wikipedia.org/wiki/Portable_Executable
]) use different names for entry-point functions, and also, for different Windows-based platforms and/or frameworks, one entry point function calls another "secondary" entry function which is the only one exposed to the framework user. We can investigate it all, but does it make much sense? Ultimately, even the very top function on the call stack, "real" entry point, does not have to have a certain standard name
. This is so because that "real" entry point is found not by the name, but by the address in the header structure used for this purpose. Please see: