locked
Determining if a 3rd party dll can be used in Metro

    Question

  • Hi

    I'm trying to write a Metro app that needs to make use of a 3rd party win32 dll. I am unable to get the dll to load in my Metro app - I get error 1114 - ERROR_DLL_INIT_FAILED.  When I created my own simple dll, and was able to load this into my Metro app without any trouble.

    I assume the problem is that the 3rd party dll uses parts of the win32 api that are not allowed in the Metro sandbox? Is there any way for me to check this is the case? 

    Thanks

    Tom


    Tom Davies, Software Engineer, Solid State Logic

    Monday, May 07, 2012 10:23 PM

Answers

  • There is no good way to tell if a DLL uses only functions applicable to a Metro style app without loading it. If you can load it you can run the Windows App Cert Kit against the test app, but since you're blocked before then that won't be possible. You'll probably have to use standard DLL load debugging techniques to see where it is failing.

    My guess is that it is trying to load a library that it doesn't have access to. You can try enabling loader snaps to get debug information about what is going on in the loader. Take a look at http://blogs.msdn.com/b/junfeng/archive/2006/11/20/debugging-loadlibrary-failures.aspx for an overview.

    --Rob

    Tuesday, May 08, 2012 3:30 AM
    Owner

All replies

  • There is no good way to tell if a DLL uses only functions applicable to a Metro style app without loading it. If you can load it you can run the Windows App Cert Kit against the test app, but since you're blocked before then that won't be possible. You'll probably have to use standard DLL load debugging techniques to see where it is failing.

    My guess is that it is trying to load a library that it doesn't have access to. You can try enabling loader snaps to get debug information about what is going on in the loader. Take a look at http://blogs.msdn.com/b/junfeng/archive/2006/11/20/debugging-loadlibrary-failures.aspx for an overview.

    --Rob

    Tuesday, May 08, 2012 3:30 AM
    Owner
  • I'll try that when I get back home later, thanks. 

    As an example, if my 3rd party dll depended on (for example) 4 standard win32 dlls, would I have to package these up in my Metro app in order for them to be accessible?

    Thanks

    Toms


    Tom Davies, Software Engineer, Solid State Logic

    Tuesday, May 08, 2012 9:19 AM
  • Yes, all of the dependencies on non-OS DLLs need to be included in your app package.

    --Rob

    Tuesday, May 08, 2012 5:39 PM
    Owner