Developing Windows Drivers With Visual Studio
Today morning I received an email from Patrick with a picture of Visual Studio with Intellisense on a WDF driver. Ok, I have to admit that in the beginning I thought that Patrick was using Photoshop! He's a guy, who just doesn't like GUIs in the first place! He can just go on and on about the advantages of using kd instead of windbg! He even refuses to look at the source code (even if it's available), since "he can look at the assembly"! I have to admit that until now I thought that he was doing "copy con driver.c" to write drivers... and then use edit.com from a full-screen command prompt to do additional editing. Anyway, it seems that I was wrong.
So, in order to be sure that Patrick hadn't used Photoshop (or just opened the screenshot with a hex editor and manually edited it, in order to add Intellisense!), I went to his office. Over there, indeed he showed me that it's really easy to Intellisense and help integration to Visual Studio (yay!). That's nice stuff! My next question was, if it's possible to load wudfext.dll (the UMDF windbg extension) from Visual Studio and use the UMDF extensions from the VS debugger, however it's not possible (even though there's some info on how to load windbg extensions at http://www.osronline.com/showThread.cfm?link=66160), because not all windbg interfaces are implemented by Visual Studio.
Anyway, Patrick has written a post saying that indeed he's been using Visual Studio for ever, in order to develop Windows Drivers. If more people ask him tips on how to make VS the best editor for Windows Drivers, he promised that he'll share a small part of his infinite wisdom :) So, feel free to ask him and/or send him an email!
DISCLAIMER: Visual Studio is not officially supported by Microsoft for driver development. The only currently supported build environment is the command window that comes with the WDK. Any opinions expressed in this article don't affect Microsoft's policy on this issue.
Comments
Anonymous
January 29, 2008
Hello, just a small note: There are two versions of DDKBUILD available, the one from OSR (http://www.osronline.com/article.cfm?article=43) as well as the one from Hollistech (http://www.hollistech.com/Resources/ddkbuild/ddkbuild.htm). From my experience, the Hollistech one seems to be "one step in front" of the OSR one, but this is just my own experience. Both versions are written from the same person, Mark Roddy. When he left OSR, he took the tool with him. However, OSR is also doing updates on it, but - as it seems - with a slower pace.Anonymous
January 29, 2008
Sorry, forgot my name in the previous posting. ;) SpiroAnonymous
January 29, 2008
Consider to use Visual Slickedit (http://www.slickedit.com/) for driver development incl. symbol tagging ('Intellisense'), easy integration of any commandline based build tool with error parsing, etc. IMHO it's more than just an alternative.Anonymous
January 30, 2008
The comment has been removedAnonymous
April 16, 2008
Try sourceinsight from www.sourceinsight.com. Combined with ddkbuild its the best!Anonymous
June 14, 2008
I have been using VS6 to develop drivers for 10 years. I like it because of intelisense, browse info (OK, it doesnt work if you use the 6000 compiler but it does with the 3790 and earlier compilers, and, you can develope Vista drivers with the 3790 compiler) and the general layout of the editor. It also easier to fix the usual code errors with VS than with the build env. Wheh it compiles cleanly in VS I then use the build env to make a build for testing, and for release drivers of course I always use the build env.Anonymous
January 19, 2009
In my previous company, I used VS for years to develop kernel drivers by ensuring that the necessary build environment variables were set and the necessary compile and link flags were set into the project. The drivers seemed to work just fine. However, more recently in my current company, I was easily able to use VS to use the DDK build executable and build the driver by creating a "Makefile" type project. I invoke VS from a script that first calls the DDK setenv script for CHK or FRE to set the environment and then launch VS on the driver solution. This works fine, and I don't have to worry about setting all the DDK compile and link flags myself. And I get all of the Intellisense and other IDE tools. So when we go from Vista to Windows 7, I won't have to worry about making discrete build flag changes; that all comes along with the new DDK.Anonymous
January 16, 2010
Which project to choose while using VS for getting intelisense, browse info?