Problem when I reading memory! Please help!!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
stevetsim
Posts: 2
Joined: 06 Aug 2017, 17:26

Problem when I reading memory! Please help!!

14 Aug 2017, 14:59

i have a problem with the ReadMemory Function.

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
}
I am using windows 8.1 64 and AutoHotkey_1.1.26.01 64.
Please help, thanks~

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: coder96, Google [Bot], RandomBoy, Rohwedder and 177 guests