Dll issue

  • Thread starter Thread starter marcotrapanese
  • Start date Start date
M

marcotrapanese

Hi,

I have a simple class which contains data used by two VB.NET projects.
I wrote a dll based on that class to read/write data values (one
update them and the other has to read them).
Into the two projects I added the reference to my dll and I get no
errors. But when I try to write a value from one exe and read the same
value from the other it seems there are two instances of my class. In
other word I can't exchange data between the two programs.

How can I tell to the compiler I want use the *same* instance of the
dll in both exe?

Bye
Marco / iw2nzm
 
How can I tell to the compiler I want use the *same* instance of the
dll in both exe?

DLLs don't work that way. You'll always get a separate copy loaded
into each application.

If you want to share data between two aplications you have to come up
with some kind of remoting or inter-process communication scheme. Or
save it to a shared persistent storage like a database.


Mattias
 
Mattias said:
DLLs don't work that way. You'll always get a separate copy loaded
into each application.

uh!
I read somewhere that is a common way to achieve this.

However:
If you want to share data between two aplications you have to come up
with some kind of remoting or inter-process communication scheme. Or
save it to a shared persistent storage like a database.

I need to share data in real-time. An application receives values from a
serial link and has to update an hastable (variables and values) used by
the second application.

Could you suggest me a method to do that?

Thanks
Marco / iw2nzm
 
Back
Top