Thread: Identifying mouse used with Global mouse hooks

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    3

    Identifying mouse used with Global mouse hooks

    Hi,

    So, here is the deal. I have this issue:
    http://treadgaming.blogspot.com/

    And after some research, my problem may be solved by using global hooking with SetWindowsHookEx(WH_MOUSE_LL, LowLevelMouseHookProcedure....). However, in the callback LowLevelMouseHookProcedure(int nCode, IntPtr wParam, IntPtr lParam), I don't see a way to identify WHICH mouse was used! Anyone here that can help me out?

    All I want is to be able to filter out mouse events for a certain mouse for games. And preferably also be able to choose to send the mouse events to a specific application.

    If anyone have other bright ideas, I welcome them!

    Thanks!

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    You also have this same post at Sysinternals. As that thread indicates, you'll have to be more specific.

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    3
    Yea, sorry about that but I'm trying to reach out to as many as possible.

    Most of if is explained in that blog, but ok.

    I have more than one USB mouse connected to my PC. One of them is used with an app (GlovePIE) to send keystrokes. Using GlovePIE I can select from which mouse I want to listen too, but apparently games doesn't care which mouse you use, so the game will get the mouse events too. I want to be able to hinder the game getting the mouse events from one of my mouse, and thus only get the keyevent send from GlovePIE.

    More clear?

    Thanks for helping!

  4. #4
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    Quote Originally Posted by Chillance View Post
    Yea, sorry about that but I'm trying to reach out to as many as possible.

    Most of if is explained in that blog, but ok.

    I have more than one USB mouse connected to my PC. One of them is used with an app (GlovePIE) to send keystrokes. Using GlovePIE I can select from which mouse I want to listen too, but apparently games doesn't care which mouse you use, so the game will get the mouse events too. I want to be able to hinder the game getting the mouse events from one of my mouse, and thus only get the keyevent send from GlovePIE.

    More clear?

    Thanks for helping!
    @Chillance, Progress is being made on your dilemma on the Sysinternals post.

  5. #5
    Registered User
    Join Date
    Feb 2009
    Posts
    3
    Quote Originally Posted by BobS0327 View Post
    @Chillance, Progress is being made on your dilemma on the Sysinternals post.
    Yeah, thanks. And wow, are you two forums synchronized somehow?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Generating Window Procedure mouse WPARAM from Hooks
    By seaders in forum Windows Programming
    Replies: 0
    Last Post: 03-24-2009, 09:43 AM
  2. Windows Hooks for global mouse detection
    By JJFMJR in forum Windows Programming
    Replies: 8
    Last Post: 08-12-2008, 08:04 AM
  3. global keyboard hooks
    By Fender Bender in forum Windows Programming
    Replies: 6
    Last Post: 12-29-2005, 05:36 PM
  4. Replies: 6
    Last Post: 07-27-2002, 01:24 AM
  5. Mouse in 800x600 24Bit Mode?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 11-11-2001, 01:38 AM