473,387 Members | 1,569 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,387 software developers and data experts.

Shared DLL

Program1.exe and Program2.exe reference Library.dll, which only contains a
class with static methods and properties.

Modifying a value of Library.dll from Program1.exe, will change when I read
that value from Program2.exe?
If not... must I use remoting to achieve this?
Can I use Diagnostics.Processes?
Suggestions?

Thanks everybody

Nov 15 '05 #1
2 3790
Osvaldo,

The values in Program1 and Program2 will be different if accessing the
same dll. Static values are limited to the app domain that the assembly is
loaded in, and the two executables are definitely running in different
application domains.

Like you said, you can get around this using remoting, and use a shared
instance. You might also want to consider using a component derived from
ServicedComponent. You can have a pooled component with a min pool size of
one, and a max pool size of one, effectively creating a singleton.

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

"Osvaldo Bisignano" <va*************@yahoo.com.ar> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl...
Program1.exe and Program2.exe reference Library.dll, which only contains a
class with static methods and properties.

Modifying a value of Library.dll from Program1.exe, will change when I read that value from Program2.exe?
If not... must I use remoting to achieve this?
Can I use Diagnostics.Processes?
Suggestions?

Thanks everybody

Nov 15 '05 #2
That's great Nicholas. Thank you. I wonder what are those Application
Domains exactly, i'll look for the documentation but if you can give me some
introduction about them and how can i load differents assemblies into a same
AppDom.
The idea is to get around the "modules" in different exe's working together
scenario.


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> escribió
en el mensaje news:eV**************@TK2MSFTNGP09.phx.gbl...
Osvaldo,

The values in Program1 and Program2 will be different if accessing the
same dll. Static values are limited to the app domain that the assembly is loaded in, and the two executables are definitely running in different
application domains.

Like you said, you can get around this using remoting, and use a shared instance. You might also want to consider using a component derived from
ServicedComponent. You can have a pooled component with a min pool size of one, and a max pool size of one, effectively creating a singleton.

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

"Osvaldo Bisignano" <va*************@yahoo.com.ar> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl...
Program1.exe and Program2.exe reference Library.dll, which only contains a class with static methods and properties.

Modifying a value of Library.dll from Program1.exe, will change when I

read
that value from Program2.exe?
If not... must I use remoting to achieve this?
Can I use Diagnostics.Processes?
Suggestions?

Thanks everybody


Nov 15 '05 #3

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

Similar topics

10
by: John Brock | last post by:
I have a base class with several derived classes (I'm writing in VB.NET). I want each derived class to have a unique class ID (a String), and I want the derived classes to inherit from the base...
96
by: BadPony | last post by:
Anyone using Peoplesoft on a Federated UDB (shared nothing)Environment on Open System Platforms? Preferably AIX, but any war stories would be good. TEA EB-C
10
by: darrel | last post by:
I'm still trying to sort out in my head the differences between public and shared when referring to declaring properties or variables. This is my understanding: shared - akin to a 'global'...
1
by: Henri | last post by:
Hi, I'm using a custom class in my ASP.NET which has a Shared property. I don't want this Shared property to be shared between users because of thread concurrent accesses problems. I just want it...
2
by: tshad | last post by:
I have a program I am trying to compile into a dll and am getting a bunch of: the following errors: error BC30469: Reference to a non-shared member requires an object reference. At first, I...
11
by: tshad | last post by:
I am setting up some of my functions in a class called MyFunctions. I am not clear as to the best time to set a function as Shared and when not to. For example, I have the following bit...
15
by: Rob Nicholson | last post by:
A consequence of the ASP.NET architecture on IIS has just hit home with a big thud. It's to do with shared variables. Consider a module like this: Public Module Functions Public GlobalName As...
5
by: Erik Cruz | last post by:
Hello! I have read some threads discussing the fact that a module is in reality a shared class. If I try to create a Public Shared Class in vb.net I receive a compile error. Why? If I can't...
5
by: Simon | last post by:
Hi all, We have an ASP.NET 1.1 application running on IIS6 on Server 2003. Most of the base objects we are using in this application are taken from a windows application also written by us. We...
11
by: eBob.com | last post by:
I have this nasty problem with Shared methods and what I think of as "global storage" - i.e. storage declared outside of any subroutines or functions. In the simple example below this "global"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.