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 


how comunicate with DLL injected??
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Sun Sep 07, 2008 9:37 am    Post subject: how comunicate with DLL injected?? Reply with quote

Hello, sorry for my english, is poor.

i am trying a trainer for maple. and i have this ¿?

1) injected dll to maplestory.exe (odinms) with CreateRemoteThread [OK]
2) dll injected, changue memomry and hacks function [OK]

BUT, i need make a GUI, how can comunicate with my dll injected.

example this is my itemvac function in my dll functional

__declspec(naked) void itemvac()
{
__asm
{
pop [Retornar]
pushad
mov ecx,[ebp+0x8]
mov ebx,[ebp-0x24]
mov [ecx],ebx
mov [ecx+0x4],eax
mov ecx,eax
mov eax,ebx
lea edx,[eax-0x19]
mov [ebp-0x34],edx
lea edx,[ecx-0x32]
add eax,0x19
add ecx,0xA
mov [ebp-0x30],edx
mov [ebp-0x2C],eax
mov [ebp-0x28],ecx
popad
push eax
push [ebp-0x24]
lea eax,[ebp-0x34]
push [Retornar]
ret
}
}

IN MY GUI : f1 = itemvac

any idea please??

i think, make a SetWindowsHookEx in dll injected??
but, if is this, the dll injected catch keyborard msg, but my GUI no!

o MY dll catch keyboard msg and, resend with SENDMESSAGE keys to GUI?

Please, i wait your help.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Sep 07, 2008 9:52 am    Post subject: Reply with quote

Piping.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Sep 07, 2008 10:04 am    Post subject: Reply with quote

I use window messages lol Razz
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Sun Sep 07, 2008 10:14 am    Post subject: Reply with quote

And for example sockets. Google for inter-process communication (IPC).

http://en.wikipedia.org/wiki/Inter-process_communication

sylvanus wrote:
BUT, i need make a GUI, how can comunicate with my dll injected.
You can spawn a window from the dll...
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Sep 07, 2008 10:29 am    Post subject: Reply with quote

Just make a GUI in the DLL?
_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Sep 07, 2008 1:07 pm    Post subject: Reply with quote

You have 2 choices:
Make the GUI into the dll. (By Creating a new thread)

OR

Edit: Just make it into the DLL its eaiser...

Ill give u an example in delphi if u want.
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Sun Sep 07, 2008 7:10 pm    Post subject: Reply with quote

instead of passing the Handle to The Current Process pass in the Handle to The Dll to DialogMain Wink

also dont handle Window Cleanup in the MessagePump do the cleanun in DLL_DETACH_PROCESS cause if Parent process is closed before window then it will cause a locked thread and prevent process from truely closing..
Back to top
View user's profile Send private message MSN Messenger
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Sun Sep 07, 2008 9:22 pm    Post subject: Reply with quote

I would say just make everything work through the DLL, unless you don't know how. Harder way would be learn to use piping.
_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Sep 08, 2008 4:53 pm    Post subject: Reply with quote

There ya go sent u the example I whiped up in like 10 seconds...
Back to top
View user's profile Send private message
sphere90
Grandmaster Cheater
Reputation: 0

Joined: 24 Jun 2006
Posts: 912

PostPosted: Tue Sep 09, 2008 5:04 am    Post subject: Reply with quote

Jani wrote:
And for example sockets.


Sockets for local inter-process communication? It's like killing a fly with a cannon.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Tue Sep 09, 2008 5:19 am    Post subject: Reply with quote

sphere90 wrote:
Jani wrote:
And for example sockets.


Sockets for local inter-process communication? It's like killing a fly with a cannon.


Hahaha, but don't you think it would be cool to fire a cannon at a fly?
Back to top
View user's profile Send private message MSN Messenger
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Tue Sep 09, 2008 7:52 am    Post subject: Reply with quote

sphere90 wrote:
Jani wrote:
And for example sockets.


Sockets for local inter-process communication? It's like killing a fly with a cannon.
Yea a bit :P You know there's a thing called POSIX Local IPC Socket. They're meant for this :) Differences between Internet sockets and these: http://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html

Also using Internet sockets, you could control the DLL from for example school. Using sockets for local communication isn't that rare for example, I'm currently running WinLIRC.

EDIT: typo.


Last edited by Jani on Wed Sep 10, 2008 6:02 am; edited 1 time in total
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Tue Sep 09, 2008 1:50 pm    Post subject: Reply with quote

Create a mutex for every hack enable/disable with the GUI application.

Make a thread for every hack, that looks like this (psuedocode):
Code:

while(1) {
    OpenMutex("Hack1Enable"); //this will block until Hack1Enable is released
    ReleaseMutex("Hack1Enable");
    __asm { ;enable hack in here }
    OpenMutex("Hack1Disable"); //again block till it is released by GUI process
    ReleaseMutex("Hack1Disable");
    __asm { ;disable hack in here }
}


Then your GUI has code like this:
Code:

//initialization
CreateMutex("Hack1Enable");
OpenMutex("Hack1Enable");
CreateMutex("Hack1Disable"); //leave disable unopened...
// same for all other hacks

//Enable hack 1:
OpenMutex("Hack1Disable");
ReleaseMutex("Hack1Enable");

//Disable hack 1:
OpenMutex("Hack1Enable");
ReleaseMutex("Hack1Disable");


That would be loltastic and kind of cool to actually use.

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Sep 09, 2008 2:23 pm    Post subject: Reply with quote

nog_lorp wrote:
Create a mutex for every hack enable/disable with the GUI application.

Make a thread for every hack, that looks like this (psuedocode):
Code:

while(1) {
    OpenMutex("Hack1Enable"); //this will block until Hack1Enable is released
    ReleaseMutex("Hack1Enable");
    __asm { ;enable hack in here }
    OpenMutex("Hack1Disable"); //again block till it is released by GUI process
    ReleaseMutex("Hack1Disable");
    __asm { ;disable hack in here }
}


Then your GUI has code like this:
Code:

//initialization
CreateMutex("Hack1Enable");
OpenMutex("Hack1Enable");
CreateMutex("Hack1Disable"); //leave disable unopened...
// same for all other hacks

//Enable hack 1:
OpenMutex("Hack1Disable");
ReleaseMutex("Hack1Enable");

//Disable hack 1:
OpenMutex("Hack1Enable");
ReleaseMutex("Hack1Disable");


That would be loltastic and kind of cool to actually use.


Isn't that a very inefficient way? I normally create a dummy window and send messages.
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Tue Sep 09, 2008 2:33 pm    Post subject: Reply with quote

YOU're an inefficient way.

Actually if the synchronicity is planned properly it shouldn't be inefficient. The threads will block while they are waiting. Unlike a window proc which loops continuously.

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
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
Goto page 1, 2  Next
Page 1 of 2

 
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