CreateSyntheticPointerDevice function (winuser.h)

Configures the pointer injection device for the calling application, and initializes the maximum number of simultaneous pointers that the app can inject.

Syntax

HSYNTHETICPOINTERDEVICE CreateSyntheticPointerDevice(
  [in] POINTER_INPUT_TYPE    pointerType,
  [in] ULONG                 maxCount,
  [in] POINTER_FEEDBACK_MODE mode
);

Parameters

[in] pointerType

The pointer injection device type. Must be either PT_TOUCH or PT_PEN.

[in] maxCount

The maximum number of contacts.

For PT_TOUCH this value must be greater than 0 and less than or equal to MAX_TOUCH_COUNT.

For PT_PEN this value must be 1.

[in] mode

The contact visualization mode.

Return value

If the function succeeds, the return value is a handle to the pointer injection device. Otherwise, it returns null. To retrieve extended error information, call the GetLastError function.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server [desktop apps only]
Target Platform Windows
Header winuser.h
Library User32.lib
DLL User32.dll