ReactOS 0.4.17-dev-1421-g4623072
precomp.h
Go to the documentation of this file.
1#ifndef _HIDCLASS_PCH_
2#define _HIDCLASS_PCH_
3
4#define _HIDPI_NO_FUNCTION_MACROS_
5#include <wdm.h>
6#include <hidpddi.h>
7#include <stdio.h>
8#include <hidport.h>
9
10#define HIDCLASS_TAG 'CdiH'
11
12typedef struct
13{
21
23
24typedef struct
25{
26 //
27 // hid device extension
28 //
30
31 //
32 // if it is a pdo
33 //
35
36 //
37 // driver extension
38 //
40
41 //
42 // device description
43 //
45
46 //
47 // hid attributes
48 //
50
52
53typedef struct
54{
55 //
56 // parts shared by fdo and pdo
57 //
59
60 //
61 // device capabilities
62 //
64
65 //
66 // hid descriptor
67 //
69
70 //
71 // report descriptor
72 //
74
75 //
76 // maximum report length (in any collection)
77 //
79
80 //
81 // device relations
82 //
84
86
87typedef struct
88{
89 //
90 // parts shared by fdo and pdo
91 //
93
94 //
95 // device capabilities
96 //
98
99 //
100 // collection index
101 //
103
104 //
105 // instance id (0-based)
106 //
108
109 //
110 // is it keyboard/mouse, or a more 'exotic' device?
111 //
113
114 //
115 // device interface
116 //
118
119 //
120 // FDO device object
121 //
123
124 //
125 // fdo device extension
126 //
128
129 //
130 // opening counters
131 //
132 ULONG OpenCount, OpenReadCount, OpenWriteCount;
133 ULONG BlockOpenCount, BlockReadCount, BlockWriteCount;
135
137{
138 //
139 // device extension
140 //
142
143 //
144 // spin lock
145 //
147
148 //
149 // read irp pending list
150 //
152
153 //
154 // completed irp list
155 //
157
158 //
159 // stop in progress indicator
160 //
162
163 //
164 // read complete event
165 //
167
168 //
169 // open access rights
170 //
173
175
176typedef struct
177{
178 //
179 // original request
180 //
182
183 //
184 // does report already contains report id?
185 //
187
188 //
189 // file op
190 //
192
193 //
194 // buffer for reading report
195 //
197
198 //
199 // buffer length
200 //
202
203 //
204 // work item
205 //
207
208 //
209 // link in the pending read list; the IRP itself belongs to the lower driver until it completes
210 //
212
214
215/* fdo.c */
219 IN PIRP Irp);
220
224 IN PIRP Irp);
225
229 IN PIRP Irp);
230
231/* pdo.c */
235 OUT PDEVICE_RELATIONS *OutDeviceRelations);
236
240 IN PIRP Irp);
241
245 ULONG CollectionNumber);
246
250 ULONG CollectionNumber);
251
256
257#endif /* _HIDCLASS_PCH_ */
unsigned char BOOLEAN
Definition: actypes.h:127
LONG NTSTATUS
Definition: precomp.h:26
PHIDP_REPORT_IDS HidClassPDO_GetReportDescriptionByReportID(PHIDP_DEVICE_DESC DeviceDescription, UCHAR ReportID)
Definition: pdo.c:71
struct HIDCLASS_COMMON_DEVICE_EXTENSION * PHIDCLASS_COMMON_DEVICE_EXTENSION
NTSTATUS HidClassPDO_PnP(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:382
struct HIDCLASS_IRP_CONTEXT * PHIDCLASS_IRP_CONTEXT
PHIDP_REPORT_IDS HidClassPDO_GetReportDescription(PHIDP_DEVICE_DESC DeviceDescription, ULONG CollectionNumber)
Definition: pdo.c:45
struct __HIDCLASS_FILEOP_CONTEXT__ HIDCLASS_FILEOP_CONTEXT
NTSTATUS HidClassPDO_CreatePDO(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS *OutDeviceRelations)
Definition: pdo.c:699
NTSTATUS HidClassFDO_DispatchRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:217
struct HIDCLASS_FDO_EXTENSION * PHIDCLASS_FDO_EXTENSION
PHIDP_COLLECTION_DESC HidClassPDO_GetCollectionDescription(PHIDP_DEVICE_DESC DeviceDescription, ULONG CollectionNumber)
Definition: pdo.c:19
NTSTATUS HidClassFDO_DispatchRequestSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:147
struct HIDCLASS_PDO_DEVICE_EXTENSION * PHIDCLASS_PDO_DEVICE_EXTENSION
struct __HIDCLASS_FILEOP_CONTEXT__ * PHIDCLASS_FILEOP_CONTEXT
struct HIDCLASS_DRIVER_EXTENSION * PHIDCLASS_DRIVER_EXTENSION
NTSTATUS HidClassFDO_PnP(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:659
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
_Must_inspect_result_ _In_ UCHAR ReportID
Definition: hidpi.h:482
_In_ PIRP Irp
Definition: kse.h:79
HIDP_DEVICE_DESC DeviceDescription
Definition: precomp.h:44
PHIDCLASS_DRIVER_EXTENSION DriverExtension
Definition: precomp.h:39
HID_DEVICE_ATTRIBUTES Attributes
Definition: precomp.h:49
HID_DEVICE_EXTENSION HidDeviceExtension
Definition: precomp.h:29
PDRIVER_ADD_DEVICE AddDevice
Definition: precomp.h:18
PDRIVER_OBJECT DriverObject
Definition: precomp.h:14
PDRIVER_UNLOAD DriverUnload
Definition: precomp.h:19
PDEVICE_RELATIONS DeviceRelations
Definition: precomp.h:83
HIDCLASS_COMMON_DEVICE_EXTENSION Common
Definition: precomp.h:58
DEVICE_CAPABILITIES Capabilities
Definition: precomp.h:63
HID_DESCRIPTOR HidDescriptor
Definition: precomp.h:68
PUCHAR ReportDescriptor
Definition: precomp.h:73
PHIDCLASS_FILEOP_CONTEXT FileOp
Definition: precomp.h:191
PVOID InputReportBuffer
Definition: precomp.h:196
ULONG InputReportBufferLength
Definition: precomp.h:201
PIO_WORKITEM CompletionWorkItem
Definition: precomp.h:206
LIST_ENTRY PendingLink
Definition: precomp.h:211
BOOLEAN HasReportID
Definition: precomp.h:186
HIDCLASS_COMMON_DEVICE_EXTENSION Common
Definition: precomp.h:92
PDEVICE_OBJECT FDODeviceObject
Definition: precomp.h:122
PHIDCLASS_FDO_EXTENSION FDODeviceExtension
Definition: precomp.h:127
DEVICE_CAPABILITIES Capabilities
Definition: precomp.h:97
UNICODE_STRING DeviceInterface
Definition: precomp.h:117
Definition: typedefs.h:120
LIST_ENTRY ReadPendingIrpListHead
Definition: precomp.h:151
LIST_ENTRY IrpCompletedListHead
Definition: precomp.h:156
PHIDCLASS_PDO_DEVICE_EXTENSION DeviceExtension
Definition: precomp.h:141
unsigned char UCHAR
Definition: typedefs.h:53
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1703
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:432
DEVICE_CAPABILITIES
Definition: iotypes.h:965
DRIVER_UNLOAD * PDRIVER_UNLOAD
Definition: iotypes.h:2268
DRIVER_ADD_DEVICE * PDRIVER_ADD_DEVICE
Definition: iotypes.h:2231
DRIVER_DISPATCH * PDRIVER_DISPATCH
Definition: iotypes.h:2277
#define IRP_MJ_MAXIMUM_FUNCTION