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 


DirectInput8 hooking

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

Joined: 25 Sep 2008
Posts: 4

PostPosted: Wed Jul 22, 2009 2:49 am    Post subject: DirectInput8 hooking Reply with quote

Doing it worse then most are accustom to, but, i'd like some insight, as i've hit a road bump

If there's a pre-requisite to what game, it's GunZ - so it's known to use DI8

Now, the way i'm hooking it is using the globally defined LPDIRECTINPUT structure in it's memory:

e.g

Code:
DWORD * g_pdwInterface = (DWORD*)0x006D6ED0;


Save to say, i've already got ahold of most of the interfaces

( I hooked createdevice, and pointed my own globally defined IDirectInputDevice8's to the lppDevice pointer after checking if HRET was ok, and determining the GUID instance of what is being created, and attempting to be exclusively controlled )

I've managed to get a mouse device (of which i can fully fake clicks, etc w/ getdevicestate ) but the only thing i've yet to come across is a KEYBOARD device. It never creates one. (At least not with that LPDIRECTINPUT structure )

Am I missing something as to what I *SHOULD* be doing to get the keyboard instance \ e.g (hidden?) , or should I create my own (i'm not that fluent with dinput, I only started attempting this project 2 days ago)
as i've heard DINPUT takes control over WM msgs, etc in their handler)

If any code is required, etc to help, i'm not hesitant to provide
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jul 22, 2009 3:32 am    Post subject: Reply with quote

Are you sure it's not processing it's keyboard in WM_CHAR or WM_KEYDOWN?
Back to top
View user's profile Send private message
hitachihex
How do I cheat?
Reputation: 0

Joined: 25 Sep 2008
Posts: 4

PostPosted: Thu Jul 23, 2009 6:30 am    Post subject: Reply with quote

I actually wasn't, at the time ):

It seems it is, as i'd began to realize (I was thinking like a one sided coin) once you mentioned their winproc and etc

I was caught up in the game requiring a more intrusive approach at monitoring button states


Thanks anyways ^


EDIT::
I take back my second post, as i've found out through a proven method that it doesn't handle its keys in it's winproc.

I'm back at square one.

Anyone? *yells into the canyon*
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