Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GetTouchInputInfo function

Retrieves detailed information about touch inputs associated with a particular touch input handle.


BOOL WINAPI GetTouchInputInfo(
  _In_  HTOUCHINPUT hTouchInput,
  _In_  UINT        cInputs,
  _Out_ PTOUCHINPUT pInputs,
  _In_  int         cbSize


hTouchInput [in]

The touch input handle received in the LPARAM of a touch message. The function fails with ERROR_INVALID_HANDLE if this handle is not valid. Note that the handle is not valid after it has been used in a successful call to CloseTouchInputHandle or after it has been passed to DefWindowProc, PostMessage, SendMessage or one of their variants.

cInputs [in]

The number of structures in the pInputs array. This should ideally be at least equal to the number of touch points associated with the message as indicated in the message WPARAM. If cInputs is less than the number of touch points, the function will still succeed and populate the pInputs buffer with information about cInputs touch points.

pInputs [out]

A pointer to an array of TOUCHINPUT structures to receive information about the touch points associated with the specified touch input handle.

cbSize [in]

The size, in bytes, of a single TOUCHINPUT structure. If cbSize is not the size of a single TOUCHINPUT structure, the function fails with ERROR_INVALID_PARAMETER.

Return value

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, use the GetLastError function.


Calling CloseTouchInputHandle will not free memory associated with values retrieved in a call to GetTouchInputInfo. Values in structures passed to GetTouchInputInfo will be valid until you delete them.


Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]


Winuser.h (include Windows.h)





See also




Community Additions

© 2015 Microsoft