比如我想读取程序名为yy.exe的程序里面的$11388A0 里面的数据.应该怎么写?
ar taskName:String;
i:integer;
TempHandle:Thandle;
TempID,tempAddress:Dword;
Ecode:integer;
hp:pansichar;
TempByte:Byte;begin
if ListView1.Selected<>nil then
begin
Val(ListView1.Selected.SubItems[0],TempID,Ecode);
end;
TempHandle:=OpenProcess(PROCESS_ALL_ACCESS,False,tempID);
Val('$009522B8',tempAddress,Ecode);
ReadMemory(CurrentProcessID,tempAddress,@tempByte,Byte_value);
edit1.text:=inttostr(tempByte);我是先把进程和进程ID写进liseview1里面.然后来选择该进程.最后进行读取.我想读取的程序009522B8数值应该是55为什么edit显示的数字为0??
ar taskName:String;
i:integer;
TempHandle:Thandle;
TempID,tempAddress:Dword;
Ecode:integer;
hp:pansichar;
TempByte:Byte;begin
if ListView1.Selected<>nil then
begin
Val(ListView1.Selected.SubItems[0],TempID,Ecode);
end;
TempHandle:=OpenProcess(PROCESS_ALL_ACCESS,False,tempID);
Val('$009522B8',tempAddress,Ecode);
ReadMemory(CurrentProcessID,tempAddress,@tempByte,Byte_value);
edit1.text:=inttostr(tempByte);我是先把进程和进程ID写进liseview1里面.然后来选择该进程.最后进行读取.我想读取的程序009522B8数值应该是55为什么edit显示的数字为0??
function TMyCanMusic.GetScore: integer;
var
Num: cardinal;
PHND: THandle;
PID, Score: Integer;
D :DWord;
begin
Self.FXXCANH :=FindWindow(nil,'MyCanMusic Stand Alone by NDogXJ <Final Unicode ver>');
if self.FXXCANH=0 then
begin
Result :=0;
exit;
end;
GetWindowThreadProcessId(self.FXXCANH, @PID);
PHND := OpenProcess(PROCESS_ALL_ACCESS,False,PID);
if PHND <> 0 then
ReadProcessMemory(PHND, Pointer($00455a00), @D, 4, Num);
d :=d+$28;
ReadProcessMemory(PHND, Pointer(d), @score, sizeof(score), Num);
//1.0.0.5版本
CloseHandle(PHND);
result :=Score;
end;
HANDLE hProcess, // handle of the process whose memory is read
LPCVOID lpBaseAddress, // address to start reading
LPVOID lpBuffer, // address of buffer to place read data
DWORD nSize, // number of bytes to read
LPDWORD lpNumberOfBytesRead // address of number of bytes read
);
你要考虑到你要读的那个数据是什么类型的数据.我们计算机都是高端存放数据.如果是$000A在内存中可能是 000A/0A00数据.如果你读了为零位当然是零拉!~~
我用CE找到了A的地址.009522B8'
用CE就可以看到这个地址的数字在变化
BUTOON1就可以看到