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 


Question about Readmemory... *****.dll+25E20 (c++)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
redhead
Cheater
Reputation: 0

Joined: 21 Mar 2007
Posts: 47

PostPosted: Wed Dec 12, 2007 12:28 pm    Post subject: Question about Readmemory... *****.dll+25E20 (c++) Reply with quote

Hey there.
In my programm, I need to know a value from an adress,usually it's np with readprocessmemory, but this time I found an adress with CE wich looks like:
*****.dll+25E20 instead of 6FAE5E20 ..(just an example).
this:
ReadProcessMemory(hProcess,(LPVOID)d2launch.dll+25E20,&Buffer,2,NULL);
ofc doesn't work... (if the adress would b 6FAE5E20, this just would go ReadProcessMemory(hProcess,(LPVOID)0x6FAE5E20,&Buffer,2,NULL)Wink
Any Idea?Thanks in advance
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Wed Dec 12, 2007 12:57 pm    Post subject: Reply with quote

So, you want to know the address of the DLL? ::GetModuleHandle();

You could clarify your question a bit..
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 Dec 12, 2007 2:18 pm    Post subject: Reply with quote

Jani wrote:
So, you want to know the address of the DLL? ::GetModuleHandle();

You could clarify your question a bit..


By looking at his code, I would guess hes not injected into the process. (ReadProcessMemory would be pointless if he was.) So GetModuleHandle() wont work in his case.

Instead, take a look at CreateToolhelp32Snapshot and Process32First/Process32Next as well as Module32First/Module32Next.

Process32First/Next will loop the processes on your system which you can use to locate the process you want to get the module list (and info) of. Then you can loop the Module tree and locate your module, in your case: d2launch.dll

The MODULEENTRY32 structure has an entry which holds the base address of the given module which is what you want when doing the dll+offset calculation. MODULEENTRY32.modBaseAddr is the entry you will want to use.

There are a few explains posted on this subject already in this section. And you can check out the MSDN for documentation on each API. (Some include examples.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Thu Dec 13, 2007 7:36 am    Post subject: Reply with quote

Wiccaan wrote:
By looking at his code, I would guess hes not injected into the process. (ReadProcessMemory would be pointless if he was.) So GetModuleHandle() wont work in his case.
redhead wrote:
In my programm,
Someone could understand that he's RPM'ing his own program (no idea why tho.)

I asked him to clarify his situtation.. :/
Back to top
View user's profile Send private message
redhead
Cheater
Reputation: 0

Joined: 21 Mar 2007
Posts: 47

PostPosted: Thu Dec 13, 2007 11:13 am    Post subject: Reply with quote

Sorry if it wasn't clear(hadn't mucht time, yesterday..).. Wiccaan was right, I'm looking to msdn atm, hope I'll understand all, thx.

EDIT:
Thx! Work's gr8 now Smile
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