O'Reilly logo

Professional Visual Basic® 2008 by Bill Sheldon, Kent Sharkey, Bill Evjen, Billy Hollis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 33. Windows Services

Modern, multitasking operating systems often need to run applications that operate in the background and that are independent of the user who is logged in. From Windows NT to Windows Vista, such applications are called Windows Services (formerly known as NT Services). The tasks carried out by Windows Services are typically long-running tasks and have little or no direct interaction with a user (so they don't usually have user interfaces). Such applications may be started when the computer is booted and often continue to run until the computer is shut down.

This chapter covers the following:

  • The characteristics of a Windows Service

  • How to interact with a Windows Service using Visual Studio 2008 and the management applets in the Windows Control Panel

  • How to create, install, and communicate with a Windows Service using Visual Basic

  • How to debug a Windows Service from within Visual Studio 2008

As VB6 did not offer direct support for the creation of Windows Services, you might be unfamiliar with such applications. To help you understand the variety of such applications, this chapter examines some scenarios for which a Windows Service application is a good solution.

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required