Share via


PASS2_BINPLACE

Use the PASS2_BINPLACE macro to specify a set of flags, files, or both to pass to BinPlace for an operation that happens during Pass2 of the build process.

This macro is specified in a Sources file.

Syntax

PASS2_BINPLACE=[/Options] FileList [[/Options] FileList]...

Parameters

  • Options
    One or more of the BinPlace options and parameters. For more information about these options and parameters, see BinPlace Command-Line Syntax.

    The options must be preceded by a hyphen ( - ) or a slash ( / ). You can combine several options after one hyphen or slash, but options that take additional parameters should be followed by a space.

  • FileList
    One or more files that BinPlace processes. Multiple files in this list must be separated by spaces.

Comments

The PASS2_BINPLACE macro instructs BinPlace to put files that are either built during Pass 2 of the build process or already exist, such as static binary files, text files, and catalog files. If the Options parameter is specified, BinPlace processes every file that is specified in the FileList parameter based on the specified options.

By default, BinPlace puts the files specified in this macro into the directory specified by the TARGET_DESTINATION macro. However, you can specify an alternate destination directory (altDest) by specifying the following Option parameter for each FileList parameter:

-:DEST altDest FileList

Set BUILD_NO_SYMCHK=1 in your Sources file if you want BinPlace to put binary files specified by the FileList parameter, such as the .sys or .dll files, without putting the associated .pdb. Otherwise, you should include the .pdb file in the FileList parameter to avoid build errors.

The PASS2_BINPLACE macro is applied during Pass 2 of the build process only if BinPlace is enabled in a Windows Driver Kit (WDK) build environment. To enable BinPlace, you must specify the separate_object_root parameter of SetEnv.bat. For more information about this parameter, see Using the SetEnv.bat Command-Line.

For example, to specify the separate_object_root parameter for the Windows 7 x86 free build environment, follow these steps:

  1. From the Windows Start menu, click Windows Drivers Kit and then click the Windows 7 WDK entry.

  2. Click the Build Environment menu, and then click Windows 7.

  3. Right-click x86 Free Build Environment and select Properties.

  4. Click the Shortcut tab and add the separate_object_root parameter to the end of the Target command for the Build Environment as shown in the following example:

    C:\Windows\System32\cmd.exe /k C:\WinDDK\bin\setenv.bat C:\WinDDK\ fre x86 WIN7 separate_object_root
    

Examples

The following example shows a PASS2_BINPLACE macro in a Sources file:

PASS2_BINPLACE=-:DEST r2upgrade_eula r2eula_retail.txt \ 
-:DEST retail -:REN eula.txt r2eula_retail.txt

The following example shows how you can use BinPlace to put a file (myFile*.txt*) to multiple destinations without specifying myFile twice.

PASS2_BINPLACE=-:DEST Destination1:Destination2 myFile.txt 

See Also

BinPlace

BinPlace Command-Line Syntax

Catalog Files

Pass 2

Sources file

TARGET_DESTINATION

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011