x86 Proc WH_MOUSE Mouse Data Incorrect After First To CallNextHook

Discussion in 'Windows 64bit' started by Ryan H. Kawicki, May 5, 2010.

  1. We have a 32 bit process that uses several thread only WH_MOUSE callbacks.
    We are in the process of testing the application under 64 bit versions of
    Windows. The issue we are seeing has to do with the mouse data value not
    being correct after the first call to CallNextHookEx.

    Let me start from the beginning.
    There are three thread only WH_MOUSE callbacks installed by the application.
    When the first callback is notified of mouse activity, I check the lParam
    value in memory and notice that either 0x0078 (120) or 0xFF88 (-120) is at
    the end of the structure defined for WH_MOUSE callbacks. No modification is
    made to the structure of data, so CallNextHookEx is called, which in turn
    calls the next installed hook. The lParam is different but the data is the
    same, except for the last four bytes of data. It does not contain the wheel
    delta value. Same situation happens again when passing this value on through
    CallNextHookEx.

    I stepped through our application on a 32 bit version of Windows and noticed
    that the lParam is changing there as well, so I expect this behavior to
    correct, but I expect that the problem lies in what seems to be a copying of
    data between calls to CallNextHookEx.

    I'm not quite sure where the disconnect is at. So the first time
    CallNextHookEx is called in our application, the value is correct, but
    subsequent calls are incorrect. This doesn't seem to be the designed
    behavior for 32 bit application on 64 bit versions of Windows. Is there
    anything in the works to correct this issue? Is there something that we are
    doing wrong in our application? Thanks for any help provided.
     
    Ryan H. Kawicki, May 5, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William J King
    Replies:
    1
    Views:
    1,491
    Rik Bain
    Dec 18, 2003
  2. Steven Moore

    Q lost data MS Works word proc

    Steven Moore, Aug 18, 2005, in forum: Computer Support
    Replies:
    1
    Views:
    396
  3. =?Utf-8?B?RWxsaW90IEh1ZGdpbnM=?=

    Why is there an x86 emu if a processor is x86-64?

    =?Utf-8?B?RWxsaW90IEh1ZGdpbnM=?=, Jul 23, 2006, in forum: Windows 64bit
    Replies:
    4
    Views:
    683
  4. Daniel
    Replies:
    11
    Views:
    659
  5. markm75
    Replies:
    7
    Views:
    1,148
    S.SubZero
    Jan 9, 2008
Loading...

Share This Page