Hello,
currently I am trying to develop a game trainer in delphi. I've got the following code:
var
WindowName : integer;
ProcessId : integer;
ThreadId : integer;
buf : PChar;
HandleWindow : Integer;
write : cardinal;
Const WindowTitle = 'Starcraft'; //Whatever
Those are my variables, and now my function:
const v1 = $90
begin
WindowName := FindWindow(nil,WindowTitle);
If WindowName = 0 then MessageDlg('The game has not been started yet..', mtwarning,[mbOK],0);
ThreadId := GetWindowThreadProcessId(WindowName,@ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS,False,ProcessId);
GetMem(buf,1);
buf^ := Chr(v1);
WriteProcessMemory(HandleWindow,ptr(/*$whatever*/),buf,1,write);
FreeMem(buf);
closehandle(HandleWindow);
end;
Now I have got some questions:
Let's say I found an adress, with a programm to check processes, that will be responsible for my ingame money. Somebody told me the constant v1 = $90 will make my money freeze. Why does that constant do that, and how do I implement it in my code? I already tried inserting my adress for the money where I wrote /$whatever/, but that doesn't work.
I hope you can help me.
Thank you for any help.