View previous topic :: View next topic |
Author |
Message |
Acidic92 Newbie cheater Reputation: 0
Joined: 09 Sep 2017 Posts: 22
|
Posted: Wed Apr 25, 2018 11:44 pm Post subject: Module Address and Pointer are different |
|
|
I'm trying to get my found static address with offsets into a C++ program, but I am having trouble getting the same address for the module that CheatEngine shows.
In my cheat table, I have two entries..
#1 SpeedRunners.exe F80000
#2 SpeedRunners.exe Pointer P->905A4D
I am using a function found online in C++ 'GetModuleBaseAddress' and I use this with 'SpeedRunners.exe' and it returns a value of 0xF80000 which is correct for the entry #1... but my aim is to get a value of 0x905A4D instead because this is needed along with some offsets to get my final address...
Why are the two entries different and how can I get the value of entry #2 in my C++ code?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Thu Apr 26, 2018 12:13 am Post subject: |
|
|
you're mixing up the offset of the module with the offsets of the pointers
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Acidic92 Newbie cheater Reputation: 0
Joined: 09 Sep 2017 Posts: 22
|
Posted: Thu Apr 26, 2018 12:28 am Post subject: Solved |
|
|
As I was writing this question it clicked and I tried it after posting and it worked... so it's as simple as reading the memory address of my entry #1 and the value of that should be entry #2...
Code: | DWORD speedRunnersBaseAddr = GetModuleBaseAddress(pid, "SpeedRunners.exe");
DWORD speedRunnersPointerBaseAddr;
ReadProcessMemory(hProcess, (LPCVOID)speedRunnersBaseAddr , &speedRunnersPointerBaseAddr, sizeof(DWORD), nullptr); |
I hope this might help someone in the future.
|
|
Back to top |
|
|
|