Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / May 2005

Tip: Looking for answers? Try searching our database.

How to share a single assembly (DLL) with multiple apps?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Binary Poet - 08 May 2005 15:36 GMT
I have been doing alot of reading about remoting, etc. but am still confused
and a little lost.
Problem: I have three applications that all use the same assembly (ie:
MyApp.dll). I want the assembly to be loaded only once (singleton?) and have
it shared between all the applications. So if for example I make a call  
MyApp.SetNumber=2 in application #1, I should be able to make a call
MyApp.ReadNumber in application #2 and get back the value 2. (might be a bad
example here.....).

With application domains, etc this seems like a major pain to do this. Can
anyone help point me in a direction or even give a very basic example of a
shared DLL across different applications? Would it be better (if posslbe) to
make the DLL into a service and do the same thing?

BTW: This is all running on the same machine so it does not need to go
across the network.
Yves Tourchot - 09 May 2005 19:21 GMT
> I have been doing alot of reading about remoting, etc. but am still confused
> and a little lost.
[quoted text clipped - 12 lines]
> BTW: This is all running on the same machine so it does not need to go
> across the network.

Each process loads its own "instance" of the CLR witch in turn loads its own
"instance" of the various needed assemblies ie mscorlib, system, MyApp and
so on.

So it's not possible to different process to loads and uses exactly the same
instance of a given assembly.

But it still possible to share data between different process through the
uses of the same assembly. Take a look at the IsolatedStorage api.
Daniel Moth - 15 May 2005 04:53 GMT
Remoting can be used for your scenario. You'll need an exe (or use a
service) to host your dll.

With .NET 1.x, use binary over tcp. With v2.0, you can also use the new IPC
channel:
http://www.danielmoth.com/Blog/2004/09/ipc-with-remoting-in-net-20.html

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

>I have been doing alot of reading about remoting, etc. but am still
>confused
[quoted text clipped - 16 lines]
> BTW: This is all running on the same machine so it does not need to go
> across the network.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.