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 


Getting API's memory addresses

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

Joined: 03 Aug 2007
Posts: 17

PostPosted: Fri Aug 03, 2007 2:58 pm    Post subject: Getting API's memory addresses Reply with quote

This is my method to get API memory addresses.

Lets say if I wanted to find out where GetConsoleTitle address is so I can change the title...etc.


Code:

.data

GCTAddr dd ?

.code
start:
push offset GetConsoleTitle
push eax
call GetProcAddress
mov GCTAddr,eax


Smile
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Aug 03, 2007 3:01 pm    Post subject: Reply with quote

I doubt anyone that could make use of this doesn't know about this. try something better
Back to top
View user's profile Send private message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Fri Aug 03, 2007 4:19 pm    Post subject: Reply with quote

Or in C/C++ with Windows API: for example getting MessageBoxA

DWORD msgbox = (DWORD)GetProcAddress(LoadLibrary("User32.dll"), "MessageBoxA");

And as you probably know GetProcAddress is a wrapper that eventually calls LdrGetProcedureAddress so you could speed up it that way too
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Aug 03, 2007 10:56 pm    Post subject: Reply with quote

Even if it is loaded, LoadLibrary will just increase the reference count and return a valid handle. And if you don't like that, you could use LoadLibraryEx.
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