ReactOS 0.4.15-dev-7961-gdcf9eb0
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_TOKENPHIDP_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_STATEPHIDP_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_CONFIGURATIONPHIDD_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_ATTRIBUTESPHIDP_EXTENDED_ATTRIBUTES
 
typedef struct _HIDP_LINK_COLLECTION_NODE HIDP_LINK_COLLECTION_NODE
 
typedef struct _HIDP_LINK_COLLECTION_NODEPHIDP_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
 Queries information details about a security descriptor.
 
_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_ ULONGUsageLength
 
_Must_inspect_result_ _In_ UCHAR ReportID
 
_Must_inspect_result_ _In_ ULONG UsageListLength
 

Macro Definition Documentation

◆ FACILITY_HID_ERROR_CODE

#define FACILITY_HID_ERROR_CODE   0x11

Definition at line 243 of file hidpi.h.

◆ HIDAPI

#define HIDAPI   DECLSPEC_IMPORT

Definition at line 35 of file hidpi.h.

◆ HIDP_ERROR_CODES

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

Definition at line 245 of file hidpi.h.

◆ HidP_GetButtonCaps

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

Definition at line 279 of file hidpi.h.

◆ HidP_GetButtonListLength

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

Definition at line 297 of file hidpi.h.

◆ HidP_GetButtons

#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.

◆ HidP_GetButtonsEx

#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.

◆ HidP_GetValueCaps

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

Definition at line 470 of file hidpi.h.

◆ HidP_IsSameUsageAndPage

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

Definition at line 495 of file hidpi.h.

◆ HIDP_LINK_COLLECTION_ROOT

#define HIDP_LINK_COLLECTION_ROOT   ((USHORT) -1)

Definition at line 184 of file hidpi.h.

◆ HIDP_LINK_COLLECTION_UNSPECIFIED

#define HIDP_LINK_COLLECTION_UNSPECIFIED   ((USHORT) 0)

Definition at line 185 of file hidpi.h.

◆ HidP_SetButtons

#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.

◆ HIDP_STATUS_BAD_LOG_PHY_VALUES

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

Definition at line 255 of file hidpi.h.

◆ HIDP_STATUS_BUFFER_TOO_SMALL

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

Definition at line 256 of file hidpi.h.

◆ HIDP_STATUS_BUTTON_NOT_PRESSED

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

Definition at line 264 of file hidpi.h.

◆ HIDP_STATUS_DATA_INDEX_NOT_FOUND

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

Definition at line 262 of file hidpi.h.

◆ HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE

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

Definition at line 263 of file hidpi.h.

◆ HIDP_STATUS_I8042_TRANS_UNKNOWN

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

Definition at line 258 of file hidpi.h.

◆ HIDP_STATUS_I8242_TRANS_UNKNOWN

#define HIDP_STATUS_I8242_TRANS_UNKNOWN   HIDP_STATUS_I8042_TRANS_UNKNOWN

Definition at line 267 of file hidpi.h.

◆ HIDP_STATUS_INCOMPATIBLE_REPORT_ID

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

Definition at line 259 of file hidpi.h.

◆ HIDP_STATUS_INTERNAL_ERROR

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

Definition at line 257 of file hidpi.h.

◆ HIDP_STATUS_INVALID_PREPARSED_DATA

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

Definition at line 250 of file hidpi.h.

◆ HIDP_STATUS_INVALID_REPORT_LENGTH

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

Definition at line 252 of file hidpi.h.

◆ HIDP_STATUS_INVALID_REPORT_TYPE

#define HIDP_STATUS_INVALID_REPORT_TYPE   (HIDP_ERROR_CODES(0xC, 2))

Definition at line 251 of file hidpi.h.

◆ HIDP_STATUS_IS_VALUE_ARRAY

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

Definition at line 261 of file hidpi.h.

◆ HIDP_STATUS_NOT_IMPLEMENTED

#define HIDP_STATUS_NOT_IMPLEMENTED   (HIDP_ERROR_CODES(0xC, 0x20))

Definition at line 266 of file hidpi.h.

◆ HIDP_STATUS_NOT_VALUE_ARRAY

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

Definition at line 260 of file hidpi.h.

◆ HIDP_STATUS_NULL

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

Definition at line 249 of file hidpi.h.

◆ HIDP_STATUS_REPORT_DOES_NOT_EXIST

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

Definition at line 265 of file hidpi.h.

◆ HIDP_STATUS_SUCCESS

#define HIDP_STATUS_SUCCESS   (HIDP_ERROR_CODES(0x0, 0))

Definition at line 248 of file hidpi.h.

◆ HIDP_STATUS_USAGE_NOT_FOUND

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

Definition at line 253 of file hidpi.h.

◆ HIDP_STATUS_VALUE_OUT_OF_RANGE

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

Definition at line 254 of file hidpi.h.

◆ HidP_UnsetButtons

#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

◆ HIDD_ATTRIBUTES

◆ HIDD_CONFIGURATION

◆ HIDP_BUTTON_CAPS

◆ HIDP_CAPS

◆ HIDP_DATA

◆ HIDP_EXTENDED_ATTRIBUTES

◆ HIDP_KEYBOARD_DIRECTION

◆ HIDP_KEYBOARD_MODIFIER_STATE

◆ HIDP_LINK_COLLECTION_NODE

◆ HIDP_REPORT_TYPE

◆ HIDP_UNKNOWN_TOKEN

◆ HIDP_VALUE_CAPS

◆ PHIDD_ATTRIBUTES

◆ PHIDD_CONFIGURATION

◆ PHIDP_BUTTON_CAPS

◆ PHIDP_CAPS

◆ PHIDP_DATA

◆ PHIDP_EXTENDED_ATTRIBUTES

◆ PHIDP_INSERT_SCANCODES

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

Definition at line 72 of file hidpi.h.

◆ PHIDP_KEYBOARD_MODIFIER_STATE

◆ PHIDP_LINK_COLLECTION_NODE

◆ PHIDP_PREPARSED_DATA

typedef struct _HIDP_PREPARSED_DATA* PHIDP_PREPARSED_DATA

Definition at line 39 of file hidpi.h.

◆ PHIDP_REPORT_DESCRIPTOR

Definition at line 38 of file hidpi.h.

◆ PHIDP_UNKNOWN_TOKEN

◆ PHIDP_VALUE_CAPS

◆ PUSAGE_AND_PAGE

◆ USAGE_AND_PAGE

Enumeration Type Documentation

◆ _HIDP_KEYBOARD_DIRECTION

Enumerator
HidP_Keyboard_Break 
HidP_Keyboard_Make 

Definition at line 47 of file hidpi.h.

47 {
@ HidP_Keyboard_Break
Definition: hidpi.h:48
@ HidP_Keyboard_Make
Definition: hidpi.h:49
enum _HIDP_KEYBOARD_DIRECTION HIDP_KEYBOARD_DIRECTION

◆ _HIDP_REPORT_TYPE

Enumerator
HidP_Input 
HidP_Output 
HidP_Feature 

Definition at line 237 of file hidpi.h.

237 {
@ HidP_Input
Definition: hidpi.h:238
@ HidP_Feature
Definition: hidpi.h:240
@ HidP_Output
Definition: hidpi.h:239
enum _HIDP_REPORT_TYPE HIDP_REPORT_TYPE

Function Documentation

◆ _In_reads_()

◆ _In_reads_bytes_()

◆ _IRQL_requires_max_() [1/2]

_Must_inspect_result_ _IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 347 of file hardware.c.

1709{
1710 SendKey();
1712}
static VOID SendKey(VOID)
Definition: hardware.c:332
static VOID Wake(_In_ UCHAR Csn)
Definition: hardware.c:149
_In_ PISAPNP_LOGICAL_DEVICE LogicalDevice
Definition: isapnp.h:399

◆ _IRQL_requires_max_() [2/2]

_Must_inspect_result_ _IRQL_requires_max_ ( PASSIVE_LEVEL  )

Queries information details about a security descriptor.

Computes the quota size of a security descriptor.

Assigns a security descriptor for a new object.

An extended function that assigns a security descriptor for a new object.

Frees a security descriptor.

An extended function that sets new information data to a security descriptor.

Modifies some information data about a security descriptor.

Parameters
[in]SecurityInformationSecurity information details to be queried from a security descriptor.
[out]SecurityDescriptorThe returned security descriptor with security information data.
[in,out]LengthThe returned length of a security descriptor.
[in,out]ObjectsSecurityDescriptorThe returned object security descriptor.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the specific information about the security descriptor has been queried. STATUS_BUFFER_TOO_SMALL is returned if the buffer size is too small to contain the queried info about the security descriptor.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
See SeSetSecurityDescriptorInfoEx.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]AutoInheritFlagsFlags bitmask inheritation, influencing how the security descriptor can be inherited and if it can be in the first place.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
Returns STATUS_SUCCESS if the operations have been completed without problems and that new info has been set to the security descriptor. STATUS_NO_SECURITY_ON_OBJECT is returned if the object does not have a security descriptor. STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the new security descriptor with new info set has failed.
Parameters
[in]SecurityDescriptorA security descriptor to be freed from memory.
Returns
Returns STATUS_SUCCESS.
Parameters
[in]_ParentDescriptorA security descriptor of the parent object that is being created.
[in]_ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]ObjectTypeThe type of the new object.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]AutoInheritFlagsAutomatic inheritance flags that influence how access control entries within ACLs from security descriptors are inherited.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the security descriptor has been assigned to the new object. STATUS_NO_TOKEN is returned if the caller hasn't supplied a valid argument to a security subject context. STATUS_INVALID_OWNER is returned if the caller hasn't supplied a parent descriptor that belongs to the main user (owner). STATUS_INVALID_PRIMARY_GROUP is returned by the same reason as with the previous NTSTATUS code. The two NTSTATUS codes are returned if the calling thread stated that the owner and/or group is defaulted to the parent descriptor (SEF_DEFAULT_OWNER_FROM_PARENT and/or SEF_DEFAULT_GROUP_FROM_PARENT respectively). STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the descriptor buffer has failed. A failure NTSTATUS is returned otherwise.
Parameters
[in]ParentDescriptorA security descriptor of the parent object that is being created.
[in]ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
See SeAssignSecurityEx.
Parameters
[in]SecurityDescriptorA security descriptor.
[out]QuotaInfoSizeThe returned quota size of the given security descriptor to the caller. The function may return 0 to this parameter if the descriptor doesn't have a group or a discretionary access control list (DACL) even.
Returns
Returns STATUS_SUCCESS if the quota size of a security descriptor has been computed successfully. STATUS_UNKNOWN_REVISION is returned if the security descriptor has an invalid revision.

Definition at line 923 of file Messaging.c.

75{
76 PFLT_SERVER_PORT_OBJECT PortObject;
78
79 /* The caller must allow at least one connection */
80 if (MaxConnections == 0)
81 {
83 }
84
85 /* The request must be for a kernel handle */
86 if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87 {
89 }
90
91 /*
92 * Get rundown protection on the target to stop the owner
93 * from unloading whilst this port object is open. It gets
94 * removed in the FltpServerPortClose callback
95 */
97 if (!NT_SUCCESS(Status))
98 {
99 return Status;
100 }
101
102 /* Create the server port object for this filter */
107 NULL,
109 0,
110 0,
111 (PVOID *)&PortObject);
112 if (NT_SUCCESS(Status))
113 {
114 /* Zero out the struct */
115 RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116
117 /* Increment the ref count on the target filter */
119
120 /* Setup the filter port object */
121 PortObject->Filter = Filter;
125 PortObject->Cookie = ServerPortCookie;
126 PortObject->MaxConnections = MaxConnections;
127
128 /* Insert the object */
129 Status = ObInsertObject(PortObject,
130 NULL,
132 0,
133 NULL,
135 if (NT_SUCCESS(Status))
136 {
137 /* Lock the connection list */
139
140 /* Add the new port object to the connection list and increment the count */
143
144 /* Unlock the connection list*/
146 }
147 }
148
149 if (!NT_SUCCESS(Status))
150 {
151 /* Allow the filter to be cleaned up */
153 }
154
155 return Status;
156}
static const INTERNET_PORT ServerPort
Definition: CWebService.cpp:11
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
_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:1877
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1875
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1874
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1876
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
Status
Definition: gdiplustypes.h:25
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
static LONG MaxConnections
#define KernelMode
Definition: asm.h:34
#define FILE_READ_DATA
Definition: nt_native.h:628
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
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:2935
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:1039
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121
LIST_ENTRY mList
Definition: fltmgrint.h:56
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

◆ _Out_writes_()

◆ _Out_writes_bytes_()

◆ HidP_GetScaledUsageValue()

_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 
)

◆ HidP_GetUsages()

_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 
)

◆ HidP_GetUsageValue()

_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 
)

◆ HidP_GetUsageValueArray()

_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 
)

◆ HidP_SetData()

_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 
)

◆ HidP_SetScaledUsageValue()

_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 
)

◆ HidP_SetUsages()

_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 
)

◆ HidP_SetUsageValue()

_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 
)

◆ HidP_SetUsageValueArray()

_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 
)

◆ HidP_TranslateUsageAndPagesToI8042ScanCodes()

_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 
)

Referenced by KbdHid_ReadCompletion().

◆ HidP_TranslateUsagesToI8042ScanCodes()

_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 
)

◆ HidP_UnsetUsages()

_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

◆ Attributes

◆ ButtonCaps

◆ ButtonCapsLength

◆ ButtonList

◆ Capabilities

Definition at line 324 of file hidpi.h.

◆ DataIndex

Definition at line 346 of file hidpi.h.

Referenced by WriteMidiUartMulti().

◆ DataLength

Definition at line 334 of file hidpi.h.

◆ DataList

◆ LengthAttributes

◆ LinkCollection

◆ LinkCollectionNodesLength

_Must_inspect_result_ _Inout_ PULONG LinkCollectionNodesLength

Definition at line 358 of file hidpi.h.

◆ PreparsedData

◆ ReportID

◆ ReportLength

◆ Usage

◆ UsageLength

◆ UsageListLength

◆ UsagePage

◆ ValueCaps

◆ ValueCapsLength