I am looking to load a DLL in Windows and catch the error if a dependency DLL is missing. For now, I get the following error:
[prog.exe] - System Error
The program can't start because issue.dll is missing from your computer. Try reinstalling the program to fix this problem.
Instead of having this error popping up, I would like to be able to either catch that when I load the DLL, or be able to know if I would get an error before loading the dll. And on the Microsoft website, I only see references of LoadLibrary[Ex], but nothing for a kind of SafeLoadLibrary.
Surprisingly, I only found a similar question with the language Delphi on StackOverflow.
LoadLibrary()does not throw C++ exceptions, which makes your question very misleading. Anyhow, that's just one point that makes it very unclear what your question actually is, as explicit loading (e.g. viaLoadLibrary()) has nothing to do with the error you quoted.