求助,如何读取特定内存地址中的数据?
如题,要求纯AU3实现 坛友的,转载Write By 疯子
Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
If Not IsArray($ah_Handle) Then
SetError(1)
Return 0
EndIf
Local $v_Buffer = DllStructCreate($sv_Type)
If @error Then
SetError(@error + 1)
Return 0
EndIf
DllCall("kernel32.dll", 'int', 'ReadProcessMemory', 'int', $ah_Handle, 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If Not @error Then
Local $v_Value = DllStructGetData($v_Buffer, 1)
Return $v_Value
Else
SetError(6)
Return 0
EndIf
EndFunc;==>_MemoryRead 内存的读写有一套简单的UDF,看此贴:
http://www.autoitx.com/thread-18449-1-1.html
源码中下面一部分就是关于内存的
页:
[1]