471,315 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 software developers and data experts.

Receive events from other project

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 =(....
Jan 3 '06 #1
3 1658
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.
"Alejandro" <@> wrote in message
news:ua*************@TK2MSFTNGP14.phx.gbl...
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 =(....

Jan 3 '06 #2
<"Alejandro" <@>> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jan 3 '06 #3
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

"Alejandro" wrote:
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 =(....

Jan 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by dave | last post: by
12 posts views Thread by scsharma | last post: by
reply views Thread by rosydwin | last post: by

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.