Difference between exe and dll??

G

Guest

hi
can nybody help me with the difference between exe and dll in .Net context ???
Amrita Bhatia
 
D

Dmitriy Lapshin [C# / .NET MVP]

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.
 
M

Marc Scheuner [MVP ADSI]

can nybody help me with the difference between exe and dll in .Net context ???

* The file extension (;-) <SCNR>)
* The fact that you can execute a .EXE, but not a .DLL

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
R

Richard Grimes [MVP]

Amrita said:
hi
can nybody help me with the difference between exe and dll in .Net
context ??? Amrita Bhatia

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.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top