locked
Metro Apps and old DLL projects RRS feed

  • Question

  • Hello,

    I have a native DLL that I wont to load using LoadPackedLibrary into Metro App.

    Problem is when I try to call GetProcAddress I get and error 127. This all work for desktop project, so I am assuming that I have some forbidden calls from win32 API. 

    How can I see what forbidden calls from win32 API my project from above DLL is using?

    Can I add some preprocessor definitions in order to get build errors or something like that?

    Thanks in advance,

    AI

    Tuesday, April 9, 2013 11:10 PM

Answers

  • You can add it to your AppX as content and then run WACK on it.

    You can also use the command-line tool 'dumpbin /exports' on it to see what it needs.

    More than likely you can't use it because it wasn't built with the VS 2012 version of the C/C++ Runtime.

    • Marked as answer by Jesse Jiang Monday, April 15, 2013 1:54 AM
    Tuesday, April 9, 2013 11:34 PM
  • If you have source, you can try to manually define the winapi family:

    WINAPI_FAMILY=WINAPI_PARTITION_APP

    • Marked as answer by Jesse Jiang Monday, April 15, 2013 1:54 AM
    Wednesday, April 10, 2013 7:25 PM

All replies

  • You can add it to your AppX as content and then run WACK on it.

    You can also use the command-line tool 'dumpbin /exports' on it to see what it needs.

    More than likely you can't use it because it wasn't built with the VS 2012 version of the C/C++ Runtime.

    • Marked as answer by Jesse Jiang Monday, April 15, 2013 1:54 AM
    Tuesday, April 9, 2013 11:34 PM
  • Thanks for the quick response.

    DLL is created using VS 2012, so that would not be a problem.

    I was wondering if there is some better way than running WACK - build it in VS 2012 using some additional preprocessor definitions or something similar?

    Also what are possible problems which can lead to the metro app do not see the exported function (but desktop does)?
    I am not sure that, if I loaded dll successfully, that the function GetProcAdress would test Win32 API calls or something like that.

    Thanks

    AI

    Wednesday, April 10, 2013 3:33 PM
  • If you have source, you can try to manually define the winapi family:

    WINAPI_FAMILY=WINAPI_PARTITION_APP

    • Marked as answer by Jesse Jiang Monday, April 15, 2013 1:54 AM
    Wednesday, April 10, 2013 7:25 PM