locked
A dependent dll was not found

    Question

  • Hi,

           I create a windows store app, Compiled and linked is OK, but when  I run the app, it crashes with error "A dependent dll was not found".  I put all the dll into the system32 folder and I have a desktop demo it runs OK, please give me some help,  thanks!

    Monday, November 5, 2012 7:37 AM

Answers

  • Hi,

          Thank you,  I found a possible reason, the old version can run, but Iinstalled the latest version, I use the old library it runs ok

    • Marked as answer by kyo2075 Wednesday, November 7, 2012 7:49 AM
    Wednesday, November 7, 2012 7:49 AM

All replies

  • Would you consumed any lib in windows store app ?

    May be you you are consuming one or more libs which is dependent on dll.

    Use  Dependency Walker   for checking a little bit more about dll.

    Monday, November 5, 2012 9:31 AM
  • Hi,

         Thanks, but all the libs and dlls are copy from the desktop demo, Configuration of the project and the preparation of the code are the same, too. So I think is there some different way of using the dlls in windows store app ?

    Monday, November 5, 2012 9:45 AM
  • Right click on your project solution explorer and go Add -> Existing item -> add dll from your desired directory.

    Right click on your dll file and set Content = Yes.

    See whether your dll is available or not in Appx directory under debug/release folder. It will be automatically copied in Appx .

    LoadPackagedLibrary

    DLLs for Windows Store Apps

    Monday, November 5, 2012 11:22 AM
  • I tried, it doesn't work
    Tuesday, November 6, 2012 1:54 AM
  • Please check the debug window of your apps for more specification of the error. Check handle is NULL or not. If NULL please see the last error ( GetLastError() )

    HINSTANCE DLLHandler; DLLHandler = LoadPackagedLibrary(L"Test.dll", 0); DWORD error = GetLastError(); OutputDebugStringW( error.ToString()->Data() );

    If possible, please clarify your problem in a little bit more.
    Tuesday, November 6, 2012 3:39 AM
  • I installed ipp,create a metro project, then contains the header files and lib library of ipp, call the a ipp inside of interface, run the program directly after the collapse the error message app.exe process started, but the activation requestfailed with error, Output: A dependent dll was not found, but the desktop demo is ok.
    Tuesday, November 6, 2012 9:33 AM
  • Hi,

    Where is your DLL location, you can check your output folder, if your DLL is in the same folder in the yourapp.exe.

    Best regards,
    Jesse

    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, November 7, 2012 6:44 AM
  • Hi,

          Thank you,  I found a possible reason, the old version can run, but Iinstalled the latest version, I use the old library it runs ok

    • Marked as answer by kyo2075 Wednesday, November 7, 2012 7:49 AM
    Wednesday, November 7, 2012 7:49 AM