Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Sending events from one assembly to another

Reply
 
Old 05-27-2008   #1 (permalink)
sdr


 
 

Sending events from one assembly to another

Hello all,

I have a scenario where I should be able to fire an event in one
assembly and listen to it in another.

As I'm writing a proof of concept at the moment, I wrote two separate
WinForms projects. The actual case is that there are going to be two
plug-in assemblies hosted in a software I don't know much about yet.
What are my options? Is there a way to make events work in my
scenario?

TIA,

sdr


My System SpecsSystem Spec
Old 05-27-2008   #2 (permalink)
Adam Benson


 
 

Re: Sending events from one assembly to another

You need to know how your target software will load and initialize your
dlls. And without knowing that it's difficult to offer anything other than
general comments in response. When the software loads up the dll that will
subscribe to the event it needs to pass to it a reference to the object that
will be generating the event. Once you have that then you can subscribe to
the event in the normal way. But like I said, without more detail, it's hard
to give you anything concrete.

Cheers,

Adam.

"sdr" <peuramaki@xxxxxx> wrote in message
news:18a9dd33-6306-4255-a79d-eaf8206d26ba@xxxxxx
Quote:

> Hello all,
>
> I have a scenario where I should be able to fire an event in one
> assembly and listen to it in another.
>
> As I'm writing a proof of concept at the moment, I wrote two separate
> WinForms projects. The actual case is that there are going to be two
> plug-in assemblies hosted in a software I don't know much about yet.
> What are my options? Is there a way to make events work in my
> scenario?
>
> TIA,
>
> sdr
>

My System SpecsSystem Spec
Old 05-27-2008   #3 (permalink)
Jack Jackson


 
 

Re: Sending events from one assembly to another

On Tue, 27 May 2008 07:10:05 -0700 (PDT), sdr <peuramaki@xxxxxx>
wrote:
Quote:

>Hello all,
>
>I have a scenario where I should be able to fire an event in one
>assembly and listen to it in another.
>
>As I'm writing a proof of concept at the moment, I wrote two separate
>WinForms projects. The actual case is that there are going to be two
>plug-in assemblies hosted in a software I don't know much about yet.
>What are my options? Is there a way to make events work in my
>scenario?
>
>TIA,
>
>sdr
Whether the generator of the event and the subscriber are in the same
or different assemblies should make no difference.

I can't tell from your post if you tried something and it didn't work,
or if you are just wanting to know if it is possible.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Can't load assembly Software
Given a C#.NET assembly, what information can you get? .NET General
Why can't I use Interop assembly instead of COM? PowerShell
.net - trust assembly Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46