[DDK]
[reactos.git] / include / ddk / hidport.h
1 #pragma once
2
3 #include <hidclass.h>
4
5 typedef struct _HID_MINIDRIVER_REGISTRATION
6 {
7 ULONG Revision;
8 PDRIVER_OBJECT DriverObject;
9 PUNICODE_STRING RegistryPath;
10 ULONG DeviceExtensionSize;
11 BOOLEAN DevicesArePolled;
12 UCHAR Reserved[3];
13 }HID_MINIDRIVER_REGISTRATION, *PHID_MINIDRIVER_REGISTRATION;
14
15 typedef struct _HID_DEVICE_EXTENSION
16 {
17 PDEVICE_OBJECT PhysicalDeviceObject;
18 PDEVICE_OBJECT NextDeviceObject;
19 PVOID MiniDeviceExtension;
20 }HID_DEVICE_EXTENSION, *PHID_DEVICE_EXTENSION;
21
22 typedef struct _HID_DEVICE_ATTRIBUTES
23 {
24 ULONG Size;
25 USHORT VendorID;
26 USHORT ProductID;
27 USHORT VersionNumber;
28 USHORT Reserved[11];
29 }HID_DEVICE_ATTRIBUTES, * PHID_DEVICE_ATTRIBUTES;
30
31 #include <pshpack1.h>
32
33 typedef struct _HID_DESCRIPTOR
34 {
35 UCHAR bLength;
36 UCHAR bDescriptorType;
37 USHORT bcdHID;
38 UCHAR bCountry;
39 UCHAR bNumDescriptors;
40
41 struct _HID_DESCRIPTOR_DESC_LIST
42 {
43 UCHAR bReportType;
44 USHORT wReportLength;
45 }DescriptorList [1];
46 }HID_DESCRIPTOR, * PHID_DESCRIPTOR;
47
48 #include <poppack.h>
49
50
51 typedef
52 VOID
53 (*HID_SEND_IDLE_CALLBACK)(
54 __in PVOID Context
55 );
56
57 typedef struct _HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO
58 {
59 HID_SEND_IDLE_CALLBACK IdleCallback;
60 PVOID IdleContext;
61 }HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO, *PHID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO;
62
63 NTSTATUS
64 NTAPI
65 HidRegisterMinidriver(
66 IN PHID_MINIDRIVER_REGISTRATION MinidriverRegistration
67 );
68
69 #if(NTDDI_VERSION>=NTDDI_WINXPSP1)
70
71 NTSTATUS
72 HidNotifyPresence(
73 IN PDEVICE_OBJECT DeviceObject,
74 IN BOOLEAN IsPresent
75 );
76
77 #endif
78
79 #define IOCTL_HID_GET_DEVICE_DESCRIPTOR HID_CTL_CODE(0)
80 #define IOCTL_HID_GET_REPORT_DESCRIPTOR HID_CTL_CODE(1)
81 #define IOCTL_HID_READ_REPORT HID_CTL_CODE(2)
82 #define IOCTL_HID_WRITE_REPORT HID_CTL_CODE(3)
83 #define IOCTL_HID_GET_STRING HID_CTL_CODE(4)
84 #define IOCTL_HID_ACTIVATE_DEVICE HID_CTL_CODE(7)
85 #define IOCTL_HID_DEACTIVATE_DEVICE HID_CTL_CODE(8)
86 #define IOCTL_HID_GET_DEVICE_ATTRIBUTES HID_CTL_CODE(9)
87 #define IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST HID_CTL_CODE(10)
88
89 #define HID_HID_DESCRIPTOR_TYPE 0x21
90 #define HID_REPORT_DESCRIPTOR_TYPE 0x22
91 #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
92
93 #define HID_STRING_ID_IMANUFACTURER 14
94 #define HID_STRING_ID_IPRODUCT 15
95 #define HID_STRING_ID_ISERIALNUMBER 16