Receive events from other project

  • Thread starter Thread starter Alejandro
  • Start date Start date
A

Alejandro

Hi!
I have 3 projects. One is class library type, which has an static class that
contains an static event, and a static method that fires the event. The
others two projects are Windows Appliocation type (App1, App2). The App1
subcribe to receive notifications from the ClassLibrary static event. When
de App2 call the static method that fires the event, the App1 never receive
the notification.
Is possible do what i want?
Thanks

PD: Sorry for my bad english =(....
 
My guess would be because each app runs in its own process and cannot share
memory. Therefore when you bind the handler in one app, it is not seen by
the other app because each app has its own copy of the variable.

I doubt this is possible with simple event handling. You may need to use
something like remoting to communicate between the apps.
 
I have 3 projects. One is class library type, which has an static class that
contains an static event, and a static method that fires the event. The
others two projects are Windows Appliocation type (App1, App2). The App1
subcribe to receive notifications from the ClassLibrary static event. When
de App2 call the static method that fires the event, the App1 never receive
the notification.
Is possible do what i want?

Not without using remoting. You need to understand that static members
are still scoped to the AppDomain, and when you run two processes,
you'll get (at least) two AppDomains.
 
Hi, Alejandro,

Did you find a way to do this? I have a similar problem. I wonder how to use
..net remoting to do it.

Thanks

Dave
 
Back
Top