Introducing the Windows Mobile API Usage Tool!


I’m really excited to announce the release of the Windows Mobile API Usage Tool, available here: http://www.microsoft.com/downloads/details.aspx?FamilyID=fc803c7b-e855-475a-b8f3-38c19a007d36&displaylang=en


 The API Usage Tool scans your Windows Mobile applications (in cab, msi, or binary formats), performs static analysis, and reports on the usage of APIs and other system resources.  Our application compatibility team has been using the tool for several months now to ensure that we have good coverage of our public SDK when we do testing with 3rd party applications, as well as to help guide resource allocation and investments toward the most frequently used APIs.


 The tool includes a file– deprecated.txt– that has the current list of deprecated APIs for Windows Mobile, and will report on your application’s usage of these APIs.  It’s a really effective way to evaluate how your application will be affected once these deprecated APIs are removed from Windows Mobile.


 The tool is command-line based, and its output is a SQL Compact Edition database (.sdf file).  When used with the /deprecated option, the tool will also generate a collection of useful reports.


 We’re hoping that developers find the tool and reports useful, and we’re encouraging developers to send us a copy of their database (or a link to a copy for larger files) at wmaut@microsoft.com.  We’ll aggregate the data and incorporate it into our application compatibility planning, and we’ll also share findings with the community via this blog.

Comments (15)

  1. wm developer says:

    I’d like to suggest that you guys also look more seriously at ways that you could expand (not just improve) the current APIs.  For example, it would be wonderful to have a standardized API for the accelerometer/G-sensors that are present in many of the newer devices these days, as this would make it MUCH easier to write software that works on a variety of devices.

    If this isn’t the best place to post this suggestion, could you point me someplace else?

  2. Rene says:

    Good morning,

    First – thanks for your promising appliacation.

    But I have strange problem – after (repeating) downloads I got (when trying to install) only message "Cannot open install package…" (message is in Czech language on my computer).

    Regards

    Rene

  3. andre says:

    Drops with exception on XP x64 =(

    C:Program Files (x86)Windows Mobile API Usage Tool>wmaut test.sdf C:TestBuildBinaryPPC2005

    Windows Mobile API Usage Tool Version 1.0.0

    ConnectDB(): Error: An attempt was made to load a program with an incorrect form

    at. (Exception from HRESULT: 0x8007000B)

    ConnectDB(): Error: An attempt was made to load a program with an incorrect form

    at. (Exception from HRESULT: 0x8007000B)

  4. msaffitz says:

    Rene and Andre– Thanks for the reports.  We’ll investigate these issues.

  5. Rene says:

    bmsaffitz: Thanks for the response. My configuration is Windows XP SP2, VS.NET 2008, WM 5 and 6 SDK.

  6. ER, sdf? says:

    Whatever happened to good old text file output?  What reads sdf?  A spreadsheet would be better than this sdf.  A database file seems sort of funny.

  7. jp says:

    looks good.

    Is there a way to export the sdf file to another more common format?

    I´m not a WM developer and installing SQL Server seams an overkill solution although I´m eager to use the tool.

    As ER said, it would useful for people like me to have a text file output too.

    Thanks

  8. Barclay says:

    What a great program:

    wmaut.exe output.sdf mywmapp.exe

    > Missing or invalid directory: Directory mywmapp.exe does not exist.

    If I try pointing it at a folder, instead of an executable, it happily ignores my executables and generates a 5mb empty sdf file.

    If you’re going to release a tool that only handles one or two scenarios correctly, then you might clue us in on what those scenarios are.

  9. Rick Austin says:

    I ran the tool on my XP box with VS2008 installed.  I get the following errors.  Can you tell me what is wrong with the installation?

    C:Program FilesWindows Mobile API Usage Tool>wmaut /deprecated jnk.sdf idl.cab

    Windows Mobile API Usage Tool Version 1.0.0

    Copyright I 2007 Microsoft Corporation.  All rights reserved.

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    Thinking…

    [                         ] 1/1 (0–%) – 00:00 Elapsed   ConnectDB(): Error: Uns

    Analysing…

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]apsed

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    Complete!                                  .sdf ]

    0 Applications scanned in 00:00

    0 Applications skipped due to errors.

    0 Applications in database at the moment.

    Identifying unique files…

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    Done.

    ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    Reading deprecated apis list…ConnectDB(): Error: Unspecified error [ jnk.sdf ]

    ERR

    DB error while populating deprecated api list

    Could not read list of deprecated APIs (deprecated.txt)

  10. Carlos says:

    Hello,

    Is there an API to be able to redirect all the sound going to the rear speaker into the internal speaker? I need to implement this feature. In all forums that I looked it seems that nobody has been able to implement it due to a limitation in the API of Windows Mobile 6 until….. I found this VOIP company (http://www.ageet.com/us/news/2008.06.19-agephone-mobile-2.5-speakerphone-edition.htm ) that claim to be able to do this speaker switching , how is it possible? Any suggestions?

  11. Very interesting Tool… I’ll download and use it… Nice job

  12. Yuanlei Sun says:

    Does it support API functions which contained in DLLs loaded by LoadLibrary or LoadLibraryEx function.

  13. RogerB says:

    Try Excel Query to get into an sdf, you may need an odbc connection in data sources to connect to it?

  14. Jaden says:

    How to use it?…

    wmaut.exe some.sdf myapp.exe

    It just prints error msg.

  15. chew says:

    could the author list the step by step on how to install this and track the windows mobile device?

    i really do not know. Pls help.