ReactOS  0.4.14-dev-1233-gf5658fd
hidp.c
Go to the documentation of this file.
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
15 {
16  HID_PARSER Parser;
17 
18  //
19  // init parser
20  //
22 
23  //
24  // free collection
25  //
27 }
28 
29 
30 HIDAPI
32 NTAPI
36 {
37  HID_PARSER Parser;
38 
39  //
40  // init parser
41  //
43 
44  //
45  // get caps
46  //
48 }
49 
53 {
54  //
55  // now we are handling only this values, for others just return
56  // status as it is.
57  //
58  switch (Status)
59  {
68  default:
69  return Status;
70  }
71 }
72 
74 NTAPI
76  IN PHIDP_REPORT_DESCRIPTOR ReportDesc,
77  IN ULONG DescLength,
80 {
81  HID_PARSER Parser;
83 
84  //
85  // init parser
86  //
88 
89  //
90  // get description;
91  //
92  Status = HidParser_GetCollectionDescription(&Parser, ReportDesc, DescLength, PoolType, DeviceDescription);
94 }
95 
96 HIDAPI
97 ULONG
98 NTAPI
100  IN HIDP_REPORT_TYPE ReportType,
103 {
104  HID_PARSER Parser;
105 
106  //
107  // sanity check
108  //
109  ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
110 
111  //
112  // init parser
113  //
115 
116 
117  //
118  // get usage length
119  //
120  return HidParser_MaxUsageListLength(&Parser, PreparsedData, ReportType, UsagePage);
121 }
122 
123 HIDAPI
124 NTSTATUS
125 NTAPI
127  IN HIDP_REPORT_TYPE ReportType,
130  IN USAGE Usage,
134 {
135  HID_PARSER Parser;
136 
137  //
138  // sanity check
139  //
140  ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
141 
142  //
143  // init parser
144  //
146 
147  //
148  // get value caps
149  //
151 }
152 
153 HIDAPI
154 NTSTATUS
155 NTAPI
157  IN HIDP_REPORT_TYPE ReportType,
160  OUT PUSAGE UsageList,
163  IN PCHAR Report,
165 {
166  HID_PARSER Parser;
167 
168  //
169  // sanity check
170  //
171  ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
172 
173  //
174  // init parser
175  //
177 
178  //
179  // get usages
180  //
181  return HidParser_GetUsages(&Parser, PreparsedData, ReportType, UsagePage, LinkCollection, UsageList, UsageLength, Report, ReportLength);
182 }
183 
184 
185 #undef HidP_GetButtonCaps
186 
187 HIDAPI
188 NTSTATUS
189 NTAPI
191  IN PUSAGE PreviousUsageList,
192  IN PUSAGE CurrentUsageList,
193  OUT PUSAGE BreakUsageList,
194  OUT PUSAGE MakeUsageList,
196 {
197  return HidParser_UsageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
198 }
199 
200 HIDAPI
201 NTSTATUS
202 NTAPI
204  IN HIDP_REPORT_TYPE ReportType,
209  IN PCHAR Report,
211 {
213 }
214 
215 HIDAPI
216 NTSTATUS
217 NTAPI
219  IN PUSAGE_AND_PAGE PreviousUsageList,
220  IN PUSAGE_AND_PAGE CurrentUsageList,
221  OUT PUSAGE_AND_PAGE BreakUsageList,
222  OUT PUSAGE_AND_PAGE MakeUsageList,
224 {
225  return HidParser_UsageAndPageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
226 }
227 
228 HIDAPI
229 NTSTATUS
230 NTAPI
232  IN HIDP_REPORT_TYPE ReportType,
235  IN USAGE Usage,
236  OUT PLONG UsageValue,
238  IN PCHAR Report,
240 {
241  HID_PARSER Parser;
242 
243  //
244  // sanity check
245  //
246  ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
247 
248  //
249  // init parser
250  //
252 
253  //
254  // get scaled usage value
255  //
256  return HidParser_GetScaledUsageValue(&Parser, PreparsedData, ReportType, UsagePage, LinkCollection, Usage, UsageValue, Report, ReportLength);
257 }
258 
259 HIDAPI
260 NTSTATUS
261 NTAPI
263  IN HIDP_REPORT_TYPE ReportType,
266  IN USAGE Usage,
267  OUT PULONG UsageValue,
269  IN PCHAR Report,
271 {
272  HID_PARSER Parser;
273 
274  //
275  // sanity check
276  //
277  ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
278 
279  //
280  // init parser
281  //
283 
284  //
285  // get scaled usage value
286  //
287  return HidParser_GetUsageValue(&Parser, PreparsedData, ReportType, UsagePage, LinkCollection, Usage, UsageValue, Report, ReportLength);
288 }
289 
290 
291 HIDAPI
292 NTSTATUS
293 NTAPI
295  IN PUSAGE_AND_PAGE ChangedUsageList,
297  IN HIDP_KEYBOARD_DIRECTION KeyAction,
298  IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
299  IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
300  IN PVOID InsertCodesContext)
301 {
302  HID_PARSER Parser;
303 
304  //
305  // init parser
306  //
308 
309  //
310  // translate usage pages
311  //
312  return HidParser_TranslateUsageAndPagesToI8042ScanCodes(&Parser, ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
313 }
314 
315 HIDAPI
316 NTSTATUS
317 NTAPI
319  HIDP_REPORT_TYPE ReportType,
323 {
325 }
326 
327 HIDAPI
328 NTSTATUS
329 NTAPI
331  IN HIDP_REPORT_TYPE ReportType,
334  IN USAGE Usage,
338 {
340  ASSERT(FALSE);
341  return STATUS_NOT_IMPLEMENTED;
342 }
343 
344 HIDAPI
345 NTSTATUS
346 NTAPI
348  IN HIDP_REPORT_TYPE ReportType,
352  IN PCHAR Report,
354 {
356  ASSERT(FALSE);
357  return STATUS_NOT_IMPLEMENTED;
358 }
359 
360 HIDAPI
361 NTSTATUS
362 NTAPI
364  IN HIDP_REPORT_TYPE ReportType,
369 {
371  ASSERT(FALSE);
372  return STATUS_NOT_IMPLEMENTED;
373 }
374 
375 HIDAPI
376 NTSTATUS
377 NTAPI
379  OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,
382 {
384  ASSERT(FALSE);
385  return STATUS_NOT_IMPLEMENTED;
386 }
387 
388 NTSTATUS
389 NTAPI
391  IN PCHAR HidPacket,
392  IN USHORT HidPacketLength,
395 {
397  ASSERT(FALSE);
398  return STATUS_NOT_IMPLEMENTED;
399 }
400 
401 NTSTATUS
402 NTAPI
406 {
408  ASSERT(FALSE);
409  return STATUS_NOT_IMPLEMENTED;
410 }
411 
412 HIDAPI
413 NTSTATUS
414 NTAPI
416  IN HIDP_REPORT_TYPE ReportType,
419  IN USAGE Usage,
420  OUT PCHAR UsageValue,
421  IN USHORT UsageValueByteLength,
423  IN PCHAR Report,
425 {
427  ASSERT(FALSE);
428  return STATUS_NOT_IMPLEMENTED;
429 }
430 
431 
432 HIDAPI
433 NTSTATUS
434 NTAPI
436  IN HIDP_REPORT_TYPE ReportType,
439  IN PUSAGE UsageList,
442  IN OUT PCHAR Report,
444 {
446  ASSERT(FALSE);
447  return STATUS_NOT_IMPLEMENTED;
448 }
449 
450 HIDAPI
451 NTSTATUS
452 NTAPI
454  IN PUSAGE ChangedUsageList,
456  IN HIDP_KEYBOARD_DIRECTION KeyAction,
457  IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
458  IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
459  IN PVOID InsertCodesContext)
460 {
462  ASSERT(FALSE);
463  return STATUS_NOT_IMPLEMENTED;
464 }
465 
466 HIDAPI
467 NTSTATUS
468 NTAPI
470  IN HIDP_REPORT_TYPE ReportType,
473  IN PUSAGE UsageList,
476  IN OUT PCHAR Report,
478 {
480  ASSERT(FALSE);
481  return STATUS_NOT_IMPLEMENTED;
482 }
483 
484 HIDAPI
485 NTSTATUS
486 NTAPI
488  IN HIDP_REPORT_TYPE ReportType,
491  IN USAGE Usage,
492  IN PCHAR UsageValue,
493  IN USHORT UsageValueByteLength,
495  OUT PCHAR Report,
497 {
499  ASSERT(FALSE);
500  return STATUS_NOT_IMPLEMENTED;
501 }
502 
503 HIDAPI
504 NTSTATUS
505 NTAPI
507  IN HIDP_REPORT_TYPE ReportType,
510  IN USAGE Usage,
511  IN ULONG UsageValue,
513  IN OUT PCHAR Report,
515 {
517  ASSERT(FALSE);
518  return STATUS_NOT_IMPLEMENTED;
519 }
520 
521 HIDAPI
522 NTSTATUS
523 NTAPI
525  IN HIDP_REPORT_TYPE ReportType,
528  IN USAGE Usage,
529  IN LONG UsageValue,
531  IN OUT PCHAR Report,
533 {
535  ASSERT(FALSE);
536  return STATUS_NOT_IMPLEMENTED;
537 }
538 
539 HIDAPI
540 NTSTATUS
541 NTAPI
543  IN HIDP_REPORT_TYPE ReportType,
547  IN OUT PCHAR Report,
549 {
551  ASSERT(FALSE);
552  return STATUS_NOT_IMPLEMENTED;
553 }
554 
555 HIDAPI
556 ULONG
557 NTAPI
559  IN HIDP_REPORT_TYPE ReportType,
561 {
563  ASSERT(FALSE);
564  return STATUS_NOT_IMPLEMENTED;
565 }
566 
567 HIDAPI
568 NTSTATUS
569 NTAPI
571  IN HIDP_REPORT_TYPE ReportType,
572  IN UCHAR ReportID,
574  IN OUT PCHAR Report,
576 {
578  ASSERT(FALSE);
579  return STATUS_NOT_IMPLEMENTED;
580 }
581 
582 #undef HidP_GetValueCaps
583 
584 HIDAPI
585 NTSTATUS
586 NTAPI
588  HIDP_REPORT_TYPE ReportType,
592 {
593  return HidP_GetSpecificValueCaps(ReportType,
596  0,
597  ValueCaps,
599  PreparsedData);
600 }
NTSTATUS NTAPI HidP_SysPowerEvent(IN PCHAR HidPacket, IN USHORT HidPacketLength, IN PHIDP_PREPARSED_DATA Ppd, OUT PULONG OutputBuffer)
Definition: hidp.c:390
signed char * PCHAR
Definition: retypes.h:7
HIDAPI ULONG NTAPI HidParser_MaxUsageListLength(IN PHID_PARSER Parser, IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage OPTIONAL)
Definition: hidparser.c:287
VOID NTAPI HidParser_FreeCollectionDescription(IN PHID_PARSER Parser, IN PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:195
#define IN
Definition: typedefs.h:39
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
HIDAPI NTSTATUS 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)
Definition: hidp.c:156
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
HIDAPI NTSTATUS 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)
Definition: hidp.c:524
BOOLEAN(NTAPI * PHIDP_INSERT_SCANCODES)(_In_opt_ PVOID Context, _In_reads_bytes_(Length) PCHAR NewScanCodes, _In_ ULONG Length)
Definition: hidpi.h:73
HIDAPI NTSTATUS 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)
Definition: hidp.c:231
HIDAPI NTSTATUS NTAPI HidParser_UsageListDifference(IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidparser.c:421
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
HIDAPI NTSTATUS 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)
Definition: hidp.c:435
HIDAPI NTSTATUS 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)
Definition: hidp.c:453
HIDAPI ULONG NTAPI HidP_MaxUsageListLength(IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage OPTIONAL, IN PHIDP_PREPARSED_DATA PreparsedData)
Definition: hidp.c:99
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS _Inout_ PUSHORT ButtonCapsLength
Definition: hidpi.h:382
HIDAPI NTSTATUS 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)
Definition: hidp.c:487
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
USAGE Usage
Definition: hidpi.h:79
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI HidP_FreeCollectionDescription(IN PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidp.c:13
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE _Inout_ ULONG * UsageLength
Definition: hidpi.h:425
PUCHAR PHIDP_REPORT_DESCRIPTOR
Definition: hidpi.h:38
NTSTATUS NTAPI HidParser_GetCollectionDescription(IN PHID_PARSER Parser, IN PHIDP_REPORT_DESCRIPTOR ReportDesc, IN ULONG DescLength, IN POOL_TYPE PoolType, OUT PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:49
enum _HIDP_KEYBOARD_DIRECTION HIDP_KEYBOARD_DIRECTION
HIDAPI NTSTATUS NTAPI HidP_GetLinkCollectionNodes(OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes, IN OUT PULONG LinkCollectionNodesLength, IN PHIDP_PREPARSED_DATA PreparsedData)
Definition: hidp.c:378
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS ValueCaps
Definition: hidpi.h:396
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
NTSTATUS NTAPI HidP_SysPowerCaps(IN PHIDP_PREPARSED_DATA Ppd, OUT PULONG OutputBuffer)
Definition: hidp.c:403
HIDAPI NTSTATUS 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)
Definition: hidp.c:363
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
HIDAPI NTSTATUS 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)
Definition: hidp.c:126
HIDAPI NTSTATUS 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)
Definition: hidp.c:262
HIDAPI NTSTATUS NTAPI HidP_UsageListDifference(IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidp.c:190
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
long LONG
Definition: pedump.c:60
HIDAPI NTSTATUS 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)
Definition: hidp.c:506
HIDAPI ULONG NTAPI HidP_MaxDataListLength(IN HIDP_REPORT_TYPE ReportType, IN PHIDP_PREPARSED_DATA PreparsedData)
Definition: hidp.c:558
HIDAPI NTSTATUS NTAPI HidP_InitializeReportForID(IN HIDP_REPORT_TYPE ReportType, IN UCHAR ReportID, IN PHIDP_PREPARSED_DATA PreparsedData, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidp.c:570
#define HIDAPI
Definition: hidpi.h:35
VOID HidParser_InitParser(IN PHIDPARSER_ALLOC_FUNCTION AllocFunction, IN PHIDPARSER_FREE_FUNCTION FreeFunction, IN PHIDPARSER_ZERO_FUNCTION ZeroFunction, IN PHIDPARSER_COPY_FUNCTION CopyFunction, IN PHIDPARSER_DEBUG_FUNCTION DebugFunction, OUT PHID_PARSER Parser)
Definition: api.c:211
enum _HIDP_REPORT_TYPE HIDP_REPORT_TYPE
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA DataList
Definition: hidpi.h:333
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
HIDAPI NTSTATUS NTAPI HidP_GetCaps(IN PHIDP_PREPARSED_DATA PreparsedData, OUT PHIDP_CAPS Capabilities)
Definition: hidp.c:33
HIDAPI NTSTATUS NTAPI HidParser_GetUsageValue(IN PHID_PARSER Parser, IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PULONG UsageValue, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:958
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
HIDAPI NTSTATUS 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)
Definition: hidp.c:469
USHORT * PUSAGE
Definition: hidusage.h:30
HIDAPI NTSTATUS NTAPI HidParser_GetScaledUsageValue(IN PHID_PARSER Parser, IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, IN USAGE Usage, OUT PLONG UsageValue, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:614
HIDAPI NTSTATUS NTAPI HidParser_GetSpecificValueCaps(IN PHID_PARSER Parser, IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PHIDP_VALUE_CAPS ValueCaps, IN OUT PUSHORT ValueCapsLength)
Definition: hidparser.c:357
INT POOL_TYPE
Definition: typedefs.h:77
struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA
Definition: hidpi.h:39
#define HIDP_STATUS_INVALID_REPORT_TYPE
Definition: hidpi.h:251
NTSTATUS TranslateStatusForUpperLayer(IN HIDPARSER_STATUS Status)
Definition: hidp.c:51
USHORT USAGE
Definition: hidusage.h:30
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
HIDAPI NTSTATUS 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)
Definition: hidp.c:415
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE ButtonList
Definition: hidpi.h:425
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
HIDAPI NTSTATUS NTAPI HidP_GetButtonCaps(HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData)
Definition: hidp.c:318
HIDAPI NTSTATUS NTAPI HidParser_UsageAndPageListDifference(IN PUSAGE_AND_PAGE PreviousUsageList, IN PUSAGE_AND_PAGE CurrentUsageList, OUT PUSAGE_AND_PAGE BreakUsageList, OUT PUSAGE_AND_PAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidparser.c:763
unsigned char UCHAR
Definition: xmlstorage.h:181
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA _In_ ULONG ReportLength
Definition: hidpi.h:337
_Must_inspect_result_ _In_ ULONG UsageListLength
Definition: hidpi.h:647
#define STATUS_NO_DATA_DETECTED
Definition: udferr_usr.h:131
#define UNIMPLEMENTED
Definition: hidp.c:9
Status
Definition: gdiplustypes.h:24
_Must_inspect_result_ _Inout_ PULONG LinkCollectionNodesLength
Definition: hidpi.h:358
_Must_inspect_result_ _In_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:382
#define HIDP_LINK_COLLECTION_UNSPECIFIED
Definition: hidpi.h:185
HIDAPI NTSTATUS NTAPI HidP_GetValueCaps(HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData)
Definition: hidp.c:587
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS ButtonCaps
Definition: hidpi.h:382
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Must_inspect_result_ _In_ UCHAR ReportID
Definition: hidpi.h:482
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
#define HID_USAGE_PAGE_UNDEFINED
Definition: hidusage.h:175
long HIDPARSER_STATUS
Definition: hidparser.h:25
HIDAPI NTSTATUS 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)
Definition: hidp.c:330
unsigned short USHORT
Definition: pedump.c:61
HIDAPI NTSTATUS NTAPI HidParser_GetCaps(IN PHID_PARSER Parser, IN PVOID CollectionContext, OUT PHIDP_CAPS Capabilities)
Definition: hidparser.c:226
HIDAPI NTSTATUS NTAPI HidParser_TranslateUsageAndPagesToI8042ScanCodes(IN PHID_PARSER Parser, 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)
Definition: hidparser.c:678
HIDAPI NTSTATUS 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)
Definition: hidp.c:347
unsigned int * PULONG
Definition: retypes.h:1
_Must_inspect_result_ _In_ USHORT DataIndex
Definition: hidpi.h:346
NTSTATUS NTAPI HidP_GetCollectionDescription(IN PHIDP_REPORT_DESCRIPTOR ReportDesc, IN ULONG DescLength, IN POOL_TYPE PoolType, OUT PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidp.c:75
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES _Inout_ OUT PULONG LengthAttributes
Definition: hidpi.h:348
#define OUT
Definition: typedefs.h:40
HIDAPI NTSTATUS 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)
Definition: hidp.c:542
unsigned int ULONG
Definition: retypes.h:1
HIDAPI NTSTATUS 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)
Definition: hidp.c:203
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG DataLength
Definition: hidpi.h:333
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
HIDAPI NTSTATUS NTAPI HidParser_GetUsages(IN PHID_PARSER Parser, IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, OUT USAGE *UsageList, IN OUT PULONG UsageLength, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:550
signed int * PLONG
Definition: retypes.h:5
HIDAPI NTSTATUS 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)
Definition: hidp.c:294
unsigned short * PUSHORT
Definition: retypes.h:2
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773
HIDAPI NTSTATUS 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)
Definition: hidp.c:218
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS _Inout_ PUSHORT ValueCapsLength
Definition: hidpi.h:396
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68