Dynamic Linking

This tutorial describes how to set up Bug Validator to include or exclude different source files from instrumentation processing when you are dynamically linking your application with MFC and/or the C Runtime. For each use case (exclude and include) we’re going to provide a short video followed by step-by-step instructions.

Excluding MFC, CRT, STL source files

When you dynamically link to MFC and the CRT, the code for MFC and the CRT is held in separate DLLs to your application. This allows you to specify not to process MFC or CRT code by simply indicating which DLLs not to process – you don’t need to know where the source code for those DLLs is.

To exclude MFC, CRT, and STL source files from instrumentation do this:

  1. Open the settings dialog by clicking the tools icon on the toolbar.
    Bug Validator Toolbar Settings
  2. The Settings Dialog is displayed. Select the Hook Insertion tab.
    Bug Validator Settings Hook Insertion Exclude MFC, CRT, STL
  3. Select the Use general hook settings checkbox in the section marked DLL Hook Insertion, then deselect the four checkboxes underneath it.
  4. The image shows that the MFC, CRT, STL and system DLLs have been marked to be ignored (deselected).
  5. Click OK to accept the settings.

Future execution traces will not include information relating to any source files in the excluded DLLs.

Including MFC, CRT, STL source files

When you dynamically link to MFC and the CRT, the code for MFC and the CRT is held in separate DLLs to your application. This allows you to specify to process MFC or CRT code by simply indicating which DLLs to process – you don’t need to know where the source code for those DLLs is.

To include MFC, CRT, and STL source files from instrumentation do this:

  1. Open the settings dialog by clicking the tools icon on the toolbar.
    Bug Validator Toolbar Settings
  2. The Settings Dialog is displayed. Select the Hook Insertion tab.
    Bug Validator Settings Hook Insertion Include MFC, CRT, STL
  3. Select the Use general hook settings checkbox in the section marked DLL Hook Insertion, then select the four checkboxes underneath it.
  4. Then select the checkboxes below that check box to select MFC, CRT, and STL functions as appropriate.
  5. The image shows that the MFC, CRT, STL and system DLLs have been marked to be ignored (deselected).
  6. Click OK to accept the settings.

Future execution traces will include information relating to any source files in the included DLLs.

Fully functional, free for 30 days