Interacting with Windows Service (but more than just status)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top