GetTouchInputInfo error RRS feed

  • Question

  • Hi everyone,

    I'm developping a multitouch application on Windows 7. Whenver I  try to get the TOUCHINPUT info with GetTouchInputInfo() I get an E_HANDLE error. I haven't closed the Touch input handle yet (which would be the obvious error) and I haven't used any of the other functions that would automatically close the handle like PostMessage().
    All I can think of is that the lParam I am getting from the windows message is somehow incorrect.
    Has anyone had similar problems? 
    Tuesday, October 13, 2009 11:10 PM

All replies

  • Sounds like you may be sending the lParam from the wrong message to GetTouchInputInfo.  Are you sure you're seeing a WM_TOUCH message?  If you haven't called RegisterTouchWindow, you will be receiveing WM_GESTURE messages.  Also, are you allocating enough memory for the number of inputs (stored in the wParam)? 

    Another potential issue could be using an SDK that doesn't match with your version of windows (RTM/RC/BETA). 

    Are you using the example from this page?
    Wednesday, October 14, 2009 12:28 AM
  • Thanks for the quick response.

    I am using that page as an example. I've called RegisterTouchWindow, which returns a success and I am definately receiving WM_TOUCHes and not WM_GESTURES. The code we have actually was working at one point, which is why I'm so stumped. Although I do believe the SDK was updated. I'm using the Windows 7 RC and the SDK was probably updated to the RTM. I'll check that out and let you know.

    If it turns out to be the case is the RC version of the SDK still available?

    Thanks again!

    Wednesday, October 14, 2009 3:54 PM
  • The differences between RC and RTM should not cause this.  Between RC and Beta may have been problematic.  Try cleaning and building also.

    This could also be caused by passing the wrong value as the 4th parameter to GetTouchInputInfo.  The following is what it should look like:


    GetTouchInputInfo((HTOUCHINPUT)lParam, cInputs, pInputs, sizeof(TOUCHINPUT))
    I have created a really simple project and added it to code gallery if you want something that you can use to test that your SDK is working. Grab it here from the downloads section.
    Wednesday, October 14, 2009 5:16 PM