Windows service

  • Thread starter Thread starter Nikolay.Kachanov
  • Start date Start date
N

Nikolay.Kachanov

Hi!
I am writing a windows service application. It must be able to return a
string value when asked by external program.
I've found only ServiceController.ExecuteCommand(int), but does not
return any value.
Is it possible to interact with service in that way? Maybe networking?
But it is not a good solution from my point of view. Any variants?
 
Hello,

you'll have to use some sort of inter-process communication like Remoting,
shared-memory, named pipes or WebServices.

Best regards,
Henning Krause
 
You could have a TcpListener that listens on a known port and accepts
TcpClient objects via AcceptTcpClient and send the data back that way. Need a
worker thread, of course.
 
Back
Top