View Full Version : Delphi Service
hammer
26-05-2004, 08:50 PM
i know that this is probably not the place to ask but has anyone created a service program? or can someone direct me to a how-to or some tutorial.
cous i am trying to create an service app but my success is quite miserable.
thanks in advance.
Alimonster
27-05-2004, 04:55 PM
I've done one before. What happens when you try it? Here's a list of points to keep in mind:
Watch the "interactive" setting. If this is set to true, your thing can pop up dialogues and generally show stuff to the user. However, this may cause hassle if nobody is logged into Windows (not sure, mind you, cause I always set it to false). Prefer log files (saved as plain text possibly) to keep the status up to date.
Remember to install the thing first! This is obvious, and quite possibly patronising (if so, sorry), but you have to pass in the command line parameter /install to get it installed and visible in the services list. Similarly, /uninstall to get rid of it later.
I tend to put something like this in the execute method for the app:
while not Terminated do
ServiceThread.ProcessRequests(True);
I use a timer for the actual work to be done.
Alimonster
27-05-2004, 04:57 PM
Also, here's a good article I found a while ago about the subject:
http://builder.com.com/5100-6387-1050538-1.html
hammer
27-05-2004, 06:36 PM
Alimonster are you talking about the service template or the service application template?
thanks for the article i am going to read it at the time of the post :)
Alimonster
28-05-2004, 09:21 AM
Alimonster are you talking about the service template or the service application template?
thanks for the article i am going to read it at the time of the post :)
To be honest, I can't remember whether I selected service application or service. I think a service application is only a container for one or more services, so I'm not sure that it makes that much of a difference. I probably selected the application thinking "hey, it says application - that's got to be what I want". :)
hammer
30-05-2004, 11:16 AM
you were talking about the service app. template :)
thanks very much for the article it was of great help :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.