September 02, 2004

Walkthrough: Creating a Windows Service Application in the Component Designer

The procedures in this topic walk you through the process of creating a simple Windows Service application that writes messages to an event log. The basic steps that you perform to create and use your service include:

-> Create a project using the Windows Service application template. This template creates a class for you that inherits from ServiceBase and writes much of the basic service code, such as the code to start the service.
-> Write the code for the OnStart and OnStop procedures, and override any other methods that you want to redefine.
-> Add the necessary installers for your service application. By default, a class containing two or more installers is added to your application when you click the Add Installer link: one to install the process, and one for each of the associated services your project contains.
-> Build your project.
-> Create a setup project to install your service, and then install it.
-> Access the Windows 2000 Services Control Manager and start your service.

Click on the link and lets walk with Windows Services.

No comments: