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/main.cpp | |
parent | 3d3d2c2a13a292a9093ad3029563a1c543a07ab7 (diff) | |
download | NorthstarLauncher-f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4.tar.gz NorthstarLauncher-f66ea9ce2af44a00e49e6defaa7ec6ef4f100bb4.zip |
more masterserver stuff and support for devonly/hidden cvars
Diffstat (limited to 'LauncherInjector/main.cpp')
-rw-r--r-- | LauncherInjector/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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); |