ReactOS  r76032
hidpi.h File Reference
#include "hidusage.h"
Include dependency graph for hidpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _HIDP_UNKNOWN_TOKEN
 
struct  _HIDP_KEYBOARD_MODIFIER_STATE
 
struct  _USAGE_AND_PAGE
 
struct  _HIDD_ATTRIBUTES
 
struct  _HIDD_CONFIGURATION
 
struct  _HIDP_BUTTON_CAPS
 
struct  _HIDP_CAPS
 
struct  _HIDP_DATA
 
struct  _HIDP_EXTENDED_ATTRIBUTES
 
struct  _HIDP_LINK_COLLECTION_NODE
 
struct  _HIDP_VALUE_CAPS
 

Macros

#define HIDAPI   DECLSPEC_IMPORT
 
#define HIDP_LINK_COLLECTION_ROOT   ((USHORT) -1)
 
#define HIDP_LINK_COLLECTION_UNSPECIFIED   ((USHORT) 0)
 
#define FACILITY_HID_ERROR_CODE   0x11
 
#define HIDP_ERROR_CODES(SEV, CODE)   ((NTSTATUS) (((SEV) << 28) | (FACILITY_HID_ERROR_CODE << 16) | (CODE)))
 
#define HIDP_STATUS_SUCCESS   (HIDP_ERROR_CODES(0x0, 0))
 
#define HIDP_STATUS_NULL   (HIDP_ERROR_CODES(0x8, 1))
 
#define HIDP_STATUS_INVALID_PREPARSED_DATA   (HIDP_ERROR_CODES(0xC, 1))
 
#define HIDP_STATUS_INVALID_REPORT_TYPE   (HIDP_ERROR_CODES(0xC, 2))
 
#define HIDP_STATUS_INVALID_REPORT_LENGTH   (HIDP_ERROR_CODES(0xC, 3))
 
#define HIDP_STATUS_USAGE_NOT_FOUND   (HIDP_ERROR_CODES(0xC, 4))
 
#define HIDP_STATUS_VALUE_OUT_OF_RANGE   (HIDP_ERROR_CODES(0xC, 5))
 
#define HIDP_STATUS_BAD_LOG_PHY_VALUES   (HIDP_ERROR_CODES(0xC, 6))
 
#define HIDP_STATUS_BUFFER_TOO_SMALL   (HIDP_ERROR_CODES(0xC, 7))
 
#define HIDP_STATUS_INTERNAL_ERROR   (HIDP_ERROR_CODES(0xC, 8))
 
#define HIDP_STATUS_I8042_TRANS_UNKNOWN   (HIDP_ERROR_CODES(0xC, 9))
 
#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID   (HIDP_ERROR_CODES(0xC, 0xA))
 
#define HIDP_STATUS_NOT_VALUE_ARRAY   (HIDP_ERROR_CODES(0xC, 0xB))
 
#define HIDP_STATUS_IS_VALUE_ARRAY   (HIDP_ERROR_CODES(0xC, 0xC))
 
#define HIDP_STATUS_DATA_INDEX_NOT_FOUND   (HIDP_ERROR_CODES(0xC, 0xD))
 
#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE   (HIDP_ERROR_CODES(0xC, 0xE))
 
#define HIDP_STATUS_BUTTON_NOT_PRESSED   (HIDP_ERROR_CODES(0xC, 0xF))
 
#define HIDP_STATUS_REPORT_DOES_NOT_EXIST   (HIDP_ERROR_CODES(0xC, 0x10))
 
#define HIDP_STATUS_NOT_IMPLEMENTED   (HIDP_ERROR_CODES(0xC, 0x20))
 
#define HIDP_STATUS_I8242_TRANS_UNKNOWN   HIDP_STATUS_I8042_TRANS_UNKNOWN
 
#define HidP_GetButtonCaps(_Type_, _Caps_, _Len_, _Data_)   HidP_GetSpecificButtonCaps(_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
 
#define HidP_GetButtons(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)   HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)
 
#define HidP_GetButtonListLength(RTy, UPa, Ppd)   HidP_GetUsageListLength(Rty, UPa, Ppd)
 
#define HidP_GetButtonsEx(RT, LC, BL, UL, PD, R, RL)   HidP_GetUsagesEx(RT, LC, BL, UL, PD, R, RL)
 
#define HidP_GetValueCaps(_Type_, _Caps_, _Len_, _Data_)   HidP_GetSpecificValueCaps (_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
 
#define HidP_IsSameUsageAndPage(u1, u2)   ((* (PULONG) &u1) == (* (PULONG) &u2))
 
#define HidP_SetButtons(RT, UP, LC, UL1, UL2, PD, R, RL)   HidP_SetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
 
#define HidP_UnsetButtons(RT, UP, LC, UL1, UL2, PD, R, RL)   HidP_UnsetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
 

Typedefs

typedef PUCHAR PHIDP_REPORT_DESCRIPTOR
 
typedef struct
_HIDP_PREPARSED_DATA * 
PHIDP_PREPARSED_DATA
 
typedef struct _HIDP_UNKNOWN_TOKEN HIDP_UNKNOWN_TOKEN
 
typedef struct
_HIDP_UNKNOWN_TOKEN
PHIDP_UNKNOWN_TOKEN
 
typedef enum
_HIDP_KEYBOARD_DIRECTION 
HIDP_KEYBOARD_DIRECTION
 
typedef struct
_HIDP_KEYBOARD_MODIFIER_STATE 
HIDP_KEYBOARD_MODIFIER_STATE
 
typedef struct
_HIDP_KEYBOARD_MODIFIER_STATE
PHIDP_KEYBOARD_MODIFIER_STATE
 
typedef BOOLEAN(NTAPIPHIDP_INSERT_SCANCODES )(_In_opt_ PVOID Context, _In_reads_bytes_(Length) PCHAR NewScanCodes, _In_ ULONG Length)
 
typedef struct _USAGE_AND_PAGE USAGE_AND_PAGE
 
typedef struct _USAGE_AND_PAGEPUSAGE_AND_PAGE
 
typedef struct _HIDD_ATTRIBUTES HIDD_ATTRIBUTES
 
typedef struct _HIDD_ATTRIBUTESPHIDD_ATTRIBUTES
 
typedef struct _HIDD_CONFIGURATION HIDD_CONFIGURATION
 
typedef struct
_HIDD_CONFIGURATION
PHIDD_CONFIGURATION
 
typedef struct _HIDP_BUTTON_CAPS HIDP_BUTTON_CAPS
 
typedef struct _HIDP_BUTTON_CAPSPHIDP_BUTTON_CAPS
 
typedef struct _HIDP_CAPS HIDP_CAPS
 
typedef struct _HIDP_CAPSPHIDP_CAPS
 
typedef struct _HIDP_DATA HIDP_DATA
 
typedef struct _HIDP_DATAPHIDP_DATA
 
typedef struct
_HIDP_EXTENDED_ATTRIBUTES 
HIDP_EXTENDED_ATTRIBUTES
 
typedef struct
_HIDP_EXTENDED_ATTRIBUTES
PHIDP_EXTENDED_ATTRIBUTES
 
typedef struct
_HIDP_LINK_COLLECTION_NODE 
HIDP_LINK_COLLECTION_NODE
 
typedef struct
_HIDP_LINK_COLLECTION_NODE
PHIDP_LINK_COLLECTION_NODE
 
typedef struct _HIDP_VALUE_CAPS HIDP_VALUE_CAPS
 
typedef struct _HIDP_VALUE_CAPSPHIDP_VALUE_CAPS
 
typedef enum _HIDP_REPORT_TYPE HIDP_REPORT_TYPE
 

Enumerations

enum  _HIDP_KEYBOARD_DIRECTION { HidP_Keyboard_Break, HidP_Keyboard_Make }
 
enum  _HIDP_REPORT_TYPE { HidP_Input, HidP_Output, HidP_Feature }
 

Functions

_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_TranslateUsageAndPagesToI8042ScanCodes (_In_reads_(UsageListLength) PUSAGE_AND_PAGE ChangedUsageList, _In_ ULONG UsageListLength, _In_ HIDP_KEYBOARD_DIRECTION KeyAction, _Inout_ PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, _In_ PHIDP_INSERT_SCANCODES InsertCodesProcedure, _In_opt_ PVOID InsertCodesContext)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_TranslateUsagesToI8042ScanCodes (_In_reads_(UsageListLength) PUSAGE ChangedUsageList, _In_ ULONG UsageListLength, _In_ HIDP_KEYBOARD_DIRECTION KeyAction, _Inout_ PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, _In_ PHIDP_INSERT_SCANCODES InsertCodesProcedure, _In_opt_ PVOID InsertCodesContext)
 
_Must_inspect_result_ _IRQL_requires_max_ (PASSIVE_LEVEL) HIDAPI NTSTATUS NTAPI HidP_GetCaps(_In_ PHIDP_PREPARSED_DATA PreparsedData
 
_Must_inspect_result_ _IRQL_requires_max_ (DISPATCH_LEVEL) HIDAPI NTSTATUS NTAPI HidP_GetData(_In_ HIDP_REPORT_TYPE ReportType
 
_Must_inspect_result_
_Out_writes_to_ DataLength
PHIDP_DATA _Inout_ PULONG _In_
PHIDP_PREPARSED_DATA 
_Out_writes_bytes_ (ReportLength) PCHAR Report
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_GetScaledUsageValue (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _Out_ PLONG UsageValue, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_GetUsages (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _Out_writes_to_(*UsageLength,*UsageLength) USAGE *UsageList, _Inout_ ULONG *UsageLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Out_writes_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ _In_
USHORT _Inout_updates_to_
UsageLength PUSAGE_AND_PAGE
_Inout_ ULONG _In_
PHIDP_PREPARSED_DATA 
_In_reads_bytes_ (ReportLength) PCHAR Report
 
_Must_inspect_result_ 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_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_GetUsageValueArray (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _Inout_updates_bytes_(UsageValueByteLength) PCHAR UsageValue, _In_ USHORT UsageValueByteLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_SetData (_In_ HIDP_REPORT_TYPE ReportType, _Inout_updates_to_(*DataLength,*DataLength) PHIDP_DATA DataList, _Inout_ PULONG DataLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_SetScaledUsageValue (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _In_ LONG UsageValue, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Inout_updates_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_SetUsages (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _Inout_updates_to_(*UsageLength,*UsageLength) PUSAGE UsageList, _Inout_ PULONG UsageLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ 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, _Inout_updates_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_SetUsageValueArray (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_ USHORT LinkCollection, _In_ USAGE Usage, _In_reads_bytes_(UsageValueByteLength) PCHAR UsageValue, _In_ USHORT UsageValueByteLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Inout_updates_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ HIDAPI
NTSTATUS NTAPI 
HidP_UnsetUsages (_In_ HIDP_REPORT_TYPE ReportType, _In_ USAGE UsagePage, _In_opt_ USHORT LinkCollection, _Inout_updates_to_(*UsageLength,*UsageLength) PUSAGE UsageList, _Inout_ PULONG UsageLength, _In_ PHIDP_PREPARSED_DATA PreparsedData, _In_reads_bytes_(ReportLength) PCHAR Report, _In_ ULONG ReportLength)
 
_Must_inspect_result_ _In_reads_ (UsageListLength) PUSAGE_AND_PAGE CurrentUsageList
 
_Must_inspect_result_ _Out_writes_ (UsageListLength) PUSAGE_AND_PAGE BreakUsageList
 

Variables

_Must_inspect_result_ _Out_
PHIDP_CAPS 
Capabilities
 
_Must_inspect_result_
_Out_writes_to_ DataLength
PHIDP_DATA 
DataList
 
_Must_inspect_result_
_Out_writes_to_ DataLength
PHIDP_DATA _Inout_ PULONG 
DataLength
 
_Must_inspect_result_
_Out_writes_to_ DataLength
PHIDP_DATA _Inout_ PULONG _In_
PHIDP_PREPARSED_DATA 
PreparsedData
 
_Must_inspect_result_
_Out_writes_to_ DataLength
PHIDP_DATA _Inout_ PULONG _In_
PHIDP_PREPARSED_DATA _In_
ULONG 
ReportLength
 
_Must_inspect_result_ _In_ USHORT DataIndex
 
_Must_inspect_result_ _In_
USHORT _In_
PHIDP_PREPARSED_DATA
_Out_writes_to_
LengthAttributes
PHIDP_EXTENDED_ATTRIBUTES 
Attributes
 
_Must_inspect_result_ _In_
USHORT _In_
PHIDP_PREPARSED_DATA
_Out_writes_to_
LengthAttributes
PHIDP_EXTENDED_ATTRIBUTES
_Inout_ OUT PULONG 
LengthAttributes
 
_Must_inspect_result_ _Inout_
PULONG 
LinkCollectionNodesLength
 
_Must_inspect_result_ _In_ USAGE UsagePage
 
_Must_inspect_result_ _In_
USAGE _In_ USHORT 
LinkCollection
 
_Must_inspect_result_ _In_
USAGE _In_ USHORT _In_ USAGE 
Usage
 
_Must_inspect_result_ _In_
USAGE _In_ USHORT _In_ USAGE
_Out_ PHIDP_BUTTON_CAPS 
ButtonCaps
 
_Must_inspect_result_ _In_
USAGE _In_ USHORT _In_ USAGE
_Out_ PHIDP_BUTTON_CAPS
_Inout_ PUSHORT 
ButtonCapsLength
 
_Must_inspect_result_ _In_
USAGE _In_ USHORT _In_ USAGE
_Out_ PHIDP_VALUE_CAPS 
ValueCaps
 
_Must_inspect_result_ _In_
USAGE _In_ USHORT _In_ USAGE
_Out_ PHIDP_VALUE_CAPS _Inout_
PUSHORT 
ValueCapsLength
 
_Must_inspect_result_ _In_
USHORT _Inout_updates_to_
UsageLength PUSAGE_AND_PAGE 
ButtonList
 
_Must_inspect_result_ _In_
USHORT _Inout_updates_to_
UsageLength PUSAGE_AND_PAGE
_Inout_ ULONG
UsageLength
 
_Must_inspect_result_ _In_ UCHAR ReportID
 
_Must_inspect_result_ _In_ ULONG UsageListLength
 

Macro Definition Documentation

#define FACILITY_HID_ERROR_CODE   0x11

Definition at line 243 of file hidpi.h.

#define HIDAPI   DECLSPEC_IMPORT

Definition at line 35 of file hidpi.h.

#define HIDP_ERROR_CODES (   SEV,
  CODE 
)    ((NTSTATUS) (((SEV) << 28) | (FACILITY_HID_ERROR_CODE << 16) | (CODE)))

Definition at line 245 of file hidpi.h.

#define HidP_GetButtonCaps (   _Type_,
  _Caps_,
  _Len_,
  _Data_ 
)    HidP_GetSpecificButtonCaps(_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)

Definition at line 279 of file hidpi.h.

#define HidP_GetButtonListLength (   RTy,
  UPa,
  Ppd 
)    HidP_GetUsageListLength(Rty, UPa, Ppd)

Definition at line 297 of file hidpi.h.

#define HidP_GetButtons (   Rty,
  UPa,
  LCo,
  ULi,
  ULe,
  Ppd,
  Rep,
  RLe 
)    HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)

Definition at line 294 of file hidpi.h.

#define HidP_GetButtonsEx (   RT,
  LC,
  BL,
  UL,
  PD,
  R,
  RL 
)    HidP_GetUsagesEx(RT, LC, BL, UL, PD, R, RL)

Definition at line 312 of file hidpi.h.

#define HidP_GetValueCaps (   _Type_,
  _Caps_,
  _Len_,
  _Data_ 
)    HidP_GetSpecificValueCaps (_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)

Definition at line 470 of file hidpi.h.

#define HidP_IsSameUsageAndPage (   u1,
  u2 
)    ((* (PULONG) &u1) == (* (PULONG) &u2))

Definition at line 495 of file hidpi.h.

#define HIDP_LINK_COLLECTION_ROOT   ((USHORT) -1)

Definition at line 184 of file hidpi.h.

#define HidP_SetButtons (   RT,
  UP,
  LC,
  UL1,
  UL2,
  PD,
  R,
  RL 
)    HidP_SetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)

Definition at line 530 of file hidpi.h.

#define HIDP_STATUS_BAD_LOG_PHY_VALUES   (HIDP_ERROR_CODES(0xC, 6))

Definition at line 255 of file hidpi.h.

Referenced by MouHid_GetButtonMove(), and TranslateHidParserStatus().

#define HIDP_STATUS_BUFFER_TOO_SMALL   (HIDP_ERROR_CODES(0xC, 7))

Definition at line 256 of file hidpi.h.

Referenced by TranslateHidParserStatus().

#define HIDP_STATUS_BUTTON_NOT_PRESSED   (HIDP_ERROR_CODES(0xC, 0xF))

Definition at line 264 of file hidpi.h.

#define HIDP_STATUS_DATA_INDEX_NOT_FOUND   (HIDP_ERROR_CODES(0xC, 0xD))

Definition at line 262 of file hidpi.h.

#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE   (HIDP_ERROR_CODES(0xC, 0xE))

Definition at line 263 of file hidpi.h.

#define HIDP_STATUS_I8042_TRANS_UNKNOWN   (HIDP_ERROR_CODES(0xC, 9))
#define HIDP_STATUS_I8242_TRANS_UNKNOWN   HIDP_STATUS_I8042_TRANS_UNKNOWN

Definition at line 267 of file hidpi.h.

#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID   (HIDP_ERROR_CODES(0xC, 0xA))

Definition at line 259 of file hidpi.h.

#define HIDP_STATUS_INTERNAL_ERROR   (HIDP_ERROR_CODES(0xC, 8))

Definition at line 257 of file hidpi.h.

Referenced by TranslateHidParserStatus().

#define HIDP_STATUS_INVALID_PREPARSED_DATA   (HIDP_ERROR_CODES(0xC, 1))

Definition at line 250 of file hidpi.h.

#define HIDP_STATUS_INVALID_REPORT_LENGTH   (HIDP_ERROR_CODES(0xC, 3))

Definition at line 252 of file hidpi.h.

Referenced by TranslateHidParserStatus().

#define HIDP_STATUS_IS_VALUE_ARRAY   (HIDP_ERROR_CODES(0xC, 0xC))

Definition at line 261 of file hidpi.h.

#define HIDP_STATUS_NOT_VALUE_ARRAY   (HIDP_ERROR_CODES(0xC, 0xB))

Definition at line 260 of file hidpi.h.

#define HIDP_STATUS_NULL   (HIDP_ERROR_CODES(0x8, 1))

Definition at line 249 of file hidpi.h.

#define HIDP_STATUS_REPORT_DOES_NOT_EXIST   (HIDP_ERROR_CODES(0xC, 0x10))

Definition at line 265 of file hidpi.h.

Referenced by TranslateHidParserStatus().

#define HIDP_STATUS_USAGE_NOT_FOUND   (HIDP_ERROR_CODES(0xC, 4))

Definition at line 253 of file hidpi.h.

Referenced by TranslateHidParserStatus().

#define HIDP_STATUS_VALUE_OUT_OF_RANGE   (HIDP_ERROR_CODES(0xC, 5))

Definition at line 254 of file hidpi.h.

#define HidP_UnsetButtons (   RT,
  UP,
  LC,
  UL1,
  UL2,
  PD,
  R,
  RL 
)    HidP_UnsetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)

Definition at line 618 of file hidpi.h.

Typedef Documentation

typedef BOOLEAN(NTAPI * PHIDP_INSERT_SCANCODES)(_In_opt_ PVOID Context, _In_reads_bytes_(Length) PCHAR NewScanCodes, _In_ ULONG Length)

Definition at line 73 of file hidpi.h.

typedef struct _HIDP_PREPARSED_DATA* PHIDP_PREPARSED_DATA

Definition at line 39 of file hidpi.h.

Definition at line 38 of file hidpi.h.

Enumeration Type Documentation

Enumerator
HidP_Keyboard_Break 
HidP_Keyboard_Make 

Definition at line 47 of file hidpi.h.

47  {
enum _HIDP_KEYBOARD_DIRECTION HIDP_KEYBOARD_DIRECTION
Enumerator
HidP_Input 
HidP_Output 
HidP_Feature 

Definition at line 237 of file hidpi.h.

237  {
238  HidP_Input,
239  HidP_Output,
enum _HIDP_REPORT_TYPE HIDP_REPORT_TYPE

Function Documentation

_Must_inspect_result_ _IRQL_requires_max_ ( PASSIVE_LEVEL  )

Definition at line 37 of file Messaging.c.

48 {
49  PFLT_SERVER_PORT_OBJECT PortObject;
51 
52  /* The caller must allow at least one connection */
53  if (MaxConnections == 0)
54  {
56  }
57 
58  /* The request must be for a kernel handle */
59  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
60  {
62  }
63 
64  /*
65  * Get rundown protection on the target to stop the owner
66  * from unloading whilst this port object is open. It gets
67  * removed in the FltpServerPortClose callback
68  */
69  Status = FltObjectReference(Filter);
70  if (!NT_SUCCESS(Status))
71  {
72  return Status;
73  }
74 
75  /* Create our new server port object */
76  Status = ObCreateObject(0,
79  KernelMode,
80  NULL,
81  sizeof(FLT_SERVER_PORT_OBJECT),
82  0,
83  0,
84  (PVOID *)&PortObject);
85  if (NT_SUCCESS(Status))
86  {
87  /* Zero out the struct */
88  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
89 
90  /* Increment the ref count on the target filter */
92 
93  /* Setup the filter port object */
94  PortObject->Filter = Filter;
98  PortObject->Cookie = ServerPortCookie;
99  PortObject->MaxConnections = MaxConnections;
100 
101  /* Insert the object */
102  Status = ObInsertObject(PortObject,
103  NULL,
105  0,
106  NULL,
108  if (NT_SUCCESS(Status))
109  {
110  /* Lock the connection list */
112 
113  /* Add the new port object to the connection list and increment the count */
116 
117  /* Unlock the connection list*/
119  }
120  }
121 
122  if (!NT_SUCCESS(Status))
123  {
124  /* Allow the filter to be cleaned up */
126  }
127 
128  return STATUS_NOT_IMPLEMENTED;
129 }
DWORD *typedef PVOID
Definition: winlogon.h:52
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:177
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
#define InsertTailList(ListHead, Entry)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:252
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
smooth NULL
Definition: ftsmooth.c:557
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:938
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:23
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:24
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2925
LONG NTSTATUS
Definition: DriverTester.h:11
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:179
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:178
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:86
_Must_inspect_result_ _IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 30 of file rmap.c.

36 {
38 }
#define TAG_RMAP
Definition: tag.h:133
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1097
#define P(row, col)
Definition: m_matrix.c:147
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetScaledUsageValue ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_ USHORT  LinkCollection,
_In_ USAGE  Usage,
_Out_ PLONG  UsageValue,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_In_reads_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetUsages ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_ USHORT  LinkCollection,
_Out_writes_to_ *,*UsageLength USAGE UsageList,
_Inout_ ULONG UsageLength,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_Out_writes_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ 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_reads_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_GetUsageValueArray ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_ USHORT  LinkCollection,
_In_ USAGE  Usage,
_Inout_updates_bytes_(UsageValueByteLength) PCHAR  UsageValue,
_In_ USHORT  UsageValueByteLength,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_In_reads_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetData ( _In_ HIDP_REPORT_TYPE  ReportType,
_Inout_updates_to_ *,*DataLength PHIDP_DATA  DataList,
_Inout_ PULONG  DataLength,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_In_reads_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetScaledUsageValue ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_ USHORT  LinkCollection,
_In_ USAGE  Usage,
_In_ LONG  UsageValue,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_Inout_updates_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetUsages ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_ USHORT  LinkCollection,
_Inout_updates_to_ *,*UsageLength PUSAGE  UsageList,
_Inout_ PULONG  UsageLength,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_In_reads_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ 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,
_Inout_updates_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_SetUsageValueArray ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_ USHORT  LinkCollection,
_In_ USAGE  Usage,
_In_reads_bytes_(UsageValueByteLength) PCHAR  UsageValue,
_In_ USHORT  UsageValueByteLength,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_Inout_updates_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_TranslateUsageAndPagesToI8042ScanCodes ( _In_reads_(UsageListLength) PUSAGE_AND_PAGE  ChangedUsageList,
_In_ ULONG  UsageListLength,
_In_ HIDP_KEYBOARD_DIRECTION  KeyAction,
_Inout_ PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
_In_ PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
_In_opt_ PVOID  InsertCodesContext 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_TranslateUsagesToI8042ScanCodes ( _In_reads_(UsageListLength) PUSAGE  ChangedUsageList,
_In_ ULONG  UsageListLength,
_In_ HIDP_KEYBOARD_DIRECTION  KeyAction,
_Inout_ PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
_In_ PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
_In_opt_ PVOID  InsertCodesContext 
)
_Must_inspect_result_ HIDAPI NTSTATUS NTAPI HidP_UnsetUsages ( _In_ HIDP_REPORT_TYPE  ReportType,
_In_ USAGE  UsagePage,
_In_opt_ USHORT  LinkCollection,
_Inout_updates_to_ *,*UsageLength PUSAGE  UsageList,
_Inout_ PULONG  UsageLength,
_In_ PHIDP_PREPARSED_DATA  PreparsedData,
_In_reads_bytes_(ReportLength) PCHAR  Report,
_In_ ULONG  ReportLength 
)

Variable Documentation

Definition at line 346 of file hidpi.h.

Referenced by WriteMidiUartMulti().

_Must_inspect_result_ _Inout_ PULONG LinkCollectionNodesLength

Definition at line 358 of file hidpi.h.

Definition at line 333 of file hidpi.h.

Referenced by KbdHid_StartDevice(), and MouHid_StartDevice().

Definition at line 482 of file hidpi.h.

Referenced by HidParser_AllocateReport().

Definition at line 425 of file hidpi.h.