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 


Bypassing mouse_event

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

Joined: 20 Apr 2007
Posts: 668

PostPosted: Tue Apr 29, 2008 3:18 am    Post subject: Bypassing mouse_event Reply with quote

I've decided to try to bypass mouse_event for practice, and i've done a little resource, but i'm a little confused about the return type

msdn "mouse_event Function()"

Quote:
Return Value

This function has no return value.


So, i should set the return value as a bool?, cas im pretty sure, i will need to make it a function, and not a procedure (a funtion has a return value, a procedure doesent)
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Apr 29, 2008 3:27 am    Post subject: Reply with quote

Hey, i've tried hooking it and it seems that GG hooks mouse_event() in a diffrent method, btw no return value means you just simply use it, for example here's a function that returns a TRUE value:

Code:
Function TrueORFalse(var tOf:Boolean):Boolean; //bool
begin
if tOf = False then
Result:=True;
end;

Procedure lol;
begin
if TrueORFalse = True then ShowMessage('Return value is TRUE!');
end;


btw, i checked MSDN further and mouse_event uses SendInput();, and SendInput is hooked on both ring3 and 0, so we're fucked (not for sure)

here's a simple check to see if WriteProcessMemory() has successfully worked (Return value 1 = Success, Returen Value 0 = Failed)

Code:

BOOL WPM = WriteProcessMemory(hProcess,...)
if (WPM) //if WPM = True (success)
printf("WPM Success @ %d\n", WPM)
else
printf("WPM Failed @ &d\n", WPM);


it will printf 1 if it worked or 0 if it didn't work
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Tue Apr 29, 2008 4:28 am    Post subject: Reply with quote

Rot1 wrote:
Hey, i've tried hooking it and it seems that GG hooks mouse_event() in a diffrent method, btw no return value means you just simply use it, for example here's a function that returns a TRUE value:

Code:
Function TrueORFalse(var tOf:Boolean):Boolean; //bool
begin
if tOf = False then
Result:=True;
end;

Procedure lol;
begin
if TrueORFalse = True then ShowMessage('Return value is TRUE!');
end;


btw, i checked MSDN further and mouse_event uses SendInput();, and SendInput is hooked on both ring3 and 0, so we're fucked (not for sure)

here's a simple check to see if WriteProcessMemory() has successfully worked (Return value 1 = Success, Returen Value 0 = Failed)

Code:

BOOL WPM = WriteProcessMemory(hProcess,...)
if (WPM) //if WPM = True (success)
printf("WPM Success @ %d\n", WPM)
else
printf("WPM Failed @ &d\n", WPM);


it will printf 1 if it worked or 0 if it didn't work


Kay, ty... Wich means i cant make an AC, that will work both outside/inside MS?, or will it work with a handle as "0"?
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Tue Apr 29, 2008 4:46 am    Post subject: Reply with quote

Anden100 wrote:
Rot1 wrote:
Hey, i've tried hooking it and it seems that GG hooks mouse_event() in a diffrent method, btw no return value means you just simply use it, for example here's a function that returns a TRUE value:

Code:
Function TrueORFalse(var tOf:Boolean):Boolean; //bool
begin
if tOf = False then
Result:=True;
end;

Procedure lol;
begin
if TrueORFalse = True then ShowMessage('Return value is TRUE!');
end;


btw, i checked MSDN further and mouse_event uses SendInput();, and SendInput is hooked on both ring3 and 0, so we're fucked (not for sure)

here's a simple check to see if WriteProcessMemory() has successfully worked (Return value 1 = Success, Returen Value 0 = Failed)

Code:

BOOL WPM = WriteProcessMemory(hProcess,...)
if (WPM) //if WPM = True (success)
printf("WPM Success @ %d\n", WPM)
else
printf("WPM Failed @ &d\n", WPM);


it will printf 1 if it worked or 0 if it didn't work


Kay, ty... Wich means i cant make an AC, that will work both outside/inside MS?, or will it work with a handle as "0"?


Look what i did, i made a simple app with Timer and a Procedure that simulate 1 click.

when i click F2 it will call that Procedure 1 time.

so what i did is, i tried clicking on other Apps while GG was running, it works but NOT on MS itself.
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