Sign in to follow this  
Followers 0
D.M.

I can't read a text from memory

2 posts in this topic

Hi all,

I need to read a value from this adress:

Address: 00A25260

Type: 5 Bytes Text

But i can't, i'm trying to use this code:

$pid = ProcessExists("teste.exe")

If $pid = 0 Then Exit

$pHandle = DllCall("kernel32.dll", "int", "OpenProcess", "int", 0x1F0FFF, "int", 0, "int", $pid)

If IsArray($pHandle) And $pHandle[0]> 0 Then

$pHandle = $pHandle[0]

Else

MsgBox(16, "OpenProcess Error!", "Could not open the process for reading/writing")

Exit

EndIf

$float = DllStructCreate("float")

$ret = DllCall("kernel32.dll", "int", "ReadProcessMemory", "int", $pHandle, "int", 0xA25260, "ptr", DllStructGetPtr($float), "int", 4, "int", 0)

If IsArray($ret) Then

MsgBox(64, "float", "$float data: " & DllStructGetData($float, 1))

EndIf

DllStructDelete($float)

But without sucess, the scripts return me a incorrect value , someone can help?

Regards

Share this post


Link to post
Share on other sites



I did it :)

$Process = "teste.exe"

$Pid = ProcessExists($Process)

$h_open = _MemOpen($pid)

$Read = _MemRead($h_open,0xA25260)

MsgBox(0, "Test Box", "Test: " & $Read)

Return $Read

_MemClose($h_open)

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  
Followers 0