From ee8ae568bc42cb5311edd7294eb0f8f2ae078bd1 Mon Sep 17 00:00:00 2001 From: BobTheBob9 Date: Mon, 22 Aug 2022 21:59:18 +0100 Subject: add more prs --- loader_launcher_proxy/dllmain.cpp | 28 +-- loader_launcher_proxy/framework.h | 2 +- .../loader_launcher_proxy.vcxproj | 214 ++++++++++----------- .../loader_launcher_proxy.vcxproj.filters | 2 +- 4 files changed, 126 insertions(+), 120 deletions(-) (limited to 'loader_launcher_proxy') diff --git a/loader_launcher_proxy/dllmain.cpp b/loader_launcher_proxy/dllmain.cpp index 1215ca1f..a86dddea 100644 --- a/loader_launcher_proxy/dllmain.cpp +++ b/loader_launcher_proxy/dllmain.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -14,7 +14,7 @@ HMODULE hTier0Module; using CreateInterfaceFn = void* (*)(const char* pName, int* pReturnCode); // does not seem to ever be used -extern "C" _declspec(dllexport) void* __fastcall CreateInterface(const char* pName, int* pReturnCode) +extern "C" __declspec(dllexport) void* __fastcall CreateInterface(const char* pName, int* pReturnCode) { //AppSystemCreateInterfaceFn(pName, pReturnCode); printf("external CreateInterface: name: %s\n", pName); @@ -45,14 +45,20 @@ FARPROC GetLauncherMain() void LibraryLoadError(DWORD dwMessageId, const wchar_t* libName, const wchar_t* location) { - 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); + 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); } BOOL APIENTRY DllMain( HMODULE hModule, @@ -87,7 +93,7 @@ bool ShouldLoadNorthstar() std::stringstream runNorthstarFileBuffer; runNorthstarFileBuffer << runNorthstarFile.rdbuf(); runNorthstarFile.close(); - if (runNorthstarFileBuffer.str()._Starts_with("0")) + if (runNorthstarFileBuffer.str().starts_with("0")) loadNorthstar = false; } return loadNorthstar; diff --git a/loader_launcher_proxy/framework.h b/loader_launcher_proxy/framework.h index d1b49600..d2a898df 100644 --- a/loader_launcher_proxy/framework.h +++ b/loader_launcher_proxy/framework.h @@ -4,4 +4,4 @@ #define WIN32_EXTRA_LEAN #define VC_EXTRALEAN // Windows Header Files -#include +#include diff --git a/loader_launcher_proxy/loader_launcher_proxy.vcxproj b/loader_launcher_proxy/loader_launcher_proxy.vcxproj index 58d290a4..3345ab6f 100644 --- a/loader_launcher_proxy/loader_launcher_proxy.vcxproj +++ b/loader_launcher_proxy/loader_launcher_proxy.vcxproj @@ -1,107 +1,107 @@ - - - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {f65c322d-66df-4af1-b650-70221de334c0} - loaderlauncherproxy - 10.0 - - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - - - - - - - - - - - - - - - true - launcher - - - false - launcher - - - - Level3 - true - _DEBUG;LOADERLAUNCHERPROXY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - stdcpp17 - - - Windows - true - false - shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - true - true - true - NDEBUG;LOADERLAUNCHERPROXY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - stdcpp17 - - - Windows - true - true - true - false - /HIGHENTROPYVA:NO %(AdditionalOptions) - shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - - Create - Create - - - - - - + + + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {f65c322d-66df-4af1-b650-70221de334c0} + loaderlauncherproxy + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + true + launcher + + + false + launcher + + + + Level3 + true + _DEBUG;LOADERLAUNCHERPROXY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp17 + + + Windows + true + false + shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;LOADERLAUNCHERPROXY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + + + Windows + true + true + true + false + /HIGHENTROPYVA:NO %(AdditionalOptions) + shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/loader_launcher_proxy/loader_launcher_proxy.vcxproj.filters b/loader_launcher_proxy/loader_launcher_proxy.vcxproj.filters index f64932cd..4bf52578 100644 --- a/loader_launcher_proxy/loader_launcher_proxy.vcxproj.filters +++ b/loader_launcher_proxy/loader_launcher_proxy.vcxproj.filters @@ -1,4 +1,4 @@ - + -- cgit v1.2.3