GetPointerPenInfoHistory function (winuser.h)

Gets the pen-based information associated with the individual inputs, if any, that were coalesced into the current message for the specified pointer (of type PT_PEN). The most recent input is included in the returned history and is the same as the most recent input returned by the GetPointerPenInfo function.

Syntax

BOOL GetPointerPenInfoHistory(
  [in]            UINT32           pointerId,
  [in, out]       UINT32           *entriesCount,
  [out, optional] POINTER_PEN_INFO *penInfo
);

Parameters

[in] pointerId

An identifier of the pointer for which to retrieve information.

[in, out] entriesCount

A pointer to a variable that specifies the count of structures in the buffer to which penInfo points. If GetPointerPenInfoHistory succeeds, entriesCount is updated with the total count of structures available. The total count of structures available is the same as the historyCount field in the POINTER_PEN_INFO structure returned by a call to GetPointerPenInfo.

[out, optional] penInfo

Address of an array of POINTER_PEN_INFO structures to receive the pointer information. This parameter can be NULL if *entriesCount is zero.

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

If the application does not process pointer input messages as fast as they are generated, some moves may be coalesced. When an application receives a coalescable pointer (of type PT_PEN) message, it can use the GetPointerPenInfoHistory function to retrieve information for all the individual inputs, if any, that were coalesced into the message. Note that the information retrieved is associated with the pointer message most recently retrieved by the calling thread. Once the calling thread retrieves its next message, the information associated with the previous message may no longer be available.

The information retrieved appears in reverse chronological order, with the most recent entry in the first row of the returned array. The most recent entry is the same as that returned by the GetPointerPenInfo function.

If the count of rows in the buffer provided is insufficient to hold all available history entries, this function succeeds with the buffer containing the most recent entries and *entriesCount containing the total count of entries available.

If the pointer frame contains no additional pointers besides the specified pointer, this function succeeds and returns only the information for the specified pointer.

If the information associated with the pointer frame 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 (where the input was originally delivered or where the message was forwarded) to which the pointer message has been delivered, this function fails with the last error set to ERROR_ACCESS_DENIED.

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

GetPointerPenInfo