aur/main.cpp
Kent Slaney d5cef39b90 2.58-2
2025-10-05 12:42:08 -07:00

24 lines
767 B
C++

#include "DllInjector.h"
#include <iostream>
int wmain(int argc, wchar_t* argv[]) {
std::wstring ps = L"RocketLeague.exe";
const wchar_t* launcher = L"C:\\users\\steamuser\\AppData\\Roaming\\bakkesmod\\bakkesmod\\dll\\bakkesmod.dll";
DllInjector dllInjector;
bool launching = false;
for (int i = 1; i < argc; i++) {
auto arg = std::wstring(argv[i]);
if (arg == L"launching") {
launching = true;
}
}
if (launching) {
std::cout << "Injector waiting for launch" << std::endl;
while (dllInjector.GetProcessID64(ps) == 0) {
Sleep(1000);
}
std::cout << "Found PID, attempting injection" << std::endl;
}
dllInjector.InjectDLL(ps, launcher);
return 0;
}