Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


I need help in vb6 and delphi

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
M.CORP
Grandmaster Cheater Supreme
Reputation: 28

Joined: 28 Oct 2009
Posts: 1010

PostPosted: Wed Jun 09, 2010 11:18 pm    Post subject: I need help in vb6 and delphi Reply with quote

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. Laughing
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.

_________________
Shameless Self Advertising Very Happy!
Steam
Just lurking around...
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Thu Jun 10, 2010 3:21 am    Post subject: Reply with quote

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.
_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Thu Jun 10, 2010 3:30 am    Post subject: Reply with quote

OpenProcess()
WriteProcessMemory()


for VB6: http://www.vbforums.com/showthread.php?t=121667
Back to top
View user's profile Send private message
M.CORP
Grandmaster Cheater Supreme
Reputation: 28

Joined: 28 Oct 2009
Posts: 1010

PostPosted: Fri Jun 11, 2010 1:19 am    Post subject: Reply with quote

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.

_________________
Shameless Self Advertising Very Happy!
Steam
Just lurking around...
Back to top
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Fri Jun 11, 2010 1:29 am    Post subject: Reply with quote

Try debugging...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites