我用以下函数想获取内存里面的字符串,不知为何用StrGet函数返回的是乱码或者空值,用NumGet是可以获取到的。
GetAddressFromAddress(address,byteCount,pidd)
{
VarSetCapacity(value,byteCount,0)
roHandle := DllCall(“OpenProcess”, “UInt”, 16, “Int”, false, “UInt”, pidd ) ;打开进程
DllCall(“ReadProcessMemory”,”UInt”,roHandle,”UInt”,address,”Str”,value,”UInt”,byteCount,”UIntP”,0)
DllCall(“CloseHandle”, “UInt”, roHandle) ; 关闭进程句柄
return StrGet(value,16,0)
}