I'm trying to do a null variable to + memory adresses and offsets without giving the error "The variable has not been assigned a value". But I don't know how create one. PD: I have #warn.
This is the function I use for read memory adresses:
Code: Select all
ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
return, result
}
Code: Select all
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)