Sign in to follow this  

A vexing problem with DirectInput (or perhaps the Win32 subsystem)

This topic is 4694 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a DirectInput game which I am creating macros for, I've written "man-in-the-middle" DLLs of dinput8.dll which allow me to access the game's IDirectInput8 and IDirectInputDevice8 interfaces, and through my debug messages I've managed to come to the conclusion that the program is acquiring both a keyboard and a mouse input. That's all fine and dandy.... I can read/write the keyboard state when the application requests GetDeviceState about the keyboard device; But strangely enough, the mouse interface _never_ makes any requests to get data or even set an action map, through my logs, the only function which are called are: SetProperty, SetCooperativeLevel, SetDataFormat, Acquire and Unacquire. I can't for the life of me discover how the mouse is controlled; So I dove into the assembly of the program and found that during startup it loads a Cursor from the .resc section.. Strange thing for a DirectInput + DirectDraw application to do. I figured that perhaps I could control the mouse pointer via normal windows messages.. But alas.. No luck. I could move the pointer with SetCursorPos which increased my hopes, but I can't send a click message through WM_LBUTTONDOWN at all, and looking at the wndproc assembly of the application, it doesn't even parse those messages anyway. I discovered with SetCursorPos that it only works if I call the function within the context of the application; IE, I call it in my "man-in-the-middle" DLL, and it doesn't work if I call from an outside app. I'm really stumped for what to do; Pondering if perhaps the programmers have acquired a seemingly non-used interface to the mouse with DirectInput (and I wouldn't put it past them :/) or simply found a really good method to hide the interface from potential "hackers" of the game. Save me from vexation, I beg you ^^

Share this post


Link to post
Share on other sites

This topic is 4694 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this