aboutsummaryrefslogtreecommitdiff
path: root/LauncherInjector/main.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-26 01:24:13 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-26 01:24:13 +0100
commite98fc31a93dfc9a14db7bb5510d25df0226d6fd3 (patch)
tree0a14184023e46394ee7bc83846c4466f7e3f14c9 /LauncherInjector/main.cpp
parentf083706eb05a22ec166d8e29b565f93785ad3cb0 (diff)
downloadNorthstarLauncher-e98fc31a93dfc9a14db7bb5510d25df0226d6fd3.tar.gz
NorthstarLauncher-e98fc31a93dfc9a14db7bb5510d25df0226d6fd3.zip
add CommandLine() and Cbuf_Execute
Diffstat (limited to 'LauncherInjector/main.cpp')
-rw-r--r--LauncherInjector/main.cpp5
1 files changed, 4 insertions, 1 deletions
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);