What happens when I load some dll at run-time (let’s call it Lib1.dll) but Lib1.dll also depends on Lib2.dll but Lib2.dll is not there?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends (sorry). If the DLL in question is statically linked to the missing DLL, then the LoadLibrary call will fail with error 126 (ERROR_MOD_NOT_FOUND). If, however, the DLL attempts to load the missing DLL dynamically (e.g., with LoadLibrary), then the original LoadLibrary call may succeed. The behavior may also change for delay loaded libraries.