none
Passing dwExtraInfo into TOUCHINPUT ? RRS feed

  • Question

  • Hi Experts:

    The user mode app can process WM_TOUCH for multi-touch apps, within in the TOUCHINPUT structure, there is dwExtraInfo. My question is, how does a kernel HID WDF driver pass custom info as dwExtraInfo so that user mode app can get it while processing WM_TOUCH message ? 

    Thanks in advance.

    Polaris


    leo

    Saturday, November 15, 2014 2:10 AM

Answers

  • Hi Leo, you might consider switching your application to use the newer WM_POINTER* messages, instead of the older WM_TOUCH model.

    If your device is a HID device, you'll be able to provide additional properties that your digitizer implements to its HID descriptor and HID input report. When you receive a WM_POINTER message such as WM_POINTERDOWN, you would typically call GetPointerInfo to retrieve a POINTER_INFO structure (the WM_POINTER* equivalent of TOUCHINPUT structure). When using WM_POINTER*, you can additionally call GetRawPointerDeviceData, and retrieve the additional properties you added to the HID report.

    Programming against WM_POINTER*may have additional benefits as well; this interface is compatible with pen and mouse in addition to touch.The reference documentation is here: http://msdn.microsoft.com/en-us/library/windows/desktop/hh454916(v=vs.85).aspx

    • Marked as answer by SJ-Hills Tuesday, November 18, 2014 5:11 PM
    Tuesday, November 18, 2014 4:46 AM

All replies

  • you can't. you are too low level in the stack. what would you do with a the DWORD?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Doron Holan [MSFT] Sunday, November 16, 2014 3:32 AM
    • Unmarked as answer by SJ-Hills Tuesday, November 18, 2014 5:11 PM
    Sunday, November 16, 2014 3:32 AM
  • The DWORD can be used for any custom info a device might implement.

    So who is filling out the dwExtraInfo before passing it up to an user app ?


    leo

    Sunday, November 16, 2014 3:41 AM
  • For a mouse device, there is ExtraInformation in MOUSE_INPUT_DATA; I'm wondering if there is something equivalent/similar for digitizer ?

    leo

    Sunday, November 16, 2014 5:02 AM
  • Hi Leo, you might consider switching your application to use the newer WM_POINTER* messages, instead of the older WM_TOUCH model.

    If your device is a HID device, you'll be able to provide additional properties that your digitizer implements to its HID descriptor and HID input report. When you receive a WM_POINTER message such as WM_POINTERDOWN, you would typically call GetPointerInfo to retrieve a POINTER_INFO structure (the WM_POINTER* equivalent of TOUCHINPUT structure). When using WM_POINTER*, you can additionally call GetRawPointerDeviceData, and retrieve the additional properties you added to the HID report.

    Programming against WM_POINTER*may have additional benefits as well; this interface is compatible with pen and mouse in addition to touch.The reference documentation is here: http://msdn.microsoft.com/en-us/library/windows/desktop/hh454916(v=vs.85).aspx

    • Marked as answer by SJ-Hills Tuesday, November 18, 2014 5:11 PM
    Tuesday, November 18, 2014 4:46 AM
  • Thanks! I'll look into that direction.

    leo

    Tuesday, November 18, 2014 5:12 PM