When using the command line it's convenient to store settings and options in files that can be easily referenced.
Those files include:
•Global settings files
•File locations for source, third party source, PDB or MAP files
•DLL hook files
Each of these file types can be saved or exported from Memory Validator.
Global settings are usually stored in the registry, but you can save a specific set of settings for use in regression tests:
•Settings menu Save settings...
Points to a previously saved settings file to be used for the test.
Examples:
-settings c:\settings\testMacro1.mvs
-settings "c:\reg tests settings\testMacro1.mvs"
File location files can be easily generated by exporting file locations from the File Locations page of the settings dialog.
Specify a plain text file listing file locations to be used during testing. See the format of the file below.
Each set of file types (one per line) is preceded by a header line in the file.
•[Files] Source files
•[Third] Third party source files
•[PDB] PDB files
•[MAP] MAP files
Example:
-fileLocations c:\regressionsTests\testFileLocations1.mvxfl
Example file:
[Files]
c:\work\project1\
[Third]
d:\VisualStudio\VC98\Include
[PDB]
c:\work\project3\debug
c:\work\project3\release
[MAP]
c:\work\project3\debug
c:\work\project3\release
Points to a file listing the DLLs to be hooked for the test.
Examples:
-dllHookFile c:\settings\testMacroDLLs.mvx
-dllHookFile "c:\reg tests settings\testMacroDLLs.mvx"
The first line of text in the DLL hooks file is one of the following:
•Rule:DoNotHook DLLs marked as enabled will not be hooked. All other DLLs will be hooked
•Rule:DoHook DLLs marked as enabled will be hooked. All other DLLs will not be hooked
•Rule:HookAll All DLLs will be hooked regardless of the settings in the list
Capitalization is important.
The remaining lines list one DLL filename or folder path and an enabled state on each line.
Example:
Rule:DoNotHook
nativeExample.exe enable=FALSE
MFC42D.DLL enable=TRUE
MSVCRTD.dll enable=TRUE
KERNEL32.dll enable=TRUE
ole32.dll enable=TRUE
Example:
Rule:DoHook
E:\OM\C\memoryValidator\examples\nativeExample\DebugNonLink enable=TRUE
Example:
Rule:DoHook
E:\OM\C\memoryValidator\examples\nativeExample with spaces\DebugNonLink enable=TRUE
Example:
Rule:DoHook
%ENV_VAR%\DebugNonLink enable=TRUE
Here, the environment variable ENV_VAR is used to replace the text %ENV_VAR% in the path definition.
The file can be ANSI or UNICODE text and paths with spaces do not need quotes.