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 


Is this how you scan for a double values?

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

Joined: 15 May 2016
Posts: 47

PostPosted: Sun Oct 15, 2017 1:58 pm    Post subject: Is this how you scan for a double values? Reply with quote

The way to read double values is to set the buffer in the size of a double, right?

hence this line buffer = ctypes.c_double()

and then inside

if ReadProcessMemory(Process, i, ctypes.byref(buffer), \
ctypes.sizeof(buffer)
, ctypes.byref(nread)):

This is Python

Code:

    buffer = ctypes.c_double()
    nread = SIZE_T()


    hit_count = 0
    hit_pool_2 = list()

    for i in hit_pool:
        Kernel32.VirtualQueryEx(Process, \
        i, ctypes.byref(mbi),ctypes.sizeof(mbi))
       
        if mbi.Protect == PAGE_READWRITE and mbi.State == MEM_COMMIT :
            print('This region can be scanned!')

            if ReadProcessMemory(Process, i, ctypes.byref(buffer), \
                                 ctypes.sizeof(buffer), ctypes.byref(nread)):

                if buffer.value < (target_value + 1) and \
                buffer.value > (target_value - 1):

                    print(i,'Hit!!!')
                    hit_pool_2.append(i)

                           
            else:
                print('else happend.')
                input('program pause because ReadProcessMemory happened.')
        else:
            '2nd run VirtualQueryEx error'
   
    hit_pool = hit_pool_2
    print('Hit_pool', hit_pool)
    return hit_pool_2
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 Gamehacking 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