♂◇◆♂◇◆在DFW没人能答的贴子♂◇◆♂◇◆谁能回答500分相送!
我想读取一程序在内存中的用户名和密码
用以下代码可以取得用户名,但是却得不到密码
到底是为什么,我在DFW顶了好几天贴子就是没人回答
哪位高手帮帮忙,必给500分!!!!
procedure TForm1.Timer1Timer(Sender: TObject);
var
WinHandle: HWND;
ProcessID: DWORD;
ProcessHandle: THandle;
S: String;
Bytes: DWORD;
begin
WinHandle := FindWindow(nil, 'XXX');
if WinHandle = 0 then Exit;
GetWindowThreadProcessId(WinHandle, ProcessID);
if ProcessID = 0 then Exit;
ProcessHandle := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessID);
if ProcessHandle = 0 then Exit;
try
SetLength(S, 10);
if ReadProcessMemory(ProcessHandle, Pointer($XXXXXX), PChar(S), 10, Bytes) then //注:内存地址正确,我用其它软件试过
listbox1.items.Add(s);
finally
CloseHandle(ProcessHandle);
end;
end;