views:

555

answers:

1

I may have gone crazy... but I am hoping there is a way to do this.

I have a base class that has event handling in it. My console application is running my workflow. Part of that workflow is to raise events at specific intervals in a separate thread to broadcast the workers' current state (a heartbeat I have heard many call it).

I also have another program in the same solution that is a windows form that I want it to be able to listen to what is going on in the console application so that it can display the worker states. I have tried running both at the same time and verified the events are triggering, but the monitor is not finding any of the raised events.

I am fearing that there is no way to do this, and I will need to go to a database logging method or something else... but in the off chance someone knew how to communicate between applications with event (or event-style) logic, I would appreciate it.

Currently the applications are running from the same location. The goal is that the monitor application will eventually be attached with a broadcaster for our network so that our workstations can monitor for certain worker states without being logged into the machine and the main monitor will show us the full status of all the workers.

Please let me know if I need to expand/clarify this, have a 2-year old watching Star Wars while I type this so I may have missed something.

+1  A: 

There are several ways: using remoting, custom windows messages and named pipes. One way is How to use named pipes for interprocess communication in Visual Basic .NET or in Visual Basic 2005

Here's a remoting example: Simple Inter-Process Communication In VB.Net

Here an example of custom windows messages: VB.NET, VB6 and C# Interprocess communication via Window Messaging

Perhaps the most 'up-to-date' way is to use WCF Callback Channels: Using Callback Contracts in WCF for Asynchronous Publish/Subscribe Event-Style Communication

Mitch Wheat
awesome response. Thank you! Will probably use one of the first two, but the third looks like it will solve some stuff that I was asked about the other week.
IPX Ares
I am using 2.0 framework at the moment (we are moving to 3.5 as soon as the rest of our servers are updated)
IPX Ares
@IPX Ares: you might want to add that info to your question...
Mitch Wheat