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 


[HELP] DELPHI XE4 [DLL INJECTOR]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ByKadiRS
How do I cheat?
Reputation: -1

Joined: 07 Feb 2013
Posts: 7

PostPosted: Sun Jun 02, 2013 4:37 am    Post subject: [HELP] DELPHI XE4 [DLL INJECTOR] Reply with quote

Function JexInject(Hedef:DWORD; DLL:String):DWORD;
Var
BytesWritten:SIZE_T;
PLoadLibrary,Paramaters:Pointer;
Process,Thread,ThreadId,HKernel:DWORD;
Begin
Process:=OpenProcess(PROCESS_ALL_ACCESS,False,Hedef);
Paramaters:=VirtualAllocEx(Process,NIL,Length(DLL),MEM_COMMIT,PAGE_EXECUTE_READWRITE);
WriteProcessMemory(Process,Paramaters,PChar(DLL),Length(DLL),BytesWritten);
HKernel:=GetModuleHandle('kernel32.dll');
PLoadLibrary:=GetProcAddress(HKernel,'LoadLibraryA');
Thread:=CreateRemoteThread(Process,NIL,0,PLoadLibrary,Paramaters,0,ThreadId);
WaitForSingleObject(Thread,INFINITE);
VirtualFreeEx(Process,Paramaters,0,MEM_RELEASE);
CloseHandle(Thread);
CloseHandle(Process);
End;


Doesn't Inject , I Cannot See ERROR
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Jun 02, 2013 4:45 pm    Post subject: Reply with quote

Add the returns to all your API calls and debug them to see which one is failing.

But looking at the code itself your OpenProcess call is probably whats failing.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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