Example Windows Services


Microsoft SQL Server, Exchange Server, Internet Information Server (IIS), and antivirus software all use Windows Services to perform tasks in response to events that occur on the system overall. Only a background service, or Windows Service, that runs no matter which user is logged in, could perform such operations. For example, consider these potential Windows Services:

  • A file watcher - Suppose you are running an FTP server that enables users to place files in a particular directory. You could use a Windows Service to monitor and process files within that directory as they arrive. The service runs in the background and detects when files are changed or added within the directory, and then extracts information from these files in order to process orders, or update address and billing information. You’ll see an example of such a Windows Service later in this chapter.

  • An automated stock price reporter - You could build a system that extracts stock prices from a Web Service or website and then e-mails the information to users. You could set thresholds so that an e-mail is only sent out if the stock price reaches a certain price. This Windows Service can be automated to extract the information every 10 minutes, every 10 seconds, or whatever. Because a Windows Service can contain any logic that does not require a user interface, you have a lot of flexibility in constructing such applications.

  • Microsoft Transaction Server (MTS) - This (part of COM+ Services in Windows 2000 and later) is an object broker that manages instances of components. It is used regularly by professional developers. This service runs constantly in the background and manages components as soon as the computer is booted, just like IIS or Exchange Server.




Professional VB 2005 with. NET 3. 0
Professional VB 2005 with .NET 3.0 (Programmer to Programmer)
ISBN: 0470124709
EAN: 2147483647
Year: 2004
Pages: 267

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net