diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-11-27 01:35:22 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-11-27 01:35:22 +0000 |
commit | f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4 (patch) | |
tree | fce15e55515c16ba5f1884545643ae45e52c6e7f /LauncherInjector | |
parent | 3d3d2c2a13a292a9093ad3029563a1c543a07ab7 (diff) | |
download | NorthstarLauncher-f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4.tar.gz NorthstarLauncher-f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4.zip |
more masterserver stuff and support for devonly/hidden cvars
Diffstat (limited to 'LauncherInjector')
-rw-r--r-- | LauncherInjector/LauncherInjector.vcxproj | 8 | ||||
-rw-r--r-- | LauncherInjector/main.cpp | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/LauncherInjector/LauncherInjector.vcxproj b/LauncherInjector/LauncherInjector.vcxproj index 07d45e75..e205207d 100644 --- a/LauncherInjector/LauncherInjector.vcxproj +++ b/LauncherInjector/LauncherInjector.vcxproj @@ -30,26 +30,26 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v142</PlatformToolset> + <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp index 8b136612..703ee188 100644 --- a/LauncherInjector/main.cpp +++ b/LauncherInjector/main.cpp @@ -134,6 +134,19 @@ int main(int argc, char* argv[]) { WriteProcessMemory(processInfo.hProcess, lpLibName, DLL_NAME, dwLength, &written); HANDLE hThread = CreateRemoteThread(processInfo.hProcess, NULL, NULL, pLoadLibraryW, lpLibName, NULL, NULL); + + if (hThread == NULL) + { + // injection failed + + std::string errorMessage = "Injection failed! CreateRemoteThread returned "; + errorMessage += std::to_string(GetLastError()).c_str(); + errorMessage += ", make sure bob hasn't accidentally shipped a debug build"; + + MessageBoxA(0, errorMessage.c_str(), "", MB_OK); + return 0; + } + WaitForSingleObject(hThread, INFINITE); //MessageBoxA(0, std::to_string(GetLastError()).c_str(), "", MB_OK); |