Windows Mobile Application Verifier

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.

Share this post :


Comments

  1. Posted on: July 26, 2009 at 11:01PM  

    Hi,

    I have both eVC++ 4 and VS2005 Pro installed in my computer. when I want to connect to a device from AppVerifCE.exe, Platform Manager (a dialog to choose a device) that pops up is the one from eVC++ instead of VS2005. What should I do to change this behaviour to pop up VS2005's Platform Manager instead?

    thank you,

    Afriza

  2. Posted on: July 28, 2009 at 6:25PM  

    I've just wasted a day trying unsuccessfully to get Application Verifier running.  On two machines, (one with Server 2003 and one with Win7 and a hodgepodge of installed WinMobile SDKs besides WM6 on each machine) I'm getting the same error when trying to connect with Applicaiton Verifier:  "EnableShimEngine Error"  "Unable to enable shim engine on device".   This is happening with both emulators and physical devices.  Is there some additional magic incantation I need to perform beyond the instructions listed above?

  3. Posted on: July 28, 2009 at 7:04PM  

    Hi Jaybo_nomad,

    There are a number of possible causes for this problem, the normal causes are :-

    1) You are using a 64-bit host OS (Win7 / Server 2003 in your case), there is currently a problem with using the available version on a 64-bit Host where the files are not copied to the device as part of initialization.

    2) The shimeng.dll is signed with the "Stinger Certificate" and not all Retail / OEM devices come with this certificate installed, disabling Security (by setting to "Security Off"), normally gets around this problem (Using the Device Security Manager that comes with VS 2008 or by downloading it from MSDN).

    As your also having issues with a Device Emulator, I suspect it's the first problem? Is this correct?

  4. Posted on: July 28, 2009 at 7:11PM  

    Hi Afriza, As part of the connection process when connecting with a Device App Verifier uses the registered "Platform.Manager" COM object. (For reference VS 2005 does not include a Platform Manager you need to install either Platform Builder or the above mentioned CETK (CE Test Kit for Windows Mobile 5)).

    In terms of switching to the version mentioned in the article, the easiest approach might be to install the CETK on top of your existing installation (Disclaimer: I have not attempted this) and *hopefully* this will reset the COM registry to the newly installed Platform Manager.

    Before trying this, however, have you tried to use the version that comes with eVC++, all the Platform Manager is used for is to establish a communication channel with the device to enable the copying, starting and communication with the device?

    Cheers

    Nev

  5. Posted on: July 28, 2009 at 9:30PM  

    Hi Nev,

    Regarding "EnableShimEngine Error", no I'm running only 32 bit versions of Server 2003 and Win7, yet the problem happens with both physical devices and emulators.  So that rules out signing issues, correct?

    What triggers Shimeng.dll to be copied onto the device / emulator, and how can I verify I've got the right version on the device / emulator? This seems to be a common cause of the problem (see: www.pocketpcjunkies.com/.../Unable-to-enable-shim-engine)

  6. Posted on: July 29, 2009 at 2:57PM  

    Hi Jaybo_nomad, no the signing issue is seperate toe the 64-bit problem, however, you should not get the signing issue on the emulators (at least for the new 6.5 images).

    Did you follow the instructions marty gave in the linked blog entry (this is essentially the appverifier.bat file above)?

    For the copying there are a number of things that cause it, so I'll try and keep it simple for here.

    - The reg entries in the appverifier.bat are use to identify the current location of the files that will get copied to the device upon connecting (note the final reg delete is important, if you have run a previous version of App Verifier)

    - As part of the CETK, the reg entries are use to create a "Package" (on App Verifier (desktop) startup) that is them copied to the device by the CETK Platform Manager.

    If you have had a successful connection and copy to the device you should see the following files in the root directory of the device

    shim_*.dll; shimeng.dll; appverif_client.exe; vlog.dll; symhlp.dll; htracker.dll (i.e. all of the files listed in the reg entries).

    It is possible that the current reg entries point to a location that does not exist and therefore no files are copied over (There are a bunch of potential errors which App Verifier Desktop swallow that would be useful for this).

    You could resort to manually copying these files into the root directory of the device (or image) if they are not present.

    Let me know.

    Cheers

    Nev

  7. Posted on: July 30, 2009 at 10:37AM  

    Hello Eric,

    I followed all of your directions and extra ones I found:

    www.microsoft.com/.../default.aspx

    social.msdn.microsoft.com/.../ebc072d3-a5e2-4bd7-9579-cc294b744eeb

    I finally followed a Marty Larson's video on the same topic:

    msdn.microsoft.com/.../bb264341.aspx

    I'm getting this error when triying to connect the app verifier to my devices (I tried in WM 6 PRO Emulator & PPC 2003 device both with security off and both show "connection to device stablished" when setting up the connection):

    ---------------------------

    Connect To Device

    ---------------------------

    Unable to launch device EXE

    ---------------------------

    Aceptar  

    ---------------------------

    I have been searching a lot and after all I believe it's because some files are not found, so I reviewed your .bat script and I found that maybe some things are wrong:

    -In thrid line you make reference to "Windows CE Platform Builder\5.00" and current version is "Windows CE Platform Builder\5.01"

    -In the same line you try to copy all files that match this wildcard: "appverif_client.*" but I searched for those ones and they don't exist, so maybe that's why the connection fail.

    Thanks a lot!

    Javier Andrés Cáceres Alvis

    Blog Personal: speechflow.spaces.live.com

    Blog Intel: software.intel.com/.../javierandrescaceres

  8. Posted on: July 31, 2009 at 10:42AM  

    Hi Nev,

    Regarding "EnableShimEngine Error" again:

    Here are few more clues regarding this problem.  

    1. I have verified that the shim DLLs get copied to the root directory on the device and emulators.  

    2. On both the Win7 machine and the Server2K3 machine, I have successfully ran ApplicationVerifier ONCE, AND ONCE ONLY.  Thereafter, subsequent attempts have resulted in the "EnableShimEngine Error" message, even after rebooting both the PC and device (which is a VX6800 btw).

    3. Emulators have NEVER worked.  I always get the "EnableShimEngine Error" message despite verifying that all the DLLs are present, WMDC is working fine, I can run my app via VS2008 and everything else seems normal.

    4. The Win7 box for a time didn't start up WMDC.  I believe this may have been related to "Microsoft Office Outlook Connector".  I began to suspect this was a problem after Outlook began crashing and reading somewhere that MOOC may be the culprit.  Since removing this, and reinstalling WMDC, WMDC seems to be working fine again.

    5. From the documents, it sounds like ActiveSync should be used for both the Transport and Startup Server, correct?

    6. Should  "Use Sockets for the client/server communication" be checked?  (I've tried both ways without success).

    7. "AppVerifier.bat" only needs to be run once, correct?

    I'm starting on day #3!  Whee!

  9. Posted on: August 01, 2009 at 4:59PM  

    Regarding "EnableShimEngine Error" again:

    I agree with Javier, there are problems with AppVerifier.bat and possibly the installer for Application Verifier.  Since I don't know the intent of the batch file, I don't know the definite fix, but...

    a.  Lines 5 and 6 of AppVerifier.bat refer to "Application Verifier for Mobile 5.00", but the actual directory should be "Application Verifier for Mobile 5.0". (note the single "0")

    b. The shortcut points to:"C:\Program Files\Windows CE Platform Builder\5.00\CEPB\wcetk\cetest.exe".  Should this be 5.01?

  10. Posted on: August 03, 2009 at 1:40PM  

    Hi Jaybo_nomad, Ok, here is a short form response

    1) Good

    2) Have you established a partnership? The only time I have seen this behaviour is when you don't. Interesteringly, you don't need to do this on XP (including the new Virtual XP on Win7 (Not sure if it's available externally yet!)

    3) Which Emulators are you using? I've used both 6.1 and 6.5 without issues (again creating a partnership on Win7).

    4) I have the Office Outlook connector installed on all of my PC's (Vista 64-bit and Win 7 32-bit) and it has ot cause any issues, which release of Win7 are you using (Build 7100 (ie RC))

    5) Yes, ActiceSync for both

    6) Use Sockets, no not needed (unless you run the Appverif_client in with sockets enabled, but thats another discussion)

    7) Yes, once we fix up the typos :)

    Cheers

    Nev

  • Page:
  • 1
  • 2
  • 3

Trackbacks

  1. Posted by: Windows Mobile Application Verifier | ASP Scribe on July 26, 2009 at 4:24PM

    Pingback from  Windows Mobile Application Verifier | ASP Scribe

  2. Posted by: Microsoft Windows Mobile Application Verifier released « MobileTechWorld on July 26, 2009 at 6:52PM

    Pingback from  Microsoft Windows Mobile Application Verifier released « MobileTechWorld

  3. Posted by: Windows Mobile Application Verifier | Microsoft | RizwanAshraf.com on July 26, 2009 at 7:05PM

    Pingback from  Windows Mobile Application Verifier | Microsoft | RizwanAshraf.com

  4. Posted by: Tech News, Resources from Blogosphere – 27 July 09(3) | Hostgator Hosting on July 26, 2009 at 10:37PM

    Pingback from  Tech News, Resources from Blogosphere – 27 July 09(3) | Hostgator Hosting

  5. Posted by: Application Verifier Validates Windows Mobile Apps | Internet News | Free Download Windows Software on July 27, 2009 at 8:52AM

    Pingback from  Application Verifier Validates Windows Mobile Apps | Internet News | Free Download Windows Software

  6. Posted by: Marketplace app code-checker released « Joozzt RSS feeds on July 27, 2009 at 12:32PM

    Pingback from  Marketplace app code-checker released «  Joozzt RSS feeds

  7. Posted by: Windows Mobile Marketplace Open for Submissions | DUOWAN on July 28, 2009 at 12:33AM

    Pingback from  Windows Mobile Marketplace Open for Submissions | DUOWAN

  8. Posted by: Windows Mobile Marketplace Open for Submissions on July 28, 2009 at 10:57AM

    Pingback from  Windows Mobile Marketplace Open for Submissions

  9. Posted by: Windows Mobile Application Verifier | India Phone cards on July 31, 2009 at 1:36AM

    Pingback from  Windows Mobile Application Verifier | India Phone cards

  10. Posted by: Mesothelioma News - Asbestos Tests Positive at Ash Grove Cement Company on July 31, 2009 at 1:56AM

    Pingback from  Mesothelioma News - Asbestos Tests Positive at Ash Grove Cement Company

  11. Posted by: Windows Marketplace j?? est?? aceitando aplicativos; melhores programas levam um Microsoft Surface | Microsoft on August 04, 2009 at 1:12AM

    Pingback from  Windows Marketplace j?? est?? aceitando aplicativos; melhores programas levam um Microsoft Surface | Microsoft

  12. Posted by: El alegre bandolero... on October 05, 2009 at 4:00PM

    A continuación detallo un conjunto de recursos para Windows Mobile 6.X/6.5: Titulo Tipo Descripción

  13. Posted by: Marketplace app code-checker released : Cellphone News and Review on January 10, 2010 at 10:55AM

    Pingback from  Marketplace app code-checker released : Cellphone News and Review

  14. Posted by: windows mobile 5 - StartTags.com on January 29, 2010 at 12:01PM

    Pingback from  windows mobile 5 - StartTags.com