Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting SendInput

Status
Not open for further replies.

Opieo

Programmer
Jul 26, 2006
454
GB
I am making a little game application on the side. I intend for my program to use DirectInput.
I was wondering if there was any way to detect the difference between the input coming from the keyboard itself or if somebody is trying to fake input using the SendInput function.

I am sure that if it is possible at all to tell the difference, then it is possible in C++.
Might anybody know if this is possible at all?

I have tried googling Detect SendInput and similar but have not found anything helpful for being able to tell the difference between real keyboard input, and somebody using a program somewhere to SendInput (I know of the exact SendInput function being available to at least Delphi, C#, C++, Python, and something similar for a couple other languages, it is a Windows function from my understanding).

~
“Your request is not unlike your lower intestine: stinky, and loaded with danger.” — Ace Ventura.
 
Here is what I have found after a lot more research.

Detecting it could be pretty easy depending on how far down one goes (and the trouble one is willing to go through).
After more extensive research, I have decided that it is not worth my time.
Basically I would need API hooks so far down that I would be at the rootkit level (without the rootkit activity).
See this link for the structure that contains a single bit to indicate whether it is legitimate or injected.
MSDN Article

There is also a program that does this kind of stuff, called GameGuard, and it causes problems with some other programs because it operates at this level.
I do not want that sort of reputation, and if people are really that determined, so be it.
I know that botting is impossible to stop to an extent. If people want to bot it, they will just be the ones missing out on the fun (that is if my game is as fun as I am hoping it will be).

~
“Your request is not unlike your lower intestine: stinky, and loaded with danger.” — Ace Ventura.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top