REVIEW - Programming Windows Services - Implementing Application Servers


Programming Windows Services

Implementing Application Servers


Randy C. Morin


Wiley (2000)




David Nash


August 2002



The subtitle of this book is 'Implementing Application Servers' by which the author means programs designed to run continuously, responding to calls from clients. What the Unix user would call daemons, in fact and he does point this out - even giving the etymology of the word! In the Windows world such things are usually implemented as NT Services or, now that we are several versions on from NT, simply Windows Services as the title indicates.

So can you fill a book on the subject of how to write a Windows Service? Probably not, but this book doesn't try to. Only the first 2 chapters are devoted to the technical details of how to write and use them. The rest of the book covers a diverse range of topics useful to the writer of these services including inter-process communications (IPC), the Windows event log, configuration and security.

The chapter on IPC is very wide-ranging, covering such things as socket communications, CORBA and of course (in a Windows book) the component object model, or COM. Because of this each subject only gets basic coverage. There are in fact other whole books twice as thick as this one on single topics from that chapter so don't expect comprehensive details, but the introduction to each is good enough to give you a flavour of what it's all about and whether or not you want to use it. The section on COM in particular scores points from me by explaining what is really going on and not just relying on the automatically generated code from the Visual Studio Wizards.

The book comes with a CD-ROM containing the sample code, which is scattered throughout the book and is generally of good quality. The author is a firm believer in using C++ in the way it was intended and is not scared to use such things as namespaces, exceptions and the standard library, only using Windows-specific types (DWORD, for example) when a call to the Windows API demands it.

The examples show how to use specific features and in several cases a generic framework is provided for the reader to use when implementing his/her own application. For example, a C++ base class is given from which your own class can be derived, thereby implementing a Windows Service simply by overriding a couple of methods.

If I had any criticism it would be simply that the book does not go into enough depth on many of the subjects covered - both core Windows services and some of the associated technologies. The SRVANY utility, for example, which comes with the NT resource kit, gets one sentence that I will quote it in full here; 'The SRVANY command-line utility can be used to convert any executable into a service'. There is no mention of where to get it, or the pros and cons and possible pitfalls of using it.

Overall a good book, clear and written in an easy to read style and to be preferred over simply choosing NT Service on the ATL AppWizard if you have to write a windows service and don't know where to begin. Recommended.Distributed Programming

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.