From 75d99e1a81bfbd0dbbaf0b1ace144a8156a47148 Mon Sep 17 00:00:00 2001 From: p0358 Date: Mon, 24 Jan 2022 19:43:21 +0100 Subject: Misc improvements --- loader_launcher_proxy/dllmain.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'loader_launcher_proxy') 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 #include #include +#include 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); } -- cgit v1.2.3