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 


Base Adress of a PROCESS in "0x0..." Format

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

Joined: 28 Jan 2015
Posts: 1

PostPosted: Wed Jan 28, 2015 9:06 pm    Post subject: Base Adress of a PROCESS in "0x0..." Format Reply with quote

Hello Guys,

i got the following problem.

I am able to get the base adress with the following command:

Code:
dwModuleBaseAddress = (DWORD)ModuleEntry32.modBaseAddr;


My function returns this back to me as DWORD.

my return value is this: 131072

since my code should looks like this 0x798A6D24 , the FORMAT is wrong.
Code:
ReadProcessMemory(PROCESS, (LPVOID)0x798A6D24, &MEM_VALUE, sizeof(int), NULL);


How do i get this value to a proper format of "0x...." ?? I need the HEX value or not?

or did i understand something wrong here?

Regards[/i][/u]
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: Thu Jan 29, 2015 12:56 am    Post subject: Reply with quote

The value is fine, just cast it to an LPVOID.

Code:
ReadProcessMemory(PROCESS, (LPVOID)dwModuleBaseAddress, &MEM_VALUE, sizeof(int), NULL);

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Fri Jan 30, 2015 5:54 am    Post subject: Reply with quote

131072 is 0x20000 in hexadecimal. They are the same exact value, and you don't need to use a specific one. The only requirement is casting it, like atom0s said.
Back to top
View user's profile Send private message
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