Delphi怎么读取内存字符串?
我要读取游戏里的人物角色名,但是读取不到,代码如下:var
WHwnd1: hwnd ;
ProcessID,Base,Num:dword;
P_Name:array of char;
PHND1: THandle;
begin
ReadProcessMemory(PHND1, Pointer($9B2AE4), @Base, 4, Num);
ReadProcessMemory(PHND1, Pointer(Base+$70), @Base, 4, Num);
ReadProcessMemory(PHND1, Pointer(Base+$1e8), @Base, 4, Num);
ReadProcessMemory(PHND1, Pointer(Base+$4), @Base, 4, Num);
ReadProcessMemory(PHND1, Pointer(Base+$34), @P_Name,20, Num);
Label1.Caption :=P_Name;
end;
CE里面可以正常显示
自己决绝了,代码没问题,原因是用错了OpenProcess的进程ID变量导致的.:loveliness:
页:
[1]