From 047d5ea26a1529644b9648631f4d1412971a751c Mon Sep 17 00:00:00 2001 From: Alexander <87954949+absoluteSpacehead@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:19:46 +0000 Subject: [PATCH] ??? why --- MercuryInjector/dllmain.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MercuryInjector/dllmain.cpp b/MercuryInjector/dllmain.cpp index 151fd00..b784766 100644 --- a/MercuryInjector/dllmain.cpp +++ b/MercuryInjector/dllmain.cpp @@ -27,12 +27,11 @@ void SetSubGameHook(void* thisref, uint8_t SubGame) PWSTR rawLocalAppData; SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &rawLocalAppData); - std::wstring localAppData(rawLocalAppData); + std::wstring dllPath(rawLocalAppData); + dllPath += L"\\Mercury\\Mercury-1.8.dll"; CoTaskMemFree(rawLocalAppData); - std::wstring dllPath(localAppData + L"\\Mercury\\Mercury-1.8.dll"); - // reference https://github.com/ZeroMemoryEx/Dll-Injector/blob/master/DLL-Injector/Dll-Injector.cpp#L43 HANDLE fnHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId()); void* location = VirtualAllocEx(fnHandle, 0, MAX_PATH, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);