Jump to content

_MemoryPointerRead Problem


zikenzie
 Share

Recommended Posts

Hi, I am trying to Read from pointer. And value is always 0. Here is my code:

$Adresse = 0x0057c370
Dim $Offset[2] = [0, 0x0]
While 1
$Process = _MemoryOpen(ProcessExists("Tutorial-i386.exe"))
If Not @error Then
  $Value = _MemoryPointerRead($Adresse, $Process, $Offset)
  If Not @error Then ToolTip($Value[1], 0, 0)
  _MemoryClose($Process)
EndIf
Sleep(100);<<<<<<< Note this sleep this is how fast we read memory
WEnd

The pointer address and offset is true.

The result is always $value[1] = 0

And I am using the latest version of NomadMemory. Thank you for your helps.

Edited by zikenzie
Link to comment
Share on other sites

You guys need to post a reproducer (short, working example script), saying "it doesn't work" means nothing.

Not only will many people ignore threads that don't provide the basics, but when someone still tries to help they often can't reproduce the error since it was the poster who did something wrong!

And that is quite possibly what happens now.

#include "NomadMemory.au3"

$struct = DllStructCreate("dword")
DllStructSetData($struct, 1, 11)
$ptr = DllStructGetPtr($struct)

$memory = _MemoryOpen(@AutoItPID)
ConsoleWrite(_MemoryRead($ptr, $memory) & @LF)
_MemoryWrite($ptr, $memory, 22)
ConsoleWrite(DllStructGetData($struct, 1) & @LF)

Runs fine.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...