Now that the WDK is tightly integrated with Visual Studio, an update to the WDK can also mean an that a new version of Visual Studio is required. That’s the case for the Windows 10 WDK: You’ll need to install Visual Studio 2015 to be able to use the Windows 10 WDK.
The good news is that Visual Studio 2015 Community Edition fully support the Windows 10 WDK. So, the tools to build Windows drivers remain free and readily available.
Another, and perhaps more important piece of good news for most developers, is that in our tests here at OSR Windows 10 WDK + Visual Studio 2015 install side-by-side and co-exists peacefully with the Windows 8.1 Update WDK and Visual Studio 2013. So, you won’t hurt yourself by installing the new VS and the new WDK, even if you continue to use the old version.
The bad news is that there are some annoying problems in the new tool set. And these problems might just be annoying enough that you’ll want to hold-off moving your existing projects to VS 2015 until the problems are fixed.
By far the most annoying problem is an Intellisense bug in VS 2015 that seems to be caused by a driver project that has files with the .C file extension (that’s specifically “*.C” as opposed to “* .CPP”). When you have a .C type file, Intellisense displays an error on the very first line of your file and then Intellisense is disabled for the entire file. Yup. No command-completion, nothing but the most basic syntax highlighting. No Intellisense at all if your driver file is named *.C!
The work-around for this problem is to change your file extension from .C to .CPP — That’s a pretty simple “fix” and makes everyone happy. Except you, of course. If you named your file with a .C file extension you presumably did that because you wanted it to be a .C file and not a .CPP file for a reason. And while I’m all for writing drivers using “C++ as a better C”, and that’s what we’ve done here at OSR for ages, I’m know for sure there are folks who disagree.
Yes, this bug has been reported.
There’s also the small matter of the standard template drivers (at least the KMDF ones) that are created by the WDK creating files with .C file extensions by default. So, when a newbie creates a new WDF driver project, he gets a group of .C files that won’t work with Intellisense. Imagine the resulting confusion.
Oh, speaking of problems with the template projects, there’s also this small detail that the KMDF samples don’t pass Code Analysis out of the box either. This problem is caused the well-known and ever-pleasant limitation that all the EvtCleanupCallback functions share a role type declaration named EVT_ WDF_ OBJECT_ CONTEXT_ CLEANUP, which annotates the callback as running at IRQL DISPATCH_LEVEL, when we all know that EvtCleanupCallback for most functions (well, most of the ones we typically care about in any case) run at IRQL PASSIVE_LEVEL. If you’ve ever written a WDF driver that uses an EvtCleanupCallback, you’ve probably bumped into this issue already. So, no big deal, really. But for a newbie? Right out of the box, if they’re using Code Analysis (and they should be, of course) they’ve got an error they have to figure out and supress. In all fairness to the WDK team, this problem was probably present in earlier versions of the WDK, too… I just never noticed it before.
The ultimate solution to this problem for WDF to create separate role-type declarations for each EvtCleanupCallback type. This will allow the IRQL to be accurate, and will avoid this error for everyone. Maybe someday…
We’ve got a more complete write-up about the changes in Visual Studio 2015 and the Windows 10 WDK in the upcoming issue of The NT Insider. But we thought you’d like to know about these issues sooner rather than later.