Microsoft has just released its Application Verifier tool for the Windows Mobile 5.0 platform. The 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. It 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 on Microsoft Windows CE.
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.
The Application Verifier is available for download on Microsoft web site.