ReactOS  0.4.14-dev-854-gb9426a3
hidp.c File Reference
#include <ntddk.h>
#include <hidpddi.h>
#include "hidparser.h"
#include "hidp.h"
Include dependency graph for hidp.c:

Go to the source code of this file.

Macros

#define _HIDPI_
 
#define _HIDPI_NO_FUNCTION_MACROS_
 
#define UNIMPLEMENTED   DebugFunction("%s is UNIMPLEMENTED\n", __FUNCTION__)
 

Functions

VOID NTAPI HidP_FreeCollectionDescription (IN PHIDP_DEVICE_DESC DeviceDescription)
 
HIDAPI NTSTATUS NTAPI HidP_GetCaps (IN PHIDP_PREPARSED_DATA PreparsedData, OUT PHIDP_CAPS Capabilities)
 
NTSTATUS TranslateStatusForUpperLayer (IN HIDPARSER_STATUS Status)
 
NTSTATUS NTAPI HidP_GetCollectionDescription (IN PHIDP_REPORT_DESCRIPTOR ReportDesc, IN ULONG DescLength, IN POOL_TYPE PoolType, OUT PHIDP_DEVICE_DESC DeviceDescription)
 
HIDAPI ULONG NTAPI HidP_MaxUsageListLength (IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage OPTIONAL, IN PHIDP_PREPARSED_DATA PreparsedData)
 
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)
 
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)
 
HIDAPI NTSTATUS NTAPI HidP_UsageListDifference (IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
 
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)
 
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)
 
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)
 
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)
 
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)
 
HIDAPI NTSTATUS NTAPI HidP_GetButtonCaps (HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData)
 
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)
 
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)
 
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)
 
HIDAPI NTSTATUS NTAPI HidP_GetLinkCollectionNodes (OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes, IN OUT PULONG LinkCollectionNodesLength, IN PHIDP_PREPARSED_DATA PreparsedData)
 
NTSTATUS NTAPI HidP_SysPowerEvent (IN PCHAR HidPacket, IN USHORT HidPacketLength, IN PHIDP_PREPARSED_DATA Ppd, OUT PULONG OutputBuffer)
 
NTSTATUS NTAPI HidP_SysPowerCaps (IN PHIDP_PREPARSED_DATA Ppd, OUT PULONG OutputBuffer)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
HIDAPI ULONG NTAPI HidP_MaxDataListLength (IN HIDP_REPORT_TYPE ReportType, IN PHIDP_PREPARSED_DATA PreparsedData)
 
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)
 
HIDAPI NTSTATUS NTAPI HidP_GetValueCaps (HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData)
 

Macro Definition Documentation

◆ _HIDPI_

#define _HIDPI_

Definition at line 1 of file hidp.c.

◆ _HIDPI_NO_FUNCTION_MACROS_

#define _HIDPI_NO_FUNCTION_MACROS_

Definition at line 2 of file hidp.c.

◆ UNIMPLEMENTED

#define UNIMPLEMENTED   DebugFunction("%s is UNIMPLEMENTED\n", __FUNCTION__)

Definition at line 9 of file hidp.c.

Function Documentation

◆ HidP_FreeCollectionDescription()

VOID NTAPI HidP_FreeCollectionDescription ( IN PHIDP_DEVICE_DESC  DeviceDescription)

Definition at line 13 of file hidp.c.

15 {
16  HID_PARSER Parser;
17 
18  //
19  // init parser
20  //
22 
23  //
24  // free collection
25  //
27 }
VOID NTAPI HidParser_FreeCollectionDescription(IN PHID_PARSER Parser, IN PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:195
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

Referenced by TestGetCollectionDescription().

◆ HidP_GetButtonCaps()

HIDAPI NTSTATUS NTAPI HidP_GetButtonCaps ( HIDP_REPORT_TYPE  ReportType,
PHIDP_BUTTON_CAPS  ButtonCaps,
PUSHORT  ButtonCapsLength,
PHIDP_PREPARSED_DATA  PreparsedData 
)

Definition at line 318 of file hidp.c.

323 {
325 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS _Inout_ PUSHORT ButtonCapsLength
Definition: hidpi.h:382
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS ButtonCaps
Definition: hidpi.h:382
#define HID_USAGE_PAGE_UNDEFINED
Definition: hidusage.h:175
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

◆ HidP_GetCaps()

HIDAPI NTSTATUS NTAPI HidP_GetCaps ( IN PHIDP_PREPARSED_DATA  PreparsedData,
OUT PHIDP_CAPS  Capabilities 
)

Definition at line 33 of file hidp.c.

36 {
37  HID_PARSER Parser;
38 
39  //
40  // init parser
41  //
43 
44  //
45  // get caps
46  //
48 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
HIDAPI NTSTATUS NTAPI HidParser_GetCaps(IN PHID_PARSER Parser, IN PVOID CollectionContext, OUT PHIDP_CAPS Capabilities)
Definition: hidparser.c:226
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

Referenced by get_device(), KbdHid_StartDevice(), MouHid_StartDevice(), test_device_info(), test_get_input_report(), and test_read_device().

◆ HidP_GetCollectionDescription()

NTSTATUS NTAPI HidP_GetCollectionDescription ( IN PHIDP_REPORT_DESCRIPTOR  ReportDesc,
IN ULONG  DescLength,
IN POOL_TYPE  PoolType,
OUT PHIDP_DEVICE_DESC  DeviceDescription 
)

Definition at line 75 of file hidp.c.

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 }
LONG NTSTATUS
Definition: precomp.h:26
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
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
NTSTATUS TranslateStatusForUpperLayer(IN HIDPARSER_STATUS Status)
Definition: hidp.c:51
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
Status
Definition: gdiplustypes.h:24
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

Referenced by HidClassFDO_StartDevice(), and TestGetCollectionDescription().

◆ HidP_GetData()

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 at line 347 of file hidp.c.

354 {
356  ASSERT(FALSE);
357  return STATUS_NOT_IMPLEMENTED;
358 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_GetExtendedAttributes()

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 at line 363 of file hidp.c.

369 {
371  ASSERT(FALSE);
372  return STATUS_NOT_IMPLEMENTED;
373 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_GetLinkCollectionNodes()

HIDAPI NTSTATUS NTAPI HidP_GetLinkCollectionNodes ( OUT PHIDP_LINK_COLLECTION_NODE  LinkCollectionNodes,
IN OUT PULONG  LinkCollectionNodesLength,
IN PHIDP_PREPARSED_DATA  PreparsedData 
)

Definition at line 378 of file hidp.c.

382 {
384  ASSERT(FALSE);
385  return STATUS_NOT_IMPLEMENTED;
386 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_GetScaledUsageValue()

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 at line 231 of file hidp.c.

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 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
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
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_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_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:382
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

◆ HidP_GetSpecificButtonCaps()

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 at line 330 of file hidp.c.

338 {
340  ASSERT(FALSE);
341  return STATUS_NOT_IMPLEMENTED;
342 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

Referenced by HidP_GetButtonCaps().

◆ HidP_GetSpecificValueCaps()

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 at line 126 of file hidp.c.

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 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS ValueCaps
Definition: hidpi.h:396
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
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
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_Must_inspect_result_ _In_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:382
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS _Inout_ PUSHORT ValueCapsLength
Definition: hidpi.h:396

Referenced by HidP_GetValueCaps(), and MouHid_StartDevice().

◆ HidP_GetUsages()

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 at line 156 of file hidp.c.

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 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE _Inout_ ULONG * UsageLength
Definition: hidpi.h:425
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_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_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:382
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
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
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

Referenced by HidP_GetUsagesEx().

◆ HidP_GetUsagesEx()

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 at line 203 of file hidp.c.

211 {
213 }
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
USAGE Usage
Definition: hidpi.h:79
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE _Inout_ ULONG * UsageLength
Definition: hidpi.h:425
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE ButtonList
Definition: hidpi.h:425
_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_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:382
#define HID_USAGE_PAGE_UNDEFINED
Definition: hidusage.h:175

Referenced by KbdHid_ReadCompletion().

◆ HidP_GetUsageValue()

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 at line 262 of file hidp.c.

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 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
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
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_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_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:382
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

◆ HidP_GetUsageValueArray()

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 at line 415 of file hidp.c.

425 {
427  ASSERT(FALSE);
428  return STATUS_NOT_IMPLEMENTED;
429 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_GetValueCaps()

HIDAPI NTSTATUS NTAPI HidP_GetValueCaps ( HIDP_REPORT_TYPE  ReportType,
PHIDP_VALUE_CAPS  ValueCaps,
PUSHORT  ValueCapsLength,
PHIDP_PREPARSED_DATA  PreparsedData 
)

Definition at line 587 of file hidp.c.

592 {
593  return HidP_GetSpecificValueCaps(ReportType,
596  0,
597  ValueCaps,
599  PreparsedData);
600 }
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS ValueCaps
Definition: hidpi.h:396
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
#define HIDP_LINK_COLLECTION_UNSPECIFIED
Definition: hidpi.h:185
#define HID_USAGE_PAGE_UNDEFINED
Definition: hidusage.h:175
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS _Inout_ PUSHORT ValueCapsLength
Definition: hidpi.h:396

Referenced by process_data().

◆ HidP_InitializeReportForID()

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 at line 570 of file hidp.c.

576 {
578  ASSERT(FALSE);
579  return STATUS_NOT_IMPLEMENTED;
580 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_MaxDataListLength()

HIDAPI ULONG NTAPI HidP_MaxDataListLength ( IN HIDP_REPORT_TYPE  ReportType,
IN PHIDP_PREPARSED_DATA  PreparsedData 
)

Definition at line 558 of file hidp.c.

561 {
563  ASSERT(FALSE);
564  return STATUS_NOT_IMPLEMENTED;
565 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_MaxUsageListLength()

HIDAPI ULONG NTAPI HidP_MaxUsageListLength ( IN HIDP_REPORT_TYPE  ReportType,
IN USAGE UsagePage  OPTIONAL,
IN PHIDP_PREPARSED_DATA  PreparsedData 
)

Definition at line 99 of file hidp.c.

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 }
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
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:333
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

Referenced by KbdHid_StartDevice(), and MouHid_StartDevice().

◆ HidP_SetData()

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 at line 542 of file hidp.c.

549 {
551  ASSERT(FALSE);
552  return STATUS_NOT_IMPLEMENTED;
553 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_SetScaledUsageValue()

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 at line 524 of file hidp.c.

533 {
535  ASSERT(FALSE);
536  return STATUS_NOT_IMPLEMENTED;
537 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_SetUsages()

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 at line 469 of file hidp.c.

478 {
480  ASSERT(FALSE);
481  return STATUS_NOT_IMPLEMENTED;
482 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_SetUsageValue()

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 at line 506 of file hidp.c.

515 {
517  ASSERT(FALSE);
518  return STATUS_NOT_IMPLEMENTED;
519 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_SetUsageValueArray()

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 at line 487 of file hidp.c.

497 {
499  ASSERT(FALSE);
500  return STATUS_NOT_IMPLEMENTED;
501 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_SysPowerCaps()

NTSTATUS NTAPI HidP_SysPowerCaps ( IN PHIDP_PREPARSED_DATA  Ppd,
OUT PULONG  OutputBuffer 
)

Definition at line 403 of file hidp.c.

406 {
408  ASSERT(FALSE);
409  return STATUS_NOT_IMPLEMENTED;
410 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_SysPowerEvent()

NTSTATUS NTAPI HidP_SysPowerEvent ( IN PCHAR  HidPacket,
IN USHORT  HidPacketLength,
IN PHIDP_PREPARSED_DATA  Ppd,
OUT PULONG  OutputBuffer 
)

Definition at line 390 of file hidp.c.

395 {
397  ASSERT(FALSE);
398  return STATUS_NOT_IMPLEMENTED;
399 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_TranslateUsageAndPagesToI8042ScanCodes()

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 at line 294 of file hidp.c.

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 }
VOID NTAPI FreeFunction(IN PVOID Item)
Definition: hid.c:53
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
VOID NTAPI ZeroFunction(IN PVOID Item, IN ULONG ItemSize)
Definition: hid.c:61
VOID __cdecl DebugFunction(IN LPCSTR FormatStr,...)
Definition: hid.c:80
_Must_inspect_result_ _In_ ULONG UsageListLength
Definition: hidpi.h:647
PVOID NTAPI AllocFunction(IN ULONG ItemSize)
Definition: hid.c:45
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
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION _In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction
Definition: mmfuncs.h:773

◆ HidP_TranslateUsagesToI8042ScanCodes()

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 at line 453 of file hidp.c.

460 {
462  ASSERT(FALSE);
463  return STATUS_NOT_IMPLEMENTED;
464 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_UnsetUsages()

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 at line 435 of file hidp.c.

444 {
446  ASSERT(FALSE);
447  return STATUS_NOT_IMPLEMENTED;
448 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define UNIMPLEMENTED
Definition: hidp.c:9

◆ HidP_UsageAndPageListDifference()

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 at line 218 of file hidp.c.

224 {
225  return HidParser_UsageAndPageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
226 }
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
_Must_inspect_result_ _In_ ULONG UsageListLength
Definition: hidpi.h:647

Referenced by KbdHid_ReadCompletion().

◆ HidP_UsageListDifference()

HIDAPI NTSTATUS NTAPI HidP_UsageListDifference ( IN PUSAGE  PreviousUsageList,
IN PUSAGE  CurrentUsageList,
OUT PUSAGE  BreakUsageList,
OUT PUSAGE  MakeUsageList,
IN ULONG  UsageListLength 
)

Definition at line 190 of file hidp.c.

196 {
197  return HidParser_UsageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
198 }
HIDAPI NTSTATUS NTAPI HidParser_UsageListDifference(IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidparser.c:421
_Must_inspect_result_ _In_ ULONG UsageListLength
Definition: hidpi.h:647

Referenced by MouHid_GetButtonFlags().

◆ TranslateStatusForUpperLayer()

NTSTATUS TranslateStatusForUpperLayer ( IN HIDPARSER_STATUS  Status)

Definition at line 51 of file hidp.c.

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 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define HIDP_STATUS_INVALID_REPORT_TYPE
Definition: hidpi.h:251
#define STATUS_NO_DATA_DETECTED
Definition: udferr_usr.h:131
Status
Definition: gdiplustypes.h:24

Referenced by HidP_GetCollectionDescription().