Application Verifier (AppVerif.exe) is a dynamic verification tool for user-mode applications that are written in unmanaged code. You can use Application Verifier to detect errors in user-mode drivers and any user-mode applications that might accompany user-mode or kernel-mode drivers. Application Verifier is a valuable tool for improving the quality of an entire driver package.
Application Verifier finds subtle programming errors that might be difficult to detect during standard application testing or driver testing. You can run Application Verifier alone or with a user-mode debugger on Windows XP and later versions of Windows.
Info Application Verifier is available from the Microsoft Download Center Web site-online at http://go.microsoft.com/fwlink/?LinkId=79601.
Application Verifier monitors application actions while the application runs, subjects the application to a variety of stresses and tests, and generates a report about potential errors in application execution or design.
Application Verifier is designed specifically to detect and help debug memory corruptions and critical security vulnerabilities. It monitors and reports on an application's interaction with the Windows operating system and profiles the application's use of objects, the registry, the file system, and the Windows API-including heaps, handles, and locks. Application Verifier also includes checks to predict how well the application will perform under User Account Control (UAC) in Windows Vista.
The Application Verifier utility is installed in %windows%\system32.
To use the Application Verifier utility as a command-line tool, enter the appverif command with at least one command-line parameter. If you enter the appverif command without any command-line parameters, the utility starts the Application Verifier application, which you can use to select applications and the tests to run on them, and to display the online help.
To verify a UMDF driver, you must enable Application Verifier on the UMDF Host Process (WUDFHost.exe) in which your driver also runs. To focus the verification on your driver rather than UMDF itself, use a command line such as the following example:
appverif -enable handles locks heaps memory exceptions TLS -for WUDFHost.exe
In this example, -enable handles locks heaps memory exceptions TLS specifies the tests to run, as follows:
Ensures that an application does not attempt to use invalid handles.
Ensures that the application correctly uses file locks. The primary purpose of the Locks test is to ensure that the application properly uses critical sections.
Checks for memory corruption issues in the heap.
Ensures that the application correctly uses virtual address space manipulation functions such as VirtualAlloc, VirtualFree, and MapViewOfFile.
Ensures that the application does not hide access violations by using structured exception handling.
Ensures that the application correctly uses thread local storage functions.
In the example, -for WUDFHost.exe enables Application Verifier on the UMDF Host Process in which your driver runs.
The UMDF Quality Assurance team uses Application Verifier as a standard tool during their test passes on UMDF itself. The tests shown in this example are the standard settings that were used to test UMDF for Windows Vista.
See the Application Verifier online help for complete details about Application Verifier tests and procedures. To do this, start the Application Verifier application and then click Help on the Help menu, or press F1.