Windows Services Part I
There are several processes running in the background without any interaction with the user, which are consumed by the application to perform tasks in response to the events in the system. These processes in windows environment are termed as Windows Service. The services are started automatically on the startup regardless of the user logged in. You can configure and manage the service using the Service mmc applet in the control panel, administrative tools. Where you can view the status and other information regarding a service. The status has values Started, Stopped and Paused; you can also specify the startup mode of the service. That is whether the service is started automatically on windows startup or need a manual startup. You can also configure an account, for the service to login and the startup parameters for the service. You can also see various dependencies of a particular service. Unlike the installation of other applications, service installation requires a special installation procedure.
Earlier versions of Visual Basic did not offer direct support for the creation of windows services, but you can use C++ in earlier versions. The .NET provides several classes to create windows services.
System.ServiceProcess.ServiceBase : This is the base class from which new services are derived.
System.Configuration.Install.Installer : The new service class must inherit and extend this generic class to provide the interface necessary to install the service under windows.
System.ServiceProcess.ServiceProcessInstaller : To install the .NET services , you need this class. The InstallUtil.exe calls this class to get the information it needs to perform the installation.
System.ServiceProcess.ServiceInstaller : This class is needed for the service installation, which contains the information of a specific service in the executable.
Detailed examples for windows services are coming in Part II
|
No responses found. Be the first to respond and make money from revenue sharing program.
|