views:

558

answers:

1

At the moment I use the SendInput() function but if you install a low level mouse hook the LLMHF_INJECTED is set indicating that the input was injected into the stream. Is there a way of sending mouse and keyboard input so that LLMHF_INJECTED is not set?

+1  A: 

Raymond Chen describes this kind of question as an Arms Race. Assume S is the technique to spoof such injections. Then one would see the question here, how do I detect if S was used to inject mouse/keyboard input? The point of this flag is that Microsoft decided that spoofing is possible but detectable.

MSalters