Pointer and adress
I've got adress and pointer of this adress (using CheatEngine) and need to get value of this adress in C++ program, when using first(dynamic - 0EE06390) adress all was ok, but when I wont to use adress of pointer (0018926C) program return stupid numbers, anywone can help me ?
Code:
#include <iostream>
#include <windows.h>
using std::cout;
using std::endl;
int main(void)
{
int money;
HWND GameWindow = FindWindow(0, "Plants vs. Zombies");
if(GameWindow)
{
DWORD ProcessID;
cout << "Znalazlem okno gry. Zczytuje pamiec" << endl << endl;
GetWindowThreadProcessId(GameWindow, &ProcessID);
HANDLE Proces = OpenProcess(PROCESS_VM_READ, false, ProcessID);
ReadProcessMemory(Proces, (PCVOID)0x0EE06390, &money, sizeof(PVOID), 0);
cout << money;
}
}
That was my problem. Pointer returning adress and i don't know what is this 