Hello Dave,

From the top of my head, in the TService's Execute method:
  while not Terminated do
    ServiceThread.ProcessRequests(True);

There is also 1 or 2 NT service examples coming with ICS. Also you can
use a normal GUI also as service. I have a little class for it you can
download from my site. Advantage is that the same exe can run as GUI and
as service, so easy for maintenance and debugging.

---
Rgds, Wilfried
http://www.mestdagh.biz

Thursday, June 23, 2005, 13:59, Dave wrote:

> I'm trying to create a service app which checks the status of 80 remote
> printers by accessing their web pages using the ICS HTTP Client
> asynchronously.  I initially put the code in a GUI app to test it, then
> tried to move it to a service and discovered that there is no
> Application.ProcessMessages method so I don't seem to be able to make the
> main procedure loop until the event is triggered.

> In the main execute function I just want to wait until each of the requests
> responds & triggers the OnRequestDone event.  How can I do this in a service
> app?

> The only alternatives I can see are either make the app threaded & to put
> each of the requests into a separate thread & use the synchronous calls, or
> process them sequentially synchronously in the main execute function.

> Any ideas?




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to