473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What exactly Dll does



*** Sent via Developersdex http://www.developersdex.com ***
Mar 27 '07 #1
6 1299
Nishita,

What do you mean? As opposed to an EXE? From .NET 2.0 and on, the only
difference between dlls and exes are that exes are entry points to
applications, dlls are not. You can add references to each of them to use
the types that are used in them.

As for 1.1 and before, you could only set references to DLLs.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"nishitha Pothuri" <bh*************@gmail.comwrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
>

*** Sent via Developersdex http://www.developersdex.com ***

Mar 27 '07 #2
Hi Nicholas,

if I reference an exe in another exe, and then the referencing exe accesses
some type in the referenced exe, what will happen at runtime. Will the
second exe be loaded in the same process as the first, simply as if it were
a dll, or will the exe start its own process.

Christof

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschrieb
im Newsbeitrag news:e9*************@TK2MSFTNGP06.phx.gbl...
Nishita,

What do you mean? As opposed to an EXE? From .NET 2.0 and on, the
only difference between dlls and exes are that exes are entry points to
applications, dlls are not. You can add references to each of them to use
the types that are used in them.

As for 1.1 and before, you could only set references to DLLs.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"nishitha Pothuri" <bh*************@gmail.comwrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
>>

*** Sent via Developersdex http://www.developersdex.com ***


Mar 27 '07 #3
Christof,

It will not hit the entry point of the referenced EXE. The only code
that is executed is the code that you reference and make explicit calls to.

I have to say that even though this option is available, I think it is a
bad idea to use. You should have shared functionality separated out into
libraries. With an EXE, the possibility exists that the classes exported
from the EXE will depend on conditions/situations that arise from the
running of the EXE.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Christof Nordiek" <cn@nospam.dewrote in message
news:%2******************@TK2MSFTNGP06.phx.gbl...
Hi Nicholas,

if I reference an exe in another exe, and then the referencing exe
accesses some type in the referenced exe, what will happen at runtime.
Will the second exe be loaded in the same process as the first, simply as
if it were a dll, or will the exe start its own process.

Christof

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschrieb
im Newsbeitrag news:e9*************@TK2MSFTNGP06.phx.gbl...
>Nishita,

What do you mean? As opposed to an EXE? From .NET 2.0 and on, the
only difference between dlls and exes are that exes are entry points to
applications, dlls are not. You can add references to each of them to
use the types that are used in them.

As for 1.1 and before, you could only set references to DLLs.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"nishitha Pothuri" <bh*************@gmail.comwrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
>>>

*** Sent via Developersdex http://www.developersdex.com ***



Mar 27 '07 #4
Nicholas Paldino [.NET/C# MVP] <mv*@spam.guard.caspershouse.comwrote:
It will not hit the entry point of the referenced EXE. The only code
that is executed is the code that you reference and make explicit calls to.

I have to say that even though this option is available, I think it is a
bad idea to use. You should have shared functionality separated out into
libraries. With an EXE, the possibility exists that the classes exported
from the EXE will depend on conditions/situations that arise from the
running of the EXE.
I don't know - it's very handy for a DLL to reference an EXE in some
situations. For instance, suppose I write a little tool which allows
plugins to be written. If there's no real need to write the plugin
interface in its own assembly, it's simpler just to have the one EXE
file which the DLLs it loads can reference to implement the interface.

Likewise a unit test class library may want to reference an EXE file
that contains the types it's testing.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 27 '07 #5
Nicholas Paldino [.NET/C# MVP] wrote:
What do you mean? As opposed to an EXE? From .NET 2.0 and on, the only
difference between dlls and exes are that exes are entry points to
applications, dlls are not. You can add references to each of them to use
the types that are used in them.

As for 1.1 and before, you could only set references to DLLs.
No.

You can reference an EXE just fine in .NET 1.1 !

Visual Studio 2003 has a check that does not allow it,
but the C# compiler does not have any problems with it.

Arne
Apr 1 '07 #6
As a matter of face, you can rename an .EXE to have a .DLL extension and it
will still work (by being referenced) just fine.
"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:46***********************@news.sunsite.dk...
Nicholas Paldino [.NET/C# MVP] wrote:
> What do you mean? As opposed to an EXE? From .NET 2.0 and on, the
only difference between dlls and exes are that exes are entry points to
applications, dlls are not. You can add references to each of them to
use the types that are used in them.

As for 1.1 and before, you could only set references to DLLs.

No.

You can reference an EXE just fine in .NET 1.1 !

Visual Studio 2003 has a check that does not allow it,
but the C# compiler does not have any problems with it.

Arne

Apr 1 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
140
by: Oliver Brausch | last post by:
Hello, have you ever heard about this MS-visual c compiler bug? look at the small prog: static int x=0; int bit32() { return ++x; }
24
by: David Mathog | last post by:
If this: int i,sum; int *array; for(sum=0, i=0; i<len; i++){ sum += array; } is converted to this (never mind why for the moment):
16
by: Ajay | last post by:
Hi all, i want to know when i create a class.what all it contains.I know the following things are there by default if i do not declare them by myself.Please tell the other things that are left. ...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
15
by: arnuld | last post by:
-------- PROGRAMME ----------- /* Stroustrup, 5.6 Structures STATEMENT: this programmes *tries* to do do this in 3 parts: 1.) it creates a "struct", named "jd", of type "address". 2. it...
32
by: Stephen Horne | last post by:
I've been using Visual C++ 2003 for some time, and recently started working on making my code compile in GCC and MinGW. I hit on lots of unexpected problems which boil down to the same template...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.