 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
M.CORP Grandmaster Cheater Supreme
Reputation: 28
Joined: 28 Oct 2009 Posts: 1010
|
Posted: Wed Jun 09, 2010 11:18 pm Post subject: I need help in vb6 and delphi |
|
|
I am coding a little application of mine on vb6 but i am struggling to make a save command. A save command that saves the items from a listbox onto a text file. i have tried this but, only 1 out of 8 text is saved onto a textfile.
And in delphi, i am making a trainer for pinball but it wouldn't work.
i keep on clicking on the checkbox but nothing seems to happen.
i am going to send yhe source of my trainer here but i accidently deleted the file from the recycle bin because it doesn't work.
thanks in advance.
P.S. i have searched in google, found results, but the results were useless because it doesn't say how to make a trainer in delphi. And has unrelated stuffs.
_________________
|
|
Back to top |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Thu Jun 10, 2010 3:21 am Post subject: |
|
|
Just paste the code? I don't think CEF is going to get sued for a pinball trainer, so I'd say it's A-OK to post it here.
_________________
|
|
Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
|
Back to top |
|
 |
M.CORP Grandmaster Cheater Supreme
Reputation: 28
Joined: 28 Oct 2009 Posts: 1010
|
Posted: Fri Jun 11, 2010 1:19 am Post subject: |
|
|
Sorry, but i made a new one! but for minesweeper this time. But still, it still doesn't work. Code is written on delphi.
Quote: | unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, tlhelp32, XPMan;
type
TForm1 = class(TForm)
Button1: TButton;
XPManifest1: TXPManifest;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
PidHandle: integer;
PidID : integer;
byteArr : Array of byte;
Const
ProgramName = 'winmine.exe';
implementation
{$R *.dfm}
// tlhelp32 function to Loop through processes and locate your target
function GetProcessID(Const ExeFileName: string; var ProcessId: integer): boolean;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin
result := false;
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := Sizeof(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
while integer(ContinueLoop) <> 0 do begin
if (StrIComp(PChar(ExtractFileName(FProcessEntry32.szExeFile)), PChar(ExeFileName)) = 0)
or (StrIComp(FProcessEntry32.szExeFile, PChar(ExeFileName)) = 0) then begin
ProcessId:= FProcessEntry32.th32ProcessID;
result := true;
break;
end;
ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;
procedure poke1(Address: Cardinal; Data: Word);
var
Written: Cardinal;
begin
WriteProcessMemory(PidHandle, Pointer(Address), @Data, SizeOf(Data), Written);
end;
procedure poke2(Address: Cardinal; Data: Cardinal);
var
Written: Cardinal;
begin
WriteProcessMemory(PidHandle, Pointer(Address), @Data, SizeOf(Data), Written);
end;
procedure poke3(Address: Cardinal; Data: Cardinal);
var
Written: Cardinal;
begin
WriteProcessMemory(PidHandle, Pointer(Address), @Data, SizeOf(Data), Written);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if GetProcessID(ProgramName, PidId) then
begin
PidHandle := OpenProcess(PROCESS_ALL_ACCESS,False,PidId);
poke1($9C, $9090);
closehandle(PidHandle);
end else
begin
MessageDlg('Start minesweeper First.', mtwarning, [mbOK],0);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end. |
_________________
|
|
Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Fri Jun 11, 2010 1:29 am Post subject: |
|
|
Try debugging...
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|