Hi,
Can you suggest a good book for learning Windows Services programming using C++?
Thanks,
Hi,
Can you suggest a good book for learning Windows Services programming using C++?
Thanks,
I would recommend to start here: MSDN
There you'll find links to other MSDN resources, like how to program services, and how to utilize visual studio functionality to make your life easier. It's a pretty good resource if you're doing windows-specific stuff...
What you are really talking about is using the Win32 API. I am not aware of any wrapper libraries for C++ that provide windows services management, so I think you will need to look for some Win32 API resources. Refer similar Win32 questions on SO, such as: http://stackoverflow.com/questions/342729/learning-the-win32-api
Jeffrey Richter's book Windows via C/C++ is a good one. It goes over way more than just Windows Services though.
If you have Visual Studio Pro (or Visual C++ Express), you can dig into the ATL classes around CAtlServiceModuleT. While it is mostly about exposing DCOM interfaces, I've used those classes to write stand-alone Win32 services.
There is also this (old) article on MSDN.
Some new attributes on mode of operation of services:
Windows Services Enhancements
Specifically for Win32 services and related topics such as threads, processes, etc., I very much recommmend: Win32 System Services: The Heart of Windows 98 and Windows 2000 (3rd Edition), by Marshall Brain and Ron Reeves.
The first edition of this book was my introduction to Win32 services-related topics. Marshall Brain wrote that edition in 1993, around the time Windows NT 3.1 was released -- this was the first implementation of the Win32 APIs and the first Microsoft operating system to have Win32 services.
While this doesn't answer your question directly, I found the following freeware framework for developing NT Windows Services in C++ with MFC: