cls Posted March 24, 2011 Posted March 24, 2011 (edited) 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); FileClose($file); If $pBuffer = 189734.2243 Then MsgBox(0, "Found!", $cur); Exit EndIf $cur = $cur + 1; WEnd It doesn´t work. Any suggestions? Edited March 24, 2011 by cls
jvanegmond Posted March 24, 2011 Posted March 24, 2011 Try getting the data from the struct with DllStructGetData. github.com/jvanegmond
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now