c++ need help about read/write process memory
hey guys!
firstly i am not american or something so my English isn't good.sorry about it.I want to make bots,hacks for games.I met with c++,read/write process memory.I tried first money,hp,mana shower.but as you guess i couldn't.so i want to help from you.actually i made a video about what i did but video was 4gb so i couldn't upload it to youtube.whatever;
i'm opening game,cheat engine and c++ as administrator,i'm searching my money on cheat engine then i found.i found one adress.then i went to game.I spent my money some.I looked at Cheat Engine and value is changed correctly.then i'm going to c++ writing this codes and run;
and my c++ program is showing value 0 or 503150133 something like this.cheat engine is working finely.but c++ is not.help me please.
firstly i am not american or something so my English isn't good.sorry about it.I want to make bots,hacks for games.I met with c++,read/write process memory.I tried first money,hp,mana shower.but as you guess i couldn't.so i want to help from you.actually i made a video about what i did but video was 4gb so i couldn't upload it to youtube.whatever;
i'm opening game,cheat engine and c++ as administrator,i'm searching my money on cheat engine then i found.i found one adress.then i went to game.I spent my money some.I looked at Cheat Engine and value is changed correctly.then i'm going to c++ writing this codes and run;
Code:
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address = 0x100579C; // This is the address that we want to read from
int value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window
hwnd = FindWindow(NULL,"EpicDuel - PvP MMORPG Play Now - Opera"); //Finds the Window
if(!hwnd) //If none, display an error
{
cout <<"Window not found!\n";
cin.get();
}
GetWindowThreadProcessId(hwnd,&pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid); //Get permission to read
if(!phandle) //Once again, if it fails, tell us
{
cout <<"Could not get handle!\n";
cin.get();
}
while(1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle,(void*)0x068474A8,&value,sizeof(value),0); //i changed adress with what i found on cheat engine.
cout << value << "\n"; //Display it
Sleep(1000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}

i guess i am not smart.