c++ - KeyboardProc returning TRUE causes performance drops -


I am developing an interface for a game for an add-on. I can not use the game API (with the fact that the code should be game-atheist) and I need to get keyboard input from the user, so I have a keyboard hook to process the user (WH_KEYBOARD ) Have decided to use input on completion of certain conditions.
The problem is that when I can get input and handle the process correctly, when my hook returns to the system rather than giving things to the system many times (more than 800ms) seems to be expected Follow the analogy and it is not acceptable as it does not allow for a fluid typing experience.
What I have to achieve, important press messages are being stopped to reach WndProc, so the question is: what can I do to achieve my goal without doing so much harm to the performance of the game that the result is unacceptable Will happen?
Edit: due to specific requirements (a game which can cause problems with my code, using attiches, although it is not related to fraud) active wndproc sub-clinging is an option is not. Firstly, you need to inject your DLL into the target process, first of all,

  1. Either by hook, or by

  2. Search the window of interest.

  3. Obtain the current window process of that window, which GetWindowLongPtr (wnd, GWLP_WNDPROC), and save it.

  4. By saying sub-section window, SetWindowLongPtr (wnd, GWLP_WNDPROC, and NewWndProc), where NewWndProc is your DLL-applicable message process. In the Nudundra process you want to process keyboard messages (there are dozens of them, type "keyboard input" in the MSDN index, I can not post more than 1 link). Call the original window process saved during windows (3) for the rest of the windows, and return the value returned to it, do not call it directly, instead use callwondoproc.

    This method is not very reliable, some antivirus and anti-bots (like "Warden Client") software may not like it, and debugging can be challenging.

    However this should work.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -