Using BinPlace from the Command Line
This topic provides examples of using BinPlace from the command-line.
First, you can set the root destination directory as follows:
Then you can set the place file's path and file name in the following way:
Let the contents of the file d:\mystuff\myplacefile.txt be as follows:
; This is a simple place file. commonmodule.dll retail application.exe files\bin mydriver.sys *\drivertree extra.cab appendix
Now you can run BinPlace with the following command:
Because extra.cab is not an executable file, BinPlace will only move it. The root destination directory is d:\projectroot. The class directory for this file is specified in the place file as appendix. The file-type subdirectory is cab (the file name extension of the file being moved). Thus, this file is copied to the location d:\projectroot\appendix\cab\extra.cab.
Now use BinPlace on the executable file and its symbol file. To do this, you specify the executable file name -- BinPlace will find the associated symbol file.
When you pass an executable file name to BinPlace, it looks for its symbol files in the same directory as the executable file. If it does not find them there, it reads the CodeView record stored in the executable file; if it finds a symbol file path in that record, it looks for symbol files in that path.
binplace -a -x -s d:\stripped -n g:\full g:\builddir\application.exe
The executable file uses the same root destination directory as before. Its class directory is files\bin. Thus, it is placed in d:\projectroot\files\bin\application.exe.
The symbol file is placed in two locations. The full symbol file (including both private and public symbols) goes to g:\full\files\bin\exe\application.pdb. The stripped symbol file (containing only public symbols) goes to d:\stripped\files\bin\exe\application.pdb.
Now, use a similar command on commonmodule.dll:
binplace -a -x -s d:\stripped -n g:\full g:\builddir\commonmodule.dll
This time, the class subdirectory is retail. For the executable file, this directory name is a code for "do not use a class subdirectory," so it is placed in d:\projectroot\application.exe. The symbol files are placed in g:\full\retail\dll\application.pdb and d:\stripped\retail\dll\application.pdb.
Finally, use BinPlace on mydriver.sys and omit the -n switch:
binplace -a -x -s d:\stripped g:\builddir\mydriver.sys
Here the class subdirectory is */drivertree. For the executable file, the asterisk (*) is replaced with the processor type. Assuming you are running on an x86 computer, the executable file is placed in d:\projectroot\i386\drivertree\application.exe. The stripped symbol file is placed in g:\full\drivertree\sys\application.pdb, because the asterisk is ignored for a symbol file. Because the -n switch was omitted, the full symbol file is not placed anywhere.