GetGestureInfo function (winuser.h)

Retrieves a GESTUREINFO structure given a handle to the gesture information.

Syntax

BOOL GetGestureInfo(
  [in]  HGESTUREINFO hGestureInfo,
  [out] PGESTUREINFO pGestureInfo
);

Parameters

[in] hGestureInfo

The gesture information handle.

[out] pGestureInfo

A pointer to the gesture information structure.

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.

Remarks

The cbSize member of the GESTUREINFO structure passed in to the function must be set before the function is called. Otherwise, calls to GetLastError will return ERROR_INVALID_PARAMETER (87 in decimal). If an application processes a WM_GESTURE message, it is responsible for closing the handle using CloseGestureInfoHandle. Failure to do so may result in process memory leaks.

If the message is passed to DefWindowProc, or is forwarded using one of the PostMessage or SendMessage classes of API functions, the handle is transferred with the message and need not be closed by the application.

Examples


    GESTUREINFO gestureInfo = {0};
    gestureInfo.cbSize = sizeof(gestureInfo);
    BOOL bResult = GetGestureInfo((HGESTUREINFO)lParam, &gestureInfo);

    if (!bResult){                
        DWORD err = GetLastError();                                       
    }
    

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-misc-l1-2-0 (introduced in Windows 8.1)

See also

Functions

Programming Guide for Gestures