ReactOS 0.4.17-dev-1421-g4623072
fdo.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Universal Serial Bus Human Interface Device Driver
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: drivers/hid/hidclass/fdo.c
5 * PURPOSE: HID Class Driver
6 * PROGRAMMERS:
7 * Michael Martin (michael.martin@reactos.org)
8 * Johannes Anderwald (johannes.anderwald@reactos.org)
9 */
10
11#include "precomp.h"
12
13#define NDEBUG
14#include <debug.h>
15
20 IN PIRP Irp,
22{
23 //
24 // set event
25 //
27
28 //
29 // completion is done in the HidClassFDO_QueryCapabilities routine
30 //
32}
33
38{
39 PIRP Irp;
42 PIO_STACK_LOCATION IoStack;
43 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
44
45 //
46 // get device extension
47 //
48 FDODeviceExtension = DeviceObject->DeviceExtension;
49 ASSERT(FDODeviceExtension->Common.IsFDO);
50
51 //
52 // init event
53 //
55
56 //
57 // now allocate the irp
58 //
59 Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
60 if (!Irp)
61 {
62 //
63 // no memory
64 //
66 }
67
68 //
69 // get next stack location
70 //
72
73 //
74 // init stack location
75 //
76 IoStack->MajorFunction = IRP_MJ_PNP;
78 IoStack->Parameters.DeviceCapabilities.Capabilities = Capabilities;
79
80 //
81 // set completion routine
82 //
84
85 //
86 // init capabilities
87 //
89 Capabilities->Size = sizeof(DEVICE_CAPABILITIES);
90 Capabilities->Version = 1; // FIXME hardcoded constant
91 Capabilities->Address = MAXULONG;
92 Capabilities->UINumber = MAXULONG;
93
94 //
95 // pnp irps have default completion code
96 //
97 Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
98
99 //
100 // call lower device
101 //
103 if (Status == STATUS_PENDING)
104 {
105 //
106 // wait for completion
107 //
109 }
110
111 //
112 // get status
113 //
114 Status = Irp->IoStatus.Status;
115
116 //
117 // complete request
118 //
119 IoFreeIrp(Irp);
120
121 //
122 // done
123 //
124 return Status;
125}
126
128NTAPI
131 IN PIRP Irp,
133{
134 //
135 // signal event
136 //
138
139 //
140 // done
141 //
143}
144
145
149 IN PIRP Irp)
150{
152 PHIDCLASS_COMMON_DEVICE_EXTENSION CommonDeviceExtension;
154 PIO_STACK_LOCATION IoStack;
155
156 //
157 // init event
158 //
160
161 //
162 // get device extension
163 //
164 CommonDeviceExtension = DeviceObject->DeviceExtension;
165
166 //
167 // set completion routine
168 //
170
171 ASSERT(Irp->CurrentLocation > 0);
172 //
173 // create stack location
174 //
176
177 //
178 // get next stack location
179 //
181
182 //
183 // store device object
184 //
185 IoStack->DeviceObject = DeviceObject;
186
187 //
188 // sanity check
189 //
190 ASSERT(CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction] != NULL);
191
192 //
193 // call minidriver (hidusb)
194 //
195 Status = CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction](DeviceObject, Irp);
196
197 //
198 // wait for the request to finish
199 //
200 if (Status == STATUS_PENDING)
201 {
203
204 //
205 // update status
206 //
207 Status = Irp->IoStatus.Status;
208 }
209
210 //
211 // done
212 //
213 return Status;
214}
215
219 IN PIRP Irp)
220{
221 PHIDCLASS_COMMON_DEVICE_EXTENSION CommonDeviceExtension;
223 PIO_STACK_LOCATION IoStack;
224
225 //
226 // get device extension
227 //
228 CommonDeviceExtension = DeviceObject->DeviceExtension;
229
230 ASSERT(Irp->CurrentLocation > 0);
231
232 //
233 // create stack location
234 //
236
237 //
238 // get next stack location
239 //
241
242 //
243 // store device object
244 //
245 IoStack->DeviceObject = DeviceObject;
246
247 //
248 // sanity check
249 //
250 ASSERT(CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction] != NULL);
251
252 //
253 // call driver
254 //
255 Status = CommonDeviceExtension->DriverExtension->MajorFunction[IoStack->MajorFunction](DeviceObject, Irp);
256
257 //
258 // done
259 //
260 return Status;
261}
262
266{
267 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
268 PIRP Irp;
269 PIO_STACK_LOCATION IoStack;
271
272 //
273 // get device extension
274 //
275 FDODeviceExtension = DeviceObject->DeviceExtension;
276 ASSERT(FDODeviceExtension->Common.IsFDO);
277
278 //
279 // let's allocate irp
280 //
281 Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
282 if (!Irp)
283 {
284 //
285 // no memory
286 //
288 }
289
290 //
291 // get stack location
292 //
294
295 //
296 // init stack location
297 //
300 IoStack->Parameters.DeviceIoControl.OutputBufferLength = sizeof(HID_DESCRIPTOR);
301 IoStack->Parameters.DeviceIoControl.InputBufferLength = 0;
302 IoStack->Parameters.DeviceIoControl.Type3InputBuffer = NULL;
303 Irp->UserBuffer = &FDODeviceExtension->HidDescriptor;
304
305 //
306 // send request
307 //
309 if (!NT_SUCCESS(Status))
310 {
311 //
312 // failed to get device descriptor
313 //
314 DPRINT1("[HIDCLASS] IOCTL_HID_GET_DEVICE_DESCRIPTOR failed with %x\n", Status);
315 IoFreeIrp(Irp);
316 return Status;
317 }
318
319 //
320 // let's get device attributes
321 //
323 IoStack->Parameters.DeviceIoControl.OutputBufferLength = sizeof(HID_DEVICE_ATTRIBUTES);
324 Irp->UserBuffer = &FDODeviceExtension->Common.Attributes;
325
326 //
327 // send request
328 //
330 if (!NT_SUCCESS(Status))
331 {
332 //
333 // failed to get device descriptor
334 //
335 DPRINT1("[HIDCLASS] IOCTL_HID_GET_DEVICE_ATTRIBUTES failed with %x\n", Status);
336 IoFreeIrp(Irp);
337 return Status;
338 }
339
340 //
341 // sanity checks
342 //
343 ASSERT(FDODeviceExtension->HidDescriptor.bLength == sizeof(HID_DESCRIPTOR));
344 ASSERT(FDODeviceExtension->HidDescriptor.bNumDescriptors > 0);
345 ASSERT(FDODeviceExtension->HidDescriptor.DescriptorList[0].wReportLength > 0);
346 ASSERT(FDODeviceExtension->HidDescriptor.DescriptorList[0].bReportType == HID_REPORT_DESCRIPTOR_TYPE);
347
348 //
349 // now allocate space for the report descriptor
350 //
352 FDODeviceExtension->HidDescriptor.DescriptorList[0].wReportLength,
354 if (!FDODeviceExtension->ReportDescriptor)
355 {
356 //
357 // not enough memory
358 //
359 IoFreeIrp(Irp);
361 }
362
363 //
364 // init stack location
365 //
367 IoStack->Parameters.DeviceIoControl.OutputBufferLength = FDODeviceExtension->HidDescriptor.DescriptorList[0].wReportLength;
368 Irp->UserBuffer = FDODeviceExtension->ReportDescriptor;
369
370 //
371 // send request
372 //
374 if (!NT_SUCCESS(Status))
375 {
376 //
377 // failed to get device descriptor
378 //
379 DPRINT1("[HIDCLASS] IOCTL_HID_GET_REPORT_DESCRIPTOR failed with %x\n", Status);
380 IoFreeIrp(Irp);
381 return Status;
382 }
383
384 //
385 // completed successfully
386 //
387 IoFreeIrp(Irp);
388 return STATUS_SUCCESS;
389}
390
391
395 IN PIRP Irp)
396{
398 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
399 ULONG Index;
400
401 //
402 // get device extension
403 //
404 FDODeviceExtension = DeviceObject->DeviceExtension;
405 ASSERT(FDODeviceExtension->Common.IsFDO);
406
407 //
408 // query capabilities
409 //
411 if (!NT_SUCCESS(Status))
412 {
413 DPRINT1("[HIDCLASS] Failed to retrieve capabilities %x\n", Status);
414 Irp->IoStatus.Status = Status;
416 return Status;
417 }
418
419 //
420 // let's start the lower device too
421 //
424 if (!NT_SUCCESS(Status))
425 {
426 DPRINT1("[HIDCLASS] Failed to start lower device with %x\n", Status);
427 Irp->IoStatus.Status = Status;
429 return Status;
430 }
431
432 //
433 // let's get the descriptors
434 //
436 if (!NT_SUCCESS(Status))
437 {
438 DPRINT1("[HIDCLASS] Failed to retrieve the descriptors %x\n", Status);
439 Irp->IoStatus.Status = Status;
441 return Status;
442 }
443
444 //
445 // now get the the collection description
446 //
447 Status = HidP_GetCollectionDescription(FDODeviceExtension->ReportDescriptor, FDODeviceExtension->HidDescriptor.DescriptorList[0].wReportLength, NonPagedPool, &FDODeviceExtension->Common.DeviceDescription);
448 if (!NT_SUCCESS(Status))
449 {
450 DPRINT1("[HIDCLASS] Failed to retrieve the collection description %x\n", Status);
451 Irp->IoStatus.Status = Status;
453 return Status;
454 }
455
456 //
457 // get maximum size of input report descriptor
458 //
459 FDODeviceExtension->MaxReportLength = 0;
460 for (Index = 0; Index < FDODeviceExtension->Common.DeviceDescription.CollectionDescLength; Index++)
461 {
463 if (ReportLength > FDODeviceExtension->MaxReportLength)
464 FDODeviceExtension->MaxReportLength = ReportLength;
465 }
466 if (FDODeviceExtension->Common.DeviceDescription.ReportIDs[0].ReportID == 0)
467 {
468 // device with only one report id. Ignore report id at the start of report
469 FDODeviceExtension->MaxReportLength--;
470 }
471
472 //
473 // complete request
474 //
475 Irp->IoStatus.Status = Status;
477 return Status;
478}
479
483 IN PIRP Irp)
484{
486 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
487
488 //
489 // get device extension
490 //
491 FDODeviceExtension = DeviceObject->DeviceExtension;
492 ASSERT(FDODeviceExtension->Common.IsFDO);
493
494 /* FIXME cleanup */
495
496 //
497 // dispatch to minidriver
498 //
501
502 //
503 // complete request
504 //
505 Irp->IoStatus.Status = Status;
507
508 //
509 // detach and delete device
510 //
513
514 return Status;
515}
516
520 OUT PDEVICE_RELATIONS *OutRelations)
521{
522 PDEVICE_RELATIONS DeviceRelations;
523 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
524 ULONG Index;
525
526 //
527 // get device extension
528 //
529 FDODeviceExtension = DeviceObject->DeviceExtension;
530 ASSERT(FDODeviceExtension->Common.IsFDO);
531
532 //
533 // allocate result
534 //
535 DeviceRelations = ExAllocatePoolWithTag(NonPagedPool,
536 sizeof(DEVICE_RELATIONS) + (FDODeviceExtension->DeviceRelations->Count - 1) * sizeof(PDEVICE_OBJECT),
538 if (!DeviceRelations)
539 {
540 //
541 // no memory
542 //
543 *OutRelations = NULL;
545 }
546
547 //
548 // copy device objects
549 //
550 for (Index = 0; Index < FDODeviceExtension->DeviceRelations->Count; Index++)
551 {
552 //
553 // reference pdo
554 //
555 ObReferenceObject(FDODeviceExtension->DeviceRelations->Objects[Index]);
556
557 //
558 // store object
559 //
560 DeviceRelations->Objects[Index] = FDODeviceExtension->DeviceRelations->Objects[Index];
561 }
562
563 //
564 // set object count
565 //
566 DeviceRelations->Count = FDODeviceExtension->DeviceRelations->Count;
567
568 //
569 // store result
570 //
571 *OutRelations = DeviceRelations;
572 return STATUS_SUCCESS;
573}
574
578 IN PIRP Irp)
579{
580 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
581 PIO_STACK_LOCATION IoStack;
583 PDEVICE_RELATIONS DeviceRelations;
584
585 //
586 // get device extension
587 //
588 FDODeviceExtension = DeviceObject->DeviceExtension;
589 ASSERT(FDODeviceExtension->Common.IsFDO);
590
591 //
592 // get current irp stack location
593 //
595
596 //
597 // check relations type
598 //
599 if (IoStack->Parameters.QueryDeviceRelations.Type != BusRelations)
600 {
601 //
602 // only bus relations are handled
603 //
605 return IoCallDriver(FDODeviceExtension->Common.HidDeviceExtension.NextDeviceObject, Irp);
606 }
607
608 if (FDODeviceExtension->DeviceRelations == NULL)
609 {
610 //
611 // time to create the pdos
612 //
614 if (!NT_SUCCESS(Status))
615 {
616 //
617 // failed
618 //
619 DPRINT1("[HIDCLASS] HidClassPDO_CreatePDO failed with %x\n", Status);
620 Irp->IoStatus.Status = Status;
622 return STATUS_SUCCESS;
623 }
624 //
625 // sanity check
626 //
627 ASSERT(FDODeviceExtension->DeviceRelations->Count > 0);
628 }
629
630 //
631 // now copy device relations
632 //
634 //
635 // store result
636 //
637 Irp->IoStatus.Status = Status;
638 Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations;
639
640 if (NT_SUCCESS(Status))
641 {
642 //
643 // let lower drivers also add some PDOs
644 //
647 }
648 else
649 {
650 //
651 // complete request
652 //
654 return Status;
655 }
656}
657
661 IN PIRP Irp)
662{
663 PIO_STACK_LOCATION IoStack;
664 PHIDCLASS_FDO_EXTENSION FDODeviceExtension;
666
667 //
668 // get device extension
669 //
670 FDODeviceExtension = DeviceObject->DeviceExtension;
671 ASSERT(FDODeviceExtension->Common.IsFDO);
672
673 //
674 // get current irp stack location
675 //
677 switch (IoStack->MinorFunction)
678 {
680 {
682 }
684 {
686 }
688 {
690 }
695 {
696 //
697 // set status to success and fall through
698 //
699 Irp->IoStatus.Status = STATUS_SUCCESS;
700 }
701 default:
702 {
703 //
704 // dispatch to mini driver
705 //
708 return Status;
709 }
710 }
711}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
_Check_return_ _In_ DXGK_EVENT_TYPE _In_ ULONG Event
Definition: dispmprt.h:1287
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define HIDCLASS_TAG
Definition: precomp.h:10
#define ULONG_PTR
Definition: config.h:101
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
#define NonPagedPool
Definition: env_spec_w32.h:307
Status
Definition: gdiplustypes.h:24
NTSTATUS HidClassFDO_RemoveDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:481
NTSTATUS NTAPI HidClassFDO_DispatchRequestSynchronousCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: fdo.c:129
NTSTATUS NTAPI HidClassFDO_QueryCapabilitiesCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: fdo.c:18
NTSTATUS HidClassFDO_DispatchRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:217
NTSTATUS HidClassFDO_StartDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:393
NTSTATUS HidClassFDO_DeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:576
NTSTATUS HidClassFDO_GetDescriptors(IN PDEVICE_OBJECT DeviceObject)
Definition: fdo.c:264
NTSTATUS HidClassFDO_DispatchRequestSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:147
NTSTATUS HidClassFDO_QueryCapabilities(IN PDEVICE_OBJECT DeviceObject, IN OUT PDEVICE_CAPABILITIES Capabilities)
Definition: fdo.c:35
NTSTATUS HidClassFDO_CopyDeviceRelations(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS *OutRelations)
Definition: fdo.c:518
NTSTATUS HidClassFDO_PnP(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:659
NTSTATUS HidClassPDO_CreatePDO(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS *OutDeviceRelations)
Definition: pdo.c:699
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
NTSTATUS NTAPI HidP_GetCollectionDescription(IN PHIDP_REPORT_DESCRIPTOR ReportDesc, IN ULONG DescLength, IN POOL_TYPE PoolType, OUT PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidp.c:61
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA _In_ ULONG ReportLength
Definition: hidpi.h:337
#define IOCTL_HID_GET_DEVICE_DESCRIPTOR
Definition: hidport.h:84
#define IOCTL_HID_GET_DEVICE_ATTRIBUTES
Definition: hidport.h:91
#define HID_REPORT_DESCRIPTOR_TYPE
Definition: hidport.h:95
struct _HID_DEVICE_ATTRIBUTES HID_DEVICE_ATTRIBUTES
#define IOCTL_HID_GET_REPORT_DESCRIPTOR
Definition: hidport.h:85
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:490
_In_ PIRP Irp
Definition: kse.h:79
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
#define ASSERT(a)
Definition: mode.c:44
#define KernelMode
Definition: asm.h:38
@ NotificationEvent
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCopyCurrentIrpStackLocationToNext(Irp)
Definition: ntifs_ex.h:413
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:1306
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1261
#define IoCompleteRequest
Definition: irp.c:1272
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
Definition: irp.c:647
#define IoCallDriver
Definition: irp.c:1257
VOID NTAPI IoFreeIrp(IN PIRP Irp)
Definition: irp.c:1698
#define STATUS_MORE_PROCESSING_REQUIRED
Definition: shellext.h:68
#define STATUS_SUCCESS
Definition: shellext.h:65
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_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: precomp.h:17
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
PDEVICE_OBJECT Objects[1]
Definition: iotypes.h:2165
PHIDP_COLLECTION_DESC CollectionDesc
Definition: hidpddi.h:38
ULONG CollectionDescLength
Definition: hidpddi.h:39
PHIDP_REPORT_IDS ReportIDs
Definition: hidpddi.h:40
UCHAR ReportID
Definition: hidpddi.h:22
UCHAR bNumDescriptors
Definition: hidport.h:39
struct _HID_DESCRIPTOR::_HID_DESCRIPTOR_DESC_LIST DescriptorList[1]
UCHAR bLength
Definition: hidport.h:35
PDEVICE_OBJECT NextDeviceObject
Definition: hidport.h:18
union _IO_STACK_LOCATION::@1823 Parameters
PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:3238
struct _IO_STACK_LOCATION::@5134::@5159 QueryDeviceRelations
struct _IO_STACK_LOCATION::@5134::@5161 DeviceCapabilities
struct _IO_STACK_LOCATION::@1823::@1824 DeviceIoControl
#define STATUS_PENDING
Definition: telnetd.h:14
#define MAXULONG
Definition: typedefs.h:251
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define HID_DESCRIPTOR
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:3020
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
Definition: iofuncs.h:3005
#define IRP_MN_CANCEL_STOP_DEVICE
DEVICE_CAPABILITIES
Definition: iotypes.h:965
@ BusRelations
Definition: iotypes.h:2154
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_MN_START_DEVICE
#define IRP_MN_REMOVE_DEVICE
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_QUERY_STOP_DEVICE
#define IRP_MN_QUERY_CAPABILITIES
* PDEVICE_CAPABILITIES
Definition: iotypes.h:965
#define IRP_MN_CANCEL_REMOVE_DEVICE
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
#define IRP_MN_QUERY_REMOVE_DEVICE
@ Executive
Definition: ketypes.h:467
#define ObReferenceObject
Definition: obfuncs.h:204