最終更新:2014-09-03 (水) 14:09:35 (3517d)  

HID parser API
Top / HID parser API

http://msdn.microsoft.com/en-us/library/windows/hardware/jj126202(v=vs.85).aspx

Report Creation and Interpretation

  • If you are writing a HID app for your own hardware, you have existing knowledge of the size and format of each report issued by your device. In this case, your app can cast the input and output report buffers to structs and consume the data.
  • If, however, you are writing a HID app that communicates with all devices that expose common functionality (for example, a music app that needs to detect when a play button is pressed), you may not know the size and format of the HID reports. This category of application understands certain Top Level Collections and certain usages.
  • In order to interpret the reports received from a device, or to create reports to be sent, the application needs to leverage the Report Descriptor in order to determine if and where a particular usage is located in the reports, and potentially the units of values in the reports. This is where HID parsing is required. Windows provides a HID parser for use by drivers and applications. This parser exposes a set of APIs (HidP_*) that can be used to discover the types of usages supported by a device, determine the state of such usages in a report, or to build a report to change the state of a usage in the device.
  • The following list identifies the HID parser APIs.

API一覧

  • HidP_GetButtonCaps?
  • HidP_GetButtons?
  • HidP_GetButtonsEx?
  • HidP_GetCaps
  • HidP_GetData?
  • HidP_GetExtendedAttributes?
  • HidP_GetLinkCollectionNodes?
  • HidP_GetScaledUsageValue?
  • HidP_GetSpecificButtonCaps?
  • HidP_GetSpecificValueCaps?
  • HidP_GetUsages?
  • HidP_GetUsagesEx?
  • HidP_GetUsageValue?
  • HidP_GetUsageValueArray?
  • HidP_GetValueCaps
  • HidP_InitializeReportForID
  • HidP_IsSameUsageAndPage?
  • HidP_MaxDataListLength?
  • HidP_MaxUsageListLength?
  • HidP_SetButtons?
  • HidP_SetData?
  • HidP_SetScaledUsageValue?
  • HidP_SetUsages?
  • HidP_SetUsageValue?
  • HidP_SetUsageValueArray?
  • HidP_UnsetButtons?
  • HidP_UnsetUsages?
  • HidP_UsageAndPageListDifference?
  • HidP_UsageListDifference?