| View previous topic :: View next topic |
| Author |
Message |
Draconix How do I cheat?
Reputation: 0
Joined: 29 Dec 2009 Posts: 1
|
Posted: Tue Dec 29, 2009 10:45 am Post subject: Tutorial for C++ and reading Pointers |
|
|
Hi there,
excuse my very bad english
I have a pointer for a ram position, but i dont know how to read it with C++ or with Visual Basic.
I don't wont to change the value at this position. I only need to read it.
Can anybody help me :/
many thx!!!
|
|
| Back to top |
|
 |
Xenico Advanced Cheater
Reputation: 0
Joined: 27 Dec 2009 Posts: 94
|
Posted: Tue Dec 29, 2009 10:52 am Post subject: |
|
|
| Use the ReadProcessMemory() function
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Dec 29, 2009 10:53 am Post subject: |
|
|
ReadProcessMemory()
Or if you're already in that virtual memory space, typecast your address as a pointer to that particular datatype then dereference it
|
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Tue Dec 29, 2009 11:27 pm Post subject: |
|
|
ReadProcessMemory()
| Code: |
HWND Target_HWND = FindWindow(ClassName, WindowTitle);
DWORD PID;
GetWindowThreadProcessId(Target_HWND, &PID);
HANDLE hTarget = OpenProcess(PROCESS_ALL_ACCESS, false, &PID);
int Value = YourValue;
LPCVOID Address = (LPCVOID) Address;
DWORD BytesRead;
ReadProcessMemory(hTarget, Address, &Value, 2, &BytesRead);
|
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Dec 30, 2009 8:52 am Post subject: |
|
|
| iPromise wrote: | ReadProcessMemory()
| Code: |
HWND Target_HWND = FindWindow(ClassName, WindowTitle);
DWORD PID;
GetWindowThreadProcessId(Target_HWND, &PID);
HANDLE hTarget = OpenProcess(PROCESS_ALL_ACCESS, false, &PID);
int Value = YourValue;
LPCVOID Address = (LPCVOID) Address;
DWORD BytesRead;
ReadProcessMemory(hTarget, Address, &Value, 2, &BytesRead);
|
|
GetProcessHandleFromHwnd()
Also don't OpenProcess with PROCESS_ALL_ACCESS.
And close your handles. And that is a messed up way of typecasting.
|
|
| Back to top |
|
 |
|