it returns only 8 numbers/Characters, where i need 9.
Example:
0BBCE9410 only shows as BBCE9410 which is not a problem because the first number is 0
But it is with 151B1D500 which returns as 51B1D500. so im missing the first character which is 1.
so when i try to read 51B1D500 it failes cus it doesnt point to anything.
How can i change to function so it shows the whole address? including the first character?
I already change the BYTE from 4 to 5 and it still doesn't work.
Code: Select all
ReadMemory(MADDRESS=0,PROGRAM="",MVALUE=" ",BYTE=5)
{
Static OLDPROC, ProcessHandle
if MVALUE := " "
VarSetCapacity(MVALUE,8,0)
If PROGRAM != %OLDPROC%
{
WinGet, pid, pid, % OLDPROC := PROGRAM
ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle"
,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"
,"Int",16,"Int",0,"UInt",pid) : 0)
}
If (ProcessHandle) && DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"str",MVALUE,"UInt",BYTE,"UInt *",0)
return *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE)
return !ProcessHandle ? "Handle Closed: " closed : "-2" ;changed to -2 myself
}
Please help, thanks~