DirectX Game hook
Asked Answered
I

1

6

I'm trying to simulate mouse events in a game. The games uses DirectInput so you can't use SendMessage to send mouse events/keyboard events to it, that's basically why I have to hook in to the game.

Also I don't want to use SendInput/mouse_events, the game must run on the background and make mouse events.

I already managed to make a DLL hook in the game but now the next problem is that I have to make the mouse events and keyboards (probably the main problem).

Thanks in advance.

Izanami answered 14/7, 2014 at 10:58 Comment(3)
Though arguably inappropriate for this forum, the no-holds-barred honesty and direct subject matter (how to hook kb/mouse events in a DLL-injected DirectInput process) may well have merit outside writing bots for what is likely a bannable offense for eula-violations on most games. I don't have an answer, but I sincerely hope this lives long enough that someone keen on the subject has a chance to chime in. You may do well to improve the question by providing links to what you did find and why (apart from the obvious) it was deemed inapplicable.Ebon
I basically want to know if there is any way to filter clicks in a WPF/DirectX applications with having the process on background/minimized.Izanami
Have you already read this. I would reverse engineer and try to find function calls on directInput to then redirect calls to your code... However, I would call this an obviously daunting task to do for i.e a AAA title...good luckBilski
M
2

Instead of hooking into the game you could use GlovePIE, which is a kernel-level input emulator. You can write down your own script and then use it. So then you'll need to send message with your applicaton to GlovePIE and it will generate input on Kernel level, so this will work in DirectX games.

Myramyrah answered 14/7, 2014 at 18:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.