Getting Started on Driver Development [closed] Getting Started on Driver Development [closed] windows windows

Getting Started on Driver Development [closed]


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


To learn kernel development well:

a. lots of samples kernel programs:

Windows DDK sample:

http://social.msdn.microsoft.com/Forums/en-US/softwaretesting/thread/08690203-1757-4129-b59a-6bae10bcdce8/

WDK samples:

http://msdn.microsoft.com/en-us/windows/hardware/gg487428

Or just search:

http://www.google.com/search?q=windows+ddk+samples

(because above URL may change, but Google will likely to return u the most appropriate/reachable one)

b. lots of debugging techniques, and among which I found the best is VMware (or VirtualBox) + windbg + serial port debugging:

http://www.google.com/search?q=windbg+vmware+kernel+debug

and this paper is classic for using VMWare + windbg (Lord of the Ring0):

http://silverstr.ufies.org/lotr0/windbg-vmware.html

c. as well as system admin tools which others have built:

http://technet.microsoft.com/en-us/sysinternals/bb545021

(In the past called SysInternals built by Mark Russinovich, co-author of "Windows Internal" - MUST READ!!)

http://technet.microsoft.com/en-us/sysinternals/bb963901

from these tools u have will immense debugging options.

d. Join the OSR mailing list (ntdev especially is very active, but there are others like windbg):

http://www.osronline.com/page.cfm?name=ListServer

e. Watch lots of video related to windows + kernel at channel9 (google returned over 1000 links):

http://www.google.com/search?q=site:channel9.msdn.com+kernel+video&num=100

f. Discussion forum like:

http://social.microsoft.com/Forums/en-us/kernel/threads

http://social.msdn.microsoft.com/Forums/en-US/wdk/threads

Subscribed to the free OSR magazine too (hardcopy). I have received mine since 1998 till now - and it is delivered half-way round the earth!


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.