Go to Post srawls: Look, all I did was say "Hi, my name is John V-Neun" and it just happened... - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 07-08-2004, 11:26
始il_Jimmy_Live 始il_Jimmy_Live is offline
Registered User
no team
 
Join Date: Aug 2004
Location: Canada
Posts: 3
始il_Jimmy_Live is an unknown quantity at this point
need help in delphi

my game trainer
Quote:
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, ComCtrls, ActnList, StdCtrls;

const
Addr11 = $007EB834;
Poke11 = $00;
Addr12 = $007EB834;
Poke12 = $01;
Addr13 = $007EB834;
Poke13 = $02;
Bytes = 1;
WindowTitle = 'gunbound';
type
TGbHacked = class(TForm)
Image11: TImage;
Image12: TImage;
Image19: TImage;
Image20: TImage;
ActionList1: TActionList;
Image24: TImage;
Image21: TImage;
A: TAction;
B: TAction;
C: TAction;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure AExecute(Sender: TObject);
procedure BExecute(Sender: TObject);
procedure CExecute(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
GbHacked: TGbHacked;
WIN : integer;
PID : integer;
TID : integer;
HND : integer;
WRT : cardinal;
BUF : pchar;

implementation

{$R *.dfm}
procedure TGbHacked.AExecute(Sender: TObject);
begin
begin
WIN := FindWindow(nil,WindowTitle);
TID := GetWindowThreadProcessId(WIN,@PID);
HND := OpenProcess(PROCESS_ALL_ACCESS,False,PID);
GetMem(BUF,1);
BUF^ := Chr(Poke11);
WriteProcessMemory(HND,ptr(Addr11),BUF,Bytes,WRT);
FreeMem(BUF);
closehandle(HND);

end;
end;
procedure TGbHacked.BExecute(Sender: TObject);
begin
WIN := FindWindow(nil,WindowTitle);
TID := GetWindowThreadProcessId(WIN,@PID);
HND := OpenProcess(PROCESS_ALL_ACCESS,False,PID);
GetMem(BUF,1);
BUF^ := Chr(Poke12);
WriteProcessMemory(HND,ptr(Addr12),BUF,Bytes,WRT);
FreeMem(BUF);
closehandle(HND);

end;

procedure TGbHacked.CExecute(Sender: TObject);
begin
WIN := FindWindow(nil,WindowTitle);
TID := GetWindowThreadProcessId(WIN,@PID);
HND := OpenProcess(PROCESS_ALL_ACCESS,False,PID);
GetMem(BUF,1);
BUF^ := Chr(Poke13);
WriteProcessMemory(HND,ptr(Addr13),BUF,Bytes,WRT);
FreeMem(BUF);
closehandle(HND);

end;

end.


this code works nicely but the thing is it finds the window, i need some windows api comands that find the process instead of the window title, any help would be greatly appreciated

Last edited by 始il_Jimmy_Live : 07-08-2004 at 11:31.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thank you to Brandon and Chief Delphi Ken Leung Thanks and/or Congrats 19 15-12-2003 22:24
Chief Delphi Climbs to New Heights ;-) archiver 2001 0 24-06-2002 04:07
Chief Delphi Institute for Better High School Robotics archiver 2000 0 24-06-2002 00:17
Team #48 Delphi E.L.I.T.E./ Xtremachen5 Travis Hoffman Robot Showcase 1 23-04-2002 16:47
Delphi Automotive Systems is now just Delphi... Joe Johnson General Forum 10 21-03-2002 22:23


All times are GMT -5. The time now is 22:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi