Delphi-Kylix
  Home arrow Delphi-Kylix arrow Creating a Windows Service in Delphi
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Creating a Windows Service in Delphi
By: Jacques Noah
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 76
    2006-02-08

    Table of Contents:
  • Creating a Windows Service in Delphi
  • Let’s Create a Service
  • The Code
  • Installing/Uninstalling the Service
  • Entire Code for the Service Application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating a Windows Service in Delphi


    (Page 1 of 5 )

    Service applications let you check for updates on a system or monitor system resources, without interrupting your work. While they can be difficult to create, Delphi makes it simple. This article explains how to create a simple Windows service application in Delphi, which you can build on and modify to suit your own needs.

    Introduction

    A service is an application type that runs in the background, and is similar to UNIX daemon applications. It is an ideal way to check for updates on a remote system or to monitor system resources, without interrupting whatever you’re doing in the front end. If you open up Task Manager by pressing Ctrl + Alt + Del, you will see a list of Services currently running on your system. Here’s a sample:

     

    Why would you need a service application? Well, if you have a networked system that is on 24/7, and you want to monitor the amount of resources used by a certain application, then a service is the best way to do it. Similarly, if you write software that requires updates from time to time, you can create a service that will look for those updates and download them. So, service applications have a lot of advantages. The only problem with Services is that they are not very flexible in that you cannot use any visual components in the application. You'll get an exception "Controls Cannot Be Added to a Service" message if you try to drop a visual component.

    Is it difficult to create a service? Yes, mostly because it is a special type of application. Fortunately for us, Delphi makes it very easy to build one.

    More Delphi-Kylix Articles
    More By Jacques Noah


       · Good article! This would help me get started in writing Services together with Indy...
       · I've provided the entire program in a zip archive for donwload. Enjoy!
       · i' very grateful to you, if u send me sample windows service application in...
       · Good Enough for me to start with servicesThanks.A little bit of more complicated...
       · Very good article, it was looking for this days ago!!!,...
       · It's so much easier creating a service in Delphi than in VB which makes me love...
     

    DELPHI-KYLIX ARTICLES

    - Loading an XML Document into the DOM
    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT