Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Module Address and Pointer are different

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Acidic92
Newbie cheater
Reputation: 0

Joined: 09 Sep 2017
Posts: 20

PostPosted: Wed Apr 25, 2018 11:44 pm    Post subject: Module Address and Pointer are different Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 352

Joined: 09 May 2003
Posts: 20501
Location: The netherlands

PostPosted: Thu Apr 26, 2018 12:13 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Acidic92
Newbie cheater
Reputation: 0

Joined: 09 Sep 2017
Posts: 20

PostPosted: Thu Apr 26, 2018 12:28 am    Post subject: Solved Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites