You often need programs that continuously run in the background. For example, an email server is expected to continuously listen on a network port for incoming email messages, a print spooler is expected to continuously listen for print requests , and so on.

Most operating systems provide a way to create such long-running background tasks . In fact, operating systems themselves run a variety of background processes critical for their functionality. In Unix, the background tasks are called daemons. In Windows NT, the background tasks are called NT services, whereas in the Window 2000, XP, and Windows .NET operating systems, the background tasks are called Windows services.

Although Windows services are created as normal executable files, they have at least two distinct characteristics:

  1. Windows services must conform to the interface of the Service Control Manager (SCM). The SCM is a part of the Windows operating system responsible for managing Windows services.

  2. Windows services must be installed in the Windows service database before they can be used.

In this chapter, you'll use the .NET Framework class libraries to develop the following skills that will help you to create your own Windows services:

  • Creating a Windows service that conforms to the interface of Windows Service Control Manager (SCM).

  • Creating an installer class that is capable of installing a Windows service to the Windows service database.

  • Using the Installer tool (installutil.exe) to install and uninstall a Windows service in the Windows service database.

  • Connecting to a Windows service and issuing commands such as start, stop, pause, and continue.

  • Querying a Windows service to retrieve its status.


MCAD. MCSD Training Guide (Exam 70-310. Developing XML Web Services and Server Components with Visual Basic. NET and the. NET Framework)
MCAD/MCSD Training Guide (70-310): Developing XML Web Services and Server Components with Visual Basic(R) .NET and the .NET Framework
ISBN: 0789728206
EAN: 2147483647
Year: 2002
Pages: 166 © 2008-2017.
If you may any questions please contact us: