unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
Edit1: TEdit;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
Var WindowName : integer;
ProcessId : integer;
ThreadId : integer;
buf : PChar;
HandleWindow : Integer;
write : cardinal;
Const WindowTitle = '
3D-Pinball für Windows - Space Cadet';
Address = $C0AEBA;
PokeValue = $F423F;
NumberOfBytes = 4;
procedure TForm1.Button1Click(Sender: TObject);
begin
WindowName := FindWindow(
nil,WindowTitle);
If WindowName = 0
then
begin
MessageDlg('
Programm nicht gefunden!!!111oneeleven11!!11', mtwarning,[mbOK],0);
end;
ThreadId := GetWindowThreadProcessId(WindowName,@ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS,False,ProcessId);
GetMem(buf,1);
buf^ := Chr(PokeValue);
WriteProcessMemory(HandleWindow,ptr(Address),buf,NumberOfBytes,
write);
FreeMem(buf);
closehandle(HandleWindow);
end;
end.