LoadLIbrary Failure GetLastError return 127 126

Source: Internet
Author: User



Reason for dynamic load DLL failure using LoadLibrary ():


  1. Path Error (program is placed in the same directory as DLL)

  2. DLL itself error (dependent on other DLLs)


  1. Workaround:

    1. Put the DLL and EXE in the same directory

    2. Loadlibrary () and LoadLibraryEx ()

  2. DLL itself relies on using depends.exedependency Walker (depends) to see which DLLs the DLL depends on

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/0F/wKioL1T1YyHzZis0AAgOAFoMii4076.jpg "title=" 08.png "alt=" Wkiol1t1yyhzzis0aagoafomii4076.jpg "/>

This article is from the "None" blog, please be sure to keep this source http://evely.blog.51cto.com/1089422/1616867

LoadLIbrary Failure GetLastError return 127 126

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.