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 


Scan speed

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source
View previous topic :: View next topic  
Author Message
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Jan 12, 2010 3:34 pm    Post subject: Scan speed Reply with quote

Hi, I am making my own memory editor, (A piece of crap, really. It was only to see if I could), and I was wondering how CE scans so fast?

My current setup is making a For Loop from 00000000 to FFFFFFFF with a ReadProcessMemory call and this seems to take ages. (I haven't actually let it run as it takes WAY too long)

Is there a better way to do this? Does CE use something such as a DLL that I could use instead? Do I need to say anything else?

Thank you!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Tue Jan 12, 2010 3:50 pm    Post subject: Reply with quote

make sure you limit the number of windows api calls to the bare minimum
Instead of calling readprocessmemory for every byte, call it to read big chunks of memory and evaluate that
And to figure out what blocks to read, use VirtualQueryEx to find the size and location of readable blocks

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Jan 12, 2010 4:21 pm    Post subject: Reply with quote

Hmm, I guess I will have to read up to figure this out.

I figured it would have to do with reading larger blocks at a time, but didn't think about how to process them.

Thanks for the help.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Jan 12, 2010 7:02 pm    Post subject: This post has 1 review(s) Reply with quote

you could also multithread your processing. furthermore you probably only intend to scan usermode memory in which case up to 7fffffff is enough. in fact getsysteminfo() will help you ascertain min/max application address
Back to top
View user's profile Send private message
KryziK
Expert Cheater
Reputation: 3

Joined: 16 Aug 2009
Posts: 199

PostPosted: Tue Jan 12, 2010 7:04 pm    Post subject: Reply with quote

No multithreading unfortunately.

Edit:

Dark Byte wrote:
make sure you limit the number of windows api calls to the bare minimum
Instead of calling readprocessmemory for every byte, call it to read big chunks of memory and evaluate that
And to figure out what blocks to read, use VirtualQueryEx to find the size and location of readable blocks


So does this mean I should use ReadProcessMemory with a 32 or 64 bit type? How could I split it up into the specified type?

What is VirtualQueryEx specifically for? I have a way to get the Base address if it has anything to do with that.
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sat Apr 03, 2010 11:56 am    Post subject: Reply with quote

VirtualQueryEx will return to you the memory page information the MEMORY_BASIC_INFORMATION structure from the address. It can be any address, it doesn't have to be the base of the memory region. Read up MSDN on VirtualQueryEx.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source 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