Re: Interacting with Windows Service (but more than just status)



Why dont you just communicate through socket calls to and from the service
and the client.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog


"W1ld0ne74" <W1ld0ne74@xxxxxxxxxxx> wrote in message
news:2B36CD10-C994-410B-B8AB-EF8E3B756487@xxxxxxxxxxxxxxxx
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


.



Relevant Pages

  • Problem with Storable on Windows
    ... Core 4), it doesn't seem to work on Windows, returning the following ... print "Caller starting\n"; ... print "Worker started\n"; ... then reading it on the worker using sysread and using thaw ...
    (comp.lang.perl.modules)
  • Modal Dialogs on worker threads can cause exceptions in MFC with N
    ... I have an MFC application that puts up several message boxes on worker ... This has always worked when compiled with MFC 6.0. ... on Windows 2000 and Windows XP. ...
    (microsoft.public.win32.programmer.ui)
  • Re: UI Thread : Wheres the processing?
    ... My reading of the documentation on worker and UI ... The message queue which is necessary for a UI thread is created on ... It is also important to note that windows and threads have a natural ... I hope that I have alleviated some confusion. ...
    (microsoft.public.vc.language)
  • Re: Java Component Scheduling
    ... Each worker runs on a different host. ... If it can't it sleeps. ... Have you given any thought to using cron to handle the scheduling? ... there is a scheduler in some versions of Windows. ...
    (comp.lang.java.help)
  • RE: 5000 System Tray Icons
    ... using forgot to account for. ... If the tray icon was created by a windows ... you can always keep it from starting during boot by opening MSConfig (Start> ... unchecking the program that is causing the tray icon. ...
    (microsoft.public.windowsxp.newusers)