JMH
Emeritus, Contributor
- Apr 2, 2012
- 7,197
An exe is an executable file which runs as a separate process and is managed by the OS.
It sometimes contains a complete program. Like a Dll, an exe cannot be shared between applications.
When windows loads an exe, the exe’s initialization code is responsible for creating what is called as “message pump”, nothing but a program loop which runs as long as the application is running.
The message pump request messages from the operating system.
Windows keep track of the application as a separate task.
It allocates separate memory for both the exe and the application using that exe.
The memory area in which each exe runs is called “Process Space”. In an exe, there is an entry point (There is only one single main entry). An exe is visible to the system as a regular Win32 executable.
Its entry point refers to the small loader which initializes the .Net run-time and tells it to load and execute the assembly contained in the exe. When the system launches a new exe, a new process is created.
The entry thread is called in the context of the main thread of that process.
An exe cannot be reused. It is self executable. They can run individually.
http://www.msigeek.com/6806/basics-ever-wondered-what-is-the-difference-between-an-exe-and-a-dll