1 #define _HIDPI_
2 #define _HIDPI_NO_FUNCTION_MACROS_
3 #include <ntddk.h>
4 #include <hidpddi.h>
5
6 #include "hidparser.h"
7 #include "hidp.h"
8
9 #define UNIMPLEMENTED DebugFunction("%s is UNIMPLEMENTED\n", __FUNCTION__)
10
11 VOID
12 NTAPI
HidP_FreeCollectionDescription(IN PHIDP_DEVICE_DESC DeviceDescription)13 HidP_FreeCollectionDescription(
14 IN PHIDP_DEVICE_DESC DeviceDescription)
15 {
16 //
17 // free collection
18 //
19 HidParser_FreeCollectionDescription(DeviceDescription);
20 }
21
22
23 HIDAPI
24 NTSTATUS
25 NTAPI
HidP_GetCaps(IN PHIDP_PREPARSED_DATA PreparsedData,OUT PHIDP_CAPS Capabilities)26 HidP_GetCaps(
27 IN PHIDP_PREPARSED_DATA PreparsedData,
28 OUT PHIDP_CAPS Capabilities)
29 {
30 //
31 // get caps
32 //
33 return HidParser_GetCaps(PreparsedData, Capabilities);
34 }
35
36 NTSTATUS
TranslateStatusForUpperLayer(IN NTSTATUS Status)37 TranslateStatusForUpperLayer(
38 IN NTSTATUS Status)
39 {
40 //
41 // now we are handling only this values, for others just return
42 // status as it is.
43 //
44 switch (Status)
45 {
46 case HIDP_STATUS_INTERNAL_ERROR:
47 return STATUS_INSUFFICIENT_RESOURCES;
48 case HIDP_STATUS_INVALID_REPORT_TYPE:
49 return HIDP_STATUS_INVALID_REPORT_TYPE;
50 case HIDP_STATUS_BUFFER_TOO_SMALL:
51 return STATUS_BUFFER_TOO_SMALL;
52 case HIDP_STATUS_USAGE_NOT_FOUND:
53 return STATUS_NO_DATA_DETECTED;
54 default:
55 return Status;
56 }
57 }
58
59 NTSTATUS
60 NTAPI
HidP_GetCollectionDescription(IN PHIDP_REPORT_DESCRIPTOR ReportDesc,IN ULONG DescLength,IN POOL_TYPE PoolType,OUT PHIDP_DEVICE_DESC DeviceDescription)61 HidP_GetCollectionDescription(
62 IN PHIDP_REPORT_DESCRIPTOR ReportDesc,
63 IN ULONG DescLength,
64 IN POOL_TYPE PoolType,
65 OUT PHIDP_DEVICE_DESC DeviceDescription)
66 {
67 NTSTATUS Status;
68
69 //
70 // get description;
71 //
72 Status = HidParser_GetCollectionDescription(ReportDesc, DescLength, PoolType, DeviceDescription);
73 return TranslateStatusForUpperLayer(Status);
74 }
75
76 HIDAPI
77 ULONG
78 NTAPI
HidP_MaxUsageListLength(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage OPTIONAL,IN PHIDP_PREPARSED_DATA PreparsedData)79 HidP_MaxUsageListLength(
80 IN HIDP_REPORT_TYPE ReportType,
81 IN USAGE UsagePage OPTIONAL,
82 IN PHIDP_PREPARSED_DATA PreparsedData)
83 {
84 //
85 // sanity check
86 //
87 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
88
89 //
90 // get usage length
91 //
92 return HidParser_MaxUsageListLength(PreparsedData, ReportType, UsagePage);
93 }
94
95 HIDAPI
96 NTSTATUS
97 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)98 HidP_GetSpecificValueCaps(
99 IN HIDP_REPORT_TYPE ReportType,
100 IN USAGE UsagePage,
101 IN USHORT LinkCollection,
102 IN USAGE Usage,
103 OUT PHIDP_VALUE_CAPS ValueCaps,
104 IN OUT PUSHORT ValueCapsLength,
105 IN PHIDP_PREPARSED_DATA PreparsedData)
106 {
107 //
108 // sanity check
109 //
110 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
111
112 //
113 // get value caps
114 //
115 return HidParser_GetSpecificValueCaps(PreparsedData, ReportType, UsagePage, LinkCollection, Usage, ValueCaps, ValueCapsLength);
116 }
117
118 HIDAPI
119 NTSTATUS
120 NTAPI
HidP_GetUsages(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection OPTIONAL,OUT PUSAGE UsageList,IN OUT PULONG UsageLength,IN PHIDP_PREPARSED_DATA PreparsedData,IN PCHAR Report,IN ULONG ReportLength)121 HidP_GetUsages(
122 IN HIDP_REPORT_TYPE ReportType,
123 IN USAGE UsagePage,
124 IN USHORT LinkCollection OPTIONAL,
125 OUT PUSAGE UsageList,
126 IN OUT PULONG UsageLength,
127 IN PHIDP_PREPARSED_DATA PreparsedData,
128 IN PCHAR Report,
129 IN ULONG ReportLength)
130 {
131 //
132 // sanity check
133 //
134 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
135
136 //
137 // get usages
138 //
139 return HidParser_GetUsages(PreparsedData, ReportType, UsagePage, LinkCollection, UsageList, UsageLength, Report, ReportLength);
140 }
141
142
143 #undef HidP_GetButtonCaps
144
145 HIDAPI
146 NTSTATUS
147 NTAPI
HidP_UsageListDifference(IN PUSAGE PreviousUsageList,IN PUSAGE CurrentUsageList,OUT PUSAGE BreakUsageList,OUT PUSAGE MakeUsageList,IN ULONG UsageListLength)148 HidP_UsageListDifference(
149 IN PUSAGE PreviousUsageList,
150 IN PUSAGE CurrentUsageList,
151 OUT PUSAGE BreakUsageList,
152 OUT PUSAGE MakeUsageList,
153 IN ULONG UsageListLength)
154 {
155 return HidParser_UsageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
156 }
157
158 HIDAPI
159 NTSTATUS
160 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)161 HidP_GetUsagesEx(
162 IN HIDP_REPORT_TYPE ReportType,
163 IN USHORT LinkCollection,
164 OUT PUSAGE_AND_PAGE ButtonList,
165 IN OUT ULONG *UsageLength,
166 IN PHIDP_PREPARSED_DATA PreparsedData,
167 IN PCHAR Report,
168 IN ULONG ReportLength)
169 {
170 return HidP_GetUsages(ReportType, HID_USAGE_PAGE_UNDEFINED, LinkCollection, &ButtonList->Usage, UsageLength, PreparsedData, Report, ReportLength);
171 }
172
173 HIDAPI
174 NTSTATUS
175 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)176 HidP_UsageAndPageListDifference(
177 IN PUSAGE_AND_PAGE PreviousUsageList,
178 IN PUSAGE_AND_PAGE CurrentUsageList,
179 OUT PUSAGE_AND_PAGE BreakUsageList,
180 OUT PUSAGE_AND_PAGE MakeUsageList,
181 IN ULONG UsageListLength)
182 {
183 return HidParser_UsageAndPageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
184 }
185
186 HIDAPI
187 NTSTATUS
188 NTAPI
HidP_GetScaledUsageValue(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection OPTIONAL,IN USAGE Usage,OUT PLONG UsageValue,IN PHIDP_PREPARSED_DATA PreparsedData,IN PCHAR Report,IN ULONG ReportLength)189 HidP_GetScaledUsageValue(
190 IN HIDP_REPORT_TYPE ReportType,
191 IN USAGE UsagePage,
192 IN USHORT LinkCollection OPTIONAL,
193 IN USAGE Usage,
194 OUT PLONG UsageValue,
195 IN PHIDP_PREPARSED_DATA PreparsedData,
196 IN PCHAR Report,
197 IN ULONG ReportLength)
198 {
199 //
200 // sanity check
201 //
202 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
203
204 //
205 // get scaled usage value
206 //
207 return HidParser_GetScaledUsageValue(PreparsedData, ReportType, UsagePage, LinkCollection, Usage, UsageValue, Report, ReportLength);
208 }
209
210 HIDAPI
211 NTSTATUS
212 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 PCHAR Report,IN ULONG ReportLength)213 HidP_GetUsageValue(
214 IN HIDP_REPORT_TYPE ReportType,
215 IN USAGE UsagePage,
216 IN USHORT LinkCollection,
217 IN USAGE Usage,
218 OUT PULONG UsageValue,
219 IN PHIDP_PREPARSED_DATA PreparsedData,
220 IN PCHAR Report,
221 IN ULONG ReportLength)
222 {
223 //
224 // sanity check
225 //
226 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
227
228 //
229 // get scaled usage value
230 //
231 return HidParser_GetUsageValue(PreparsedData, ReportType, UsagePage, LinkCollection, Usage, UsageValue, Report, ReportLength);
232 }
233
234
235 HIDAPI
236 NTSTATUS
237 NTAPI
HidP_TranslateUsageAndPagesToI8042ScanCodes(IN PUSAGE_AND_PAGE ChangedUsageList,IN ULONG UsageListLength,IN HIDP_KEYBOARD_DIRECTION KeyAction,IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,IN PVOID InsertCodesContext)238 HidP_TranslateUsageAndPagesToI8042ScanCodes(
239 IN PUSAGE_AND_PAGE ChangedUsageList,
240 IN ULONG UsageListLength,
241 IN HIDP_KEYBOARD_DIRECTION KeyAction,
242 IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
243 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
244 IN PVOID InsertCodesContext)
245 {
246 //
247 // translate usage pages
248 //
249 return HidParser_TranslateUsageAndPagesToI8042ScanCodes(ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
250 }
251
252 HIDAPI
253 NTSTATUS
254 NTAPI
HidP_GetButtonCaps(HIDP_REPORT_TYPE ReportType,PHIDP_BUTTON_CAPS ButtonCaps,PUSHORT ButtonCapsLength,PHIDP_PREPARSED_DATA PreparsedData)255 HidP_GetButtonCaps(
256 HIDP_REPORT_TYPE ReportType,
257 PHIDP_BUTTON_CAPS ButtonCaps,
258 PUSHORT ButtonCapsLength,
259 PHIDP_PREPARSED_DATA PreparsedData)
260 {
261 return HidP_GetSpecificButtonCaps(ReportType, HID_USAGE_PAGE_UNDEFINED, 0, 0, ButtonCaps, ButtonCapsLength, PreparsedData);
262 }
263
264 HIDAPI
265 NTSTATUS
266 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)267 HidP_GetSpecificButtonCaps(
268 IN HIDP_REPORT_TYPE ReportType,
269 IN USAGE UsagePage,
270 IN USHORT LinkCollection,
271 IN USAGE Usage,
272 OUT PHIDP_BUTTON_CAPS ButtonCaps,
273 IN OUT PUSHORT ButtonCapsLength,
274 IN PHIDP_PREPARSED_DATA PreparsedData)
275 {
276 UNIMPLEMENTED;
277 ASSERT(FALSE);
278 return STATUS_NOT_IMPLEMENTED;
279 }
280
281 HIDAPI
282 NTSTATUS
283 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)284 HidP_GetData(
285 IN HIDP_REPORT_TYPE ReportType,
286 OUT PHIDP_DATA DataList,
287 IN OUT PULONG DataLength,
288 IN PHIDP_PREPARSED_DATA PreparsedData,
289 IN PCHAR Report,
290 IN ULONG ReportLength)
291 {
292 UNIMPLEMENTED;
293 ASSERT(FALSE);
294 return STATUS_NOT_IMPLEMENTED;
295 }
296
297 HIDAPI
298 NTSTATUS
299 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)300 HidP_GetExtendedAttributes(
301 IN HIDP_REPORT_TYPE ReportType,
302 IN USHORT DataIndex,
303 IN PHIDP_PREPARSED_DATA PreparsedData,
304 OUT PHIDP_EXTENDED_ATTRIBUTES Attributes,
305 IN OUT PULONG LengthAttributes)
306 {
307 UNIMPLEMENTED;
308 ASSERT(FALSE);
309 return STATUS_NOT_IMPLEMENTED;
310 }
311
312 HIDAPI
313 NTSTATUS
314 NTAPI
HidP_GetLinkCollectionNodes(OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,IN OUT PULONG LinkCollectionNodesLength,IN PHIDP_PREPARSED_DATA PreparsedData)315 HidP_GetLinkCollectionNodes(
316 OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,
317 IN OUT PULONG LinkCollectionNodesLength,
318 IN PHIDP_PREPARSED_DATA PreparsedData)
319 {
320 UNIMPLEMENTED;
321 ASSERT(FALSE);
322 return STATUS_NOT_IMPLEMENTED;
323 }
324
325 NTSTATUS
326 NTAPI
HidP_SysPowerEvent(IN PCHAR HidPacket,IN USHORT HidPacketLength,IN PHIDP_PREPARSED_DATA Ppd,OUT PULONG OutputBuffer)327 HidP_SysPowerEvent(
328 IN PCHAR HidPacket,
329 IN USHORT HidPacketLength,
330 IN PHIDP_PREPARSED_DATA Ppd,
331 OUT PULONG OutputBuffer)
332 {
333 UNIMPLEMENTED;
334 ASSERT(FALSE);
335 return STATUS_NOT_IMPLEMENTED;
336 }
337
338 NTSTATUS
339 NTAPI
HidP_SysPowerCaps(IN PHIDP_PREPARSED_DATA Ppd,OUT PULONG OutputBuffer)340 HidP_SysPowerCaps(
341 IN PHIDP_PREPARSED_DATA Ppd,
342 OUT PULONG OutputBuffer)
343 {
344 UNIMPLEMENTED;
345 ASSERT(FALSE);
346 return STATUS_NOT_IMPLEMENTED;
347 }
348
349 HIDAPI
350 NTSTATUS
351 NTAPI
HidP_GetUsageValueArray(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection OPTIONAL,IN USAGE Usage,OUT PCHAR UsageValue,IN USHORT UsageValueByteLength,IN PHIDP_PREPARSED_DATA PreparsedData,IN PCHAR Report,IN ULONG ReportLength)352 HidP_GetUsageValueArray(
353 IN HIDP_REPORT_TYPE ReportType,
354 IN USAGE UsagePage,
355 IN USHORT LinkCollection OPTIONAL,
356 IN USAGE Usage,
357 OUT PCHAR UsageValue,
358 IN USHORT UsageValueByteLength,
359 IN PHIDP_PREPARSED_DATA PreparsedData,
360 IN PCHAR Report,
361 IN ULONG ReportLength)
362 {
363 UNIMPLEMENTED;
364 ASSERT(FALSE);
365 return STATUS_NOT_IMPLEMENTED;
366 }
367
368
369 HIDAPI
370 NTSTATUS
371 NTAPI
HidP_UnsetUsages(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection,IN PUSAGE UsageList,IN OUT PULONG UsageLength,IN PHIDP_PREPARSED_DATA PreparsedData,IN OUT PCHAR Report,IN ULONG ReportLength)372 HidP_UnsetUsages(
373 IN HIDP_REPORT_TYPE ReportType,
374 IN USAGE UsagePage,
375 IN USHORT LinkCollection,
376 IN PUSAGE UsageList,
377 IN OUT PULONG UsageLength,
378 IN PHIDP_PREPARSED_DATA PreparsedData,
379 IN OUT PCHAR Report,
380 IN ULONG ReportLength)
381 {
382 UNIMPLEMENTED;
383 ASSERT(FALSE);
384 return STATUS_NOT_IMPLEMENTED;
385 }
386
387 HIDAPI
388 NTSTATUS
389 NTAPI
HidP_TranslateUsagesToI8042ScanCodes(IN PUSAGE ChangedUsageList,IN ULONG UsageListLength,IN HIDP_KEYBOARD_DIRECTION KeyAction,IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,IN PVOID InsertCodesContext)390 HidP_TranslateUsagesToI8042ScanCodes(
391 IN PUSAGE ChangedUsageList,
392 IN ULONG UsageListLength,
393 IN HIDP_KEYBOARD_DIRECTION KeyAction,
394 IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
395 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
396 IN PVOID InsertCodesContext)
397 {
398 UNIMPLEMENTED;
399 ASSERT(FALSE);
400 return STATUS_NOT_IMPLEMENTED;
401 }
402
403 HIDAPI
404 NTSTATUS
405 NTAPI
HidP_SetUsages(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection,IN PUSAGE UsageList,IN OUT PULONG UsageLength,IN PHIDP_PREPARSED_DATA PreparsedData,IN OUT PCHAR Report,IN ULONG ReportLength)406 HidP_SetUsages(
407 IN HIDP_REPORT_TYPE ReportType,
408 IN USAGE UsagePage,
409 IN USHORT LinkCollection,
410 IN PUSAGE UsageList,
411 IN OUT PULONG UsageLength,
412 IN PHIDP_PREPARSED_DATA PreparsedData,
413 IN OUT PCHAR Report,
414 IN ULONG ReportLength)
415 {
416 UNIMPLEMENTED;
417 ASSERT(FALSE);
418 return STATUS_NOT_IMPLEMENTED;
419 }
420
421 HIDAPI
422 NTSTATUS
423 NTAPI
HidP_SetUsageValueArray(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection OPTIONAL,IN USAGE Usage,IN PCHAR UsageValue,IN USHORT UsageValueByteLength,IN PHIDP_PREPARSED_DATA PreparsedData,OUT PCHAR Report,IN ULONG ReportLength)424 HidP_SetUsageValueArray(
425 IN HIDP_REPORT_TYPE ReportType,
426 IN USAGE UsagePage,
427 IN USHORT LinkCollection OPTIONAL,
428 IN USAGE Usage,
429 IN PCHAR UsageValue,
430 IN USHORT UsageValueByteLength,
431 IN PHIDP_PREPARSED_DATA PreparsedData,
432 OUT PCHAR Report,
433 IN ULONG ReportLength)
434 {
435 UNIMPLEMENTED;
436 ASSERT(FALSE);
437 return STATUS_NOT_IMPLEMENTED;
438 }
439
440 HIDAPI
441 NTSTATUS
442 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,IN OUT PCHAR Report,IN ULONG ReportLength)443 HidP_SetUsageValue(
444 IN HIDP_REPORT_TYPE ReportType,
445 IN USAGE UsagePage,
446 IN USHORT LinkCollection,
447 IN USAGE Usage,
448 IN ULONG UsageValue,
449 IN PHIDP_PREPARSED_DATA PreparsedData,
450 IN OUT PCHAR Report,
451 IN ULONG ReportLength)
452 {
453 UNIMPLEMENTED;
454 ASSERT(FALSE);
455 return STATUS_NOT_IMPLEMENTED;
456 }
457
458 HIDAPI
459 NTSTATUS
460 NTAPI
HidP_SetScaledUsageValue(IN HIDP_REPORT_TYPE ReportType,IN USAGE UsagePage,IN USHORT LinkCollection OPTIONAL,IN USAGE Usage,IN LONG UsageValue,IN PHIDP_PREPARSED_DATA PreparsedData,IN OUT PCHAR Report,IN ULONG ReportLength)461 HidP_SetScaledUsageValue(
462 IN HIDP_REPORT_TYPE ReportType,
463 IN USAGE UsagePage,
464 IN USHORT LinkCollection OPTIONAL,
465 IN USAGE Usage,
466 IN LONG UsageValue,
467 IN PHIDP_PREPARSED_DATA PreparsedData,
468 IN OUT PCHAR Report,
469 IN ULONG ReportLength)
470 {
471 UNIMPLEMENTED;
472 ASSERT(FALSE);
473 return STATUS_NOT_IMPLEMENTED;
474 }
475
476 HIDAPI
477 NTSTATUS
478 NTAPI
HidP_SetData(IN HIDP_REPORT_TYPE ReportType,IN PHIDP_DATA DataList,IN OUT PULONG DataLength,IN PHIDP_PREPARSED_DATA PreparsedData,IN OUT PCHAR Report,IN ULONG ReportLength)479 HidP_SetData(
480 IN HIDP_REPORT_TYPE ReportType,
481 IN PHIDP_DATA DataList,
482 IN OUT PULONG DataLength,
483 IN PHIDP_PREPARSED_DATA PreparsedData,
484 IN OUT PCHAR Report,
485 IN ULONG ReportLength)
486 {
487 UNIMPLEMENTED;
488 ASSERT(FALSE);
489 return STATUS_NOT_IMPLEMENTED;
490 }
491
492 HIDAPI
493 ULONG
494 NTAPI
HidP_MaxDataListLength(IN HIDP_REPORT_TYPE ReportType,IN PHIDP_PREPARSED_DATA PreparsedData)495 HidP_MaxDataListLength(
496 IN HIDP_REPORT_TYPE ReportType,
497 IN PHIDP_PREPARSED_DATA PreparsedData)
498 {
499 UNIMPLEMENTED;
500 ASSERT(FALSE);
501 return STATUS_NOT_IMPLEMENTED;
502 }
503
504 HIDAPI
505 NTSTATUS
506 NTAPI
HidP_InitializeReportForID(IN HIDP_REPORT_TYPE ReportType,IN UCHAR ReportID,IN PHIDP_PREPARSED_DATA PreparsedData,IN OUT PCHAR Report,IN ULONG ReportLength)507 HidP_InitializeReportForID(
508 IN HIDP_REPORT_TYPE ReportType,
509 IN UCHAR ReportID,
510 IN PHIDP_PREPARSED_DATA PreparsedData,
511 IN OUT PCHAR Report,
512 IN ULONG ReportLength)
513 {
514 UNIMPLEMENTED;
515 ASSERT(FALSE);
516 return STATUS_NOT_IMPLEMENTED;
517 }
518
519 #undef HidP_GetValueCaps
520
521 HIDAPI
522 NTSTATUS
523 NTAPI
HidP_GetValueCaps(HIDP_REPORT_TYPE ReportType,PHIDP_VALUE_CAPS ValueCaps,PUSHORT ValueCapsLength,PHIDP_PREPARSED_DATA PreparsedData)524 HidP_GetValueCaps(
525 HIDP_REPORT_TYPE ReportType,
526 PHIDP_VALUE_CAPS ValueCaps,
527 PUSHORT ValueCapsLength,
528 PHIDP_PREPARSED_DATA PreparsedData)
529 {
530 return HidP_GetSpecificValueCaps(ReportType,
531 HID_USAGE_PAGE_UNDEFINED,
532 HIDP_LINK_COLLECTION_UNSPECIFIED,
533 0,
534 ValueCaps,
535 ValueCapsLength,
536 PreparsedData);
537 }
538