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