SlideShare a Scribd company logo
Draft: 1st
Date: 22 Jan. 08
Author: Niall Munro
Title: GS: Assistant Data Analyst
Address: Generation Scotland Office
Room D38
Medical Genetics (OPD2)
2nd Floor, Out Patients Department
Western General Hospital
Crewe Road South
Edinburgh
EH4 2XU
Email: niall.munro@ed.ac.uk
DELPHI HOWTO:
SERVICES
Delphi Howto: System Services
CONTENTS
Introduction 1
Creating a New Service 2
Service Events 3
Keeping it Alive 4
Passing Event Signals to Threads 5
Installing / Uninstalling Your Service 6
Full Example 7
Useful Links 9
Table 1: Service events 3
Example 1: Skeleton code 1
Example 2: Keep alive loop 4
Example 3: Passing state calls to worker threads 5
Example 4: Installing your service 6
Example 5: Service uninstall success 6
Example 6: Full example code 8
Delphi Howto: System Services
1 | P a g e
INTRODUCTION
A service is an application that runs in the background of an operating system that waits for client connections,
does some processing and then returns information. Web, FTP and e-mail servers are common examples of
services; they all require little human interaction hence why they run in the background. Services are also
useful for starting mission critical applications at boot time in that they start with the system instead of waiting
for a user to log on and have it automatically or manually launch at that point. This means that if there is a
systems failure and the computer the application is installed on may start upon reboot without a user having
logged on.
unit main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr,
Dialogs;
type
TMyService = class(TService)
private
{ Private declarations }
public
function GetServiceController: TServiceController; override;
{ Public declarations }
end;var
MyService: TMyService;
implementation
{$R *.DFM}
procedure ServiceController(CtrlCode: DWord); stdcall;
begin
MyService.Controller(CtrlCode);
end;
function TMyService.GetServiceController: TServiceController;
begin
Result := ServiceController;
end;
end.
Example 1: Skeleton code
Delphi Howto: System Services
2 | P a g e
CREATING A NEW SERVICE
You can create a new Delphi service in the Borland IDE by going to File>New>Other and selecting Service. This
will create the skeleton code as seen in example 1 on the previous page as well as other service specific code
required to communicate properly with the Windows API.
Note that you are not recommended to add services to non-service applications as they will not include the
necessary additionally generated code to handle service specific errors or Windows calls.
Services have both Code and Design views so you may drag and drop components from the designer toolbox.
The easiest way to name your service is by renaming it in the designer context by changing the Name attribute
to the name you wish to give to your new service object. This is also the name the service will be known as to
the system and the DisplayName attribute will be what appears in the services console and TaskManager i.e.
Microsoft’s Internet Information Services is displayed as World Wide Web Publishing in the services console
yet its service name is W3SVC. The service name is what is called from the command line when starting or
stopping services, net start W3SVC and for our own service it would be net start MyService.
You should also make sure the following properties are set to your requirements:
ď‚· AllowPause and AllowStop should be set to true unless otherwise required
ď‚· Interactive should be set to false unless you require to communicate with the Desktop such as via the
ShowMessage command
ď‚· StartType defines at which point during system initialisation should the process start, this should be
set to stAuto if you want it to start at during the system startup or stManual which will allow users
and applications to start it when required
Delphi Howto: System Services
3 | P a g e
SERVICE EVENTS
Services come with a set of events that can be used to initialise variables, spawn worker threads as well as
initiating clean up code when a service terminates.
The following is a list of important service events and there meanings:
Event Description
AfterInstall (published) Occurs immediately after the service is registered with the Windows Service Control
manager.
AfterUninstall (published) Occurs immediately after the service is removed from the Service Control manager's
database.
BeforeInstall (published) Occurs before the service is first registered with the Windows Service Control
manager.
BeforeUninstall
(published)
Occurs immediately before the service is removed from the Service Control
manager's database.
OnContinue (published) Occurs when the Service Control manager resumes the service after it has been
paused.
OnExecute (published) Occurs when the thread associated with the service starts up.
OnPause (published) Occurs when the Service Control manager pauses the service temporarily.
OnShutdown (published) Occurs when the system running the service application is about to shut down.
OnStart (published) OnStartup occurs when the service first starts up, before the OnExecute event.
OnStop (published) Occurs when the Service Control manager stops the service.
Table 1: Service events
Delphi Howto: System Services
4 | P a g e
KEEPING IT ALIVE
Services, like threads, require a loop in order to stay alive otherwise once it reaches the end of its first run of
the OnExecute method, it will return and the service will exit. To add a method for the OnExecute method
simply double click on the OnExecute event in the design view of the Borland IDE and it will automatically
generate the required method. The following demonstrates a loop that will keep the service alive:
procedure TMyService.ServiceExecute(Sender: TService);
begin
while not Terminated do
begin
ServiceThread.ProcessRequests(True); // wait for termination
end;
end;
Example 2: Keep alive loop
What the ServiceThread.ProcessRequests(True) does is to keep the thread alive instead of
terminating once it reaches the end of the method. The functionality of the service can come from worker
threads initiated before the loop or from TCP, HTTP or Socket components added in the design view.
Delphi Howto: System Services
5 | P a g e
PASSING EVENT SIGNALS TO THREADS
One thing to remember is that if you utilise the Start, Stop, Pause and Continue events and you have worker
threads, you should pass these calls on to them as there is no point pausing a service only for a worker thread
to ignore the request. The following example explains how this would be done:
procedure TMyService.ServiceStart(Sender: TService; var Started: Boolean);
begin
WorkerThread := TWorkerThread.Create(False); // initialise thread
Started := True;
end;
procedure TMyService.ServiceContinue(Sender: TService; var Continued:
Boolean);
begin
WorkerThread.Resume;
Continued := True;
end;
procedure TMyService.ServicePause(Sender: TService; var Paused: Boolean);
begin
WorkerThread.Suspend;
Paused := True;
end;
procedure TMyService.ServiceStop(Sender: TService; var Stopped: Boolean);
begin
WorkerThread.Terminate;
Stopped := True;
end;
Example 3: Passing state calls to worker threads
Delphi Howto: System Services
6 | P a g e
INSTALLING / UNINSTALLING YOUR SERVICE
Services come with the necessary code to install and uninstall themselves through the use of switches on the
command line or through the Run box located in the start menu. To register a service on a system open a new
Run box, locate your service executable and add the /install switch.
Example 4: Installing your service
Depending on what you specified as the StartType the service will either start during the boot process of the
machine or it will be started manually by users or other applications. To uninstall the service repeat the
process above except instead of the /install switch use /uninstall instead.
Example 5: Service uninstall success
Delphi Howto: System Services
7 | P a g e
FULL EXAMPLE
unit main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr,
Dialogs, MyWorkerThread;
{ MyWorkerThread will be a unit that contains TWorkerThread }
type
TMyService = class(TService)
private
{ Private declarations }
public
function GetServiceController: TServiceController; override;
{ Public declarations }
end;var
MyService: TMyService;
implementation
{$R *.DFM}
procedure ServiceController(CtrlCode: DWord); stdcall;
begin
MyService.Controller(CtrlCode);
end;
function TMyService.GetServiceController: TServiceController;
begin
Result := ServiceController;
end;
procedure TMyService.ServiceStart(Sender: TService; var Started: Boolean);
begin
WorkerThread := TWorkerThread.Create(False); // initialise thread
Started := True;
end;
Delphi Howto: System Services
8 | P a g e
procedure TMyService.ServiceContinue(Sender: TService; var Continued:
Boolean);
begin
WorkerThread.Resume;
Continued := True;
end;
procedure TMyService.ServiceExecute(Sender: TService);
begin
while not Terminated do
begin
ServiceThread.ProcessRequests(True); // wait for termination
end;
end;
procedure TMyService.ServicePause(Sender: TService; var Paused: Boolean);
begin
WorkerThread.Suspend;
Paused := True;
end;
procedure TMyService.ServiceStop(Sender: TService; var Stopped: Boolean);
begin
WorkerThread.Terminate;
Stopped := True;
end;
end.
Example 6: Full example code
Delphi Howto: System Services
9 | P a g e
USEFUL LINKS
Creating a Windows Service in Delphi – http://www.devarticles.com/c/a/Delphi-Kylix/Creating-a-Windows-
Service-in-Delphi/

More Related Content

Viewers also liked

Data storing & retrieval system
Data storing & retrieval systemData storing & retrieval system
Data storing & retrieval system
Abdul Momin 💻👕💯
 
2084 Zwischenpraese_Wenwen
2084 Zwischenpraese_Wenwen2084 Zwischenpraese_Wenwen
2084 Zwischenpraese_Wenwen
JulianReineck
 
ionas-Server Live-Demo vom 04.12.2015
ionas-Server Live-Demo vom 04.12.2015ionas-Server Live-Demo vom 04.12.2015
ionas-Server Live-Demo vom 04.12.2015
Christoph Dyllick-Brenzinger
 
Aborto
AbortoAborto
Aborto
Ivonne Zenteno
 
Pariisin ilmastosopimus sijoittajan näkökulmasta.
Pariisin ilmastosopimus sijoittajan näkökulmasta. Pariisin ilmastosopimus sijoittajan näkökulmasta.
Pariisin ilmastosopimus sijoittajan näkökulmasta.
Matti Kahra
 
Dystopian Connections to History
Dystopian Connections to HistoryDystopian Connections to History
Dystopian Connections to History
donamore1
 
F block dystopian in the real world!
F block dystopian in the real world!F block dystopian in the real world!
F block dystopian in the real world!
donamore1
 
Plos
PlosPlos

Viewers also liked (9)

Data storing & retrieval system
Data storing & retrieval systemData storing & retrieval system
Data storing & retrieval system
 
Certificat_IKSEM
Certificat_IKSEMCertificat_IKSEM
Certificat_IKSEM
 
2084 Zwischenpraese_Wenwen
2084 Zwischenpraese_Wenwen2084 Zwischenpraese_Wenwen
2084 Zwischenpraese_Wenwen
 
ionas-Server Live-Demo vom 04.12.2015
ionas-Server Live-Demo vom 04.12.2015ionas-Server Live-Demo vom 04.12.2015
ionas-Server Live-Demo vom 04.12.2015
 
Aborto
AbortoAborto
Aborto
 
Pariisin ilmastosopimus sijoittajan näkökulmasta.
Pariisin ilmastosopimus sijoittajan näkökulmasta. Pariisin ilmastosopimus sijoittajan näkökulmasta.
Pariisin ilmastosopimus sijoittajan näkökulmasta.
 
Dystopian Connections to History
Dystopian Connections to HistoryDystopian Connections to History
Dystopian Connections to History
 
F block dystopian in the real world!
F block dystopian in the real world!F block dystopian in the real world!
F block dystopian in the real world!
 
Plos
PlosPlos
Plos
 

Similar to Delphi - Howto Services

Services I.pptx
Services I.pptxServices I.pptx
Services I.pptx
RiziX3
 
Android service, aidl - day 1
Android service, aidl - day 1Android service, aidl - day 1
Android service, aidl - day 1
Utkarsh Mankad
 
Introduction To Windows Services
Introduction To Windows ServicesIntroduction To Windows Services
Introduction To Windows Services
Josef Finsel
 
Mule Tcat server
Mule  Tcat serverMule  Tcat server
Mule Tcat server
D.Rajesh Kumar
 
IBM Business Automation Workflow
IBM Business Automation WorkflowIBM Business Automation Workflow
IBM Business Automation Workflow
Mohammed El Rafie Tarabay
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)
Khaled Anaqwa
 
Background Tasks with Worker Service
Background Tasks with Worker ServiceBackground Tasks with Worker Service
Background Tasks with Worker Service
ssusere19c741
 
Windows services 101 (2004)
Windows services 101 (2004)Windows services 101 (2004)
Windows services 101 (2004)
Vatroslav Mihalj
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
butest
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
butest
 
130297267 transformations
130297267 transformations130297267 transformations
130297267 transformations
Sunil Pandey
 
Architecture: Manual vs. Automation
Architecture: Manual vs. AutomationArchitecture: Manual vs. Automation
Architecture: Manual vs. Automation
Amazon Web Services
 
Linux class 10 15 oct 2021-6
Linux class 10   15 oct 2021-6Linux class 10   15 oct 2021-6
Linux class 10 15 oct 2021-6
Khawar Nehal khawar.nehal@atrc.net.pk
 
Android 8 behavior changes
Android 8 behavior changesAndroid 8 behavior changes
Android 8 behavior changes
InnovationM
 
Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_service
krishmdkk
 
Configuring an application_server_in_eclipse
Configuring an application_server_in_eclipseConfiguring an application_server_in_eclipse
Configuring an application_server_in_eclipse
Supratim Ray
 
Day 15: Working in Background
Day 15: Working in BackgroundDay 15: Working in Background
Day 15: Working in Background
Ahsanul Karim
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
Huu Bang Le Phan
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
felicidaddinwoodie
 
How to restart the RDP without rebooting the windows server .pdf
How to restart the RDP without rebooting the windows server .pdfHow to restart the RDP without rebooting the windows server .pdf
How to restart the RDP without rebooting the windows server .pdf
Host It Smart
 

Similar to Delphi - Howto Services (20)

Services I.pptx
Services I.pptxServices I.pptx
Services I.pptx
 
Android service, aidl - day 1
Android service, aidl - day 1Android service, aidl - day 1
Android service, aidl - day 1
 
Introduction To Windows Services
Introduction To Windows ServicesIntroduction To Windows Services
Introduction To Windows Services
 
Mule Tcat server
Mule  Tcat serverMule  Tcat server
Mule Tcat server
 
IBM Business Automation Workflow
IBM Business Automation WorkflowIBM Business Automation Workflow
IBM Business Automation Workflow
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)
 
Background Tasks with Worker Service
Background Tasks with Worker ServiceBackground Tasks with Worker Service
Background Tasks with Worker Service
 
Windows services 101 (2004)
Windows services 101 (2004)Windows services 101 (2004)
Windows services 101 (2004)
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
 
130297267 transformations
130297267 transformations130297267 transformations
130297267 transformations
 
Architecture: Manual vs. Automation
Architecture: Manual vs. AutomationArchitecture: Manual vs. Automation
Architecture: Manual vs. Automation
 
Linux class 10 15 oct 2021-6
Linux class 10   15 oct 2021-6Linux class 10   15 oct 2021-6
Linux class 10 15 oct 2021-6
 
Android 8 behavior changes
Android 8 behavior changesAndroid 8 behavior changes
Android 8 behavior changes
 
Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_service
 
Configuring an application_server_in_eclipse
Configuring an application_server_in_eclipseConfiguring an application_server_in_eclipse
Configuring an application_server_in_eclipse
 
Day 15: Working in Background
Day 15: Working in BackgroundDay 15: Working in Background
Day 15: Working in Background
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
 
How to restart the RDP without rebooting the windows server .pdf
How to restart the RDP without rebooting the windows server .pdfHow to restart the RDP without rebooting the windows server .pdf
How to restart the RDP without rebooting the windows server .pdf
 

Delphi - Howto Services

  • 1. Draft: 1st Date: 22 Jan. 08 Author: Niall Munro Title: GS: Assistant Data Analyst Address: Generation Scotland Office Room D38 Medical Genetics (OPD2) 2nd Floor, Out Patients Department Western General Hospital Crewe Road South Edinburgh EH4 2XU Email: niall.munro@ed.ac.uk DELPHI HOWTO: SERVICES
  • 2. Delphi Howto: System Services CONTENTS Introduction 1 Creating a New Service 2 Service Events 3 Keeping it Alive 4 Passing Event Signals to Threads 5 Installing / Uninstalling Your Service 6 Full Example 7 Useful Links 9 Table 1: Service events 3 Example 1: Skeleton code 1 Example 2: Keep alive loop 4 Example 3: Passing state calls to worker threads 5 Example 4: Installing your service 6 Example 5: Service uninstall success 6 Example 6: Full example code 8
  • 3. Delphi Howto: System Services 1 | P a g e INTRODUCTION A service is an application that runs in the background of an operating system that waits for client connections, does some processing and then returns information. Web, FTP and e-mail servers are common examples of services; they all require little human interaction hence why they run in the background. Services are also useful for starting mission critical applications at boot time in that they start with the system instead of waiting for a user to log on and have it automatically or manually launch at that point. This means that if there is a systems failure and the computer the application is installed on may start upon reboot without a user having logged on. unit main; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs; type TMyService = class(TService) private { Private declarations } public function GetServiceController: TServiceController; override; { Public declarations } end;var MyService: TMyService; implementation {$R *.DFM} procedure ServiceController(CtrlCode: DWord); stdcall; begin MyService.Controller(CtrlCode); end; function TMyService.GetServiceController: TServiceController; begin Result := ServiceController; end; end. Example 1: Skeleton code
  • 4. Delphi Howto: System Services 2 | P a g e CREATING A NEW SERVICE You can create a new Delphi service in the Borland IDE by going to File>New>Other and selecting Service. This will create the skeleton code as seen in example 1 on the previous page as well as other service specific code required to communicate properly with the Windows API. Note that you are not recommended to add services to non-service applications as they will not include the necessary additionally generated code to handle service specific errors or Windows calls. Services have both Code and Design views so you may drag and drop components from the designer toolbox. The easiest way to name your service is by renaming it in the designer context by changing the Name attribute to the name you wish to give to your new service object. This is also the name the service will be known as to the system and the DisplayName attribute will be what appears in the services console and TaskManager i.e. Microsoft’s Internet Information Services is displayed as World Wide Web Publishing in the services console yet its service name is W3SVC. The service name is what is called from the command line when starting or stopping services, net start W3SVC and for our own service it would be net start MyService. You should also make sure the following properties are set to your requirements: ď‚· AllowPause and AllowStop should be set to true unless otherwise required ď‚· Interactive should be set to false unless you require to communicate with the Desktop such as via the ShowMessage command ď‚· StartType defines at which point during system initialisation should the process start, this should be set to stAuto if you want it to start at during the system startup or stManual which will allow users and applications to start it when required
  • 5. Delphi Howto: System Services 3 | P a g e SERVICE EVENTS Services come with a set of events that can be used to initialise variables, spawn worker threads as well as initiating clean up code when a service terminates. The following is a list of important service events and there meanings: Event Description AfterInstall (published) Occurs immediately after the service is registered with the Windows Service Control manager. AfterUninstall (published) Occurs immediately after the service is removed from the Service Control manager's database. BeforeInstall (published) Occurs before the service is first registered with the Windows Service Control manager. BeforeUninstall (published) Occurs immediately before the service is removed from the Service Control manager's database. OnContinue (published) Occurs when the Service Control manager resumes the service after it has been paused. OnExecute (published) Occurs when the thread associated with the service starts up. OnPause (published) Occurs when the Service Control manager pauses the service temporarily. OnShutdown (published) Occurs when the system running the service application is about to shut down. OnStart (published) OnStartup occurs when the service first starts up, before the OnExecute event. OnStop (published) Occurs when the Service Control manager stops the service. Table 1: Service events
  • 6. Delphi Howto: System Services 4 | P a g e KEEPING IT ALIVE Services, like threads, require a loop in order to stay alive otherwise once it reaches the end of its first run of the OnExecute method, it will return and the service will exit. To add a method for the OnExecute method simply double click on the OnExecute event in the design view of the Borland IDE and it will automatically generate the required method. The following demonstrates a loop that will keep the service alive: procedure TMyService.ServiceExecute(Sender: TService); begin while not Terminated do begin ServiceThread.ProcessRequests(True); // wait for termination end; end; Example 2: Keep alive loop What the ServiceThread.ProcessRequests(True) does is to keep the thread alive instead of terminating once it reaches the end of the method. The functionality of the service can come from worker threads initiated before the loop or from TCP, HTTP or Socket components added in the design view.
  • 7. Delphi Howto: System Services 5 | P a g e PASSING EVENT SIGNALS TO THREADS One thing to remember is that if you utilise the Start, Stop, Pause and Continue events and you have worker threads, you should pass these calls on to them as there is no point pausing a service only for a worker thread to ignore the request. The following example explains how this would be done: procedure TMyService.ServiceStart(Sender: TService; var Started: Boolean); begin WorkerThread := TWorkerThread.Create(False); // initialise thread Started := True; end; procedure TMyService.ServiceContinue(Sender: TService; var Continued: Boolean); begin WorkerThread.Resume; Continued := True; end; procedure TMyService.ServicePause(Sender: TService; var Paused: Boolean); begin WorkerThread.Suspend; Paused := True; end; procedure TMyService.ServiceStop(Sender: TService; var Stopped: Boolean); begin WorkerThread.Terminate; Stopped := True; end; Example 3: Passing state calls to worker threads
  • 8. Delphi Howto: System Services 6 | P a g e INSTALLING / UNINSTALLING YOUR SERVICE Services come with the necessary code to install and uninstall themselves through the use of switches on the command line or through the Run box located in the start menu. To register a service on a system open a new Run box, locate your service executable and add the /install switch. Example 4: Installing your service Depending on what you specified as the StartType the service will either start during the boot process of the machine or it will be started manually by users or other applications. To uninstall the service repeat the process above except instead of the /install switch use /uninstall instead. Example 5: Service uninstall success
  • 9. Delphi Howto: System Services 7 | P a g e FULL EXAMPLE unit main; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs, MyWorkerThread; { MyWorkerThread will be a unit that contains TWorkerThread } type TMyService = class(TService) private { Private declarations } public function GetServiceController: TServiceController; override; { Public declarations } end;var MyService: TMyService; implementation {$R *.DFM} procedure ServiceController(CtrlCode: DWord); stdcall; begin MyService.Controller(CtrlCode); end; function TMyService.GetServiceController: TServiceController; begin Result := ServiceController; end; procedure TMyService.ServiceStart(Sender: TService; var Started: Boolean); begin WorkerThread := TWorkerThread.Create(False); // initialise thread Started := True; end;
  • 10. Delphi Howto: System Services 8 | P a g e procedure TMyService.ServiceContinue(Sender: TService; var Continued: Boolean); begin WorkerThread.Resume; Continued := True; end; procedure TMyService.ServiceExecute(Sender: TService); begin while not Terminated do begin ServiceThread.ProcessRequests(True); // wait for termination end; end; procedure TMyService.ServicePause(Sender: TService; var Paused: Boolean); begin WorkerThread.Suspend; Paused := True; end; procedure TMyService.ServiceStop(Sender: TService; var Stopped: Boolean); begin WorkerThread.Terminate; Stopped := True; end; end. Example 6: Full example code
  • 11. Delphi Howto: System Services 9 | P a g e USEFUL LINKS Creating a Windows Service in Delphi – http://www.devarticles.com/c/a/Delphi-Kylix/Creating-a-Windows- Service-in-Delphi/