- Code: Select all
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
DWORD bytes, wid;
HWND w3wnd = FindWindow(NULL, "gamename");
GetWindowThreadProcessId(w3wnd, &wid);
HANDLE w3hnd = OpenProcess(PROCESS_ALL_ACCESS, false, wid);
if (w3wnd==NULL)
{
printf("Not found...\n");
system("PAUSE");
return 0;
}
char* output[10];
void* pointer=&output;
ReadProcessMemory(w3hnd, (LPCVOID* )0x00442CD8 + 0x82C, pointer, 1, &bytes);
printf("%s", output);
system("PAUSE");
return 0;
}
I need to read TEXT from [00442CD8] + 0x82C but I didn't found any sources which would have done so. So what's wrong here?