GetPointerPenInfo function (winuser.h)

Gets the pen-based information for the specified pointer (of type PT_PEN) associated with the current message.

Syntax

BOOL GetPointerPenInfo(
  [in]  UINT32           pointerId,
  [out] POINTER_PEN_INFO *penInfo
);

Parameters

[in] pointerId

An identifier of the pointer for which to retrieve information.

[out] penInfo

Address of a POINTER_PEN_INFO structure to receive the pen-specific pointer information.

Return value

If the function succeeds, the return value is non-zero.

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

Remarks

GetPointerPenInfo retrieves information for a single pointer (of type PT_PEN) associated with a pointer message.

Use GetPointerFramePenInfo to retrieve frame information associated with a message for a set of pointers.

The information returned by GetPointerInfo is associated with the most recent pointer message retrieved by the calling thread. When the next message is retrieved by the calling thread, the information associated with the previous message may no longer be available.

If the application does not process pointer input messages as fast as they are generated, some messages may be coalesced into a WM_POINTERUPDATE message. Use GetPointerPenInfoHistory to retrieve the message history from the most recent WM_POINTERUPDATE message.

If the information associated with the message is no longer available, this function fails with the last error set to ERROR_NO_DATA.

If the calling thread does not own the window to which the pointer message has been delivered, this function fails with the last error set to ERROR_ACCESS_DENIED. Note that this may be the window to which the input was originally delivered or it may be a window to which the message was forwarded.

If the specified pointer is not of type PT_PEN, this function fails with the last error set to ERROR_DATATYPE_MISMATCH.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

Functions

GetPointerFramePenInfo

GetPointerFramePenInfoHistory

GetPointerPenInfoHistory