geek1982 wrote:for other who eager to do it manually:
...
This is all well and good, but the recommended way of building a kernel mode driver is to use BUILD.EXE from the latest released WDK and the proper build environment for your targeted OS. I haven't used it, but from what I have read DDKWIZARD, as recommended by mehdi, produces a Makefile project that utilizes a batch file called DDKBUILD.bat. That BAT file sets up a command line environment properly and then calls BUILD.exe from that environment. Even with that, there are times when you simply need to know how to use a WDK build environment.
There have been reported bugs with VS projects not using DDKBUILD that were easily fixed by simply building the driver using BUILD or DDKBUILD. The point here is that the VS compiler may NOT, and most likely isn't, be the same compiler used by BUILD and contained within the WDK.
Gary