ReactOS 0.4.15-dev-8102-g108db8f
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 NTSTATUS 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 //
17 // free collection
18 //
20}
VOID NTAPI HidParser_FreeCollectionDescription(IN PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:163
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:432

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 255 of file hidp.c.

260{
262}
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:267
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA PreparsedData
Definition: hidpi.h:335
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS _Inout_ PUSHORT ButtonCapsLength
Definition: hidpi.h:386
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS ButtonCaps
Definition: hidpi.h:385
#define HID_USAGE_PAGE_UNDEFINED
Definition: hidusage.h:175

◆ HidP_GetCaps()

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

Definition at line 26 of file hidp.c.

29{
30 //
31 // get caps
32 //
34}
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
HIDAPI NTSTATUS NTAPI HidParser_GetCaps(IN PVOID CollectionContext, OUT PHIDP_CAPS Capabilities)
Definition: hidparser.c:193

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 61 of file hidp.c.

66{
68
69 //
70 // get description;
71 //
74}
LONG NTSTATUS
Definition: precomp.h:26
Status
Definition: gdiplustypes.h:25
NTSTATUS TranslateStatusForUpperLayer(IN NTSTATUS Status)
Definition: hidp.c:37
NTSTATUS NTAPI HidParser_GetCollectionDescription(IN PHIDP_REPORT_DESCRIPTOR ReportDesc, IN ULONG DescLength, IN POOL_TYPE PoolType, OUT PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:18
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815

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 284 of file hidp.c.

291{
293 ASSERT(FALSE);
295}
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: hidp.c:9
#define ASSERT(a)
Definition: mode.c:44
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239

◆ 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 300 of file hidp.c.

306{
308 ASSERT(FALSE);
310}

◆ 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 315 of file hidp.c.

319{
321 ASSERT(FALSE);
323}

◆ 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 189 of file hidp.c.

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}
HIDAPI NTSTATUS NTAPI HidParser_GetScaledUsageValue(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:559
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
@ HidP_Input
Definition: hidpi.h:238
@ HidP_Feature
Definition: hidpi.h:240
@ HidP_Output
Definition: hidpi.h:239
_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:383
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384

◆ 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 267 of file hidp.c.

275{
277 ASSERT(FALSE);
279}

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 98 of file hidp.c.

106{
107 //
108 // sanity check
109 //
110 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
111
112 //
113 // get value caps
114 //
116}
HIDAPI NTSTATUS NTAPI HidParser_GetSpecificValueCaps(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:321
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS _Inout_ PUSHORT ValueCapsLength
Definition: hidpi.h:400
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS ValueCaps
Definition: hidpi.h:399

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 121 of file hidp.c.

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}
HIDAPI NTSTATUS NTAPI HidParser_GetUsages(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:504
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE _Inout_ ULONG * UsageLength
Definition: hidpi.h:426

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 161 of file hidp.c.

169{
171}
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:121
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE ButtonList
Definition: hidpi.h:425
USAGE Usage
Definition: hidpi.h:79

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 213 of file hidp.c.

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}
HIDAPI NTSTATUS NTAPI HidParser_GetUsageValue(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:880

◆ 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 352 of file hidp.c.

362{
364 ASSERT(FALSE);
366}

◆ HidP_GetValueCaps()

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

Definition at line 524 of file hidp.c.

529{
530 return HidP_GetSpecificValueCaps(ReportType,
533 0,
534 ValueCaps,
537}
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:98
#define HIDP_LINK_COLLECTION_UNSPECIFIED
Definition: hidpi.h:185

◆ 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 507 of file hidp.c.

513{
515 ASSERT(FALSE);
517}

◆ HidP_MaxDataListLength()

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

Definition at line 495 of file hidp.c.

498{
500 ASSERT(FALSE);
502}

◆ HidP_MaxUsageListLength()

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

Definition at line 79 of file hidp.c.

83{
84 //
85 // sanity check
86 //
87 ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
88
89 //
90 // get usage length
91 //
93}
HIDAPI ULONG NTAPI HidParser_MaxUsageListLength(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage OPTIONAL)
Definition: hidparser.c:253

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 479 of file hidp.c.

486{
488 ASSERT(FALSE);
490}

◆ 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 461 of file hidp.c.

470{
472 ASSERT(FALSE);
474}

◆ 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 406 of file hidp.c.

415{
417 ASSERT(FALSE);
419}

◆ 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 443 of file hidp.c.

452{
454 ASSERT(FALSE);
456}

◆ 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 424 of file hidp.c.

434{
436 ASSERT(FALSE);
438}

◆ HidP_SysPowerCaps()

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

Definition at line 340 of file hidp.c.

343{
345 ASSERT(FALSE);
347}

◆ HidP_SysPowerEvent()

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

Definition at line 327 of file hidp.c.

332{
334 ASSERT(FALSE);
336}

◆ 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 238 of file hidp.c.

245{
246 //
247 // translate usage pages
248 //
249 return HidParser_TranslateUsageAndPagesToI8042ScanCodes(ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
250}
HIDAPI NTSTATUS NTAPI HidParser_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: hidparser.c:614
_Must_inspect_result_ _In_ ULONG UsageListLength
Definition: hidpi.h:647

◆ 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 390 of file hidp.c.

397{
399 ASSERT(FALSE);
401}

◆ 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 372 of file hidp.c.

381{
383 ASSERT(FALSE);
385}

◆ 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 176 of file hidp.c.

182{
183 return HidParser_UsageAndPageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
184}
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:689

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 148 of file hidp.c.

154{
155 return HidParser_UsageListDifference(PreviousUsageList, CurrentUsageList, BreakUsageList, MakeUsageList, UsageListLength);
156}
HIDAPI NTSTATUS NTAPI HidParser_UsageListDifference(IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidparser.c:375

Referenced by MouHid_GetButtonFlags().

◆ TranslateStatusForUpperLayer()

NTSTATUS TranslateStatusForUpperLayer ( IN NTSTATUS  Status)

Definition at line 37 of file hidp.c.

39{
40 //
41 // now we are handling only this values, for others just return
42 // status as it is.
43 //
44 switch (Status)
45 {
54 default:
55 return Status;
56 }
57}
#define HIDP_STATUS_INVALID_REPORT_TYPE
Definition: hidpi.h:251
#define HIDP_STATUS_INTERNAL_ERROR
Definition: hidpi.h:257
#define HIDP_STATUS_USAGE_NOT_FOUND
Definition: hidpi.h:253
#define HIDP_STATUS_BUFFER_TOO_SMALL
Definition: hidpi.h:256
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define STATUS_NO_DATA_DETECTED
Definition: udferr_usr.h:131
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158

Referenced by HidP_GetCollectionDescription().