Summary
Windows services provide standardized capabilities to add user-developed services to Windows systems. An existing stand-alone program can be converted to a service using the methods discussed in this chapter.A service can be created, controlled, and monitored using the Administrative Tools or the ServiceShell program presented in this chapter. Deployed services are controlled and monitored through the SCM, and all services are entered in the registry.
Looking Ahead
Chapter 14 describes asynchronous I/O, which provides two techniques that allow multiple read and write operations to take place concurrently with other processing. It is not necessary to use threads; only one user thread is required.In most cases, multiple threads are easier to program than asynchronous I/O, and thread performance is generally superior. However, asynchronous I/O is essential to the use of I/O completion ports, which are extremely useful when building scalable servers that can handle large numbers of clients.Waitable timers are also described in Chapter 14.
Additional Reading
Kevin Miller's Professional NT Services thoroughly covers the subject. Device drivers and their interaction with services were not covered in this chapter; a book such as Walter Oney's Programming the Microsoft Windows Driver Model, Second Edition, can provide that information.