mirror of
https://github.com/absoluteSpacehead/MercuryLauncher.git
synced 2026-01-13 03:02:21 +01:00
??? why
This commit is contained in:
@@ -27,12 +27,11 @@ void SetSubGameHook(void* thisref, uint8_t SubGame)
|
|||||||
|
|
||||||
PWSTR rawLocalAppData;
|
PWSTR rawLocalAppData;
|
||||||
SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &rawLocalAppData);
|
SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &rawLocalAppData);
|
||||||
std::wstring localAppData(rawLocalAppData);
|
std::wstring dllPath(rawLocalAppData);
|
||||||
|
dllPath += L"\\Mercury\\Mercury-1.8.dll";
|
||||||
|
|
||||||
CoTaskMemFree(rawLocalAppData);
|
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
|
// reference https://github.com/ZeroMemoryEx/Dll-Injector/blob/master/DLL-Injector/Dll-Injector.cpp#L43
|
||||||
HANDLE fnHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId());
|
HANDLE fnHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId());
|
||||||
void* location = VirtualAllocEx(fnHandle, 0, MAX_PATH, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
void* location = VirtualAllocEx(fnHandle, 0, MAX_PATH, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||||
|
|||||||
Reference in New Issue
Block a user