sl@17
|
1 |
using System;
|
sl@17
|
2 |
using System.Runtime.InteropServices;
|
sl@23
|
3 |
using Microsoft.Win32.SafeHandles;
|
sl@23
|
4 |
using System.Text;
|
sl@17
|
5 |
|
sl@17
|
6 |
namespace Win32
|
sl@17
|
7 |
{
|
sl@17
|
8 |
|
sl@17
|
9 |
static partial class Function
|
sl@17
|
10 |
{
|
sl@17
|
11 |
[DllImport("hid.dll", CharSet = CharSet.Unicode)]
|
sl@17
|
12 |
public static extern HidStatus HidP_GetUsagesEx(HIDP_REPORT_TYPE ReportType, ushort LinkCollection, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] USAGE_AND_PAGE[] ButtonList, ref uint UsageLength, IntPtr PreparsedData, [MarshalAs(UnmanagedType.LPArray)] byte[] Report, uint ReportLength);
|
sl@23
|
13 |
|
sl@23
|
14 |
[DllImport("hid.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
sl@24
|
15 |
public static extern Boolean HidD_GetManufacturerString(SafeFileHandle HidDeviceObject, StringBuilder Buffer, Int32 BufferLength);
|
sl@24
|
16 |
|
sl@24
|
17 |
[DllImport("hid.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
sl@24
|
18 |
public static extern Boolean HidD_GetProductString(SafeFileHandle HidDeviceObject, StringBuilder Buffer, Int32 BufferLength);
|
sl@23
|
19 |
|
sl@25
|
20 |
[DllImport("hid.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
sl@25
|
21 |
public static extern Boolean HidD_GetAttributes(SafeFileHandle HidDeviceObject, ref HIDD_ATTRIBUTES Attributes);
|
StephaneLenclud@50
|
22 |
|
StephaneLenclud@51
|
23 |
/// Return Type: NTSTATUS->LONG->int
|
StephaneLenclud@51
|
24 |
///PreparsedData: PHIDP_PREPARSED_DATA->_HIDP_PREPARSED_DATA*
|
StephaneLenclud@51
|
25 |
///Capabilities: PHIDP_CAPS->_HIDP_CAPS*
|
StephaneLenclud@51
|
26 |
[DllImportAttribute("hid.dll", EntryPoint = "HidP_GetCaps", CallingConvention = CallingConvention.StdCall)]
|
StephaneLenclud@56
|
27 |
public static extern HidStatus HidP_GetCaps(System.IntPtr PreparsedData, ref HIDP_CAPS Capabilities);
|
StephaneLenclud@50
|
28 |
|
StephaneLenclud@51
|
29 |
/// Return Type: NTSTATUS->LONG->int
|
StephaneLenclud@51
|
30 |
///ReportType: HIDP_REPORT_TYPE->_HIDP_REPORT_TYPE
|
StephaneLenclud@51
|
31 |
///ButtonCaps: PHIDP_BUTTON_CAPS->_HIDP_BUTTON_CAPS*
|
StephaneLenclud@51
|
32 |
///ButtonCapsLength: PUSHORT->USHORT*
|
StephaneLenclud@51
|
33 |
///PreparsedData: PHIDP_PREPARSED_DATA->_HIDP_PREPARSED_DATA*
|
StephaneLenclud@56
|
34 |
[System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetButtonCaps", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
|
StephaneLenclud@56
|
35 |
public static extern HidStatus HidP_GetButtonCaps(HIDP_REPORT_TYPE ReportType, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] HIDP_BUTTON_CAPS[] ButtonCaps, ref ushort ButtonCapsLength, System.IntPtr PreparsedData);
|
StephaneLenclud@50
|
36 |
|
StephaneLenclud@51
|
37 |
/// Return Type: NTSTATUS->LONG->int
|
StephaneLenclud@51
|
38 |
///ReportType: HIDP_REPORT_TYPE->_HIDP_REPORT_TYPE
|
StephaneLenclud@51
|
39 |
///ValueCaps: PHIDP_VALUE_CAPS->_HIDP_VALUE_CAPS*
|
StephaneLenclud@51
|
40 |
///ValueCapsLength: PUSHORT->USHORT*
|
StephaneLenclud@51
|
41 |
///PreparsedData: PHIDP_PREPARSED_DATA->_HIDP_PREPARSED_DATA*
|
StephaneLenclud@56
|
42 |
[System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetValueCaps", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
|
StephaneLenclud@56
|
43 |
public static extern HidStatus HidP_GetValueCaps(HIDP_REPORT_TYPE ReportType, ref HIDP_VALUE_CAPS[] ValueCaps, ref ushort ValueCapsLength, System.IntPtr PreparsedData);
|
StephaneLenclud@50
|
44 |
|
sl@17
|
45 |
}
|
sl@17
|
46 |
|
sl@17
|
47 |
|
sl@17
|
48 |
static partial class Macro
|
sl@17
|
49 |
{
|
sl@17
|
50 |
|
sl@17
|
51 |
|
sl@17
|
52 |
}
|
sl@17
|
53 |
|
sl@17
|
54 |
|
sl@17
|
55 |
static partial class Const
|
sl@17
|
56 |
{
|
sl@17
|
57 |
|
sl@17
|
58 |
|
sl@17
|
59 |
}
|
sl@17
|
60 |
|
sl@17
|
61 |
|
sl@17
|
62 |
public enum HIDP_REPORT_TYPE : ushort
|
sl@17
|
63 |
{
|
sl@17
|
64 |
HidP_Input = 0,
|
sl@17
|
65 |
HidP_Output,
|
sl@17
|
66 |
HidP_Feature
|
sl@17
|
67 |
}
|
sl@17
|
68 |
|
sl@17
|
69 |
|
sl@17
|
70 |
public enum HidStatus : uint
|
sl@17
|
71 |
{
|
sl@17
|
72 |
HIDP_STATUS_SUCCESS = 0x110000,
|
sl@17
|
73 |
HIDP_STATUS_NULL = 0x80110001,
|
sl@17
|
74 |
HIDP_STATUS_INVALID_PREPARSED_DATA = 0xc0110001,
|
sl@17
|
75 |
HIDP_STATUS_INVALID_REPORT_TYPE = 0xc0110002,
|
sl@17
|
76 |
HIDP_STATUS_INVALID_REPORT_LENGTH = 0xc0110003,
|
sl@17
|
77 |
HIDP_STATUS_USAGE_NOT_FOUND = 0xc0110004,
|
sl@17
|
78 |
HIDP_STATUS_VALUE_OUT_OF_RANGE = 0xc0110005,
|
sl@17
|
79 |
HIDP_STATUS_BAD_LOG_PHY_VALUES = 0xc0110006,
|
sl@17
|
80 |
HIDP_STATUS_BUFFER_TOO_SMALL = 0xc0110007,
|
sl@17
|
81 |
HIDP_STATUS_INTERNAL_ERROR = 0xc0110008,
|
sl@17
|
82 |
HIDP_STATUS_I8042_TRANS_UNKNOWN = 0xc0110009,
|
sl@17
|
83 |
HIDP_STATUS_INCOMPATIBLE_REPORT_ID = 0xc011000a,
|
sl@17
|
84 |
HIDP_STATUS_NOT_VALUE_ARRAY = 0xc011000b,
|
sl@17
|
85 |
HIDP_STATUS_IS_VALUE_ARRAY = 0xc011000c,
|
sl@17
|
86 |
HIDP_STATUS_DATA_INDEX_NOT_FOUND = 0xc011000d,
|
sl@17
|
87 |
HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE = 0xc011000e,
|
sl@17
|
88 |
HIDP_STATUS_BUTTON_NOT_PRESSED = 0xc011000f,
|
sl@17
|
89 |
HIDP_STATUS_REPORT_DOES_NOT_EXIST = 0xc0110010,
|
sl@17
|
90 |
HIDP_STATUS_NOT_IMPLEMENTED = 0xc0110020,
|
sl@17
|
91 |
HIDP_STATUS_I8242_TRANS_UNKNOWN = 0xc0110009
|
sl@17
|
92 |
}
|
sl@17
|
93 |
|
sl@17
|
94 |
|
sl@17
|
95 |
[StructLayout(LayoutKind.Sequential)]
|
sl@17
|
96 |
public struct USAGE_AND_PAGE
|
sl@17
|
97 |
{
|
sl@17
|
98 |
public ushort Usage;
|
sl@17
|
99 |
public ushort UsagePage;
|
sl@17
|
100 |
};
|
sl@17
|
101 |
|
sl@25
|
102 |
[StructLayout(LayoutKind.Sequential)]
|
sl@25
|
103 |
public struct HIDD_ATTRIBUTES
|
sl@25
|
104 |
{
|
sl@25
|
105 |
public uint Size;
|
sl@25
|
106 |
public ushort VendorID;
|
sl@25
|
107 |
public ushort ProductID;
|
sl@25
|
108 |
public ushort VersionNumber;
|
sl@25
|
109 |
}
|
sl@25
|
110 |
|
sl@17
|
111 |
|
StephaneLenclud@51
|
112 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
StephaneLenclud@51
|
113 |
public struct HIDP_CAPS
|
StephaneLenclud@51
|
114 |
{
|
StephaneLenclud@50
|
115 |
|
StephaneLenclud@51
|
116 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
117 |
public ushort Usage;
|
StephaneLenclud@50
|
118 |
|
StephaneLenclud@51
|
119 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
120 |
public ushort UsagePage;
|
StephaneLenclud@50
|
121 |
|
StephaneLenclud@51
|
122 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
123 |
public ushort InputReportByteLength;
|
StephaneLenclud@50
|
124 |
|
StephaneLenclud@51
|
125 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
126 |
public ushort OutputReportByteLength;
|
StephaneLenclud@50
|
127 |
|
StephaneLenclud@51
|
128 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
129 |
public ushort FeatureReportByteLength;
|
StephaneLenclud@50
|
130 |
|
StephaneLenclud@51
|
131 |
/// USHORT[17]
|
StephaneLenclud@51
|
132 |
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 17, ArraySubType = System.Runtime.InteropServices.UnmanagedType.U2)]
|
StephaneLenclud@51
|
133 |
public ushort[] Reserved;
|
StephaneLenclud@50
|
134 |
|
StephaneLenclud@51
|
135 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
136 |
public ushort NumberLinkCollectionNodes;
|
StephaneLenclud@50
|
137 |
|
StephaneLenclud@51
|
138 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
139 |
public ushort NumberInputButtonCaps;
|
StephaneLenclud@50
|
140 |
|
StephaneLenclud@51
|
141 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
142 |
public ushort NumberInputValueCaps;
|
StephaneLenclud@50
|
143 |
|
StephaneLenclud@51
|
144 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
145 |
public ushort NumberInputDataIndices;
|
StephaneLenclud@50
|
146 |
|
StephaneLenclud@51
|
147 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
148 |
public ushort NumberOutputButtonCaps;
|
StephaneLenclud@50
|
149 |
|
StephaneLenclud@51
|
150 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
151 |
public ushort NumberOutputValueCaps;
|
StephaneLenclud@50
|
152 |
|
StephaneLenclud@51
|
153 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
154 |
public ushort NumberOutputDataIndices;
|
StephaneLenclud@50
|
155 |
|
StephaneLenclud@51
|
156 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
157 |
public ushort NumberFeatureButtonCaps;
|
StephaneLenclud@50
|
158 |
|
StephaneLenclud@51
|
159 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
160 |
public ushort NumberFeatureValueCaps;
|
StephaneLenclud@50
|
161 |
|
StephaneLenclud@51
|
162 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
163 |
public ushort NumberFeatureDataIndices;
|
StephaneLenclud@51
|
164 |
}
|
StephaneLenclud@50
|
165 |
|
StephaneLenclud@51
|
166 |
/// <summary>
|
StephaneLenclud@51
|
167 |
/// Type created in place of an anonymous struct
|
StephaneLenclud@51
|
168 |
/// </summary>
|
StephaneLenclud@51
|
169 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
StephaneLenclud@51
|
170 |
public struct HIDP_BUTTON_CAPS_RANGE
|
StephaneLenclud@51
|
171 |
{
|
StephaneLenclud@50
|
172 |
|
StephaneLenclud@51
|
173 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
174 |
public ushort UsageMin;
|
StephaneLenclud@50
|
175 |
|
StephaneLenclud@51
|
176 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
177 |
public ushort UsageMax;
|
StephaneLenclud@50
|
178 |
|
StephaneLenclud@51
|
179 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
180 |
public ushort StringMin;
|
StephaneLenclud@50
|
181 |
|
StephaneLenclud@51
|
182 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
183 |
public ushort StringMax;
|
StephaneLenclud@50
|
184 |
|
StephaneLenclud@51
|
185 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
186 |
public ushort DesignatorMin;
|
StephaneLenclud@50
|
187 |
|
StephaneLenclud@51
|
188 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
189 |
public ushort DesignatorMax;
|
StephaneLenclud@50
|
190 |
|
StephaneLenclud@51
|
191 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
192 |
public ushort DataIndexMin;
|
StephaneLenclud@50
|
193 |
|
StephaneLenclud@51
|
194 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
195 |
public ushort DataIndexMax;
|
StephaneLenclud@51
|
196 |
}
|
StephaneLenclud@50
|
197 |
|
StephaneLenclud@51
|
198 |
/// <summary>
|
StephaneLenclud@51
|
199 |
/// Type created in place of an anonymous struct
|
StephaneLenclud@51
|
200 |
/// </summary>
|
StephaneLenclud@51
|
201 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
StephaneLenclud@51
|
202 |
public struct HIDP_BUTTON_CAPS_NOT_RANGE
|
StephaneLenclud@51
|
203 |
{
|
StephaneLenclud@50
|
204 |
|
StephaneLenclud@51
|
205 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
206 |
public ushort Usage;
|
StephaneLenclud@50
|
207 |
|
StephaneLenclud@51
|
208 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
209 |
public ushort Reserved1;
|
StephaneLenclud@50
|
210 |
|
StephaneLenclud@51
|
211 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
212 |
public ushort StringIndex;
|
StephaneLenclud@50
|
213 |
|
StephaneLenclud@51
|
214 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
215 |
public ushort Reserved2;
|
StephaneLenclud@50
|
216 |
|
StephaneLenclud@51
|
217 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
218 |
public ushort DesignatorIndex;
|
StephaneLenclud@50
|
219 |
|
StephaneLenclud@51
|
220 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
221 |
public ushort Reserved3;
|
StephaneLenclud@50
|
222 |
|
StephaneLenclud@51
|
223 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
224 |
public ushort DataIndex;
|
StephaneLenclud@50
|
225 |
|
StephaneLenclud@51
|
226 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
227 |
public ushort Reserved4;
|
StephaneLenclud@51
|
228 |
}
|
StephaneLenclud@50
|
229 |
|
StephaneLenclud@57
|
230 |
/// <summary>
|
StephaneLenclud@57
|
231 |
///
|
StephaneLenclud@57
|
232 |
/// </summary>
|
StephaneLenclud@57
|
233 |
[StructLayoutAttribute(LayoutKind.Explicit, Pack = 1)]
|
StephaneLenclud@51
|
234 |
public struct HIDP_BUTTON_CAPS
|
StephaneLenclud@51
|
235 |
{
|
StephaneLenclud@51
|
236 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@57
|
237 |
[FieldOffset(0)]
|
StephaneLenclud@51
|
238 |
public ushort UsagePage;
|
StephaneLenclud@50
|
239 |
|
StephaneLenclud@51
|
240 |
/// UCHAR->unsigned char
|
StephaneLenclud@57
|
241 |
[FieldOffset(2)]
|
StephaneLenclud@51
|
242 |
public byte ReportID;
|
StephaneLenclud@50
|
243 |
|
StephaneLenclud@51
|
244 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@57
|
245 |
[FieldOffset(3)]
|
StephaneLenclud@57
|
246 |
public bool IsAlias;
|
StephaneLenclud@50
|
247 |
|
StephaneLenclud@51
|
248 |
/// USHORT->unsigned short
|
StephaneLenclud@57
|
249 |
[FieldOffset(4)]
|
StephaneLenclud@51
|
250 |
public ushort BitField;
|
StephaneLenclud@50
|
251 |
|
StephaneLenclud@51
|
252 |
/// USHORT->unsigned short
|
StephaneLenclud@57
|
253 |
[FieldOffset(6)]
|
StephaneLenclud@51
|
254 |
public ushort LinkCollection;
|
StephaneLenclud@50
|
255 |
|
StephaneLenclud@51
|
256 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@57
|
257 |
[FieldOffset(8)]
|
StephaneLenclud@51
|
258 |
public ushort LinkUsage;
|
StephaneLenclud@50
|
259 |
|
StephaneLenclud@51
|
260 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@57
|
261 |
[FieldOffset(10)]
|
StephaneLenclud@51
|
262 |
public ushort LinkUsagePage;
|
StephaneLenclud@50
|
263 |
|
StephaneLenclud@51
|
264 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@57
|
265 |
[FieldOffset(12)]
|
StephaneLenclud@57
|
266 |
public bool IsRange;
|
StephaneLenclud@50
|
267 |
|
StephaneLenclud@51
|
268 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@57
|
269 |
[FieldOffset(13)]
|
StephaneLenclud@57
|
270 |
public bool IsStringRange;
|
StephaneLenclud@50
|
271 |
|
StephaneLenclud@51
|
272 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@57
|
273 |
[FieldOffset(14)]
|
StephaneLenclud@57
|
274 |
public bool IsDesignatorRange;
|
StephaneLenclud@50
|
275 |
|
StephaneLenclud@51
|
276 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@57
|
277 |
[FieldOffset(15)]
|
StephaneLenclud@57
|
278 |
public bool IsAbsolute;
|
StephaneLenclud@50
|
279 |
|
StephaneLenclud@51
|
280 |
/// ULONG[10]
|
StephaneLenclud@57
|
281 |
[FieldOffset(16)]
|
StephaneLenclud@57
|
282 |
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.U4)]
|
StephaneLenclud@51
|
283 |
public uint[] Reserved;
|
StephaneLenclud@50
|
284 |
|
StephaneLenclud@57
|
285 |
/// Union Range/NotRange
|
StephaneLenclud@57
|
286 |
[FieldOffset(56)]
|
StephaneLenclud@57
|
287 |
HIDP_BUTTON_CAPS_RANGE Range;
|
StephaneLenclud@57
|
288 |
|
StephaneLenclud@57
|
289 |
[FieldOffset(56)]
|
StephaneLenclud@57
|
290 |
HIDP_BUTTON_CAPS_NOT_RANGE NotRange;
|
StephaneLenclud@51
|
291 |
}
|
StephaneLenclud@50
|
292 |
|
StephaneLenclud@51
|
293 |
/// <summary>
|
StephaneLenclud@51
|
294 |
/// Type created in place of an anonymous struct
|
StephaneLenclud@51
|
295 |
/// </summary>
|
StephaneLenclud@51
|
296 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
StephaneLenclud@51
|
297 |
public struct HIDP_VALUE_CAPS_RANGE
|
StephaneLenclud@51
|
298 |
{
|
StephaneLenclud@50
|
299 |
|
StephaneLenclud@51
|
300 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
301 |
public ushort UsageMin;
|
StephaneLenclud@50
|
302 |
|
StephaneLenclud@51
|
303 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
304 |
public ushort UsageMax;
|
StephaneLenclud@50
|
305 |
|
StephaneLenclud@51
|
306 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
307 |
public ushort StringMin;
|
StephaneLenclud@50
|
308 |
|
StephaneLenclud@51
|
309 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
310 |
public ushort StringMax;
|
StephaneLenclud@50
|
311 |
|
StephaneLenclud@51
|
312 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
313 |
public ushort DesignatorMin;
|
StephaneLenclud@50
|
314 |
|
StephaneLenclud@51
|
315 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
316 |
public ushort DesignatorMax;
|
StephaneLenclud@50
|
317 |
|
StephaneLenclud@51
|
318 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
319 |
public ushort DataIndexMin;
|
StephaneLenclud@50
|
320 |
|
StephaneLenclud@51
|
321 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
322 |
public ushort DataIndexMax;
|
StephaneLenclud@51
|
323 |
}
|
StephaneLenclud@50
|
324 |
|
StephaneLenclud@51
|
325 |
/// <summary>
|
StephaneLenclud@51
|
326 |
/// Type created in place of an anonymous struct
|
StephaneLenclud@51
|
327 |
/// </summary>
|
StephaneLenclud@51
|
328 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
StephaneLenclud@51
|
329 |
public struct HIDP_VALUE_CAPS_NOT_RANGE
|
StephaneLenclud@51
|
330 |
{
|
StephaneLenclud@50
|
331 |
|
StephaneLenclud@51
|
332 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
333 |
public ushort Usage;
|
StephaneLenclud@50
|
334 |
|
StephaneLenclud@51
|
335 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
336 |
public ushort Reserved1;
|
StephaneLenclud@50
|
337 |
|
StephaneLenclud@51
|
338 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
339 |
public ushort StringIndex;
|
StephaneLenclud@50
|
340 |
|
StephaneLenclud@51
|
341 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
342 |
public ushort Reserved2;
|
StephaneLenclud@50
|
343 |
|
StephaneLenclud@51
|
344 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
345 |
public ushort DesignatorIndex;
|
StephaneLenclud@50
|
346 |
|
StephaneLenclud@51
|
347 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
348 |
public ushort Reserved3;
|
StephaneLenclud@50
|
349 |
|
StephaneLenclud@51
|
350 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
351 |
public ushort DataIndex;
|
StephaneLenclud@50
|
352 |
|
StephaneLenclud@51
|
353 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
354 |
public ushort Reserved4;
|
StephaneLenclud@51
|
355 |
}
|
StephaneLenclud@50
|
356 |
|
StephaneLenclud@51
|
357 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Explicit)]
|
StephaneLenclud@51
|
358 |
public struct HIDP_VALUE_CAPS_UNION
|
StephaneLenclud@51
|
359 |
{
|
StephaneLenclud@50
|
360 |
|
StephaneLenclud@51
|
361 |
///
|
StephaneLenclud@51
|
362 |
[System.Runtime.InteropServices.FieldOffsetAttribute(0)]
|
StephaneLenclud@51
|
363 |
public HIDP_VALUE_CAPS_RANGE Range;
|
StephaneLenclud@50
|
364 |
|
StephaneLenclud@51
|
365 |
///
|
StephaneLenclud@51
|
366 |
[System.Runtime.InteropServices.FieldOffsetAttribute(0)]
|
StephaneLenclud@51
|
367 |
public HIDP_VALUE_CAPS_NOT_RANGE NotRange;
|
StephaneLenclud@51
|
368 |
}
|
StephaneLenclud@50
|
369 |
|
StephaneLenclud@51
|
370 |
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
StephaneLenclud@51
|
371 |
public struct HIDP_VALUE_CAPS
|
StephaneLenclud@51
|
372 |
{
|
StephaneLenclud@50
|
373 |
|
StephaneLenclud@51
|
374 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
375 |
public ushort UsagePage;
|
StephaneLenclud@50
|
376 |
|
StephaneLenclud@51
|
377 |
/// UCHAR->unsigned char
|
StephaneLenclud@51
|
378 |
public byte ReportID;
|
StephaneLenclud@50
|
379 |
|
StephaneLenclud@51
|
380 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@51
|
381 |
public byte IsAlias;
|
StephaneLenclud@50
|
382 |
|
StephaneLenclud@51
|
383 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
384 |
public ushort BitField;
|
StephaneLenclud@50
|
385 |
|
StephaneLenclud@51
|
386 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
387 |
public ushort LinkCollection;
|
StephaneLenclud@50
|
388 |
|
StephaneLenclud@51
|
389 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
390 |
public ushort LinkUsage;
|
StephaneLenclud@50
|
391 |
|
StephaneLenclud@51
|
392 |
/// USAGE->USHORT->unsigned short
|
StephaneLenclud@51
|
393 |
public ushort LinkUsagePage;
|
StephaneLenclud@50
|
394 |
|
StephaneLenclud@51
|
395 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@51
|
396 |
public byte IsRange;
|
StephaneLenclud@50
|
397 |
|
StephaneLenclud@51
|
398 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@51
|
399 |
public byte IsStringRange;
|
StephaneLenclud@50
|
400 |
|
StephaneLenclud@51
|
401 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@51
|
402 |
public byte IsDesignatorRange;
|
StephaneLenclud@50
|
403 |
|
StephaneLenclud@51
|
404 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@51
|
405 |
public byte IsAbsolute;
|
StephaneLenclud@50
|
406 |
|
StephaneLenclud@51
|
407 |
/// BOOLEAN->BYTE->unsigned char
|
StephaneLenclud@51
|
408 |
public byte HasNull;
|
StephaneLenclud@50
|
409 |
|
StephaneLenclud@51
|
410 |
/// UCHAR->unsigned char
|
StephaneLenclud@51
|
411 |
public byte Reserved;
|
StephaneLenclud@50
|
412 |
|
StephaneLenclud@51
|
413 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
414 |
public ushort BitSize;
|
StephaneLenclud@50
|
415 |
|
StephaneLenclud@51
|
416 |
/// USHORT->unsigned short
|
StephaneLenclud@51
|
417 |
public ushort ReportCount;
|
StephaneLenclud@50
|
418 |
|
StephaneLenclud@51
|
419 |
/// USHORT[5]
|
StephaneLenclud@51
|
420 |
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = System.Runtime.InteropServices.UnmanagedType.U2)]
|
StephaneLenclud@51
|
421 |
public ushort[] Reserved2;
|
StephaneLenclud@50
|
422 |
|
StephaneLenclud@51
|
423 |
/// ULONG->unsigned int
|
StephaneLenclud@51
|
424 |
public uint UnitsExp;
|
StephaneLenclud@50
|
425 |
|
StephaneLenclud@51
|
426 |
/// ULONG->unsigned int
|
StephaneLenclud@51
|
427 |
public uint Units;
|
StephaneLenclud@50
|
428 |
|
StephaneLenclud@51
|
429 |
/// LONG->int
|
StephaneLenclud@51
|
430 |
public int LogicalMin;
|
StephaneLenclud@50
|
431 |
|
StephaneLenclud@51
|
432 |
/// LONG->int
|
StephaneLenclud@51
|
433 |
public int LogicalMax;
|
StephaneLenclud@50
|
434 |
|
StephaneLenclud@51
|
435 |
/// LONG->int
|
StephaneLenclud@51
|
436 |
public int PhysicalMin;
|
StephaneLenclud@50
|
437 |
|
StephaneLenclud@51
|
438 |
/// LONG->int
|
StephaneLenclud@51
|
439 |
public int PhysicalMax;
|
StephaneLenclud@50
|
440 |
|
StephaneLenclud@51
|
441 |
///
|
StephaneLenclud@51
|
442 |
public HIDP_VALUE_CAPS_UNION Union;
|
StephaneLenclud@51
|
443 |
}
|
StephaneLenclud@51
|
444 |
}
|
StephaneLenclud@50
|
445 |
|
StephaneLenclud@51
|
446 |
|