]> git.zerfleddert.de Git - proxmark3-svn/blame_incremental - client/include/hidsdi.h
More CRLF -> LF conversion
[proxmark3-svn] / client / include / hidsdi.h
... / ...
CommitLineData
1/*++\r
2\r
3Copyright (c) 1996 Microsoft Corporation\r
4\r
5Module Name:\r
6\r
7 HIDSDI.H\r
8\r
9Abstract:\r
10\r
11 This module contains the PUBLIC definitions for the\r
12 code that implements the HID dll.\r
13\r
14Environment:\r
15\r
16 Kernel & user mode\r
17\r
18--*/\r
19\r
20\r
21#ifndef _HIDSDI_H\r
22#define _HIDSDI_H\r
23\r
24#include <pshpack4.h>\r
25\r
26//#include "wtypes.h"\r
27\r
28//#include <windef.h>\r
29//#include <win32.h>\r
30//#include <basetyps.h>\r
31\r
32//typedef LONG NTSTATUS;\r
33#include "hidusage.h"\r
34#include "hidpi.h"\r
35\r
36typedef struct _HIDD_CONFIGURATION {\r
37 PVOID cookie;\r
38 ULONG size;\r
39 ULONG RingBufferSize;\r
40} HIDD_CONFIGURATION, *PHIDD_CONFIGURATION;\r
41\r
42typedef struct _HIDD_ATTRIBUTES {\r
43 ULONG Size; // = sizeof (struct _HIDD_ATTRIBUTES)\r
44\r
45 //\r
46 // Vendor ids of this hid device\r
47 //\r
48 USHORT VendorID;\r
49 USHORT ProductID;\r
50 USHORT VersionNumber;\r
51\r
52 //\r
53 // Additional fields will be added to the end of this structure.\r
54 //\r
55} HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES;\r
56\r
57\r
58BOOLEAN __stdcall\r
59HidD_GetAttributes (\r
60 IN HANDLE HidDeviceObject,\r
61 OUT PHIDD_ATTRIBUTES Attributes\r
62 );\r
63/*++\r
64Routine Description:\r
65 Fill in the given HIDD_ATTRIBUTES structure with the attributes of the\r
66 given hid device.\r
67\r
68--*/\r
69\r
70\r
71void __stdcall\r
72HidD_GetHidGuid (\r
73 OUT LPGUID HidGuid\r
74 );\r
75\r
76BOOLEAN __stdcall\r
77HidD_GetPreparsedData (\r
78 IN HANDLE HidDeviceObject,\r
79 OUT PHIDP_PREPARSED_DATA * PreparsedData\r
80 );\r
81/*++\r
82Routine Description:\r
83 Given a handle to a valid Hid Class Device Object, retrieve the preparsed\r
84 data for the device. This routine will allocate the appropriately \r
85 sized buffer to hold this preparsed data. It is up to client to call\r
86 HidP_FreePreparsedData to free the memory allocated to this structure when\r
87 it is no longer needed.\r
88\r
89Arguments:\r
90 HidDeviceObject A handle to a Hid Device that the client obtains using \r
91 a call to CreateFile on a valid Hid device string name.\r
92 The string name can be obtained using standard PnP calls.\r
93\r
94 PreparsedData An opaque data structure used by other functions in this \r
95 library to retrieve information about a given device.\r
96\r
97Return Value:\r
98 TRUE if successful.\r
99 FALSE otherwise -- Use GetLastError() to get extended error information\r
100--*/\r
101\r
102BOOLEAN __stdcall\r
103HidD_FreePreparsedData (\r
104 IN PHIDP_PREPARSED_DATA PreparsedData\r
105 );\r
106\r
107BOOLEAN __stdcall\r
108HidD_FlushQueue (\r
109 IN HANDLE HidDeviceObject\r
110 );\r
111/*++\r
112Routine Description:\r
113 Flush the input queue for the given HID device.\r
114\r
115Arguments:\r
116 HidDeviceObject A handle to a Hid Device that the client obtains using \r
117 a call to CreateFile on a valid Hid device string name.\r
118 The string name can be obtained using standard PnP calls.\r
119\r
120Return Value:\r
121 TRUE if successful\r
122 FALSE otherwise -- Use GetLastError() to get extended error information\r
123--*/\r
124\r
125BOOLEAN __stdcall\r
126HidD_GetConfiguration (\r
127 IN HANDLE HidDeviceObject,\r
128 OUT PHIDD_CONFIGURATION Configuration,\r
129 IN ULONG ConfigurationLength\r
130 );\r
131/*++\r
132Routine Description:\r
133 Get the configuration information for this Hid device\r
134\r
135Arguments:\r
136 HidDeviceObject A handle to a Hid Device Object.\r
137\r
138 Configuration A configuration structure. HidD_GetConfiguration MUST\r
139 be called before the configuration can be modified and\r
140 set using HidD_SetConfiguration\r
141\r
142 ConfigurationLength That is ``sizeof (HIDD_CONFIGURATION)''. Using this\r
143 parameter, we can later increase the length of the \r
144 configuration array and not break older apps.\r
145\r
146Return Value:\r
147 TRUE if successful\r
148 FALSE otherwise -- Use GetLastError() to get extended error information\r
149--*/\r
150\r
151BOOLEAN __stdcall\r
152HidD_SetConfiguration (\r
153 IN HANDLE HidDeviceObject,\r
154 IN PHIDD_CONFIGURATION Configuration,\r
155 IN ULONG ConfigurationLength\r
156 );\r
157/*++\r
158Routine Description:\r
159 Set the configuration information for this Hid device...\r
160 \r
161 NOTE: HidD_GetConfiguration must be called to retrieve the current \r
162 configuration information before this information can be modified \r
163 and set.\r
164\r
165Arguments:\r
166 HidDeviceObject A handle to a Hid Device Object.\r
167 \r
168 Configuration A configuration structure. HidD_GetConfiguration MUST\r
169 be called before the configuration can be modified and\r
170 set using HidD_SetConfiguration\r
171 \r
172 ConfigurationLength That is ``sizeof (HIDD_CONFIGURATION)''. Using this\r
173 parameter, we can later increase the length of the \r
174 configuration array and not break older apps.\r
175\r
176Return Value:\r
177 TRUE if successful\r
178 FALSE otherwise -- Use GetLastError() to get extended error information\r
179--*/\r
180\r
181BOOLEAN __stdcall\r
182HidD_GetFeature (\r
183 IN HANDLE HidDeviceObject,\r
184 OUT PVOID ReportBuffer,\r
185 IN ULONG ReportBufferLength\r
186 );\r
187/*++\r
188Routine Description:\r
189 Retrieve a feature report from a HID device.\r
190\r
191Arguments:\r
192 HidDeviceObject A handle to a Hid Device Object.\r
193 \r
194 ReportBuffer The buffer that the feature report should be placed \r
195 into. The first byte of the buffer should be set to\r
196 the report ID of the desired report\r
197 \r
198 ReportBufferLength The size (in bytes) of ReportBuffer. This value \r
199 should be greater than or equal to the \r
200 FeatureReportByteLength field as specified in the \r
201 HIDP_CAPS structure for the device\r
202Return Value:\r
203 TRUE if successful\r
204 FALSE otherwise -- Use GetLastError() to get extended error information\r
205--*/\r
206\r
207BOOLEAN __stdcall\r
208HidD_SetFeature (\r
209 IN HANDLE HidDeviceObject,\r
210 IN PVOID ReportBuffer,\r
211 IN ULONG ReportBufferLength\r
212 );\r
213/*++\r
214Routine Description:\r
215 Send a feature report to a HID device.\r
216\r
217Arguments:\r
218 HidDeviceObject A handle to a Hid Device Object.\r
219 \r
220 ReportBuffer The buffer of the feature report to send to the device\r
221 \r
222 ReportBufferLength The size (in bytes) of ReportBuffer. This value \r
223 should be greater than or equal to the \r
224 FeatureReportByteLength field as specified in the \r
225 HIDP_CAPS structure for the device\r
226Return Value:\r
227 TRUE if successful\r
228 FALSE otherwise -- Use GetLastError() to get extended error information\r
229--*/\r
230\r
231BOOLEAN __stdcall\r
232HidD_GetNumInputBuffers (\r
233 IN HANDLE HidDeviceObject,\r
234 OUT PULONG NumberBuffers\r
235 );\r
236/*++\r
237Routine Description:\r
238 This function returns the number of input buffers used by the specified\r
239 file handle to the Hid device. Each file object has a number of buffers\r
240 associated with it to queue reports read from the device but which have\r
241 not yet been read by the user-mode app with a handle to that device.\r
242\r
243Arguments:\r
244 HidDeviceObject A handle to a Hid Device Object.\r
245 \r
246 NumberBuffers Number of buffers currently being used for this file\r
247 handle to the Hid device\r
248\r
249Return Value:\r
250 TRUE if successful\r
251 FALSE otherwise -- Use GetLastError() to get extended error information\r
252--*/\r
253\r
254BOOLEAN __stdcall\r
255HidD_SetNumInputBuffers (\r
256 IN HANDLE HidDeviceObject,\r
257 OUT ULONG NumberBuffers\r
258 );\r
259/*++\r
260\r
261Routine Description:\r
262 This function sets the number of input buffers used by the specified\r
263 file handle to the Hid device. Each file object has a number of buffers\r
264 associated with it to queue reports read from the device but which have\r
265 not yet been read by the user-mode app with a handle to that device.\r
266\r
267Arguments:\r
268 HidDeviceObject A handle to a Hid Device Object.\r
269 \r
270 NumberBuffers New number of buffers to use for this file handle to\r
271 the Hid device\r
272\r
273Return Value:\r
274 TRUE if successful\r
275 FALSE otherwise -- Use GetLastError() to get extended error information\r
276--*/\r
277\r
278BOOLEAN __stdcall\r
279HidD_GetPhysicalDescriptor (\r
280 IN HANDLE HidDeviceObject,\r
281 OUT PVOID Buffer,\r
282 IN ULONG BufferLength\r
283 );\r
284/*++\r
285Routine Description:\r
286 This function retrieves the raw physical descriptor for the specified\r
287 Hid device. \r
288\r
289Arguments:\r
290 HidDeviceObject A handle to a Hid Device Object.\r
291 \r
292 Buffer Buffer which on return will contain the physical\r
293 descriptor if one exists for the specified device\r
294 handle\r
295\r
296 BufferLength Length of buffer (in bytes)\r
297\r
298\r
299Return Value:\r
300 TRUE if successful\r
301 FALSE otherwise -- Use GetLastError() to get extended error information\r
302--*/\r
303\r
304BOOLEAN __stdcall\r
305HidD_GetManufacturerString (\r
306 IN HANDLE HidDeviceObject,\r
307 OUT PVOID Buffer,\r
308 IN ULONG BufferLength\r
309 );\r
310/*++\r
311Routine Description:\r
312 This function retrieves the manufacturer string from the specified \r
313 Hid device. \r
314\r
315Arguments:\r
316 HidDeviceObject A handle to a Hid Device Object.\r
317 \r
318 Buffer Buffer which on return will contain the manufacturer\r
319 string returned from the device. This string is a \r
320 wide-character string\r
321\r
322 BufferLength Length of Buffer (in bytes)\r
323\r
324\r
325Return Value:\r
326 TRUE if successful\r
327 FALSE otherwise -- Use GetLastError() to get extended error information\r
328--*/\r
329\r
330BOOLEAN __stdcall\r
331HidD_GetProductString (\r
332 IN HANDLE HidDeviceObject,\r
333 OUT PVOID Buffer,\r
334 IN ULONG BufferLength\r
335 );\r
336/*++\r
337Routine Description:\r
338 This function retrieves the product string from the specified \r
339 Hid device. \r
340\r
341Arguments:\r
342 HidDeviceObject A handle to a Hid Device Object.\r
343 \r
344 Buffer Buffer which on return will contain the product\r
345 string returned from the device. This string is a \r
346 wide-character string\r
347\r
348 BufferLength Length of Buffer (in bytes)\r
349\r
350\r
351Return Value:\r
352 TRUE if successful\r
353 FALSE otherwise -- Use GetLastError() to get extended error information\r
354--*/\r
355\r
356BOOLEAN __stdcall\r
357HidD_GetIndexedString (\r
358 IN HANDLE HidDeviceObject,\r
359 IN ULONG StringIndex,\r
360 OUT PVOID Buffer,\r
361 IN ULONG BufferLength\r
362 );\r
363/*++\r
364Routine Description:\r
365 This function retrieves a string from the specified Hid device that is\r
366 specified with a certain string index.\r
367\r
368Arguments:\r
369 HidDeviceObject A handle to a Hid Device Object.\r
370 \r
371 StringIndex Index of the string to retrieve\r
372\r
373 Buffer Buffer which on return will contain the product\r
374 string returned from the device. This string is a \r
375 wide-character string\r
376\r
377 BufferLength Length of Buffer (in bytes)\r
378\r
379Return Value:\r
380 TRUE if successful\r
381 FALSE otherwise -- Use GetLastError() to get extended error information\r
382--*/\r
383\r
384BOOLEAN __stdcall\r
385HidD_GetSerialNumberString (\r
386 IN HANDLE HidDeviceObject,\r
387 OUT PVOID Buffer,\r
388 IN ULONG BufferLength\r
389 );\r
390/*++\r
391Routine Description:\r
392 This function retrieves the serial number string from the specified \r
393 Hid device. \r
394\r
395Arguments:\r
396 HidDeviceObject A handle to a Hid Device Object.\r
397 \r
398 Buffer Buffer which on return will contain the serial number\r
399 string returned from the device. This string is a \r
400 wide-character string\r
401\r
402 BufferLength Length of Buffer (in bytes)\r
403\r
404Return Value:\r
405 TRUE if successful\r
406 FALSE otherwise -- Use GetLastError() to get extended error information\r
407--*/\r
408\r
409\r
410#include <poppack.h>\r
411\r
412#endif\r
Impressum, Datenschutz