|
|
|
Driver development environment and tools for windowsAs for other programs we write, we need a compiler to build our drivers. Also we need an editor to write the code. This article describes the tools you need to get started with writing drivers. You can write drivers and build them in Visual Studio. But, there are many problems with this approach. Also, Microsoft do not recommend using the C++ compiler and linker of Visual Studio to compile and build drivers. Microsoft offered the Driver Development Kit (DDK) for the purpose of creating drivers. Recently, they have changed the name of DDK to WDK (Windows Driver Kit). In this tutorial, we use WDK which can build drivers to Windows 2000, Windows XP, Windows Server 2003, Windows Vista and Windows 7 for build the drivers. You can download it here. The WDK do not give you a nice IDE like Visual Studio. It has a command prompt to build the drivers. Also, It uses the old method of using makefiles for projects. You do not need to learn much about makefiles. You can use one of the several example projects come with DDK and edit the source files as you want. Also, certainly you can download our example projects and use them. Although we do not use Visual Studio to build the drivers, we can use it as the editor because it gives useful features such as syntax highlighting, Auto complete etc. We will show you how configure Visual Studio to edit C (drivers are written in C, rather than C++) source code so that those useful features such as auto complete are enabled. Also, you need DbgView, a tool to view the debug print statements, which we use for debugging our drivers. You are familiar with using printf or MessageBox for identify where the error is. But, It is not possible to use such methods in drivers. So, we print messages to kernel debugger, just as we print to console using printf. The messages sent to kernel debugger can be viewed by DbgView. You can download DbgView here. |