Communicate across application instances
-
I need to send a signal from one instance of my application to another. What would be the best method to do this? In Win32 I would use a named event and have a listening thread to pick up when that event gets signalled. But named events dont seem to be available in .NET 1.1
-
I need to send a signal from one instance of my application to another. What would be the best method to do this? In Win32 I would use a named event and have a listening thread to pick up when that event gets signalled. But named events dont seem to be available in .NET 1.1
WM_COPYDATA is the easiest way to do this. Yes, you need to impliment this yourself, I don't think C# has a method that calls it. Christian Graus - Microsoft MVP - C++
-
I need to send a signal from one instance of my application to another. What would be the best method to do this? In Win32 I would use a named event and have a listening thread to pick up when that event gets signalled. But named events dont seem to be available in .NET 1.1
You could use remoting for this. There's a good example on single instance applications on MSDN: Real World Applications Sample, Part 1[^] There are a few little bugs in there and it's written for .NET 1.0 IIRC (so some channel security settings have to be changed for 1.1), but altogether it's working nicely. Regards, mav