Thanks.
--
Regards,
Fernando
"Tell me and I will forget; show me and I may remember; involve me and I
will understand."
- Chinese Proverb
Well, firstly, in terms of actual DLL data, such as static fields, you
actually get a different copy of these per App-Domain. This means that it
is not possible to have two Processes sharing the same set of static
fields, even if the classes come from the same DLL. It also means that it
is possible to have multiple sets of static data in the same Process, but
that is another story.
Now, what about the code? By default the DLL code will get Just-In-Time
compiled in a way that is optimized for the way the DLL is being used. This
means that it only compiles the methods that are actually getting called.
Also, code may be optimized differently depending on the configuration and
security settings of the application calling. However, a consequence of
this is that the JITTED code cannot be safely shared by two processes, and
this will be duplicated.
There is another way to handle dynamic compliltion called NGEN. There is a
tool called NGEN.EXE that can be used to "pre-JIT" a DLL. If you do this,
the code is compiled once and saved in a special cache, and this can be
shared by multiple processes. The code is marginally slower, although the
startup time of the application using it is generally faster. Search for
NGEN on MSDN to find out more.
--------------------
| Reply-To: "F Vicaria" <fvic...@hotmail.com>
| From: "F Vicaria" <fvic...@hotmail.com>
| Subject: One DLL - Two apps?
| Date: Thu, 4 Sep 2003 10:56:33 -0700
| Lines: 18
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uTHQj3wc...@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.clr
| NNTP-Posting-Host: host143186050011.borland.com 143.186.50.11
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.clr:7890
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr
Best regard,
Fernando
"Anthony Moore" <amo...@online.microsoft.com> wrote in message
news:XGtFKjA...@cpmsftngxa06.phx.gbl...