I have a litle, propabely easy isue. i been readig this forums and google alot but i cant find answers.
i have found some memmory adressess in cheatengine.
00CBBBD0
00CBBBD4
00CBBBE0
49D1D0E0
39D1D0E4
i placed the adressess seperated wich are related.
do i need to find a base adress then and offsets? And how do i have to do that or can i simply read the adresses like that.
that brings me to the next problem.
how should i retrieve the value of these adresses and cout them with c++
the adresses are from a game thus not from the application i try to make.
i have used this code i found on the forum and i tryed to edit it some but i cant get it to work. i guess i go wrong with the propper adresses.
Code:
#include <windows.h>
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
HWND WarWindow = ::FindWindow(0, "Warhammer: Age of Reckoning, Copyright 2001-2009 Electronic Arts, Inc.");
DWORD pid;
GetWindowThreadProcessId(WarWindow, &pid);
/*
Had some troubles with
getting PROCESS_ALL_ACCESS
work with Windows Vista.
Should be working now though.
*/
HANDLE h_Proc = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, false, pid);
if(!WarWindow)
{
cout << "Warhammer not found\n";
cin.get();
return 0;
}
/*
addr is the adress where our player
pointer is stored.
*/
int BaseAdress;
int addr = 13351888;
/*
Get the base adress from the player pointer adress
*/
if(ReadProcessMemory(h_Proc, (void*)(addr), &BaseAdress, sizeof(int), NULL) == 0)
cout << "Could not read memory, sure WAR is running?" << endl;
struct Waypoint{
float X;
float Y;
};
Waypoint myWaypoint;
/*
Read the memory at our
X & Y adresses.
*/
cout<<ReadProcessMemory(h_Proc, (void*)(BaseAdress+(int)0x2c), &myWaypoint.X, sizeof(float), NULL);
cout<<ReadProcessMemory(h_Proc, (void*)(BaseAdress+(int)0x28), &myWaypoint.Y, sizeof(float), NULL);
cin.get();
}
i dont remember who was the author of this code.
So can anyone help me out here how to convert my adresses into a base + offset or edit the code so it will work with the adresses i found.
thanks in advance, greetings