diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-25 18:06:57 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-25 18:06:57 +0000 |
commit | fc10ac473811f2497ef3f4c9c0b885f8efb3025f (patch) | |
tree | c4af81b026e6d72b79d1b11e939e04183ece4b84 /loader_launcher_proxy | |
parent | 32277386b62877999c2017146750a2449d52d447 (diff) | |
parent | a23232aad6bccc3dc0e5ecd38365303863222a73 (diff) | |
download | NorthstarLauncher-fc10ac473811f2497ef3f4c9c0b885f8efb3025f.tar.gz NorthstarLauncher-fc10ac473811f2497ef3f4c9c0b885f8efb3025f.zip |
Merge branch 'main' of https://github.com/R2Northstar/NorthstarLauncher
Diffstat (limited to 'loader_launcher_proxy')
-rw-r--r-- | loader_launcher_proxy/dllmain.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/loader_launcher_proxy/dllmain.cpp b/loader_launcher_proxy/dllmain.cpp index cf69d63e..1215ca1f 100644 --- a/loader_launcher_proxy/dllmain.cpp +++ b/loader_launcher_proxy/dllmain.cpp @@ -5,6 +5,7 @@ #include <Shlwapi.h> #include <sstream> #include <fstream> +#include <filesystem> HMODULE hLauncherModule; HMODULE hHookModule; @@ -44,9 +45,13 @@ FARPROC GetLauncherMain() void LibraryLoadError(DWORD dwMessageId, const wchar_t* libName, const wchar_t* location) { - char text[2048]; - std::string message = std::system_category().message(dwMessageId); + char text[4096]; + std::string message = std::system_category().message(dwMessageId); sprintf_s(text, "Failed to load the %ls at \"%ls\" (%lu):\n\n%hs", libName, location, dwMessageId, message.c_str()); + if (dwMessageId == 126 && std::filesystem::exists(location)) + { + sprintf_s(text, "%s\n\nThe file at the specified location DOES exist, so this error indicates that one of its *dependencies* failed to be found.", text); + } MessageBoxA(GetForegroundWindow(), text, "Northstar Launcher Proxy Error", 0); } |