Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Mar : Re: need input on a TServiceApplication
| Subject: | Re: need input on a TServiceApplication |
| Posted by: | "danny heijl" (danny_dot_heijl_at_telenet_dot_be) |
| Date: | Sun, 6 Mar 2005 17:46:35 |
Finn Tolderlund schreef:
> If you or anybody can see errors, things you would like to be more clear or
> explained better, please let me know.
> But remember, it's not finished yet, a lot of stuff is missing right now.
I don't agree with the Delphi help that states that you can put your
service code in the ServiceExecute method, this is a recipe for disaster
in my opinion. The Execute method should be left alone, it's only
function is to respond to service manager requests. If you put other
code there your service won't always be able to do that.
The service code should always be started from the ServiceStart method,
preferably in a separate thread, unless you only need a TCP server
service where this can be reduced to setting a TIdTcpServer.Active to
True as all processing will then be done in separate client connection
threads anyway.
Danny
---