Menasoft Menasoft Menasoft Menasoft Menasoft

June 28, 2006

Windows Kernel Mode – Who writes code in C anymore?

I’ve recently been working on some windows driver code amoung the many other things on my list. Oddly most of the sample code I find is in C. I began writing kernel mode (driver) code in C++ back in 1996 in VxD’s. Back then I was asking the same questions. Whats wrong with C++? It appeared to me at the time to be just another of the religious issues that programmers have to deal with on a regular basis. This of course makes me want to dig deeper.

First a good general description of kernel mode drivers on Wikipedia. (another of my favorite sites)

Here is the official MSDN word on the matter of using C and C++ for kernel mode:
C++ for Kernel Mode Drivers: Pros and Cons

NuMega/CompuWare the producers of SoftIce (a kernel mode debugger) also produce a product called Driver Studio. I really hate to say anything good about them since i really dont like their customer support, corporate image, etc but they do produce a pretty good product. The only 3rd party kernel mode capable debugger (outside Microsoft) that i know of. Driver Studio has extensive code samples for almost any sort of driver you’ll want to produce. They also have all their samples in C++. They base them on a set of kernel C++ wrappers called DriverWorks (amoung other names).

My personal experience writing kernel mode drivers includes: NDIS minports, TDI, Keyboard, PCMCIA, RAM Disk Volumes, Serial ports, Custom data acquistion and hooking drivers. All of which where in C++.
Excellent sources for kernel mode tools and info:


(8/7/2006) Looks like microsoft just bought up SysInternals. Is this a good thing ?


The MS Windows DDK Samples – my personal favorite. – great for networking, NDIS, TDI type code. – always good stuff. – some of the best docs you will find anywhere for kernel mode API’s

Oddly a lot of info seems to come from people on message boards who may actually be up to no good. Maybe my faith in human nature isnt doing very well these days…

Filed under: Philosophic,Research — admin @ 5:05 pm

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Time limit is exhausted. Please reload CAPTCHA.