Is there a way to communicate between two different services? I have a service that already runs. Is there a way to create a second service that can attach to the first service and send and receive dates to it?
I would also like to access the Windows service from a console application and attach to it. Is it possible?
You can try to implement this by using:
Example of using WCF: Many to One Local IPC using WCF and NetNamedPipeBindin.
Other example: A C# Framework for Interprocess Synchronization and Communication.
Everything depends on what version of .NET Framework you use. If you use .NET 3.0 and above then you can take a look into WCF. If not then you are on your own and you can google on keywords P/Invoke (CreateFileMapping, MapViewOfFile, CreatePipe...).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With