locked
Tool for supported Metro style API test

    Question

  • Hi ,

    Is there any tool or cheat to perform just the "Supported Metro API Test" for my Metro App. Currently i  have to run all the tests which takes a lot of time .I am working on removing the unsupported API for my Metro application and i frequently need to check if an api is supported or not .


    Friday, June 8, 2012 1:18 PM

Answers

  • If the library is already compiled then compile time checks won't apply. They only help when you use them to compile the code, not after the code has been compiling and you are linking.

    For that scenario, the WACK is the only tool I am aware of.

    If you can recompile the library then the compile time checks are very useful. If you cannot recompile it, then you won't be able to fix any WACK failures. Most old static libraries won't be usable without rebuilding, since they probably are linked against an older and non-compliant version of the C runtime library.

    --Rob

    Saturday, June 9, 2012 5:10 AM
    Owner

All replies

  • Unsupported API should cause compiler failures when building. By default they are excluded from the headers when building a Metro style app. This is controlled by the WINAPI_PARTITION_DESKTOP constant, which should be undefined for Metro style apps.

    After you've built, the Windows App Cert Kit should flag any unsupported API which are used.

    --Rob

    Friday, June 8, 2012 3:46 PM
    Owner
  • @Rob :  But when i link with an old static library which contains unsupported apis  it compiles and runs fine .But the "Supported Metro API test " fails for that app .Am i missing something here ?

    Saturday, June 9, 2012 5:01 AM
  • If the library is already compiled then compile time checks won't apply. They only help when you use them to compile the code, not after the code has been compiling and you are linking.

    For that scenario, the WACK is the only tool I am aware of.

    If you can recompile the library then the compile time checks are very useful. If you cannot recompile it, then you won't be able to fix any WACK failures. Most old static libraries won't be usable without rebuilding, since they probably are linked against an older and non-compliant version of the C runtime library.

    --Rob

    Saturday, June 9, 2012 5:10 AM
    Owner
  • What if i just want to test how my old code runs on Metro .I have a fairly large static library containing hundreds of unsupported calls .Most of the functionality lies within that library .Can i still use that same library without recompiling ,just to check how my application would look like .I think it is achievable since i checked this by wrapping up a ::MessageBoxA() API (which is unsupported on Metro ) , into a static library compiled with VS2010 and used it in my metro app and it ran successfully (i.e. Displayed a MessageBox on Desktop) .However when i tried to appcert my metro app , it failed the "Supported Metro API test" which is expected because of the MessageBoxA API .But still i was able to use the unsupported api on my metro app . I understand that i cannot upload such app to appstore but it will still help me work on my metro app and use old code  till the time that old static library will become metro compliant . Is there anything that i am missing ?
    Saturday, June 9, 2012 5:33 AM
  • Hi Mukesh,

    Whether it will work or not will depend on the specific calls. You can definitely try it, just be aware that you won't be able to certify the app so long as it makes unsupported calls.

    --Rob

    Monday, June 11, 2012 2:13 AM
    Owner