To build a driver, open a build environment, then use the cd commandto set your default directory to one containing a sources file or a dirs file.
After setting the directory, invoke the Build utility with the -cZoption as in the following example:
E:\NTDDK>cd mydriver\src
E:\NTDDK\mydriver\src>build -cZ
Running build -cZ compiles and links your driver. It creates a "cleanbuild" (by deleting all pre-existing .obj files) and inhibits dependencychecking of source and header files.
Output files are placed in a subdirectory named either \objfre or\objchk, depending on whether you are using the free or checked buildenvironment.
For more information, see How to Use the BuildUtility.
To build a WDM driver, use the DRIVERTYPEmacro in your sources file:
DRIVERTYPE=WDM
When this macro is set, the Build utility sets the path for include filesequal to the value of WDM_INC_PATH instead ofDDK_INC_PATH. This means that the WDM-onlyheader files will be used in your driver.
For information about creating drivers that will run on multiple versions ofWDM, see Determining the WDM Versionand Differences in WDM Versions.
联系客服