Appendix C. Building Drivers

< BACK  NEXT >
[oR]

Appendix C. Building Drivers

CHAPTER OBJECTIVES

  • The Build Utility

  • Using Visual Studio to Build Drivers

There is nothing magical about the build process for a driver. Like any piece of "real" (i.e., noninterpreted) code, it must be compiled and linked into a binary file before it can be used. The issues that arise when building drivers concern notifying the build tools (compiler and linker) that the environment for the code being generated is that of kernel mode.

Although it sometimes may appear otherwise, Microsoft supplies a single compiler and linker. Whether the tools are invoked from a command-line prompt or from an elaborate Integrated Development Environment (IDE) such as Visual Studio, the resulting binary files are the same. In many ways, Visual Studio is merely a GUI interface for the build and editing tools. Clicking on the menu option for Project, then Settings, provides a convenient dialog-based interface to the tool switches.

The DDK provides a utility, BUILD, that is convenient for batch and production builds of device drivers (as well as other production-level binaries). With proper environment settings, however, the driver author may successfully use Visual Studio. Indeed, it may be appropriate to use Visual Studio throughout the development phase and introduce BUILD during the later release stages of the project.

The purpose of this appendix is to provide background material on the BUILD utility, as well as provide the Visual Studio settings necessary for successful driver builds.

< BACK  NEXT >


The Windows 2000 Device Driver Book(c) A Guide for Programmers
The Windows 2000 Device Driver Book: A Guide for Programmers (2nd Edition)
ISBN: 0130204315
EAN: 2147483647
Year: 2000
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net