Testing with Windows Application Verifier

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

When you have access to source code, Windows Application Verifier can help you uncover subtle stability, reliability, compatibility, and security problems. Windows Application Verifier is not an automated test tool. To use it, you must run an application with Application Verifier enabled and exercise all of your test cases.

Windows Application Verifier helps you to identify code that needs to be modified by running in either of two modes of operation: debugging or logging. In debugging mode, it detects problems in the application and transfers the results to a debugger. In logging mode, it writes all of the output that it generates to a text file for later review.

Figure 3.9 shows the main window of Application Verifier.

Figure 3.9   Application Verifier Main Window

Application Verifier Main Window

To start Application Verifier on Windows XP Professional, click Start, click All Programs, click Microsoft Windows Application Compatibility Toolkit, and then click Windows Application Verifier. On Windows Server 2003, click Start, click Programs, click Microsoft Windows Application Compatibility Toolkit, and then click Windows Application Verifier.

To use Application Verifier, you must be logged on as an Administrator. Click Add to add the applications that you want to test in the left pane. To test an application, select it in the left pane, select the tests that you want to apply to it in the right pane, and then start the application in your normal way and run the test cases. After you add an application to the list, Application Verifier is enabled for that application, whether you start the application from this tool, from a shortcut, or from the command line. The tests that you select are applied whenever you run the application on that computer until you remove the application from the list in Application Verifier.


  • Application Verifier tests require the symbol files for the version of Windows and the application that you are testing.

The tests detect the most common application problems, such as incorrect version checking, bad registry usage, and hard-coded file paths. You can view a list of the detected problems in the Application Verifier log, which is located in the \Documents and Settings\All Users\Shared Documents\AppVerifierLogs folder with a file name corresponding to the name of the executable file for the application. You also can export the log to a text file so that you can send it to others.

Some of the test options provided by this tool are designed to cause the application to stop responding when it encounters a problem. These problems are not written to the Application Verifier log. To determine the cause of the problem in such a case, run the application under a debugger with Application Verifier running. When using a debugger, you can set Application Verifier so that it breaks into the debugger for any event that is written to the Application Verifier log.

For more information about the Application Verifier tool, see Windows Application Compatibility Toolkit Help.

Table 3.6 describes the tests that you can perform with Application Verifier.

Table 3.6   Application Verifier Tests

Test Description

PageHeap — Detect heap corruptions

Performs regular checks of the heap and adds guard pages at the end of each allocation to catch possible heap overruns.

Locks — Check lock usage

Looks for common errors with locks, and displays the output in a separate debugger application. This test can cause access violations if an error is found.

Handles — Detect invalid handle usage

Checks for common problems with handles, and displays the output in a separate debugger application. This test can cause access violations if an error is found.

Stacks — Check for adequate stack

Disables stack growth, causing a stack overflow exception if the initial allocation is too small.

LogStartAndStop — Logs start and stop

Enters log information when the application starts or stops, making it easier for you to review test data.

FilePaths — Checks system path usage

Monitors the application’s attempts to obtain file path information to determine if the application uses hard-coded paths or a nonstandard method of gathering the path information. This test can cause the application to stop responding if the application uses an improper method for determining file paths.

HighVersionLie — Checks version handling

In the past, many applications were written to run on a specific version of Windows. This test returns a very high version number to test how the application handles a version that does not yet exist.

RegistryChecks — Checks registry usage

Checks how the application uses the system registry to determine whether the application uses any inappropriate or dangerous calls. Logs any problems that it detects.

WindowsFileProtection — Logs changes to Windows File Protection files

Verifies that applications are not improperly replacing files that are protected by Windows File Protection.

DXFileVersionInfo — Logs DirectX file checks

Logs information about any attempt that the application makes to check the version of Microsoft® DirectX® application programming interface installed on the local computer.

LogRegistryChanges — Logs registry changes

Logs any changes that the application makes to the registry.

LogFileChanges — Logs file system changes

Logs information about any change that the application makes to the file system.

ObsoleteAPICalls — Logs calls made to obsolete APIs

Logs any attempt to use a deprecated API, which is an API that is still supported but is likely to be unsupported in the future.

KernelModeDriveInstall — Logs installation of kernel-mode drivers

Logs data about any kernel-mode driver that is installed for use by the application.

SecurityChecks — Logs potential security problems

Identifies many common security problems.