Building BDA Drivers
Note Beginning with Windows 8, the WDK build environment no longer uses Build.exe. See WDK and Visual Studio build environment. The following discussion applies only if you build your driver using the WDK Windows 7 version or earlier.
You can use the Microsoft Windows Driver Kit (WDK) to build your Broadcast Driver Architecture (BDA) driver. To build a BDA driver, open a WDK build environment window, change to the appropriate BDA driver's source code subdirectory of the WDK's main source directory, and use the build command. The build command gets instructions on how to build the BDA driver from the Sources file that resides in the BDA driver's source code subdirectory.
For more information about the Build utility, the WDK's build environments, the macros and environment variables which control the Build utility, and the files that are required to build your BDA driver, see "Using the Build Utility" and "Build Utility Reference" in the Windows 7 WDK documentation (build 7600).
The following list contains the macro names to use in a BDA Sources file and discusses how to use them to build your BDA driver:
TARGETNAME=BDAsampl # WDK builds the driver as BDAsampl.sys
Set the destination directory for the built driver. Note that depending on whether your build environment is "free" or "checked", you can use the BUILD_ALT_DIR variable to append "fre" or "chk" to the \obj subdirectory that the build command creates under the directory containing the Sources file. The following code provides an example:
TARGETPATH=obj$(BUILD_ALT_DIR) # built driver in \objfre or \objchk
TARGETTYPE=DRIVER # WDK builds the driver as *.sys
TARGETLIBS=..\..\..\..\lib\ks.lib \ ..\..\..\..\lib\ksguid.lib \ ..\..\..\..\lib\BdaSup.lib
INCLUDES=..\..\..\..\inc; \ $(DDK_INC_PATH)\wdm;
SOURCES= \ ObjDesc.cpp \ inpin.cpp \ outpin.cpp \ Filter.cpp \ Device.cpp \ bdaguid.c \ BDAsampl.rc
Generate .sym symbol files, in addition to the .pdb symbol files. These files map names to addresses. Setting this macro is required to debug on Windows 98/Me platforms. Set this macro as shown in the following example: