Chapter 22 - Windows Services | |
bySimon Robinsonet al. | |
Wrox Press 2002 | |
In the .NET Framework, we can find service classes in the System.ServiceProcess namespace that implement the three parts of a service:
We inherit from the ServiceBase class to implement a service. The ServiceBase class is used to register the service and answer start and stop requests .
The ServiceController class is used to implement a service control program. With this class we can send requests to services.
The ServiceProcessInstaller and ServiceInstaller classes are, as the names suggest, classes to install and configure service programs.
Now we are ready to create a new service.