DLL Load Library - Error Code 126

前端 未结 4 1513
醉话见心
醉话见心 2020-11-28 08:56

I\'m using the \'LoadLibrary\' from the Windows API, when I run the application, it throws me an error code 126. I read that it may be caused by dependencies, I checked what

相关标签:
4条回答
  • 2020-11-28 09:41

    This error can happen because some MFC library (eg. mfc120.dll) from which the DLL is dependent is missing in windows/system32 folder.

    0 讨论(0)
  • 2020-11-28 09:50

    This worked for me Visual C++ Redistributable Packages

    0 讨论(0)
  • 2020-11-28 09:56

    Windows dll error 126 can have many root causes. The most useful methods I have found to debug this are:

    1. Use dependency walker to look for any obvious problems (which you have already done)
    2. Use the sysinternals utility Process Monitor http://technet.microsoft.com/en-us/sysinternals/bb896645 from Microsoft to trace all file access while your dll is trying to load. With this utility, you will see everything that that dll is trying to pull in and usually the problem can be determined from there.
    0 讨论(0)
  • 2020-11-28 09:59

    This can also happen when you're trying to load a DLL and that in turn needs another DLL which cannot be not found.

    0 讨论(0)
提交回复
热议问题