Injecting to a DX game and make game idle

153 views Asked by At

I have a DLL that I am injecting to DX games. In the DLL, I am disabling XInput, raw input and also subclass WndProc to filter a bunch of input messages like WM_MOUSEMOVE, WM_LBUTTONDOWN, WM_INPUT etc. Disabling XInput with XInputEnable(FALSE) and register raw devices with RIDEV_REMOVE flag.

While it works great for some games, it doesn't work for all. Certain games still have mouse move/hover input and I can see hover state for some UI when I move over.

My question is what did I miss? Could the game be capturing input some other ways?

Thank you.

1

There are 1 answers

5
Ross Ridge On BEST ANSWER

I can think of these possible ways the application may still be receiving mouse input:

  • It re-enables Raw Input notifications
  • A window other than you one subclassed is receiving the messages
  • It's polling GetCursorPos
  • Using the Windows HID API or other user-mode interface to access the mouse device
  • Hooking mouse events or windows message using SetWindowsHookEx

The are probably others, but these are all I can think of at the moment.