Direct Input help

Posts 1–4 of 4 · Page 1 of 1
Direct Input help
Hi everyone,
I'm a total beginner in C and for sure in C++.
I am trying to send virtual key presses and mouseclicks to a game, I tried it with commands like SendInput SendMessage or PostMessage but it didn't work, because the game seems to use direct input.
Now I wonder, if there is a simple way in C/C++ to get my programm to work with this game.
Please remember that I'm a real beginner so please explain everything detailed.^^

I'm looking forward to get your help and suggestions
Many games add a driver on their game so that virtual inputs don't work. You will have to reverse engineer the driver or w/e it is.
First you have to make sure the game is using DirectInput. If it is (IIRC), PostMessage should work (read the documentation for proper lParam/wParam assignment).

Or you could hook the correct interface method of DirectInput itself.
There are many API which send messages / do output, SendMessage, PostMessage, keybd_event, mouse_event, SendInput etc etc
which of these is the base api?
I mean...internally does SendMessage() call PostMessage() or vice-versa? - what's the lowest level API that doesn't call any other api?
I've been using keybd_event which works for the games I play, but I've always been curious about the above question, but since keybd_event has always worked for me, I've never really learned about the other api's. Thanks.
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us