StephaneLenclud@50: StephaneLenclud@50: typedef USHORT USAGE, *PUSAGE; StephaneLenclud@50: typedef LONG NTSTATUS; StephaneLenclud@50: StephaneLenclud@50: typedef struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA; StephaneLenclud@50: StephaneLenclud@50: typedef enum _HIDP_REPORT_TYPE StephaneLenclud@50: { StephaneLenclud@50: HidP_Input, StephaneLenclud@50: HidP_Output, StephaneLenclud@50: HidP_Feature StephaneLenclud@50: } HIDP_REPORT_TYPE; StephaneLenclud@50: StephaneLenclud@50: typedef struct _HIDP_CAPS StephaneLenclud@50: { StephaneLenclud@50: USAGE Usage; StephaneLenclud@50: USAGE UsagePage; StephaneLenclud@50: USHORT InputReportByteLength; StephaneLenclud@50: USHORT OutputReportByteLength; StephaneLenclud@50: USHORT FeatureReportByteLength; StephaneLenclud@50: USHORT Reserved[17]; StephaneLenclud@50: StephaneLenclud@50: USHORT NumberLinkCollectionNodes; StephaneLenclud@50: StephaneLenclud@50: USHORT NumberInputButtonCaps; StephaneLenclud@50: USHORT NumberInputValueCaps; StephaneLenclud@50: USHORT NumberInputDataIndices; StephaneLenclud@50: StephaneLenclud@50: USHORT NumberOutputButtonCaps; StephaneLenclud@50: USHORT NumberOutputValueCaps; StephaneLenclud@50: USHORT NumberOutputDataIndices; StephaneLenclud@50: StephaneLenclud@50: USHORT NumberFeatureButtonCaps; StephaneLenclud@50: USHORT NumberFeatureValueCaps; StephaneLenclud@50: USHORT NumberFeatureDataIndices; StephaneLenclud@50: } HIDP_CAPS, *PHIDP_CAPS; StephaneLenclud@50: StephaneLenclud@50: StephaneLenclud@50: typedef struct _HIDP_BUTTON_CAPS StephaneLenclud@50: { StephaneLenclud@50: USAGE UsagePage; StephaneLenclud@50: UCHAR ReportID; StephaneLenclud@50: BOOLEAN IsAlias; StephaneLenclud@50: StephaneLenclud@50: USHORT BitField; StephaneLenclud@50: USHORT LinkCollection; // A unique internal index pointer StephaneLenclud@50: StephaneLenclud@50: USAGE LinkUsage; StephaneLenclud@50: USAGE LinkUsagePage; StephaneLenclud@50: StephaneLenclud@50: BOOLEAN IsRange; StephaneLenclud@50: BOOLEAN IsStringRange; StephaneLenclud@50: BOOLEAN IsDesignatorRange; StephaneLenclud@50: BOOLEAN IsAbsolute; StephaneLenclud@50: StephaneLenclud@50: ULONG Reserved[10]; StephaneLenclud@50: union { StephaneLenclud@50: struct { StephaneLenclud@50: USAGE UsageMin, UsageMax; StephaneLenclud@50: USHORT StringMin, StringMax; StephaneLenclud@50: USHORT DesignatorMin, DesignatorMax; StephaneLenclud@50: USHORT DataIndexMin, DataIndexMax; StephaneLenclud@50: } Range; StephaneLenclud@50: struct { StephaneLenclud@50: USAGE Usage, Reserved1; StephaneLenclud@50: USHORT StringIndex, Reserved2; StephaneLenclud@50: USHORT DesignatorIndex, Reserved3; StephaneLenclud@50: USHORT DataIndex, Reserved4; StephaneLenclud@50: } NotRange; StephaneLenclud@50: }; StephaneLenclud@50: StephaneLenclud@50: } HIDP_BUTTON_CAPS, *PHIDP_BUTTON_CAPS; StephaneLenclud@50: StephaneLenclud@50: typedef struct _HIDP_VALUE_CAPS StephaneLenclud@50: { StephaneLenclud@50: USAGE UsagePage; StephaneLenclud@50: UCHAR ReportID; StephaneLenclud@50: BOOLEAN IsAlias; StephaneLenclud@50: StephaneLenclud@50: USHORT BitField; StephaneLenclud@50: USHORT LinkCollection; // A unique internal index pointer StephaneLenclud@50: StephaneLenclud@50: USAGE LinkUsage; StephaneLenclud@50: USAGE LinkUsagePage; StephaneLenclud@50: StephaneLenclud@50: BOOLEAN IsRange; StephaneLenclud@50: BOOLEAN IsStringRange; StephaneLenclud@50: BOOLEAN IsDesignatorRange; StephaneLenclud@50: BOOLEAN IsAbsolute; StephaneLenclud@50: StephaneLenclud@50: BOOLEAN HasNull; // Does this channel have a null report union StephaneLenclud@50: UCHAR Reserved; StephaneLenclud@50: USHORT BitSize; // How many bits are devoted to this value? StephaneLenclud@50: StephaneLenclud@50: USHORT ReportCount; // See Note below. Usually set to 1. StephaneLenclud@50: USHORT Reserved2[5]; StephaneLenclud@50: StephaneLenclud@50: ULONG UnitsExp; StephaneLenclud@50: ULONG Units; StephaneLenclud@50: StephaneLenclud@50: LONG LogicalMin, LogicalMax; StephaneLenclud@50: LONG PhysicalMin, PhysicalMax; StephaneLenclud@50: StephaneLenclud@50: union { StephaneLenclud@50: struct { StephaneLenclud@50: USAGE UsageMin, UsageMax; StephaneLenclud@50: USHORT StringMin, StringMax; StephaneLenclud@50: USHORT DesignatorMin, DesignatorMax; StephaneLenclud@50: USHORT DataIndexMin, DataIndexMax; StephaneLenclud@50: } Range; StephaneLenclud@50: StephaneLenclud@50: struct { StephaneLenclud@50: USAGE Usage, Reserved1; StephaneLenclud@50: USHORT StringIndex, Reserved2; StephaneLenclud@50: USHORT DesignatorIndex, Reserved3; StephaneLenclud@50: USHORT DataIndex, Reserved4; StephaneLenclud@50: } NotRange; StephaneLenclud@50: }; StephaneLenclud@50: } HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS; StephaneLenclud@50: StephaneLenclud@50: NTSTATUS __stdcall StephaneLenclud@50: HidP_GetCaps ( StephaneLenclud@50: PHIDP_PREPARSED_DATA PreparsedData, StephaneLenclud@50: PHIDP_CAPS Capabilities StephaneLenclud@50: ); StephaneLenclud@50: StephaneLenclud@50: NTSTATUS __stdcall StephaneLenclud@50: HidP_GetButtonCaps ( StephaneLenclud@50: HIDP_REPORT_TYPE ReportType, StephaneLenclud@50: PHIDP_BUTTON_CAPS ButtonCaps, StephaneLenclud@50: PUSHORT ButtonCapsLength, StephaneLenclud@50: PHIDP_PREPARSED_DATA PreparsedData StephaneLenclud@50: ); StephaneLenclud@50: StephaneLenclud@50: NTSTATUS __stdcall StephaneLenclud@50: HidP_GetValueCaps ( StephaneLenclud@50: HIDP_REPORT_TYPE ReportType, StephaneLenclud@50: PHIDP_VALUE_CAPS ValueCaps, StephaneLenclud@50: PUSHORT ValueCapsLength, StephaneLenclud@50: PHIDP_PREPARSED_DATA PreparsedData StephaneLenclud@50: );