35 #define HIDAPI DECLSPEC_IMPORT
184#define HIDP_LINK_COLLECTION_ROOT ((USHORT) -1)
185#define HIDP_LINK_COLLECTION_UNSPECIFIED ((USHORT) 0)
243#define FACILITY_HID_ERROR_CODE 0x11
245#define HIDP_ERROR_CODES(SEV, CODE) \
246 ((NTSTATUS) (((SEV) << 28) | (FACILITY_HID_ERROR_CODE << 16) | (CODE)))
248#define HIDP_STATUS_SUCCESS (HIDP_ERROR_CODES(0x0, 0))
249#define HIDP_STATUS_NULL (HIDP_ERROR_CODES(0x8, 1))
250#define HIDP_STATUS_INVALID_PREPARSED_DATA (HIDP_ERROR_CODES(0xC, 1))
251#define HIDP_STATUS_INVALID_REPORT_TYPE (HIDP_ERROR_CODES(0xC, 2))
252#define HIDP_STATUS_INVALID_REPORT_LENGTH (HIDP_ERROR_CODES(0xC, 3))
253#define HIDP_STATUS_USAGE_NOT_FOUND (HIDP_ERROR_CODES(0xC, 4))
254#define HIDP_STATUS_VALUE_OUT_OF_RANGE (HIDP_ERROR_CODES(0xC, 5))
255#define HIDP_STATUS_BAD_LOG_PHY_VALUES (HIDP_ERROR_CODES(0xC, 6))
256#define HIDP_STATUS_BUFFER_TOO_SMALL (HIDP_ERROR_CODES(0xC, 7))
257#define HIDP_STATUS_INTERNAL_ERROR (HIDP_ERROR_CODES(0xC, 8))
258#define HIDP_STATUS_I8042_TRANS_UNKNOWN (HIDP_ERROR_CODES(0xC, 9))
259#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID (HIDP_ERROR_CODES(0xC, 0xA))
260#define HIDP_STATUS_NOT_VALUE_ARRAY (HIDP_ERROR_CODES(0xC, 0xB))
261#define HIDP_STATUS_IS_VALUE_ARRAY (HIDP_ERROR_CODES(0xC, 0xC))
262#define HIDP_STATUS_DATA_INDEX_NOT_FOUND (HIDP_ERROR_CODES(0xC, 0xD))
263#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE (HIDP_ERROR_CODES(0xC, 0xE))
264#define HIDP_STATUS_BUTTON_NOT_PRESSED (HIDP_ERROR_CODES(0xC, 0xF))
265#define HIDP_STATUS_REPORT_DOES_NOT_EXIST (HIDP_ERROR_CODES(0xC, 0x10))
266#define HIDP_STATUS_NOT_IMPLEMENTED (HIDP_ERROR_CODES(0xC, 0x20))
267#define HIDP_STATUS_I8242_TRANS_UNKNOWN HIDP_STATUS_I8042_TRANS_UNKNOWN
270#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
279#define HidP_GetButtonCaps(_Type_, _Caps_, _Len_, _Data_) \
280 HidP_GetSpecificButtonCaps(_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
294#define HidP_GetButtons(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe) \
295 HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)
297#define HidP_GetButtonListLength(RTy, UPa, Ppd) \
298 HidP_GetUsageListLength(Rty, UPa, Ppd)
312#define HidP_GetButtonsEx(RT, LC, BL, UL, PD, R, RL) \
313 HidP_GetUsagesEx(RT, LC, BL, UL, PD, R, RL)
460#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
470#define HidP_GetValueCaps(_Type_, _Caps_, _Len_, _Data_) \
471 HidP_GetSpecificValueCaps (_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
487#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
495#define HidP_IsSameUsageAndPage(u1, u2) ((* (PULONG) &u1) == (* (PULONG) &u2))
516#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
530#define HidP_SetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
531 HidP_SetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
604#if !defined(_HIDPI_NO_FUNCTION_MACROS_)
618#define HidP_UnsetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
619 HidP_UnsetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
#define _IRQL_requires_max_(irql)
HIDAPI NTSTATUS NTAPI HidP_GetSpecificButtonCaps(IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PHIDP_BUTTON_CAPS ButtonCaps, IN OUT PUSHORT ButtonCapsLength, IN PHIDP_PREPARSED_DATA PreparsedData)
HIDAPI NTSTATUS NTAPI HidP_InitializeReportForID(IN HIDP_REPORT_TYPE ReportType, IN UCHAR ReportID, IN PHIDP_PREPARSED_DATA PreparsedData, IN OUT PCHAR Report, IN ULONG ReportLength)
HIDAPI NTSTATUS NTAPI HidP_GetData(IN HIDP_REPORT_TYPE ReportType, OUT PHIDP_DATA DataList, IN OUT PULONG DataLength, IN PHIDP_PREPARSED_DATA PreparsedData, IN PCHAR Report, IN ULONG ReportLength)
HIDAPI NTSTATUS NTAPI HidP_GetLinkCollectionNodes(OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes, IN OUT PULONG LinkCollectionNodesLength, IN PHIDP_PREPARSED_DATA PreparsedData)
HIDAPI NTSTATUS NTAPI HidP_UsageListDifference(IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
HIDAPI NTSTATUS NTAPI HidP_GetCaps(IN PHIDP_PREPARSED_DATA PreparsedData, OUT PHIDP_CAPS Capabilities)
HIDAPI NTSTATUS NTAPI HidP_GetExtendedAttributes(IN HIDP_REPORT_TYPE ReportType, IN USHORT DataIndex, IN PHIDP_PREPARSED_DATA PreparsedData, OUT PHIDP_EXTENDED_ATTRIBUTES Attributes, IN OUT PULONG LengthAttributes)
HIDAPI NTSTATUS NTAPI HidP_UsageAndPageListDifference(IN PUSAGE_AND_PAGE PreviousUsageList, IN PUSAGE_AND_PAGE CurrentUsageList, OUT PUSAGE_AND_PAGE BreakUsageList, OUT PUSAGE_AND_PAGE MakeUsageList, IN ULONG UsageListLength)
HIDAPI NTSTATUS NTAPI HidP_GetSpecificValueCaps(IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PHIDP_VALUE_CAPS ValueCaps, IN OUT PUSHORT ValueCapsLength, IN PHIDP_PREPARSED_DATA PreparsedData)
HIDAPI NTSTATUS NTAPI HidP_GetUsagesEx(IN HIDP_REPORT_TYPE ReportType, IN USHORT LinkCollection, OUT PUSAGE_AND_PAGE ButtonList, IN OUT ULONG *UsageLength, IN PHIDP_PREPARSED_DATA PreparsedData, IN PCHAR Report, IN ULONG ReportLength)
HIDAPI ULONG NTAPI HidP_MaxDataListLength(IN HIDP_REPORT_TYPE ReportType, IN PHIDP_PREPARSED_DATA PreparsedData)
HIDAPI ULONG NTAPI HidP_MaxUsageListLength(IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage OPTIONAL, IN PHIDP_PREPARSED_DATA PreparsedData)
struct _HIDP_CAPS HIDP_CAPS
_Must_inspect_result_ _In_ UCHAR ReportID
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_UnsetUsages(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_opt_ USHORT LinkCollection, _Inout_updates_to_(*UsageLength, *UsageLength) PUSAGE UsageList, _Inout_ PULONG UsageLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
_Must_inspect_result_ _Inout_ PULONG LinkCollectionNodesLength
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS _Inout_ PUSHORT ButtonCapsLength
struct _HIDP_BUTTON_CAPS * PHIDP_BUTTON_CAPS
struct _USAGE_AND_PAGE USAGE_AND_PAGE
_Must_inspect_result_ _Out_ PHIDP_CAPS Capabilities
_Must_inspect_result_ _In_ USAGE UsagePage
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS ButtonCaps
BOOLEAN(NTAPI * PHIDP_INSERT_SCANCODES)(_In_opt_ PVOID Context, _In_reads_bytes_(Length) PCHAR NewScanCodes, _In_ ULONG Length)
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE ButtonList
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetScaledUsageValue(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _Out_ PLONG UsageValue, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS _Inout_ PUSHORT ValueCapsLength
struct _HIDP_UNKNOWN_TOKEN * PHIDP_UNKNOWN_TOKEN
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES _Inout_ OUT PULONG LengthAttributes
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetData(_In_ HIDP_REPORT_TYPE ReportType, _Inout_updates_to_(*DataLength, *DataLength) PHIDP_DATA DataList, _Inout_ PULONG DataLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
struct _HIDD_ATTRIBUTES * PHIDD_ATTRIBUTES
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetUsageValueArray(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _Inout_updates_bytes_(UsageValueByteLength) PCHAR UsageValue, _In_ USHORT UsageValueByteLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetUsages(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _Inout_updates_to_(*UsageLength, *UsageLength) PUSAGE UsageList, _Inout_ PULONG UsageLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_TranslateUsageAndPagesToI8042ScanCodes(_In_reads_(UsageListLength) PUSAGE_AND_PAGE ChangedUsageList, _In_ ULONG UsageListLength, _In_ HIDP_KEYBOARD_DIRECTION KeyAction, _Inout_ PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, _In_ PHIDP_INSERT_SCANCODES InsertCodesProcedure, _In_opt_ PVOID InsertCodesContext)
struct _HIDP_VALUE_CAPS * PHIDP_VALUE_CAPS
struct _HIDD_CONFIGURATION * PHIDD_CONFIGURATION
struct _HIDP_KEYBOARD_MODIFIER_STATE * PHIDP_KEYBOARD_MODIFIER_STATE
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE _Inout_ ULONG * UsageLength
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS ValueCaps
struct _HIDP_EXTENDED_ATTRIBUTES * PHIDP_EXTENDED_ATTRIBUTES
struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA
struct _HIDD_CONFIGURATION HIDD_CONFIGURATION
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetScaledUsageValue(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _In_ LONG UsageValue, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Inout_updates_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
_Must_inspect_result_ _In_ ULONG UsageListLength
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA _In_ ULONG ReportLength
struct _HIDP_LINK_COLLECTION_NODE * PHIDP_LINK_COLLECTION_NODE
struct _HIDP_VALUE_CAPS HIDP_VALUE_CAPS
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG DataLength
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetUsageValueArray(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _In_reads_bytes_(UsageValueByteLength) PCHAR UsageValue, _In_ USHORT UsageValueByteLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Inout_updates_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
struct _HIDP_LINK_COLLECTION_NODE HIDP_LINK_COLLECTION_NODE
enum _HIDP_KEYBOARD_DIRECTION HIDP_KEYBOARD_DIRECTION
enum _HIDP_REPORT_TYPE HIDP_REPORT_TYPE
struct _HIDP_KEYBOARD_MODIFIER_STATE HIDP_KEYBOARD_MODIFIER_STATE
struct _HIDP_BUTTON_CAPS HIDP_BUTTON_CAPS
struct _HIDP_UNKNOWN_TOKEN HIDP_UNKNOWN_TOKEN
struct _HIDD_ATTRIBUTES HIDD_ATTRIBUTES
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetUsages(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _Out_writes_to_(*UsageLength, *UsageLength) USAGE *UsageList, _Inout_ ULONG *UsageLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Out_writes_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
struct _HIDP_CAPS * PHIDP_CAPS
PUCHAR PHIDP_REPORT_DESCRIPTOR
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA DataList
struct _HIDP_DATA HIDP_DATA
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetUsageValue(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _In_ ULONG UsageValue, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Inout_updates_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
struct _USAGE_AND_PAGE * PUSAGE_AND_PAGE
struct _HIDP_EXTENDED_ATTRIBUTES HIDP_EXTENDED_ATTRIBUTES
struct _HIDP_DATA * PHIDP_DATA
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetUsageValue(_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _Out_ PULONG UsageValue, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
_Must_inspect_result_ _In_ USAGE _In_ USHORT LinkCollection
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_TranslateUsagesToI8042ScanCodes(_In_reads_(UsageListLength) PUSAGE ChangedUsageList, _In_ ULONG UsageListLength, _In_ HIDP_KEYBOARD_DIRECTION KeyAction, _Inout_ PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, _In_ PHIDP_INSERT_SCANCODES InsertCodesProcedure, _In_opt_ PVOID InsertCodesContext)
_Must_inspect_result_ _In_ USHORT DataIndex
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
#define _In_reads_bytes_(size)
#define _Out_writes_bytes_(size)
#define _Out_writes_(size)
#define _Inout_updates_to_(size, count)
#define _Must_inspect_result_
#define _Inout_updates_bytes_(size)
#define _Out_writes_to_(size, count)
#define _ANONYMOUS_STRUCT
_In_ ULONG _In_ ULONG _In_ ULONG Length
USHORT NumberLinkCollectionNodes
USHORT NumberInputButtonCaps
USHORT NumberOutputButtonCaps
USHORT NumberFeatureButtonCaps
USHORT NumberInputValueCaps
USHORT FeatureReportByteLength
USHORT NumberOutputValueCaps
USHORT OutputReportByteLength
USHORT InputReportByteLength
USHORT NumberFeatureDataIndices
USHORT NumberInputDataIndices
USHORT NumberFeatureValueCaps
USHORT NumberOutputDataIndices
_ANONYMOUS_UNION union _HIDP_DATA::@2969 DUMMYUNIONNAME
PHIDP_UNKNOWN_TOKEN GlobalUnknowns
_ANONYMOUS_STRUCT struct _HIDP_KEYBOARD_MODIFIER_STATE::@2964::@2965 DUMMYSTRUCTNAME
_ANONYMOUS_UNION union _HIDP_KEYBOARD_MODIFIER_STATE::@2964 DUMMYUNIONNAME
_ANONYMOUS_UNION union _HIDP_VALUE_CAPS::@2970 DUMMYUNIONNAME
struct _HIDP_VALUE_CAPS::@2970::@2972 NotRange
struct _HIDP_VALUE_CAPS::@2970::@2971 Range
BOOLEAN IsDesignatorRange
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Reserved_ PVOID Reserved