Tuesday 15 April 2014

c# - When hooking Window's message loop, what's KBDLLHOOKSTRUCT's dwExtraInfo for -


I tried hooking a wnd proc of a window, when suddenly a wild variable appeared ... < P> Okay, let me describe your problem a bit more: To access C ++ C ++ WinApi I have added P / some functions. I want to copy some keystrokes from one window to another. (Alias ​​Dual Boxing in WOW and other MMOs) P / Incognito works just fine and I'm happy, however I am confused whether to variable dwExtraInfo . The document on this area only repeats what the name already says ...

Here is the definition:

Or for the lazy people (I am one of them: P):

  [Layout layout (layout kickind). Public category KBDLLHOOKSTRUCT {public UITC vkCode; Public UIT scan code; Public KBDLLHOOKSTRUCTFlags Flags; Time of public time; Public UIintPtr dwExtraInfo; }   

When I want to send this data to a game (SendMessage with WPARAM set to WM_KEYDOWN and WM_KEYD ), I will use vkCode Build my LPARAM from WPARAM and this structure. Is the volume of keystrokes in only one message?

For example, I hold w-key for 10 seconds, does it store the amount of keystrokes in an interval before the next message is sent?

This variable really confuses me ...

this "extra "Represents the information that the developer can use when working with LowLevelKeyboardProc to pinpoint certain or special type of keyboard events (like artificially generated keystrokes). In LowLevelKeyboardProc , lParam is an indicator for a KBDLLHOOKSTRUCT which keeps dwExtraInfo.

This is a good example of using it:

No comments:

Post a Comment