This tutorial describes how to setup Coverage Validator to include or exclude different source files from coverage processing when you are statically linking your application with MFC and/or the C Runtime.
When you statically link to MFC and/or the CRT, the code for the MFC and/or CRT libraries is included in your application. This means that Coverage Validator’s filtering by DLL policy will not work, as DLLs are not used to provide MFC and/or CRT support for statically linked applications.
This means that Coverage Validator needs to know where the source code for your application, source code for 3rd parties (MFC, CRT, etc) and any other source code is kept.
- Open the settings dialog by clicking the tools icon on the toolbar.
- The Settings Dialog is displayed. Select the File Locations tab.
- Set the Path Type to “Source Files” and using the Partial Scan… button select the file paths that identify the locations of your application’s source code. The image shows one directory for an example statically linked application.
- Set the Path Type to “Third Party Source Files” and using the Partial Scan… button select the file paths that identify the locations of your application’s 3rd party source code (MFC, CRT, 3rd party vendor controls, etc).
The image shows the directories for a typical Visual Studio 6.0 installation.
- Select the Hook Insertion tab.
- Select the check boxes in the section marked Source Code Line Hook Insertion. The image shows that 3rd party source code has been marked to be ignored (deselected).