diff options
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); |