views:

334

answers:

3

Does anyone have any books/tutorials which may be useful in getting started in Windows device driver development?

For plain Win32/GUI development, Petzold's book seems to be the essential reference. Does such exist for drivers?

I would like to note that I'm not actually talking to hardware -- I actually want to emulate a piece of hardware in software, but I'd like to see how things work in general first.

Billy3

+4  A: 

One thing to beware of is the device driver development (architecture and tools) changes more than Win32 development ... so while Petzold's book from the 1990s is fine for Win32 and may be considered a timeless classic, the architecture for many kinds of drivers (printer drivers, network drivers, etc.) has varied in various O/S releases.

Here's a blog entry which reviews various books: Windows Device Drivers Book Reviews.

Don't forget the microsoft documentation included with the DDK: and, most importantly, the sample drivers (source code) included with the DDK. When I wanted to write a mock serial port driver, for example, I found the sample serial driver documentation combined with the DDK documentation was invaluable (and sufficient).

ChrisW
I'd also add that it's a good idea to subscribe to the ntdev mailing list (http://www.osronline.com/cf.cfm?PageURL=showlists.CFM?list=NTDEV) because it can be a great source of information, as well as pointing out common mistakes.
BruceCran
+1  A: 

I would search for tutorials with rich examples, like this one. The essence in windows driver development is to get the picture about layers and IRPs, IRQLs, and also to know terms like filter drivers. If you are looking for example codes, here is my Spodek driver code: sf.net link. You will find there a filter driver (for keyboard, keyb.c), kernel space queue (queue.c) and techniques to hide presence in system. It's a legacy (sys) driver though.

A: 

You should probably use the quite recent Windows Driver Foundation (WDF) framework instead of the older WDM framework. A good starting point is reading the WDF Overview Word documents.

If you want to read a book, "Developing Drivers with the Windows Driver Foundation" is the one you are looking for.

Taneli Waltari
Too bad I have to support Win2k :(
Billy ONeal