ReadProcessMemory
Its funny how this went from memory reading to when we started C++
Registered to say thank you for this tutorial and explanation.
Can you explain how to read from static pointer? I don't have code for it.
Can you explain how to read from static pointer? I don't have code for it.
Old thread I know...
but this is my code where I have a base pointer and an offset and it gives me weird shit. I am using the game assault cube.
but this is my code where I have a base pointer and an offset and it gives me weird shit. I am using the game assault cube.
Code:
#include <iostream>
#include <conio.h>
#include <windows.h>
int main()
{
DWORD base = 0x00509B74;
DWORD offset = 0xF8;
int value = 0;
int memes = 0;
int k = 100;
unsigned long address = value + offset;
HWND pWND = FindWindow(0, ("AssaultCube"));
DWORD pID;
GetWindowThreadProcessId(pWND, &pID);
std::cout << "pID = " << pID << std::endl;
HANDLE hPROC = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);
int i = ReadProcessMemory(hPROC, (LPCVOID*)base, (LPVOID)(&value), (DWORD)sizeof(int), NULL);
int ii = ReadProcessMemory(hPROC, (LPCVOID*)address, (LPVOID)(&k), (DWORD)sizeof(int), NULL);
std::cout << k << std::endl;
std::cout << std::hex << k << std::dec << " = " << k << std::endl;
_getch();
return 0;
}
Thank you!
So what can you do with this information like the DWORD Pid and INT Value?
Thank you, this will help me out a ton.



