I am trying to display the XP on my toon, but I do not seem to be getting the correct value.
And I've tried a few times to get it to work.
I tried to print the dynamic address, I tried to print the pointer address. To me it seems like I've tried everything.
Code:
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
HWND hWnd = FindWindow(0, "World of Warcraft");
DWORD dwTA;
if (hWnd == 0)
{
cerr << "Open WoW first!" << endl;
}
else
{
DWORD pId;
GetWindowThreadProcessId(hWnd, &pId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
if (!hProc)
{
cerr << "Process is not active!" << endl;
}
else
{
while (true)
{
ReadProcessMemory(hProc, (void *) 0x1BEC9FF0, &dwTA, sizeof(DWORD), 0);
printf("Stored Value: %d\n",dwTA & 0x000FFFF);
Sleep(1000);
system("cls");
}
}
}
}
Anyone got any ideas?
I'm kinda tired so that might be it too.