Autoit 内存只读返回 0

Autoit memory read only give back 0s

我正在用 AutoIt 学习记忆阅读。我目前的问题是,当我想读取一个地址时,它只返回 0。

这是我的代码:

#include "C:\Program Files (x86)\AutoIt3\Plugins\NomadMemory.au3"
$ID = _MemoryOpen(0x00000650)
$Address = 0x1AAFD6ECEC8

While 1
MemoryTest()
WEnd

Func MemoryTest()

$Test = _MemoryRead($Address,$ID)

Sleep(1000)
ConsoleWrite('Current address value: ' & $Test & @LF)

EndFunc

_MemoryClose($ID)

输出为:

Current address value: 0
Current address value: 0
Current address value: 0
Current address value: 0
Current address value: 0
Current address value: 0
Current address value: 0
...

同时地址没有变化(是3315),我用Cheat Engine仔细检查过

可能是什么问题?

_MemoryOpen()_MemoryRead() returns 0 失败。来自 NomadMemory.au3:

_MemoryOpen()

; Return Value(s):  On Success - Returns an array containing the Dll handle and an
;                                open handle to the specified process.
;                   On Failure - Returns 0
;                   @Error - 0 = No error.
;                            1 = Invalid $iv_Pid.
;                            2 = Failed to open Kernel32.dll.
;                            3 = Failed to open the specified process.

_MemoryRead()

; Return Value(s):  On Success - Returns the value located at the specified address.
;                   On Failure - Returns 0
;                   @Error - 0 = No error.
;                            1 = Invalid $ah_Handle.
;                            2 = $sv_Type was not a string.
;                            3 = $sv_Type is an unknown data type.
;                            4 = Failed to allocate the memory needed for the DllStructure.
;                            5 = Error allocating memory for $sv_Type.
;                            6 = Failed to read from the specified process.

您应该在调用每个函数后检查您的 @Error 值。