Jump to content
Sign in to follow this  

Searching process memory for float value

Recommended Posts


I have to search some process for an 8 bytes float value. Let's say it is "189734.2243". Here is my code.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#Include <WinAPI.au3>
#Include <ProcessConstants.au3>

$cur = 0x00000000;

$pid = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS, False, ProcessExists("app.exe"));
$pBuffer = DllStructCreate("float");
$iRead = 0;

While 1
 _WinAPI_ReadProcessMemory($pid, $cur, DllStructGetPtr($pBuffer), 8, $iRead) ; here we read the memory

 $file = FileOpen("go.txt", 1);
 FileWrite($file, $pBuffer);
 If $pBuffer = 189734.2243 Then
  MsgBox(0, "Found!", $cur);
 $cur = $cur + 1;

It doesn´t work. Any suggestions?

Edited by cls

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.