From e98fc31a93dfc9a14db7bb5510d25df0226d6fd3 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sun, 26 Sep 2021 01:24:13 +0100 Subject: add CommandLine() and Cbuf_Execute --- LauncherInjector/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'LauncherInjector') diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp index c335390b..e392b532 100644 --- a/LauncherInjector/main.cpp +++ b/LauncherInjector/main.cpp @@ -84,7 +84,7 @@ int main() { memset(&startupInfo, 0, sizeof(startupInfo)); memset(&processInfo, 0, sizeof(processInfo)); - CreateProcessW(PROCESS_NAME, (LPWSTR)L"-multiple -novid", NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &startupInfo, &processInfo); + CreateProcessW(PROCESS_NAME, (wchar_t*)L" -multiple -novid", NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &startupInfo, &processInfo); HMODULE hKernel32 = GetModuleHandleW(L"kernel32.dll"); LPTHREAD_START_ROUTINE pLoadLibraryW = (LPTHREAD_START_ROUTINE)GetProcAddress(hKernel32, "LoadLibraryW"); @@ -97,6 +97,9 @@ int main() { HANDLE hThread = CreateRemoteThread(processInfo.hProcess, NULL, NULL, pLoadLibraryW, lpLibName, NULL, NULL); WaitForSingleObject(hThread, INFINITE); + + MessageBoxA(0, std::to_string(GetLastError()).c_str(), "", MB_OK); + CloseHandle(hThread); ResumeThread(processInfo.hThread); -- cgit v1.2.3