locked
Does metro style App only use Metro style dll's?

Answers

  • Hi Dongjjing,

    It looks like you've posted essentially the same question in many places. Please post it only once.

    Metro style apps can use Win32 DLLs so long as the DLLs use only API which are available to Metro style apps. Calling API from a DLL counts the same as if you called them from your app itself. While you can bypass the compile-time restrictions intended to help you avoid disallowed API, the app will still fail certification.

    See Win32 and COM for Metro style apps for the list of available API. Your app will not pass certification if it tries to use them. See How to test your app with the Windows App Certification Kit for instructions on testing if your app will pass certification locally.

    _tcscmp and _tcscpy are part of the C-runtime and are not Win32 API. The WinSock2 API are part of the Win32 Desktop Family and are not available to Metro style apps. If you include them in your DLL then your app won't pass certification. I suspect that the VC6 runtime libraries won't pass certification, but you can test that with the cert kit. It may depend on what in them you call. You may need to recompile the DLL with VS11.

    --Rob

    Thursday, March 22, 2012 2:47 AM
    Owner

All replies

  • Hi Dongjjing,

    It looks like you've posted essentially the same question in many places. Please post it only once.

    Metro style apps can use Win32 DLLs so long as the DLLs use only API which are available to Metro style apps. Calling API from a DLL counts the same as if you called them from your app itself. While you can bypass the compile-time restrictions intended to help you avoid disallowed API, the app will still fail certification.

    See Win32 and COM for Metro style apps for the list of available API. Your app will not pass certification if it tries to use them. See How to test your app with the Windows App Certification Kit for instructions on testing if your app will pass certification locally.

    _tcscmp and _tcscpy are part of the C-runtime and are not Win32 API. The WinSock2 API are part of the Win32 Desktop Family and are not available to Metro style apps. If you include them in your DLL then your app won't pass certification. I suspect that the VC6 runtime libraries won't pass certification, but you can test that with the cert kit. It may depend on what in them you call. You may need to recompile the DLL with VS11.

    --Rob

    Thursday, March 22, 2012 2:47 AM
    Owner
  • First, Welcome to Metro style app development.

    Regarding your understanding of section 3.1 http://msdn.microsoft.com/en-us/library/windows/apps/hh694083 you have reached the wrong conclusion. The message that section is trying to deliver is if you have a component (in your case a Win32 DLL) that only uses the Windows provided API's available to Metro style apps then it can be included in your app. Every component you include in your Metro style app must limit their use to the Windows API's in this list: API reference for Metro style apps 

    As Rob mentioned in your other post, it is unlikely your VS6 compiled component will pass certification as it likely has dependencies on runtimes that will not pass certification.

    Compiling it in VS11 is a good first step. You might take a look at this thread for some insight from persons that have been down this path previously:

    http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/4fa636f6-123d-4826-a0ee-e6200d8bface

    This list may also be helpful to you while learning what alternatives are available for API's you previously used: Alternatives to Windows APIs in Metro style apps

    I hope this helps make the transition a bit cleared for you.

    Thanks!


    David Lamb



    Thursday, March 22, 2012 3:07 AM
    Moderator