Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HWND hwnd = FindWindow("LWJGL", "Minecraft 1.8.9");
- DWORD process_id;
- GetWindowThreadProcessId(hwnd, &process_id);
- HANDLE process_handle = OpenProcess(PROCESS_ALL_ACCESS, false, process_id);
- char dll[MAX_PATH];
- GetFullPathNameA(DLL_DIRECTORY_HERE, MAX_PATH, dll, NULL);
- LPVOID memory = VirtualAllocEx(process_handle, 0, sizeof(dll), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
- WriteProcessMemory(process_handle, memory, dll, sizeof(dll), 0);
- CreateRemoteThread(Process, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibrary, (LPVOID)Memory, NULL, NULL);
- LoadLibrary = (LPVOID)GetProcAddress(GetModuleHandle("example.dll"), "LoadLibraryA");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement