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 mod base address

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

Joined: 09 Jan 2008
Posts: 84

PostPosted: Thu May 15, 2008 11:36 pm    Post subject: getting mod base address Reply with quote

what's the other way to get the module BaseAddress or the allocation base without using CreateToolhelp32Snapshot ??
_________________
Code:
XXXXXX      XXXXXX
   XXXXX  XXXXX
     XXXXXXXX
    D I R E C T
     XXXXXXXX
   XXXXX  XXXXX
XXXXXX      XXXXXX
      GameDev
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Thu May 15, 2008 11:58 pm    Post subject: Reply with quote

GetModuleInformation() inside of PSAPI.

Example:

Code:
#include <windows.h>
#include <iostream>

#include <psapi.h>
#pragma comment( lib, "psapi" )

int main( int argc, char* argcv[] )
{
   MODULEINFO mi = {0};
   GetModuleInformation( GetCurrentProcess(), GetModuleHandle( "psapi.dll" ), &mi, sizeof(mi) );

   return 0;
}

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
ShurikeN
Advanced Cheater
Reputation: 0

Joined: 09 Jan 2008
Posts: 84

PostPosted: Fri May 16, 2008 12:13 am    Post subject: Reply with quote

cool!
tnx master!!

_________________
Code:
XXXXXX      XXXXXX
   XXXXX  XXXXX
     XXXXXXXX
    D I R E C T
     XXXXXXXX
   XXXXX  XXXXX
XXXXXX      XXXXXX
      GameDev
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Fri May 16, 2008 2:32 am    Post subject: Reply with quote

Care to explain how thats wrong?
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Fri May 16, 2008 5:20 am    Post subject: Reply with quote

If you know the module's name, GetModuleHandle() is more than enough.

Last edited by DoomsDay on Sat May 17, 2008 4:59 am; edited 1 time in total
Back to top
View user's profile Send private message
thenicelordj
Cheater
Reputation: 0

Joined: 24 Mar 2007
Posts: 48
Location: I'm in your VCR

PostPosted: Fri May 16, 2008 5:34 am    Post subject: Reply with quote

x0r wrote:
Wiccaan wrote:
GetModuleInformation() inside of PSAPI.

Example:

Code:
#include <windows.h>
#include <iostream>

#include <psapi.h>
#pragma comment( lib, "psapi" )

int main( int argc, char* argcv[] )
{
   MODULEINFO mi = {0};
   GetModuleInformation( GetCurrentProcess(), GetModuleHandle( "psapi.dll" ), &mi, sizeof(mi) );

   return 0;
}

Wrong.


Does it really help if you just say he's wrong? Maybe you could have written a correction too.

_________________
I'm like a rubix cube, the more you play with me the harder I get.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Fri May 16, 2008 5:37 pm    Post subject: Reply with quote

Eh, think he jumped to conclusions cause I used GetCurrentProcess() which is correct and allowed to be used. x0r just enjoys trying to always be right, you'll learn to get used to it and ignore it. Wink
_________________
- 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