views:

220

answers:

7

Hi,

Can you suggest a good book for learning Windows Services programming using C++?

Thanks,

A: 

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

Marcin
This talks with VB and C#
Manav Sharma
Sure you won't just copy - paste the C# / VB code verbatim, but all the steps are there, and you can follow them, assuming you know basic C++.
Marcin
A: 

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

ChrisGNZ
+2  A: 

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.

Justin Rudd
A: 

With C++ libraries there is always gSoap. Its not the quickest thing, but it works on Linux (including Maemo) and Windows.

monksy
A: 

Some new attributes on mode of operation of services:
Windows Services Enhancements

lsalamon
A: 

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.

Information at Amazon.com

Heath Hunnicutt
A: 

While this doesn't answer your question directly, I found the following freeware framework for developing NT Windows Services in C++ with MFC:

http://www.codeproject.com/KB/system/cntservice.aspx

Odrade