|
The default host for running managed executables is implemented in the function _CorExeMain in the CLR startup shim (mscoree.dll). Control is passed to _CorExeMain differently depending on the operating system on which you're running. On computers running Microsoft Windows XP and later, the operating system loader has explicit knowledge of managed code executables and calls _CorExeMain directly when a managed executable is launched. For earlier versions of the Windows operating system, the process for getting to _CorExeMain isn't as direct. When a compiler emits a managed executable, it sets the main routine (in the Portable Executable [PE] header) to a small stub that calls _CorExeMain instead of the executable's "real" entry point. Launching the executable thereby passes control to the CLR startup shim, where the process of running the program begins.
|
|