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 


C++ Using pointers address

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
zarut
How do I cheat?
Reputation: 0

Joined: 29 Jul 2006
Posts: 5

PostPosted: Tue Apr 15, 2008 8:12 am    Post subject: C++ Using pointers address Reply with quote

How can i use pointer address in c++ the address looks like this LieroX.exe+00041008 since the address of my z,x,y changes everytime i close game i had to use pointer to find real one always so if its possible use this in c++ and how could it be done?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Tue Apr 15, 2008 8:28 am    Post subject: Reply with quote

Module Base Address+X.
Back to top
View user's profile Send private message
zarut
How do I cheat?
Reputation: 0

Joined: 29 Jul 2006
Posts: 5

PostPosted: Tue Apr 15, 2008 9:01 am    Post subject: Reply with quote

hmm what is exactly module base address and that + x?
example would be nice too Rolling Eyes
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Apr 15, 2008 9:48 am    Post subject: Reply with quote

He gave you the 'math' for code shifting type things.

Base + Offset = Address
Address - Base = Offset

Every module that is loaded into a programs memory space has a base address of where it starts. You need this base address to calculate the offset to use next time the program is loaded.

You can obtain the base address of a module using the following API:
- CreateToolhelp32Snapshot
- Process32First / Process32Next
- Module32First / Module32Next

Google 'em for examples, as they are used very commonly now-a-days.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
zarut
How do I cheat?
Reputation: 0

Joined: 29 Jul 2006
Posts: 5

PostPosted: Tue Apr 15, 2008 2:38 pm    Post subject: Reply with quote

So far i think i found the base address that is 00400000 and other address is 01EA4BA0 so how do i start subract these? im not sure about those letters so no idea how i get offset out from those two address
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Tue Apr 15, 2008 3:10 pm    Post subject: Reply with quote

01EA4BA0 is probably not in the main module, (base address 0x400000) try finding a static pointer.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Apr 16, 2008 10:39 am    Post subject: Reply with quote

zarut wrote:
So far i think i found the base address that is 00400000 and other address is 01EA4BA0 so how do i start subract these? im not sure about those letters so no idea how i get offset out from those two address


As Symbol said, thats probably not the correct base address. 00400000 is commonly the base address given to a program. (VB6 defaults to this memory address.)

While you have CE attached to the program, open the memory editor and goto the menu:

View -> Enumerate DLL's and Symbols

As you said your address was located at 01EA4BA0, look for a module that is close (but less then) that address. Something like 01E00000.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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