Hack Forums
[C] readprocessmemory - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] readprocessmemory (/showthread.php?tid=5744288)



readprocessmemory - Malentor - Oct 28, 2017

I'm practicing with ReadProcessMemory and I already know how to read a static memory address, today I watched around 10 tutorials and learnt how to get a pointer, I have found it because every time I open the game again its pointing to the same address.

INow I want to read the hp with my program (but unsure what to put (see red letters))


ReadProcessMemory(hwnd, (LPCVOID) (WhatIputHere?), &hp, sizeof(hp) ,0);


[Image: db1a3dc3765567c0c5d80cbf3fbe1e88.png][Image: 3ad4bcd3c635ece1bb6776f1aa93affb.png]

any help is appreciated!


RE: readprocessmemory - terribleopsecisterrible - Oct 28, 2017

put the address you want to read there.


RE: readprocessmemory - d4rkj4y - Oct 28, 2017

"lpBaseAddress [in]

A pointer to the base address in the specified process from which to read. Before any data transfer occurs, the system verifies that all data in the base address and memory of the specified size is accessible for read access, and if it is not accessible the function fails.
"

So in english the address in memory where that process starts.


RE: readprocessmemory - Mouse❤️ - Oct 28, 2017

(Oct 28, 2017 10:55 AM)d4rkj4y Wrote:  "lpBaseAddress [in]

   A pointer to the base address in the specified process from which to read. Before any data transfer occurs, the system verifies that all data in the base address and memory of the specified size is accessible for read access, and if it is not accessible the function fails.
"

So in english the address in memory where that process starts.

Not the memory where the process starts. The memory in which you're reading.


RE: readprocessmemory - d4rkj4y - Oct 28, 2017

(Oct 28, 2017 04:25 PM)Mouse❤️ Wrote:  Not the memory where the process starts. The memory in which you're reading.

My bad, the relative address, it's been a while  🤦‍♂


RE: readprocessmemory - Malentor - Oct 29, 2017

Yeah guys but now problem is I am not reading an address anymore. Now I want to read a pointer.

How I can read a pointer value?


RE: readprocessmemory - Mouse❤️ - Oct 29, 2017

A pointer is an address. It even lists it there for you. 006B3B40 - that is your address. Your address is 0x006B3B40


RE: readprocessmemory - int main() - Oct 30, 2017

(Oct 29, 2017 07:18 AM)Malentor Wrote:  Yeah guys but now problem is I am not reading an address anymore. Now I want to read a pointer.

How I can read a pointer value?

A pointer is an address containing an address which could go further if its a multi level one which is what you have there

Read it the same way you'd do a regular one for an example: basegame + basegameoffset(pointer) = localplayer

localplayer + offset(eg: 0xf0) = your speed or w/e then write like 100 to this value
https://#.com/showthread.php?612-C-Writing-Multi-Level-Pointer