Reading Memory Pointers

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
FireCulex
Posts: 3
Joined: 30 Nov 2021, 15:05

Reading Memory Pointers

30 Nov 2021, 15:13

Code: Select all

#SingleInstance Force
#Include c:\users\culex\documents\classMemory.ahk ; Available from https://github.com/Kalamity/classMemory

F3::

mem := new _ClassMemory("ahk_exe SkyrimSE.exe", "", hProcessCopy) 
if !isObject(mem)
    msgbox failed to open a handle
if !hProcessCopy
    msgbox failed to open a handle. Error Code = %hProcessCopy%

msgbox % mem.BaseAddress
value := mem.read(mem.BaseAddress + 0x02FC06B8, "Float", 0x18, 0x30, 0x190, 0x348)
msgbox % "results:" value
 
return
cheatengine-x86_64-SSE4-AVX2_JFWZpcviHw.png
cheatengine-x86_64-SSE4-AVX2_JFWZpcviHw.png (14.51 KiB) Viewed 816 times
AutoHotkey_blKa2g4lTf.png
AutoHotkey_blKa2g4lTf.png (2.67 KiB) Viewed 816 times
AutoHotkey_WkqPWgCSzB.png
AutoHotkey_WkqPWgCSzB.png (2.03 KiB) Viewed 816 times

Can't figure out why my results is blank?
User avatar
boiler
Posts: 16931
Joined: 21 Dec 2014, 02:44

Re: Reading Memory Pointers

30 Nov 2021, 15:32

To troubleshoot, follow what is shown in classMemory.ahk for the read() method’s null return value:
Null - Indicates failure. Check ErrorLevel and A_LastError for more information.
FireCulex
Posts: 3
Joined: 30 Nov 2021, 15:05

Re: Reading Memory Pointers

30 Nov 2021, 16:03

boiler wrote:
30 Nov 2021, 15:32
To troubleshoot, follow what is shown in classMemory.ahk for the read() method’s null return value:
Null - Indicates failure. Check ErrorLevel and A_LastError for more information.
ErrorLevel 0 A_LastError 299

edit: per https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
ERROR_PARTIAL_COPY

299 (0x12B)

Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
FireCulex
Posts: 3
Joined: 30 Nov 2021, 15:05

Re: Reading Memory Pointers

30 Nov 2021, 17:36

After messing around with ReadMemory and going by each individual offsets I was able to determine they are supposed to be in reverse from Cheat Engine.

Code: Select all

value := mem.read(mem.BaseAddress + 0x02FC06B8, "Float", 0x348, 0x190, 0x30, 0x18)
AutoHotkey_5dpDT44c5j.png
AutoHotkey_5dpDT44c5j.png (2.38 KiB) Viewed 714 times

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: wilkster and 324 guests