Hi friends,
I want to know that what is the difference between an EXE and a DLL?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jan 30, 2012, 6:28 AM EST
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 30, 2012, 8:41 AM EST
1.EXE is an extension used for executable files while DLL is the extension for a dynamic link library.
2.An EXE file can be run independently while a DLL is used by other applications.
3.An EXE file defines an entry point while a DLL does not.
4.A DLL file can be reused by other applications while an EXE cannot.
5.A DLL would share the same process and memory space of the calling application while an EXE creates its separate process and memory space.
Thanks
Sam HobbsRank #107 · 20.5K reputationPosted Feb 5, 2012, 5:18 PM EST
It might be confusing to say that an exe is an executable but a DLL is not. A DLL definitely has executable code. So it is arguable whether a DLL is an executable.
I think it is extremely confusing to call a DLL a class library. There are very many types of DLLs. Some of them are class libraries with managed code in them. Some of them, such as the DLLs that contain nearly all of the Windows API, are native DLLs that contain no managed code and that must be called in a manner DLLs were called by in the very early days of Windows; in the DOS days of Wiondows. Some DLLs are COM objects and/or ActiveX components; I am not sure of the differences there. The way those three types are used are differnt. You cannot add a refernce for a native DLL; it does not have a type library nor does it have any managed code so you must call it using something else, usually Platform Invoke (DllImport). Many times beginners ask how to use a DLL and if it is a native DLL and they are told to add a reference for it, they will fail. If it is a class library and they are told to use Platform Invoke they wil fail. It is critical to know what type of DLL a DLL is and to use it the way it is designed to be used.
.Net has something called application domains that makes things even more confusing. Application domains break the rule that says that every exe is in a separate process. For those of us familair with unmanaged Windows, there is a very clear difference between DLLs that execute in a process of an exe file and exe files that (for unmanaged applications) always have one and only one process for each exe. Microsoft has made things much more complicated for you to understand by making application domains that support mulitple exe files in one process.
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 5, 2012, 9:56 PM EST
Both "exe" and "dll" are fundamentally the same but the difference lies in how windows interacts with them.
.Exe
1.These are outbound file.
2.Only one .exe file exists per application.
3. .Exe cannot be shared with other applications.
4. ExE There is some Entry point
.dll
1.These are inbund file .
2.Many .dll files may exists in one application.
3. .dll can be shared with other applications.
4. Dll There is no entry point
5. Dll Execution is very Fast compare to Exe
hope this help.
Sam HobbsRank #107 · 20.5K reputationPosted Feb 5, 2012, 10:55 PM EST
Windows does not define what the term application means. The term application does not help to define what a dll or exe file is.
The performance of the execution of code in a DLL is the same as in a exe.