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 


Delphi Dll Injection

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Sun Nov 04, 2007 1:28 pm    Post subject: Delphi Dll Injection Reply with quote

I tried translating C++ to delph and came up wtih this.
I get an access violation but i know im close, can anyone read my source and tell me what im doing wrong? POR FAVOR



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message AIM Address MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Nov 04, 2007 1:46 pm    Post subject: Reply with quote

It looks like you are are sending an uninitialized pointer into the function.

Source wrote:
procedure TForm1.SpeedButton2Click(Sender: TObject);
var lpprocess : string;
dwpid : DWORD;
lpdll : LPSTR;
TempSnapshot:THandle;
Process32:TProcessEntry32;
begin
lpprocess := edit1.text;
if Process32.szExeFile = lpprocess then
begin dwPID:=Process32.th32ProcessID;
end;

Injectdll(dwPID, lpdll, 0 );
end;


I don't use Delphi often, so I could be wrong, but i will give you advice on something else also:

Source wrote:
InjectDll(dwPid, lpDll, nLength);


nLength is the length of the buffer that stores the path of the dll, in your source you are passing 0, which is bad.

Oh, and I thought I would point out you are translating from C to Delphi (it is blatantly obvious you are translating my source Wink ). As far as I can tell, it doesn't look like you are doing so well.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Nov 04, 2007 3:27 pm    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?p=1530346#1530346
_________________
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