HelpC++ Pointers & Offset

Posts 1–2 of 2 · Page 1 of 1
C++ Pointers & Offset
Well, first go forward now apologize for the bad English, I am using a translator.
I have some doubts about Pointeirs and offsets, I can usually find them without difficulty (this is even more difficult, no?), The problem is I can not in any way to edit the memory game with them.
For example:

Code:
// 0x14C offset
// 0x00246954 pointer
int value = 100000;
WriteProcessMemory(hProcess, (LPVOID)(DWORD) (0x00246954 + 0x14C), (LPVOID) &value, sizeof(&value), NULL);
What's wrong with the code above? I saw him in a tutorial and there seemed to pick up perfectly, this is my question ... the Pointer Offset are correct and I'm sure more than absolute, tested more than 5 times and always fell on the same (using CHEAT ENGINE).

Since I am already grateful for replies and sorry if this is a silly question, I'm still beginner.

Regards.
You'r not reading the pointer to where it points to.
Read up some basics on pointer and you should understand them better.
Code:
DWORD dwAddy;
ReadProcessMemory( hProcess, (PVOID)0x00246954, &dwAddy, 4, 0 );
WriteProcessMemory( hProcess, (PVOID)( dwAddy + 0x14C ), &value, 4, 0 );
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?