Export (0) Print
Expand All

HidP_UsageListDifference routine

The HidP_UsageListDifference routine returns the differences between two arrays of HID usages.

Syntax


NTSTATUS __stdcall HidP_UsageListDifference(
  _In_   PUSAGE PreviousUsageList,
  _In_   PUSAGE CurrentUsageList,
  _Out_  PUSAGE BreakUsageList,
  _Out_  PUSAGE MakeUsageList,
  _In_   ULONG UsageListLength
);

Parameters

PreviousUsageList [in]

Pointer to a list of usages that the routine compares with the list of usages in CurrentUsageList.

CurrentUsageList [in]

Pointer to a list of usages that the routine compares with the list of usages in PreviousUsageList.

BreakUsageList [out]

Pointer to a caller-allocated buffer that, on return, contains a list of the usages that are in PreviousUsageList, but not in CurrentUsageList.

MakeUsageList [out]

Pointer to a caller-allocated buffer that, on return, contains a list of the usages that are in CurrentUsageList, but not in PreviousUsageList.

UsageListLength [in]

Specifies the length, in array elements, of the buffers provided at CurrentUsageList and PreviousUsageList.

Return value

HidP_UsageListDifference returns HIDP_STATUS_SUCCESS.

Remarks

A user-mode application or kernel-mode driver can use this routine to compare two usage lists, for example, to determine the change in button state between two usage lists returned by two HidP_GetButtons calls.

If the input usage lists have different lengths, an application or driver should set UsageListLength to the length of the larger list.

The routine interprets a zero usage in an input usage list as a delimiter that ends the list. Any usages after a zero in a list are not processed. Unused usages in an output list are set to zero.

For more information, see HID Collections.

Requirements

Version

Available in Windows 2000 and later versions of Windows.

Header

Hidpi.h (include Hidpi.h)

Library

Hidparse.lib

IRQL

PASSIVE_LEVEL

See also

HidP_UsageAndPageListDifference

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft