Professional NT Services

Author: Kevin Miller
List Price: $49.99
Our Price: Click to see the latest and low price
Publisher: Wrox (15 January, 2002)
Edition: Digital
Sales Rank: 5,923
Average Customer Rating: 4.78 out of 5

Buy now directly from Amazon.com - Purchase this book, safely and securely from the largest book dealer on the Internet, Amazon.com

Customer Reviews

Rating: 4 out of 5
Chapter 5 - Event Log Class
Mr. Miller wrote a handy class for event logging called CEventLog, but he chose to use overloaded names for the methods to handle all sorts of different types of events. If I were you, I would NOT do this.

Instead:

I would give each LogEvent() method in that class an explicit name, because it makes it more clear which method will be invoked. In my particular case, I sort of assumed his class was good until I noticed that a bunch of my custom messages weren't printing to the event log. Because it was 2:00 AM when I found this, it took me a long time to figure out the problem.

Anyway, the rest of the book is pretty great, a must-have if you're going to be writing a service.


Rating: 5 out of 5
Best of its kind
The book is comprehensive, clear, and easy to read. The source code works and it is easy to follow (the code is available on-line.) The discussion on ATL COM servers is truly enlightening and by itself worth the price of the book. If you are writing an ATL COM server this book is a must, especially if it will be a multi-threaded server.

From the beginning the author has the attitude that NT services are easy to understand and his "prophecy" becomes self-fulfilling throughout the book. The book is well organized and it pays special attention to service design and usage patterns.

Also notice that the book does not cover hardware drivers. By the way, do read the previous review titled "One of a kind" as it gives very useful tips on installing ATL services (using "myservice.exe -Service") and housing COM objects in a service; I have not found that information in the book.


Rating: 4 out of 5
One of a kind
No other source compares to the quality and convenience of Professional NT Services, either in book form or on the Internet. The only other way to get this information is to read sample code on MSDN, which is a less-than-optimal way to learn the subject.

Professional NT Services describes the issues involved in writing services, such as security and threading, and provides sample code every step of the way. The book also details how to build a service with ATL and even tells you how to improve ATL's implementation. It even talks a bit about Microsoft Transaction Server (now part of COM+).

Here are three bits of information that I discovered elsewhere that I wish were more evident in the book -

1. If you create an ATL service, the default registation code registers the EXE as a COM server instead of a service -- run "myservice.exe -Service" to register the service.

2. The easiest way for multiple clients to be able to use a single COM instance that's housed in the service is to implement the COM class using DECLARE_CLASSFACTORY_SINGLETON. This is your typical "server" pattern.

3. Clients that want to connect to COM objects housed in the ervice should use CLSCTX_SERVER in CoCreateInstance

Perhaps this information is buried in the book somewhere, but I didn't find it. At any rate, without this book, I wouldn't have known where to start.

Finally, for all its great qualities, the book needs to be revised for Windows 2000. It mentions some new features of "NT5" but I wonder how accurate this information really is.

Similar Products

· Beginning Windows NT Programming
· The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)
· Developer's Workshop to COM and ATL 3.0

Return To Main Computer Book IndexSearch Our Entire Computer Book Catalog