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 


Cheat Engine Forum Index
PostGo back to topic
tombana
Master Cheater
Reputation: 2
Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Sun Apr 04, 2010 12:57 pm    Post subject:

slovach wrote:
why the second for loop?

for i = min address; i <= max; i += region size
virtualquery for delicious informations, do whatever with it
go hog wild

Wouldn't calling virtualquery on every address slow things down?

@iPromise: something like this:
Code:
for (DWORD addr = lpStartAddress; addr <= lpStopAddress; )
{
   S = VirtualQuery((LPCVOID) addr, &MBI, sizeof(MEMORY_BASIC_INFORMATION));
   
   if( MBI.Protect == PAGE_READWRITE ){ //And other protections like execute and so on
      
      for (DWORD i = MBI.BaseAddress; i <= ((DWORD) MBI.BaseAddress + (DWORD) MBI.RegionSize); i++)
      {
         ...
      }
      
   }
   
   addr = ((DWORD) MBI.BaseAddress + (DWORD) MBI.RegionSize);
}
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
iPromise
Review: Approve
Post reference:
ReviewPosted: Sun Apr 04, 2010 1:58 pm

very helpful
Back to top
View user's profile Send private message MSN Messenger
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites