I ran across a copy of “The Windows 2000 Device Driver Book, 2nd Edition” by
Art Baker & Jerry Lozano, published as part of the Microsoft Technology
Series. In appendix C, it discusses the use of the BUILD utility as
included with the DDK, but then it also has a 2 to 3 page discussion about
using Visual Studio to build driver projects. Included with the CD that
comes with the book is a Visual Studio wizard called DDAppWiz.AWX that
automates the process of setting up a new driver project, but there’s also a
clearly documented set of instructions detailing what changes you need to
make to a project in order to build drivers [just in case you want to set it
up manually ;-)].
What I’m curious about is whether or not anybody here has any feedback or
comments about it, either for or against it, especially any caveats related
to this that might not be called out in the book due to the fact that
there’s been 2 or 3major releases of Visual Studio put out since the book
was published. AFAIK, it’s the same underlying compiler/linker that VS and
BUILD make use of, but I don’t know what compiler version differences of any
significance that there might be between, say, the compiler/linker used by
the 6000 release of the DDK and Visual Studio 2003 .NET [MSVC v7] / Visual
Studio 2005 [VC v8].
Yea? Maybe? Nay? Hell No Not In This Lifetime?
Chuck,
I had a customer who based their build on this. They called me in
since they had a bug their developers could not find. Since I am a tools
guy, I converted it to use BUILD so I could PreFast the code, after fixing
all the PreFast problems I tried the driver it worked perfectly. They took
the source, put it back into their build and the driver still crashed.
Finally convinced them to abandon the approach, it took them only a week to
be using BUILD, but they fixed a ton of bugs that way.
Your mileage may vary, but since:
a. You are using an undocumented and potentially dangerous method
you may have problems.
b. Doing this disables all the great tools, such as PreFast, SDV,
and even good PC-Lint integration
c. If you are going to logo your driver, it has to be built with
BUILD
Given any of the above, it is not in my lifetime for me.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
“Chuck Chopp” wrote in message news:xxxxx@ntfsd…
>I ran across a copy of “The Windows 2000 Device Driver Book, 2nd Edition”
>by Art Baker & Jerry Lozano, published as part of the Microsoft Technology
>Series. In appendix C, it discusses the use of the BUILD utility as
>included with the DDK, but then it also has a 2 to 3 page discussion about
>using Visual Studio to build driver projects. Included with the CD that
>comes with the book is a Visual Studio wizard called DDAppWiz.AWX that
>automates the process of setting up a new driver project, but there’s also
>a clearly documented set of instructions detailing what changes you need
>to make to a project in order to build drivers [just in case you want to
>set it up manually ;-)].
>
> What I’m curious about is whether or not anybody here has any feedback or
> comments about it, either for or against it, especially any caveats
> related to this that might not be called out in the book due to the fact
> that there’s been 2 or 3major releases of Visual Studio put out since the
> book was published. AFAIK, it’s the same underlying compiler/linker that
> VS and BUILD make use of, but I don’t know what compiler version
> differences of any significance that there might be between, say, the
> compiler/linker used by the 6000 release of the DDK and Visual Studio
> 2003 .NET [MSVC v7] / Visual Studio 2005 [VC v8].
>
> Yea? Maybe? Nay? Hell No Not In This Lifetime?
>
>
I have never used the tool you mentioned but I do use DDKWizard avaliable at
http://ddkwizard.assarbad.net/ DDKWizard itself is a project setup tool for
Visual Studio, DDKBUILD.COM is used to build the driver which also is
avaliable at the mentioned place but also at www.osronline.com
I think it’s a great tool and easy to use. Give it a try…
/Faik
The tool mentioned is totally different, instead of using BUILD and the
stock environment as DDKBUILD does, this tool tries to force Visual Studio
to do the right thing. This in general does not work.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
“Faik Riza” wrote in message news:xxxxx@ntfsd…
>I have never used the tool you mentioned but I do use DDKWizard avaliable
>at
> http://ddkwizard.assarbad.net/ DDKWizard itself is a project setup tool
> for
> Visual Studio, DDKBUILD.COM is used to build the driver which also is
> avaliable at the mentioned place but also at www.osronline.com
>
> I think it’s a great tool and easy to use. Give it a try…
>
>
>
>
> /Faik
>
I use Visual Studio to develop my drivers, but my actual build process is done with DDKBUILD via MakeFile/NMake command line (ddkbuild -WLH checked .). I looked at the DDKWizard and it just seemed like too much hassle and by using nmake I still get the end result of jumping to the target error lines in my build / cross referencing anything needed.
I also use all of the DDK paths up to the top so they are first in order. I havent had any issues with it to date, and I can create a platform with the correct parms for each type I am targetting including prefast support / x86 / x64 / etc. And it does not interfere with my normal user mode app builds.
Anyone see any issues / comments on this method while the topic is still out there?
–Royal
I would think it is fine, the important thing is to use the BUILD
environment (which you do via DDKBUILD) from the DDK/WDK. I have customers
who have various ways of invoking the build none of them have problems if
they use the BUILD environment.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntfsd…
>I use Visual Studio to develop my drivers, but my actual build process is
>done with DDKBUILD via MakeFile/NMake command line (ddkbuild -WLH checked
>.). I looked at the DDKWizard and it just seemed like too much hassle and
>by using nmake I still get the end result of jumping to the target error
>lines in my build / cross referencing anything needed.
>
> I also use all of the DDK paths up to the top so they are first in order.
> I havent had any issues with it to date, and I can create a platform with
> the correct parms for each type I am targetting including prefast support
> / x86 / x64 / etc. And it does not interfere with my normal user mode app
> builds.
>
> Anyone see any issues / comments on this method while the topic is still
> out there?
>
> --Royal
>
>
>
Hi,
when I was working on a driver, I built it using Visual Studio
and I never had a problem caused by it. We discussed this few times
before, and actually Don presented the first real case of troubles,
although it’s unclear if it was caused by visual studio build.
I would love to see crash dump from that case Don Burn described,
because it would answer my question “What does VS compiler wrong
so that all guys strongly discourage to use it for building drivers”.
L.