1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49:
|
function ReadMemory(Adresse:String; Fenstername : string):string; var fensterhandle, processhandle : THandle; ProcessID : Cardinal; wert : integer; b : cardinal; i : integer; begin fensterhandle := FindWindow(nil, PChar(FensterName)); if fensterhandle = 0 then begin showmessage('Fenster kann nicht gefunden werden'); exit; end; GetWindowThreadProcessId(Fensterhandle, @ProcessId); processhandle := OpenProcess(PROCESS_ALL_ACCESS, false, ProcessId); readprocessmemory(processhandle, ptr(strtoint(adresse)), @wert, sizeof(wert), b); if b = sizeof(wert) then begin result := inttostr(puffer); end; end;
procedure TForm1.DOLIST(Grenze1, Grenze2, Fenstertitel, Wert : String); var i : integer; gA, gB : Integer; ZW : Integer; TeilerCount : Integer; begin gA := strToInt(Grenze1); gB := strToInt(Grenze2); ZW := gB - gA; TeilerCount := round(ZW div 100); for i := gA to gB do begin if ReadMemory('$' +inttoHex(i,2), FensterTitel)=Wert then begin listbox1.Items.add(ColorToString(clblue); end; if (i mod 500) = 0 then begin Application.ProcessMessages; gauge1.Position := round(i div TeilerCount); end; end; end; |