So I tried to read the static memory address for player X address in C++ and it didnt work. I have cheat engine open with the same memory address being viewed with the correct X location.
The current output is just 2. always 2. Im running vista and there is always problems with my permissions. I thought OpenProcess as ACCESS_ALL and running as administrator would do the trick but I guess not.
heres my code
Code:
#include <cstdlib>
#include <iostream>
#include <Windows.h>
//memory addresses
DWORD PLAYER_X = 0x012E1B7C;
int main(int argc, char *argv[])
{
long x;
unsigned long pID;
HWND hWnd = FindWindow(NULL, "World of Warcraft");
GetWindowThreadProcessId(hWnd, &pID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);
ReadProcessMemory(hProcess, (LPVOID) PLAYER_X, &x, sizeof(x), NULL);
std::cout<< x << "\n";
system("PAUSE");
return EXIT_SUCCESS;
}