Before an application will be accepted into the Windows Marketplace for Mobile catalog, it must be able to perform all primary and secondary functions while the Microsoft Application Verifier Test (AppVerifier) is running. AppVerifier needs to be configured to detect heap corruption and invalid locks usage, including critical section use. The specific conditions that must be met in order for the application to pass the AppVerifier test are:
- The application must not break into the debugger, crash, or fail when Application Verifier Heaps, Locks and Handles related tests are performed.
- The application must not have any invalid pointers associated with the main executable.
By the way, passing AppVerifier is only one step towards Windows Marketplace certification. For the current and complete set of guidelines, you will want to carefully read the Windows Marketplace Application Submission Requirements whitepaper.
Now I’ll describe the application itself and steps for getting started! The Application Verifier tool assesses the stability of an application and detects common programming mistakes. The tool can detect and pinpoint memory leaks, handle leaks, and leaks in graphics device interface (GDI) objects. The tool can also detect some forms of heap corruption.
Application Verifier attaches to an application and performs tests while the application runs. With the tool, you may be able to diagnose subtle problems with an application that would otherwise be difficult to diagnose.
Each test that Application Verifier runs is referred to as a shim. The tool inserts the shim into the code path between the calling function and the intended target function. A shim loads into the process space, and the kernel redirects calls from other libraries to the shim.
You might find it helpful to run a shim with a debugger attached to the target device. If a debugger is attached to the target device, the debugger points to the location where the exception occurred, which might be close to the source of the problem identified by the shim.
For a specified application, you can select the shims that Application Verifier uses to test the application. Examples of tests performed by shims for the tool include tests for memory leaks, tests for the usage of specific application programming interfaces (APIs), and tests for memory corruption.
Application Verifier Installation Instructions
1. Install the following prerequisites.
2. Install the Application Verifier Tool
3. Run appverifier32.bat (for 32-bit Host) or appverifier64.bat (for 64-bit Host). Run as administrator on Windows Vista or Windows 7
4. When using the desktop application for AppVerifier on Windows Vista and Windows 7, you must set up a Windows Mobile Device Center partnership with any device you are using with Application Verifier. Otherwise, after any initial connection with the device, subsequent connections will not work.
5. Additional step for 64-bit Only, there is a know issue when using a 64-bit Host OS, the issue is that the files to support App Verifier are not automatically copied to the device as part of the initial configuration. There are 2 possible work-arounds for this issue :-
- After installation on the desktop you need to manually copy all of the files listed in the appverifier64.bat to the root directory of each device you want to use with App Verifier, you only need to do this the first time or whenever you re-flash or cold boot the device
- Use a 32-bit Host OS for the initial setup process of a device, if using Win 7 you can successfully use the Win XP mode and setup App Verifier in the 23-bit host environment, after the files have been copied to the device you can go back and use the 64-bit Host Os to configure App Verifier.
For additional reference material on AppVerifier, check out the following MSDN reference pages. Even though Windows Mobile 5.0 is specified by these topics, much of the content is still relevant for devices running Windows Mobile 6 and later.
- Application Verifier for Windows CE and Windows Mobile 5.0
- Step by Step: Monitoring Resource Leaks Using the Application Verifier Tool for Windows Mobile 5.0
|Share this post :|