Techno World Inc - The Best Technical Encyclopedia Online!

THE TECHNO CLUB [ TECHNOWORLDINC.COM ] => ASP .NET => Topic started by: Avena on November 19, 2007, 11:56:08 AM



Title: Help me-difference between .dll and .exe file
Post by: Avena on November 19, 2007, 11:56:08 AM
Hi,
I am currently learning Asp.net.I want to know the difference between .dll and .exe file.if any one know please explain this.I am awaiting for your valuable replies. ::)


Title: Re: Help me-difference between .dll and .exe file
Post by: Mark David on November 19, 2007, 12:43:22 PM
Hi,

An EXE is visible to the system as a regular Win32 executable. Its entry point refers to a small loader which initializes the .NET runtime and tells it to load and execute the assembly contained in the EXE. A DLL is visible to the system as a Win32 DLL but most likely without any entry points. The .NET runtime stores information about the contained assembly in its own header.

You might want to review Jeffrey Richter's "Programming with .NET Framework" book for a very detailed explanation of .NET nuts and bolts, including loading DLLs and EXEs.


Title: Re: Help me-difference between .dll and .exe file
Post by: Tina on November 19, 2007, 12:45:34 PM
Well, .NET blurs the differences. As Dmitriy says a .NET library is a Win32
DLL, which means that there are flags set as such in the Win32 headers in
the file. A .NET process is a Win32 EXE, again, with flags set as such.
However, to .NET a library can have the extension DLL or EXE, .NET checks
for both, BUT, even if the extension is EXE it still must be built as a
library if it is used to export classes.

In .NET v1.1 and v1.0, only libraries can export classes, you cannot do this
with a process (there is one exception). If you want to export objects from
a process you must use .NET remoting. The exception is the .NET Installer
class, which can be a public class in a process and the installer tool can
still call it.

In .NET 2.0 both libraries (DLL) and processes (EXE) can export classes.