Board index » delphi » Repost: NT Service Applications: Processing messages

Repost: NT Service Applications: Processing messages

Anyone know of a good source of info on how to write NT Service apps?

Quote
> Just curious, but if one were to (theoretically) write an NT service
> application that did some message processing (eg for socket functions),
then
> how would you do the equivalent of:

>     Application.ProcessMessages;

> TServiceApplication doesn't seem to do this, or have I missed something.

> TIA,

> Terry Field.

 

Re:Repost: NT Service Applications: Processing messages


Terry Field <Tez...@NoSpamBigpond.com> schreef in berichtnieuws
X%BX4.5493$c5.8...@newsfeeds.bigpond.com...

Quote
> Anyone know of a good source of info on how to write NT Service apps?

> > Just curious, but if one were to (theoretically) write an NT service
> > application that did some message processing (eg for socket functions),
> then
> > how would you do the equivalent of:

> >     Application.ProcessMessages;

> > TServiceApplication doesn't seem to do this, or have I missed something.

---
What would be the use of Application.ProcessMessages in a service?? It just
relinquishes control to other running apps. The only place to use this, is
in very tight, longwinding calculation loops.
Using it in an empty loop will burn the CPU while basically doing nothing
99% of the time.
Sockets (and most other communication components) run in separate threads,
and will fire off events when there is work to do. This should work
smoothly.

--
Regards,

Dirk Claessens
---------------------------------------------------------
Attention: spamshields raised; E-mails will bounce!
---------------------------------------------------------

Other Threads