Interacting with Windows Service (but more than just status)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a Windows Service, which will be hosting a couple of worker
classes, each in there own thread. I will be creating a tray Icon (Notify
Icon) and a windows form to manage this service.

I can send custom commands to start or stop or... any of the worker objects
that the windows service will be hosting.

What I need to do is to get some information back to the Tray Icon app or
the windows form about the actual worker items status inside the windows
service. Is there some way to get the windows service to raise events or pass
information back about its inner workings?

I just found:
public override System.Runtime.Remoting.ObjRef CreateObjRef(Type
requestedType)
{
return base.CreateObjRef(requestedType);
}
but I have no idea if I'm actually barking up the wrong tree.

Short of getting the windows service to write it's status to a text file,
which I can then read from the windows app (Obviously a bad idea and actually
meant as a joke ;-) I can't think of another way to do this.

If anyone has any ideas/suggestions, it would be much appreciated.

Thanks
David
 
Back
Top