ReactOS  r75636
classpnp.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #define _CLASS_
5 
6 #include <ntdddisk.h>
7 #include <ntddcdrm.h>
8 #include <ntddtape.h>
9 #include <ntddscsi.h>
10 #include <ntddstor.h>
11 
12 #include <stdio.h>
13 
14 #include <scsi.h>
15 
16 #define max(a,b) (((a) > (b)) ? (a) : (b))
17 #define min(a,b) (((a) < (b)) ? (a) : (b))
18 
19 #define SRB_CLASS_FLAGS_LOW_PRIORITY 0x10000000
20 #define SRB_CLASS_FLAGS_PERSISTANT 0x20000000
21 #define SRB_CLASS_FLAGS_PAGING 0x40000000
22 #define SRB_CLASS_FLAGS_FREE_MDL 0x80000000
23 
24 #define ASSERT_FDO(x) \
25  ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)
26 
27 #define ASSERT_PDO(x) \
28  ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo))
29 
30 #define IS_CLEANUP_REQUEST(majorFunction) \
31  ((majorFunction == IRP_MJ_CLOSE) || \
32  (majorFunction == IRP_MJ_CLEANUP) || \
33  (majorFunction == IRP_MJ_SHUTDOWN))
34 
35 #define DO_MCD(fdoExtension) \
36  (((fdoExtension)->MediaChangeDetectionInfo != NULL) && \
37  ((fdoExtension)->MediaChangeDetectionInfo->MediaChangeDetectionDisableCount == 0))
38 
39 #define IS_SCSIOP_READ(opCode) \
40  ((opCode == SCSIOP_READ6) || \
41  (opCode == SCSIOP_READ) || \
42  (opCode == SCSIOP_READ12) || \
43  (opCode == SCSIOP_READ16))
44 
45 #define IS_SCSIOP_WRITE(opCode) \
46  ((opCode == SCSIOP_WRITE6) || \
47  (opCode == SCSIOP_WRITE) || \
48  (opCode == SCSIOP_WRITE12) || \
49  (opCode == SCSIOP_WRITE16))
50 
51 #define IS_SCSIOP_READWRITE(opCode) (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode))
52 
53 #define ADJUST_FUA_FLAG(fdoExt) { \
54  if (TEST_FLAG(fdoExt->DeviceFlags, DEV_WRITE_CACHE) && \
55  !TEST_FLAG(fdoExt->DeviceFlags, DEV_POWER_PROTECTED) && \
56  !TEST_FLAG(fdoExt->ScanForSpecialFlags, CLASS_SPECIAL_FUA_NOT_SUPPORTED) ) { \
57  fdoExt->CdbForceUnitAccess = TRUE; \
58  } else { \
59  fdoExt->CdbForceUnitAccess = FALSE; \
60  } \
61 }
62 
63 #define FREE_POOL(_PoolPtr) \
64  if (_PoolPtr != NULL) { \
65  ExFreePool(_PoolPtr); \
66  _PoolPtr = NULL; \
67  }
68 
69 #ifdef POOL_TAGGING
70 #undef ExAllocatePool
71 #undef ExAllocatePoolWithQuota
72 #define ExAllocatePool(a,b) ExAllocatePoolWithTag(a,b,'nUcS')
73 //#define ExAllocatePool(a,b) #assert(0)
74 #define ExAllocatePoolWithQuota(a,b) ExAllocatePoolWithQuotaTag(a,b,'nUcS')
75 #endif
76 
77 #define CLASS_TAG_AUTORUN_DISABLE 'ALcS'
78 #define CLASS_TAG_FILE_OBJECT_EXTENSION 'FLcS'
79 #define CLASS_TAG_MEDIA_CHANGE_DETECTION 'MLcS'
80 #define CLASS_TAG_MOUNT 'mLcS'
81 #define CLASS_TAG_RELEASE_QUEUE 'qLcS'
82 #define CLASS_TAG_POWER 'WLcS'
83 #define CLASS_TAG_WMI 'wLcS'
84 #define CLASS_TAG_FAILURE_PREDICT 'fLcS'
85 #define CLASS_TAG_DEVICE_CONTROL 'OIcS'
86 #define CLASS_TAG_MODE_DATA 'oLcS'
87 #define CLASS_TAG_MULTIPATH 'mPcS'
88 
89 #define MAXIMUM_RETRIES 4
90 
91 #define CLASS_DRIVER_EXTENSION_KEY ((PVOID) ClassInitialize)
92 
93 #define NO_REMOVE 0
94 #define REMOVE_PENDING 1
95 #define REMOVE_COMPLETE 2
96 
97 #define ClassAcquireRemoveLock(devobj, tag) \
98  ClassAcquireRemoveLockEx(devobj, tag, __FILE__, __LINE__)
99 
100 #ifdef TRY
101 #undef TRY
102 #endif
103 #ifdef LEAVE
104 #undef LEAVE
105 #endif
106 
107 #ifdef FINALLY
108 #undef FINALLY
109 #endif
110 
111 #define TRY
112 #define LEAVE goto __tryLabel;
113 #define FINALLY __tryLabel:
114 
115 #if defined DebugPrint
116 #undef DebugPrint
117 #endif
118 
119 #if DBG
120 #define DebugPrint(x) ClassDebugPrint x
121 #else
122 #define DebugPrint(x)
123 #endif
124 
125 #define DEBUG_BUFFER_LENGTH 256
126 
127 #define START_UNIT_TIMEOUT (60 * 4)
128 
129 #define MEDIA_CHANGE_DEFAULT_TIME 1
130 #define MEDIA_CHANGE_TIMEOUT_TIME 300
131 
132 #ifdef ALLOCATE_SRB_FROM_POOL
133 
134 #define ClasspAllocateSrb(ext) \
135  ExAllocatePoolWithTag(NonPagedPool, \
136  sizeof(SCSI_REQUEST_BLOCK), \
137  'sBRS')
138 
139 #define ClasspFreeSrb(ext, srb) ExFreePool((srb));
140 
141 #else /* ALLOCATE_SRB_FROM_POOL */
142 
143 #define ClasspAllocateSrb(ext) \
144  ExAllocateFromNPagedLookasideList( \
145  &((ext)->CommonExtension.SrbLookasideList))
146 
147 #define ClasspFreeSrb(ext, srb) \
148  ExFreeToNPagedLookasideList( \
149  &((ext)->CommonExtension.SrbLookasideList), \
150  (srb))
151 
152 #endif /* ALLOCATE_SRB_FROM_POOL */
153 
154 #define SET_FLAG(Flags, Bit) ((Flags) |= (Bit))
155 #define CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit))
156 #define TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0)
157 
158 #define CLASS_WORKING_SET_MAXIMUM 2048
159 
160 #define CLASS_INTERPRET_SENSE_INFO2_MAXIMUM_HISTORY_COUNT 30000
161 
162 #define CLASS_SPECIAL_DISABLE_SPIN_DOWN 0x00000001
163 #define CLASS_SPECIAL_DISABLE_SPIN_UP 0x00000002
164 #define CLASS_SPECIAL_NO_QUEUE_LOCK 0x00000008
165 #define CLASS_SPECIAL_DISABLE_WRITE_CACHE 0x00000010
166 #define CLASS_SPECIAL_CAUSE_NOT_REPORTABLE_HACK 0x00000020
167 #if ((NTDDI_VERSION == NTDDI_WIN2KSP3) || (OSVER(NTDDI_VERSION) == NTDDI_WINXP))
168 #define CLASS_SPECIAL_DISABLE_WRITE_CACHE_NOT_SUPPORTED 0x00000040
169 #endif
170 #define CLASS_SPECIAL_MODIFY_CACHE_UNSUCCESSFUL 0x00000040
171 #define CLASS_SPECIAL_FUA_NOT_SUPPORTED 0x00000080
172 #define CLASS_SPECIAL_VALID_MASK 0x000000FB
173 #define CLASS_SPECIAL_RESERVED (~CLASS_SPECIAL_VALID_MASK)
174 
175 #define DEV_WRITE_CACHE 0x00000001
176 #define DEV_USE_SCSI1 0x00000002
177 #define DEV_SAFE_START_UNIT 0x00000004
178 #define DEV_NO_12BYTE_CDB 0x00000008
179 #define DEV_POWER_PROTECTED 0x00000010
180 #define DEV_USE_16BYTE_CDB 0x00000020
181 
182 #define GUID_CLASSPNP_QUERY_REGINFOEX {0x00e34b11, 0x2444, 0x4745, {0xa5, 0x3d, 0x62, 0x01, 0x00, 0xcd, 0x82, 0xf7}}
183 #define GUID_CLASSPNP_SENSEINFO2 {0x509a8c5f, 0x71d7, 0x48f6, {0x82, 0x1e, 0x17, 0x3c, 0x49, 0xbf, 0x2f, 0x18}}
184 #define GUID_CLASSPNP_WORKING_SET {0x105701b0, 0x9e9b, 0x47cb, {0x97, 0x80, 0x81, 0x19, 0x8a, 0xf7, 0xb5, 0x24}}
185 
186 #define DEFAULT_FAILURE_PREDICTION_PERIOD 60 * 60 * 1
187 
188 #define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS (0x3b9aca00)
189 
191 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
193 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
195 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
197 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
199 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
200 
207 
208 typedef enum _CLASS_DEBUG_LEVEL {
223 
224 typedef enum {
228 
229 typedef enum {
235 
236 typedef enum {
243 
244 typedef enum {
252 
253 typedef enum {
260 
261 struct _CLASS_INIT_DATA;
263 
266 
267 struct _CLASS_PRIVATE_PDO_DATA;
268 typedef struct _CLASS_PRIVATE_PDO_DATA CLASS_PRIVATE_PDO_DATA, *PCLASS_PRIVATE_PDO_DATA;
269 
270 struct _CLASS_PRIVATE_COMMON_DATA;
271 typedef struct _CLASS_PRIVATE_COMMON_DATA CLASS_PRIVATE_COMMON_DATA, *PCLASS_PRIVATE_COMMON_DATA;
272 
275 
276 typedef struct _DICTIONARY {
281 
288 
290 typedef VOID
296 
298 typedef NTSTATUS
299 (NTAPI *PCLASS_ADD_DEVICE)(
302 
303 typedef NTSTATUS
305  _In_ PDEVICE_OBJECT DeviceObject,
306  _In_ PIRP Irp);
307 
309 typedef NTSTATUS
310 (NTAPI *PCLASS_START_DEVICE)(
311  _In_ PDEVICE_OBJECT DeviceObject);
312 
314 typedef NTSTATUS
315 (NTAPI *PCLASS_STOP_DEVICE)(
316  _In_ PDEVICE_OBJECT DeviceObject,
318 
320 typedef NTSTATUS
321 (NTAPI *PCLASS_INIT_DEVICE)(
322  _In_ PDEVICE_OBJECT DeviceObject);
323 
325 typedef NTSTATUS
326 (NTAPI *PCLASS_ENUM_DEVICE)(
327  _In_ PDEVICE_OBJECT DeviceObject);
328 
330 typedef NTSTATUS
332  _In_ PDEVICE_OBJECT DeviceObject,
333  _In_ PIRP Irp);
334 
336 typedef NTSTATUS
338  _In_ PDEVICE_OBJECT DeviceObject,
339  _In_ PIRP Irp);
340 
342 typedef NTSTATUS
344  _In_ PDEVICE_OBJECT DeviceObject,
345  _In_ PIRP Irp);
346 
348 typedef NTSTATUS
350  _In_ PDEVICE_OBJECT DeviceObject,
351  _In_ PIRP Irp);
352 
354 typedef NTSTATUS
355 (NTAPI *PCLASS_QUERY_ID)(
356  _In_ PDEVICE_OBJECT DeviceObject,
359 
361 typedef NTSTATUS
362 (NTAPI *PCLASS_REMOVE_DEVICE)(
363  _In_ PDEVICE_OBJECT DeviceObject,
364  _In_ UCHAR Type);
365 
367 typedef VOID
368 (NTAPI *PCLASS_UNLOAD)(
369  _In_ PDRIVER_OBJECT DriverObject);
370 
372 typedef NTSTATUS
373 (NTAPI *PCLASS_QUERY_PNP_CAPABILITIES)(
376 
378 typedef VOID
379 (NTAPI *PCLASS_TICK)(
380  _In_ PDEVICE_OBJECT DeviceObject);
381 
383 typedef NTSTATUS
384 (NTAPI *PCLASS_QUERY_WMI_REGINFO_EX)(
385  _In_ PDEVICE_OBJECT DeviceObject,
389 
391 typedef NTSTATUS
392 (NTAPI *PCLASS_QUERY_WMI_REGINFO)(
393  _In_ PDEVICE_OBJECT DeviceObject,
394  _Out_ ULONG *RegFlags,
395  _Out_ PUNICODE_STRING Name);
396 
398 typedef NTSTATUS
399 (NTAPI *PCLASS_QUERY_WMI_DATABLOCK)(
400  _In_ PDEVICE_OBJECT DeviceObject,
401  _In_ PIRP Irp,
404  _Out_writes_bytes_(BufferAvail) PUCHAR Buffer);
405 
407 typedef NTSTATUS
408 (NTAPI *PCLASS_SET_WMI_DATABLOCK)(
409  _In_ PDEVICE_OBJECT DeviceObject,
410  _In_ PIRP Irp,
411  _In_ ULONG GuidIndex,
413  _In_reads_bytes_(BufferSize) PUCHAR Buffer);
414 
416 typedef NTSTATUS
417 (NTAPI *PCLASS_SET_WMI_DATAITEM)(
418  _In_ PDEVICE_OBJECT DeviceObject,
419  _In_ PIRP Irp,
420  _In_ ULONG GuidIndex,
422  _In_ ULONG BufferSize,
423  _In_reads_bytes_(BufferSize) PUCHAR Buffer);
424 
426 typedef NTSTATUS
427 (NTAPI *PCLASS_EXECUTE_WMI_METHOD)(
428  _In_ PDEVICE_OBJECT DeviceObject,
429  _In_ PIRP Irp,
430  _In_ ULONG GuidIndex,
434  _In_reads_(_Inexpressible_(max(InBufferSize, OutBufferSize))) PUCHAR Buffer);
435 
437 typedef NTSTATUS
438 (NTAPI *PCLASS_WMI_FUNCTION_CONTROL)(
439  _In_ PDEVICE_OBJECT DeviceObject,
440  _In_ PIRP Irp,
441  _In_ ULONG GuidIndex,
444 
453 
454 typedef struct _SRB_HISTORY {
456  _Field_range_(1,30000) ULONG TotalHistoryCount;
457  _Field_range_(0,TotalHistoryCount) ULONG UsedHistoryCount;
458  _Field_size_part_(TotalHistoryCount, UsedHistoryCount) SRB_HISTORY_ITEM History[1];
460 
462 typedef BOOLEAN
463 (NTAPI *PCLASS_INTERPRET_SENSE_INFO)(
464  _In_ PDEVICE_OBJECT Fdo,
473  LONGLONG *RetryIn100nsUnits);
474 
476 _At_(RequestHistory->UsedHistoryCount, _Pre_equal_to_(RequestHistory->TotalHistoryCount)
477  _Out_range_(0, RequestHistory->TotalHistoryCount - 1))
478 typedef VOID
479 (NTAPI *PCLASS_COMPRESS_RETRY_HISTORY_DATA)(
481  _Inout_ PSRB_HISTORY RequestHistory);
482 
483 typedef struct {
488 
489 typedef struct _CLASS_WMI_INFO {
492  PCLASS_QUERY_WMI_REGINFO ClassQueryWmiRegInfo;
493  PCLASS_QUERY_WMI_DATABLOCK ClassQueryWmiDataBlock;
494  PCLASS_SET_WMI_DATABLOCK ClassSetWmiDataBlock;
495  PCLASS_SET_WMI_DATAITEM ClassSetWmiDataItem;
496  PCLASS_EXECUTE_WMI_METHOD ClassExecuteWmiMethod;
497  PCLASS_WMI_FUNCTION_CONTROL ClassWmiFunctionControl;
499 
500 typedef struct _CLASS_DEV_INFO {
510  PCLASS_INIT_DEVICE ClassInitDevice;
511  PCLASS_START_DEVICE ClassStartDevice;
513  PCLASS_STOP_DEVICE ClassStopDevice;
514  PCLASS_REMOVE_DEVICE ClassRemoveDevice;
515  PCLASS_QUERY_PNP_CAPABILITIES ClassQueryPnpCapabilities;
518 
519 struct _CLASS_INIT_DATA {
520  ULONG InitializationDataSize;
523  PCLASS_ADD_DEVICE ClassAddDevice;
524  PCLASS_ENUM_DEVICE ClassEnumerateDevice;
525  PCLASS_QUERY_ID ClassQueryId;
527  PCLASS_UNLOAD ClassUnload;
528  PCLASS_TICK ClassTick;
529 };
530 
531 typedef struct _FILE_OBJECT_EXTENSION {
537 
538 typedef struct _CLASS_WORKING_SET {
540  _Field_range_(0,2048) ULONG XferPacketsWorkingSetMaximum;
541  _Field_range_(0,2048) ULONG XferPacketsWorkingSetMinimum;
543 
545  _Field_range_(sizeof(CLASS_INTERPRET_SENSE_INFO),sizeof(CLASS_INTERPRET_SENSE_INFO))
546  ULONG Size;
547  _Field_range_(1,30000) ULONG HistoryCount;
548  __callback PCLASS_COMPRESS_RETRY_HISTORY_DATA Compress;
549  __callback PCLASS_INTERPRET_SENSE_INFO Interpret;
551 
552 C_ASSERT((MAXULONG - sizeof(SRB_HISTORY)) / 30000 >= sizeof(SRB_HISTORY_ITEM));
553 
554 typedef struct _CLASS_DRIVER_EXTENSION {
558 #if (NTDDI_VERSION >= NTDDI_WINXP)
559  PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx;
560  PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx;
561 #endif
562 #if (NTDDI_VERSION >= NTDDI_VISTA)
564  PDRIVER_DISPATCH DeviceMajorFunctionTable[IRP_MJ_MAXIMUM_FUNCTION + 1];
565  PDRIVER_DISPATCH MpDeviceMajorFunctionTable[IRP_MJ_MAXIMUM_FUNCTION + 1];
568 #endif
570 
571 typedef struct _COMMON_DEVICE_EXTENSION {
583  _ANONYMOUS_STRUCT struct {
585  BOOLEAN IsInitialized:1;
586  BOOLEAN IsSrbLookasideListInitialized:1;
587  } DUMMYSTRUCTNAME;
601 #ifndef ALLOCATE_SRB_FROM_POOL
603 #endif
608 #if (NTDDI_VERSION >= NTDDI_WINXP)
610 #else
612 #endif
613 #if (NTDDI_VERSION >= NTDDI_VISTA)
615 #else
617 #endif
621 
623  _ANONYMOUS_UNION union {
624  _ANONYMOUS_STRUCT struct {
627  } DUMMYSTRUCTNAME;
629  } DUMMYUNIONNAME;
632 #if (NTDDI_VERSION >= NTDDI_WINXP)
634 #else
636 #endif
641 
642 typedef struct _CLASS_POWER_OPTIONS {
643  ULONG PowerDown:1;
644  ULONG LockQueue:1;
645  ULONG HandleSpinDown:1;
646  ULONG HandleSpinUp:1;
649 
650 typedef struct _CLASS_POWER_CONTEXT {
651  union {
655  } PowerChangeState;
667 
668 typedef struct _COMPLETION_CONTEXT {
672 
676 ULONG
677 NTAPI
681  _In_ PCLASS_INIT_DATA InitializationData);
682 
685  __callback PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx;
686  __callback PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx;
688 
690  _ANONYMOUS_UNION union {
691  _ANONYMOUS_STRUCT struct {
694  } DUMMYSTRUCTNAME;
696  } DUMMYUNIONNAME;
716 #if (NTDDI_VERSION >= NTDDI_VISTA)
718 #else
719  UCHAR ReservedByte;
720 #endif
721  PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo;
745 
746 #if (NTDDI_VERSION <= NTDDI_WIN2K)
747 
748 #if (SPVER(NTDDI_VERSION) < 2))
753 #else
754  ULONG CompletionSuccessCount;
755  ULONG SavedSrbFlags;
756  ULONG SavedErrorCount;
758 #endif
759 
760 #else /* (NTDDI_VERSION <= NTDDI_WIN2K) */
761 
762  PCLASS_PRIVATE_FDO_DATA PrivateFdoData;
766 
767 #endif /* (NTDDI_VERSION <= NTDDI_WIN2K) */
768 
770 
774 ULONG
775 NTAPI
779  _In_ PVOID Data);
780 
785 NTSTATUS
786 NTAPI
788  _In_ PDRIVER_OBJECT DriverObject,
793  PDEVICE_OBJECT *DeviceObject);
794 
797 NTSTATUS
798 NTAPI
800  _In_ PDEVICE_OBJECT DeviceObject);
801 
803 VOID
804 NTAPI
806  _In_ PDEVICE_OBJECT DeviceObject);
807 
809 VOID
810 NTAPI
812  _In_ PDEVICE_OBJECT DeviceObject,
813  _In_ PIRP Irp,
814  _In_ ULONG MaximumBytes);
815 
817 NTSTATUS
818 NTAPI
820  _In_ PDEVICE_OBJECT DeviceObject,
821  _Inout_ PIRP Irp);
822 
824 NTSTATUS
825 NTAPI
827  PDEVICE_OBJECT DeviceObject,
828  PIRP Irp,
829  PVOID Context);
830 
832 NTSTATUS
833 NTAPI
835  PDEVICE_OBJECT DeviceObject,
836  PIRP Irp,
837  PVOID Context);
838 
840 BOOLEAN
841 NTAPI
843  _In_ PDEVICE_OBJECT DeviceObject,
847  _In_ ULONG RetryCount,
849  _Out_opt_ _Deref_out_range_(0,100) ULONG *RetryInterval);
850 
851 VOID
852 NTAPI
855  _In_ PDEVICE_OBJECT TargetDeviceObject,
857  PVOID Buffer,
858  _In_ ULONG InputBufferLength,
862 
864 NTSTATUS
865 NTAPI
867  _In_ PDEVICE_OBJECT TargetDeviceObject,
868  _In_ PIRP Irp);
869 
871 NTSTATUS
872 NTAPI
874  _In_ PCOMMON_DEVICE_EXTENSION CommonExtension,
875  _In_ PIRP Irp);
876 
878 NTSTATUS
879 NTAPI
881  _In_ PDEVICE_OBJECT DeviceObject,
883  _In_reads_bytes_opt_(BufferLength) PVOID BufferAddress,
885  _In_ BOOLEAN WriteToDevice);
886 
888 NTSTATUS
889 NTAPI
891  _In_ PDEVICE_OBJECT DeviceObject,
893  _In_ PIRP Irp,
894  _In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID BufferAddress,
895  _In_ ULONG BufferLength,
896  _In_ BOOLEAN WriteToDevice);
897 
899 NTSTATUS
900 NTAPI
902  _In_ PDEVICE_OBJECT DeviceObject,
903  _In_ PIRP Irp);
904 
906 ULONG
907 NTAPI
909  _In_ PDEVICE_OBJECT DeviceObject,
910  _In_reads_bytes_(Length) PCHAR ModeSenseBuffer,
911  _In_ ULONG Length,
912  _In_ UCHAR PageMode);
913 
915 PVOID
916 NTAPI
918  _In_reads_bytes_(Length) PCHAR ModeSenseBuffer,
919  _In_ ULONG Length,
920  _In_ UCHAR PageMode,
921  _In_ BOOLEAN Use6Byte);
922 
925 NTSTATUS
926 NTAPI
928  _In_ PDEVICE_OBJECT LowerDeviceObject,
930 
932 NTSTATUS
933 NTAPI
935  PDEVICE_OBJECT DeviceObject,
936  PIRP Irp);
937 
940 VOID
941 NTAPI
943  _Inout_ PCOMMON_DEVICE_EXTENSION CommonExtension,
945 
948 VOID
949 NTAPI
951  _Inout_ PCOMMON_DEVICE_EXTENSION CommonExtension);
952 
955 ULONG
956 NTAPI
958  _In_ PDEVICE_OBJECT DeviceObject);
959 
962 NTSTATUS
963 NTAPI
965  _In_ PDEVICE_OBJECT DeviceObject,
968 
971 VOID
972 NTAPI
974  _In_ PDEVICE_OBJECT Fdo);
975 
978 VOID
979 NTAPI
982 
985 BOOLEAN
986 NTAPI
988  _In_ PPHYSICAL_DEVICE_EXTENSION PdoExtension,
990 
992 VOID
994  _In_ CLASS_DEBUG_LEVEL DebugPrintLevel,
995  _In_z_ PCCHAR DebugMessage,
996  ...);
997 
1002 NTAPI
1004  _In_ PDRIVER_OBJECT DriverObject);
1005 
1007 VOID
1008 NTAPI
1010  _In_ PDEVICE_OBJECT DeviceObject,
1011  _In_ PIRP Irp,
1013 
1015 VOID
1016 NTAPI
1018  _In_ PDEVICE_OBJECT DeviceObject,
1019  PIRP Tag);
1020 
1022 ULONG
1023 NTAPI
1025  _In_ PDEVICE_OBJECT DeviceObject,
1026  PVOID Tag,
1027  _In_ PCSTR File,
1028  _In_ ULONG Line);
1029 
1032 VOID
1033 NTAPI
1035  _In_ PDEVICE_OBJECT Fdo,
1040 
1042 NTSTATUS
1043 NTAPI
1045  _In_ PDEVICE_OBJECT DeviceObject,
1046  _Inout_ PIRP Irp,
1047  _In_ NTSTATUS Status,
1048  _In_ ULONG BufferUsed,
1049  _In_ CCHAR PriorityBoost);
1050 
1053 NTSTATUS
1054 NTAPI
1056  _In_ PDEVICE_OBJECT DeviceObject,
1057  _In_ LPGUID Guid,
1060  _In_reads_bytes_(EventDataSize) PVOID EventData);
1061 
1063 VOID
1064 NTAPI
1066  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1067 
1070 VOID
1071 NTAPI
1073  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1075 
1078 NTSTATUS
1079 NTAPI
1081  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1083 
1085 PVPB
1086 NTAPI
1087 ClassGetVpb(
1088  _In_ PDEVICE_OBJECT DeviceObject);
1089 
1091 NTSTATUS
1092 NTAPI
1094  _In_ PDEVICE_OBJECT DeviceObject,
1095  _In_ PIRP Irp);
1096 
1097 NTSTATUS
1098 NTAPI
1100  _In_ PDEVICE_OBJECT DeviceObject,
1101  _In_ PIRP Irp);
1102 
1104 NTSTATUS
1105 NTAPI
1110 
1112 VOID
1113 NTAPI
1115  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1120  _In_ UCHAR PathId,
1122  _In_ UCHAR Lun);
1123 
1126 VOID
1127 NTAPI
1129  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1130 
1132 VOID
1133 NTAPI
1135  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1136 
1137 IO_COMPLETION_ROUTINE ClassSignalCompletion;
1138 
1139 VOID
1140 NTAPI
1142  _In_ PDEVICE_OBJECT DeviceObject);
1143 
1146 NTSTATUS
1147 NTAPI
1149  _In_ PDEVICE_OBJECT DeviceObject,
1151 
1153 NTSTATUS
1154 NTAPI
1156  PDEVICE_OBJECT DeviceObject,
1157  PIRP Irp,
1158  PVOID Event);
1159 
1161 VOID
1162 NTAPI
1164  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1165 
1167 NTSTATUS
1168 NTAPI
1170  PDEVICE_OBJECT DeviceObject,
1171  PIRP Irp,
1172  PVOID Context);
1173 
1176 VOID
1177 NTAPI
1179  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1181  _In_ BOOLEAN Wait);
1182 
1185 VOID
1186 NTAPI
1188  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1189 
1192 VOID
1193 NTAPI
1195  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1196 
1199 VOID
1200 NTAPI
1202  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
1203 
1205 VOID
1206 NTAPI
1208  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1212 
1214 NTSTATUS
1215 NTAPI
1217  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1218  _In_opt_ PWSTR SubkeyName,
1219  _In_ PWSTR ParameterName,
1220  _In_ ULONG ParameterValue);
1221 
1222 #if (NTDDI_VERSION >= NTDDI_VISTA)
1223 
1226 NTAPI
1227 ClassGetFsContext(
1228  _In_ PCOMMON_DEVICE_EXTENSION CommonExtension,
1230 
1232 VOID
1233 NTAPI
1234 ClassSendNotification(
1235  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1236  _In_ const GUID *Guid,
1238  _In_reads_bytes_opt_(ExtraDataSize) PVOID ExtraData);
1239 
1240 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
1241 
1242 static __inline
1243 BOOLEAN
1245  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1247 {
1248  return ((BOOLEAN)((TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_PORT_DRIVER_ALLOCSENSE) &&
1249  TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER)) &&
1250  (Srb->SenseInfoBuffer != FdoExtension->SenseData)));
1251 }
1252 
1253 static __inline
1254 VOID
1256  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1258 {
1260  ASSERT(TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER));
1261  ASSERT(Srb->SenseInfoBuffer != FdoExtension->SenseData);
1262 
1263  ExFreePool(Srb->SenseInfoBuffer);
1264  Srb->SenseInfoBuffer = FdoExtension->SenseData;
1265  Srb->SenseInfoBufferLength = SENSE_BUFFER_SIZE;
1266  CLEAR_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER);
1267  return;
1268 }
1269 
1271 typedef VOID
1272 (NTAPI *PCLASS_SCAN_FOR_SPECIAL_HANDLER)(
1273  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1274  _In_ ULONG_PTR Data);
1275 
1277 VOID
1278 NTAPI
1280  _In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
1282  _In_ PCLASS_SCAN_FOR_SPECIAL_HANDLER Function);
__callback PCLASS_COMPRESS_RETRY_HISTORY_DATA Compress
Definition: classpnp.h:548
DWORD *typedef PVOID
Definition: winlogon.h:52
COMMON_DEVICE_EXTENSION CommonExtension
Definition: classpnp.h:628
_In_ ULONG _In_ BOOLEAN _In_ ULONG UniqueErrorValue
Definition: classpnp.h:1117
SCSIPORTAPI NTSTATUS NTAPI ClassDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
ULONG NTAPI ClassInitialize(IN PVOID Argument1, IN PVOID Argument2, IN PCLASS_INIT_DATA InitializationData)
Definition: class.c:120
LARGE_INTEGER PartitionLength
Definition: classpnp.h:594
VOID NTAPI ClassDisableMediaChangeDetection(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
Definition: autorun.c:2803
SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbSynchronous(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_reads_bytes_opt_(BufferLength) PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
UCHAR ClassDriverUse
Definition: classpnp.h:451
enum _MEDIA_CHANGE_DETECTION_STATE MEDIA_CHANGE_DETECTION_STATE
#define _Must_inspect_result_
Definition: no_sal2.h:314
PGUIDREGINFO GuidRegInfo
Definition: classpnp.h:491
struct _CLASS_PRIVATE_FDO_DATA * PCLASS_PRIVATE_FDO_DATA
Definition: classpnp.h:265
* PSTORAGE_DESCRIPTOR_HEADER
Definition: ntddstor.h:441
* PSTORAGE_ADAPTER_DESCRIPTOR
Definition: ntddstor.h:476
GUID Guid
Definition: classpnp.h:484
struct _MEDIA_CHANGE_DETECTION_INFO * PMEDIA_CHANGE_DETECTION_INFO
Definition: classpnp.h:274
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
NTSTATUS NTAPI ClassRemoveDevice(IN PDEVICE_OBJECT DeviceObject, IN UCHAR RemoveType)
Definition: class.c:6971
unsigned int ULONG32
Definition: basetsd.h:124
static ULONG CountOfSetBitsUlongPtr(ULONG_PTR _X)
Definition: classpnp.h:198
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
SCSIPORTAPI NTSTATUS NTAPI ClassIoCompleteAssociated(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
VOID NTAPI ClassDeleteSrbLookasideList(IN PCOMMON_DEVICE_EXTENSION CommonExtension)
Definition: obsolete.c:899
#define DEVICE_TYPE
Definition: nt_native.h:578
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1117
_In_ PDEVICE_OBJECT Pdo
Definition: classpnp.h:301
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG IoControlCode
Definition: fltkernel.h:1383
struct _SRB_HISTORY_ITEM * PSRB_HISTORY_ITEM
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
Type
Definition: Type.h:6
VOID NTAPI ClassAcquireChildLock(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
Definition: class.c:8483
struct GUIDREGINFO * PGUIDREGINFO
_In_ BOOLEAN Release
Definition: classpnp.h:929
BOOLEAN Enable
Definition: acefiex.h:245
PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo
Definition: classpnp.h:721
_In_ ULONG _In_ BOOLEAN LogError
Definition: classpnp.h:1117
NTSTATUS FinalStatus
Definition: classpnp.h:659
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: classpnp.h:966
#define _Inout_updates_opt_(size)
Definition: no_sal2.h:293
_Field_range_(1, 30000) ULONG TotalHistoryCount
VOID NTAPI ClassNotifyFailurePredicted(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, PUCHAR Buffer, ULONG BufferSize, BOOLEAN LogError, ULONG UniqueErrorValue, UCHAR PathId, UCHAR TargetId, UCHAR Lun)
Definition: autorun.c:3468
PCLASS_QUERY_ID ClassQueryId
Definition: classpnp.h:525
CLASS_DEV_INFO FdoData
Definition: classpnp.h:521
#define TEST_FLAG(Flags, Bit)
Definition: classpnp.h:156
_In_ const GUID _In_ ULONG ExtraDataSize
Definition: classpnp.h:1236
DISK_GEOMETRY DiskGeometry
Definition: classpnp.h:704
#define SRB_FLAGS_FREE_SENSE_BUFFER
Definition: srb.h:398
_In_ PIRP Irp
Definition: csq.h:116
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
struct _CLASS_PRIVATE_PDO_DATA CLASS_PRIVATE_PDO_DATA
Definition: classpnp.h:268
_In_ BUS_QUERY_ID_TYPE _In_ PUNICODE_STRING IdString
Definition: classpnp.h:357
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
struct _CLASSPNP_SCAN_FOR_SPECIAL_INFO CLASSPNP_SCAN_FOR_SPECIAL_INFO
const char * PCSTR
Definition: typedefs.h:52
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1117
IN OUT PIRP IN ULONG IN WMIENABLEDISABLECONTROL Function
Definition: wmilib.h:37
IN OUT PIRP IN ULONG IN ULONG InstanceIndex
Definition: wmilib.h:45
unsigned char * PUCHAR
Definition: retypes.h:3
_In_z_ PCCHAR _In_ PDEVICE_OBJECT _In_ BOOLEAN IsFdo
Definition: classpnp.h:789
static ULONG CountOfSetBitsULong(ULONG _X)
Definition: classpnp.h:192
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
Definition: iofuncs.h:713
struct _FUNCTIONAL_DEVICE_EXTENSION * PartitionZeroExtension
Definition: classpnp.h:575
IO_COMPLETION_ROUTINE ClassSignalCompletion
Definition: classpnp.h:1137
SCSIPORTAPI VOID NTAPI ClassReleaseQueue(_In_ PDEVICE_OBJECT DeviceObject)
#define IRP_MJ_MAXIMUM_FUNCTION
_In_ PIRP _In_ ULONG _In_ ULONG _Out_writes_bytes_(BufferAvail) PUCHAR Buffer)
COMMON_DEVICE_EXTENSION CommonExtension
Definition: classpnp.h:695
__callback PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx
Definition: classpnp.h:685
#define _Outptr_
Definition: no_sal2.h:396
PVOID *typedef PWSTR
Definition: winlogon.h:57
CLASS_POWER_OPTIONS Options
Definition: classpnp.h:656
PCLASS_INTERPRET_SENSE_INFO2 InterpretSenseInfo
Definition: classpnp.h:566
struct _COMPLETION_CONTEXT COMPLETION_CONTEXT
static ULONG CountOfSetBitsULong32(ULONG32 _X)
Definition: classpnp.h:194
CLASS_POWER_DOWN_STATE PowerDown
Definition: classpnp.h:652
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG _In_ ULONG OutputBufferLength
Definition: fltkernel.h:1374
SCSIPORTAPI NTSTATUS NTAPI ClassBuildRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
SCSIPORTAPI NTSTATUS NTAPI ClassWmiCompleteRequest(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _In_ NTSTATUS Status, _In_ ULONG BufferUsed, _In_ CCHAR PriorityBoost)
VOID NTAPI ClassSetMediaChangeState(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, IN MEDIA_CHANGE_DETECTION_STATE NewState, IN BOOLEAN Wait)
Definition: autorun.c:780
CLASS_POWER_UP_STATE PowerUp
Definition: classpnp.h:654
_In_z_ PCCHAR _In_ PDEVICE_OBJECT _In_ BOOLEAN _Outptr_result_nullonfailure_ _At_ * DeviceObject(Mem) __drv_aliasesMem) PDEVICE_OBJECT *DeviceObject
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: classpnp.h:293
struct _CLASS_PRIVATE_COMMON_DATA CLASS_PRIVATE_COMMON_DATA
Definition: classpnp.h:271
PCLASS_CREATE_CLOSE ClassCreateClose
Definition: classpnp.h:509
enum _CLASS_DEBUG_LEVEL * PCLASS_DEBUG_LEVEL
struct _CLASS_POWER_CONTEXT * PCLASS_POWER_CONTEXT
struct _CLASS_WORKING_SET CLASS_WORKING_SET
PCLASS_DEVICE_CONTROL ClassDeviceControl
Definition: classpnp.h:507
#define DUMMYUNIONNAME
Definition: ntbasedef.h:32
PDEVICE_OBJECT DeviceObject
Definition: classpnp.h:533
PDEVICE_OBJECT DeviceObject
Definition: classpnp.h:663
NTSTATUS(NTAPI * PCLASS_READ_WRITE)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: class2.h:57
VOID NTAPI ClassMarkChildrenMissing(IN PFUNCTIONAL_DEVICE_EXTENSION Fdo)
Definition: class.c:6604
ULONG DeviceCharacteristics
Definition: classpnp.h:504
#define SENSE_BUFFER_SIZE
Definition: cdrw_hw.h:1183
static ULONG CountOfSetBitsUChar(UCHAR _X)
Definition: classpnp.h:190
#define _In_opt_
Definition: no_sal2.h:213
_In_opt_ PIRP OriginalRequest
Definition: classpnp.h:465
PCLASS_QUERY_WMI_DATABLOCK ClassQueryWmiDataBlock
Definition: classpnp.h:493
static ULONG CountOfSetBitsULong64(ULONG64 _X)
Definition: classpnp.h:196
ULONG_PTR ClassDriverUse[4]
Definition: classpnp.h:455
ULONGLONG Signature
Definition: classpnp.h:277
uint32_t ULONG_PTR
Definition: typedefs.h:64
PCLASS_TICK ClassTick
Definition: classpnp.h:528
IN OUT PIRP IN ULONG IN ULONG IN ULONG IN ULONG IN ULONG OutBufferSize
Definition: wmilib.h:56
SCSIPORTAPI BOOLEAN NTAPI ClassInterpretSenseInfo(_In_ PDEVICE_OBJECT DeviceObject, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ UCHAR MajorFunctionCode, _In_ ULONG IoDeviceCode, _In_ ULONG RetryCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, 100) ULONG *RetryInterval)
struct _DICTIONARY DICTIONARY
VOID NTAPI ClassGetDeviceParameter(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, IN PWSTR SubkeyName OPTIONAL, IN PWSTR ParameterName, IN OUT PULONG ParameterValue)
Definition: utils.c:52
GLenum GLclampf GLint i
Definition: glfuncs.h:14
SCSIPORTAPI NTSTATUS NTAPI ClassIoComplete(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
SCSIPORTAPI VOID NTAPI ClassCompleteRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ CCHAR PriorityBoost)
struct _DICTIONARY_HEADER * List
Definition: classpnp.h:278
struct _CLASS_POWER_CONTEXT CLASS_POWER_CONTEXT
_In_opt_ PIRP _In_ PSCSI_REQUEST_BLOCK _In_ UCHAR _In_ ULONG _In_ ULONG _In_opt_ SRB_HISTORY * RequestHistory
Definition: classpnp.h:465
* PSTORAGE_DEVICE_DESCRIPTOR
Definition: ntddstor.h:457
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define __drv_aliasesMem
Definition: driverspecs.h:238
CLASS_POWER_DOWN_STATE2
Definition: classpnp.h:244
#define max(a, b)
Definition: classpnp.h:16
_Field_size_part_(TotalHistoryCount, UsedHistoryCount) SRB_HISTORY_ITEM History[1]
long LONG
Definition: pedump.c:60
#define _X(x)
Definition: CString.cpp:210
_In_ ULONG BufferLength
Definition: usbdlib.h:225
struct _FUNCTIONAL_DEVICE_EXTENSION * PFUNCTIONAL_DEVICE_EXTENSION
SCSI_REQUEST_BLOCK Srb
Definition: classpnp.h:665
SCSIPORTAPI VOID NTAPI ClassSplitRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ ULONG MaximumBytes)
ULONG InstanceCount
Definition: classpnp.h:485
struct _FUNCTIONAL_DEVICE_EXTENSION FUNCTIONAL_DEVICE_EXTENSION
uint64_t ULONG64
Definition: typedefs.h:66
SCSIPORTAPI NTSTATUS NTAPI ClassCheckVerifyComplete(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
#define CLEAR_FLAG(Flags, Bit)
Definition: classpnp.h:155
_In_opt_ PIRP _In_ PSCSI_REQUEST_BLOCK _In_ UCHAR _In_ ULONG _In_ ULONG _In_opt_ SRB_HISTORY _Out_ NTSTATUS _Out_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIn100nsUnits)
_In_ CCHAR PriorityBoost
Definition: iofuncs.h:763
_In_ BOOLEAN AcquireChildLock
Definition: classpnp.h:989
SCSIPORTAPI VOID NTAPI ClassResetMediaChangeTimer(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
struct _FILE_OBJECT_EXTENSION * PFILE_OBJECT_EXTENSION
UINTN * BufferSize
Definition: acefiex.h:370
IN OUT PULONG RegFlags
Definition: wmilib.h:28
DRIVER_STARTIO * PDRIVER_STARTIO
Definition: iotypes.h:2131
PCLASS_INIT_DEVICE ClassInitDevice
Definition: classpnp.h:510
KSPIN_LOCK ReleaseQueueSpinLock
Definition: classpnp.h:727
PCLASS_SET_WMI_DATABLOCK ClassSetWmiDataBlock
Definition: classpnp.h:494
VOID(* PCLASS_ERROR)(IN PDEVICE_OBJECT DeviceObject, IN PSCSI_REQUEST_BLOCK Srb, IN OUT NTSTATUS *Status, IN OUT BOOLEAN *Retry)
Definition: class.h:58
IN OUT PIRP IN ULONG IN ULONG IN ULONG DataItemId
Definition: wmilib.h:76
CLASS_POWER_DOWN_STATE
Definition: classpnp.h:236
PCLASS_ADD_DEVICE ClassAddDevice
Definition: classpnp.h:523
_In_ PIRP _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_reads_(_Inexpressible_(max(InBufferSize, OutBufferSize))) PUCHAR Buffer)
_In_z_ PCCHAR ObjectNameBuffer
Definition: classpnp.h:789
static __inline BOOLEAN PORT_ALLOCATED_SENSE(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: classpnp.h:1244
LARGE_INTEGER TickCountSent
Definition: classpnp.h:446
VOID NTAPI ClassSendStartUnit(_In_ PDEVICE_OBJECT DeviceObject)
CLASS_POWER_UP_STATE
Definition: classpnp.h:253
_In_ UCHAR RemoveType
Definition: classpnp.h:1150
NTSTATUS NTAPI ClassCreateDeviceObject(IN PDRIVER_OBJECT DriverObject, IN PCCHAR ObjectNameBuffer, IN PDEVICE_OBJECT LowerDevice, IN BOOLEAN IsFdo, IN OUT PDEVICE_OBJECT *DeviceObject)
Definition: class.c:5687
SCSIPORTAPI NTSTATUS NTAPI ClassSpinDownPowerHandler(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
_In_ PFILE_OBJECT FileObject
Definition: classpnp.h:1229
#define _Out_
Definition: no_sal2.h:323
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
#define _At_(target, annos)
Definition: no_sal2.h:11
IN PSCSI_REQUEST_BLOCK IN OUT NTSTATUS IN OUT BOOLEAN * Retry
Definition: class2.h:49
PCLASS_READ_WRITE ClassReadWriteVerification
Definition: classpnp.h:506
struct _CLASS_DRIVER_EXTENSION * PCLASS_DRIVER_EXTENSION
Definition: bufpool.h:45
NPAGED_LOOKASIDE_LIST SrbLookasideList
Definition: classpnp.h:602
return(0)
PCLASS_QUERY_WMI_REGINFO_EX ClassFdoQueryWmiRegInfoEx
Definition: classpnp.h:559
_MEDIA_CHANGE_DETECTION_STATE
Definition: classpnp.h:201
PCLASS_ERROR ClassError
Definition: classpnp.h:505
struct _CLASS_WMI_INFO * PCLASS_WMI_INFO
_In_ BUS_QUERY_ID_TYPE IdType
Definition: classpnp.h:357
Definition: bcd.h:200
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
_In_ PVOID Argument2
Definition: classpnp.h:680
CLASS_POWER_DOWN_STATE2 PowerDown2
Definition: classpnp.h:653
SCSIPORTAPI PVOID NTAPI ClassFindModePage(_In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode, _In_ BOOLEAN Use6Byte)
UNICODE_STRING DeviceName
Definition: classpnp.h:591
struct _CLASS_INTERPRET_SENSE_INFO2 CLASS_INTERPRET_SENSE_INFO2
UINTN Size
Definition: acefiex.h:555
LARGE_INTEGER StartingOffset
Definition: classpnp.h:595
PDEVICE_OBJECT DeviceObject
Definition: classpnp.h:626
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
struct _PHYSICAL_DEVICE_EXTENSION * PPHYSICAL_DEVICE_EXTENSION
int64_t LONGLONG
Definition: typedefs.h:67
#define _Out_opt_
Definition: no_sal2.h:339
LARGE_INTEGER TickCountCompleted
Definition: classpnp.h:447
unsigned char BOOLEAN
#define const
Definition: zconf.h:230
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:239
SCSIPORTAPI ULONG NTAPI ClassModeSense(_In_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode)
ULONG Flags
Definition: classpnp.h:486
#define _Post_satisfies_(cond)
Definition: no_sal2.h:465
PCLASS_POWER_DEVICE ClassPowerDevice
Definition: classpnp.h:512
_In_ PUCHAR EventPrefix
Definition: classpnp.h:1074
CLASS_WMI_INFO ClassWmiInfo
Definition: classpnp.h:516
_In_ LPGUID _In_ ULONG _In_ ULONG EventDataSize
Definition: classpnp.h:1057
PCLASS_START_DEVICE ClassStartDevice
Definition: classpnp.h:511
char CCHAR
Definition: typedefs.h:51
SCSIPORTAPI ULONG NTAPI ClassAcquireRemoveLockEx(_In_ PDEVICE_OBJECT DeviceObject, PVOID Tag, _In_ PCSTR File, _In_ ULONG Line)
VOID NTAPI ClassEnableMediaChangeDetection(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
Definition: autorun.c:2718
uint64_t ULONGLONG
Definition: typedefs.h:66
PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx
Definition: classpnp.h:560
C_ASSERT((MAXULONG-sizeof(SRB_HISTORY))/30000 >=sizeof(SRB_HISTORY_ITEM))
IN OUT PIRP IN ULONG IN ULONG IN ULONG MethodId
Definition: wmilib.h:56
NTSTATUS NTAPI ClassSetDeviceParameter(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, IN PWSTR SubkeyName OPTIONAL, IN PWSTR ParameterName, IN ULONG ParameterValue)
Definition: utils.c:136
struct _CLASS_QUERY_WMI_REGINFO_EX_LIST CLASS_QUERY_WMI_REGINFO_EX_LIST
static __inline VOID FREE_PORT_ALLOCATED_SENSE_BUFFER(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: classpnp.h:1255
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
Definition: classpnp.h:699
static DRIVER_STARTIO ClassStartIo
Definition: kbdclass.c:25
SCSIPORTAPI VOID NTAPI ClassReleaseRemoveLock(_In_ PDEVICE_OBJECT DeviceObject, PIRP Tag)
PSTORAGE_DEVICE_DESCRIPTOR DeviceDescriptor
Definition: classpnp.h:698
UNICODE_STRING MountedDeviceInterfaceName
Definition: classpnp.h:604
enum FAILURE_PREDICTION_METHOD * PFAILURE_PREDICTION_METHOD
struct _FILE_OBJECT_EXTENSION FILE_OBJECT_EXTENSION
struct _PHYSICAL_DEVICE_EXTENSION * ChildList
Definition: classpnp.h:592
VOID NTAPI ClassCleanupMediaChangeDetection(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
Definition: autorun.c:2849
PCLASS_UNLOAD ClassUnload
Definition: classpnp.h:527
enum _STORAGE_PROPERTY_ID * PSTORAGE_PROPERTY_ID
_In_opt_ PIRP _In_ PSCSI_REQUEST_BLOCK _In_ UCHAR MajorFunctionCode
Definition: classpnp.h:465
#define _Inout_
Definition: no_sal2.h:244
struct _CLASS_PRIVATE_COMMON_DATA * PCLASS_PRIVATE_COMMON_DATA
Definition: classpnp.h:271
struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
* PFILE_OBJECT
Definition: iotypes.h:1949
NTSTATUS(NTAPI * PCLASS_DEVICE_CONTROL)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: class2.h:68
struct _CLASS_QUERY_WMI_REGINFO_EX_LIST * PCLASS_QUERY_WMI_REGINFO_EX_LIST
PCLASS_SHUTDOWN_FLUSH ClassShutdownFlush
Definition: classpnp.h:508
PDEVICE_OBJECT DeviceObject
Definition: classpnp.h:693
CLASS_POWER_CONTEXT PowerContext
Definition: classpnp.h:744
struct _COMPLETION_CONTEXT * PCOMPLETION_CONTEXT
SCSIPORTAPI VOID NTAPI ClassCheckMediaState(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
Definition: ncftp.h:79
_In_ PUNICODE_STRING Name
Definition: mrx.h:218
_In_opt_ PWSTR _In_ PWSTR _Inout_ PULONG ParameterValue
Definition: classpnp.h:1209
_In_ PCHAR _In_ ULONG _In_reads_bytes_opt_(InquiryDataLength) PINQUIRYDATA InquiryData
unsigned char UCHAR
Definition: xmlstorage.h:181
PIO_COMPLETION_ROUTINE CompletionRoutine
Definition: classpnp.h:662
_In_opt_ PIRP _In_ PSCSI_REQUEST_BLOCK _In_ UCHAR _In_ ULONG _In_ ULONG PreviousRetryCount
Definition: classpnp.h:465
__callback PCLASS_QUERY_WMI_REGINFO_EX ClassPdoQueryWmiRegInfoEx
Definition: classpnp.h:686
struct _CLASS_DEV_INFO * PCLASS_DEV_INFO
_In_ LPGUID Guid
Definition: classpnp.h:778
PDEVICE_OBJECT LowerPdo
Definition: classpnp.h:697
SCSIPORTAPI PVPB NTAPI ClassGetVpb(_In_ PDEVICE_OBJECT DeviceObject)
CLASSENABLEDISABLEFUNCTION
Definition: classpnp.h:224
VOID UINTN Length
Definition: acefiex.h:744
IN OUT PIRP IN ULONG IN ULONG IN ULONG IN ULONG InBufferSize
Definition: wmilib.h:56
Definition: ketypes.h:672
PCLASS_ENUM_DEVICE ClassEnumerateDevice
Definition: classpnp.h:524
_In_ PVOID _In_ PCLASS_INIT_DATA InitializationData
Definition: classpnp.h:680
PCLASS_DRIVER_EXTENSION DriverExtension
Definition: classpnp.h:576
struct _SRB_HISTORY_ITEM SRB_HISTORY_ITEM
PCLASS_WORKING_SET WorkingSet
Definition: classpnp.h:567
_In_z_ PCCHAR _In_ PDEVICE_OBJECT LowerDeviceObject
Definition: classpnp.h:789
NTSTATUS NTAPI ClassSetFailurePredictionPoll(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, FAILURE_PREDICTION_METHOD FailurePredictionMethod, ULONG PollingPeriod)
Definition: autorun.c:3552
#define _Outptr_result_nullonfailure_
Definition: no_sal2.h:428
NTSTATUS(NTAPI * PCLASS_POWER_DEVICE)(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: classpnp.h:304
VOID NTAPI ClassSendDeviceIoControlSynchronous(_In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT TargetDeviceObject, _Inout_updates_opt_(_Inexpressible_(max(InputBufferLength, OutputBufferLength))) PVOID Buffer, _In_ ULONG InputBufferLength, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _Out_ PIO_STATUS_BLOCK IoStatus)
_In_opt_ PWSTR SubkeyName
Definition: classpnp.h:1209
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
PCLASS_STOP_DEVICE ClassStopDevice
Definition: classpnp.h:513
ULONG PVOID Reserved
Definition: ntimage.h:533
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG InputBufferLength
Definition: fltkernel.h:1372
_IRQL_requires_max_(DISPATCH_LEVEL) typedef VOID(NTAPI *PCLASS_ERROR)(_In_ PDEVICE_OBJECT DeviceObject
Definition: rmap.c:30
#define _ANONYMOUS_STRUCT
Definition: ntbasedef.h:56
* PDEVICE_CAPABILITIES
Definition: iotypes.h:927
NTSTATUS NTAPI ClassClaimDevice(IN PDEVICE_OBJECT LowerDeviceObject, IN BOOLEAN Release)
Definition: class.c:5985
Status
Definition: gdiplustypes.h:24
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK IoStatus
Definition: npfs.h:636
IN OUT PIRP IN ULONG GuidIndex
Definition: wmilib.h:37
#define MAXULONG
Definition: typedefs.h:251
#define _Pre_equal_to_(expr)
Definition: no_sal2.h:493
_In_ FAILURE_PREDICTION_METHOD _In_ ULONG PollingPeriod
Definition: classpnp.h:1108
SCSIPORTAPI NTSTATUS NTAPI ClassSendIrpSynchronous(_In_ PDEVICE_OBJECT TargetDeviceObject, _In_ PIRP Irp)
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _In_
Definition: no_sal2.h:204
struct _CLASS_PRIVATE_PDO_DATA * PCLASS_PRIVATE_PDO_DATA
Definition: classpnp.h:268
ULONG NTAPI ClassInitializeEx(IN PDRIVER_OBJECT DriverObject, IN LPGUID Guid, IN PVOID Data)
Definition: class.c:367
DRIVER_DISPATCH * PDRIVER_DISPATCH
Definition: iotypes.h:2148
PCLASS_SET_WMI_DATAITEM ClassSetWmiDataItem
Definition: classpnp.h:495
PCLASS_REMOVE_DEVICE ClassRemoveDevice
Definition: classpnp.h:514
#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS
Definition: classpnp.h:188
DWORD *typedef HANDLE
Definition: winlogon.h:52
struct _CLASS_INIT_DATA * PCLASS_INIT_DATA
Definition: classpnp.h:262
#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE
Definition: srb.h:405
SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbAsynchronous(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ PIRP Irp, _In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
LONG NTSTATUS
Definition: DriverTester.h:11
struct _FAILURE_PREDICTION_INFO * FailurePredictionInfo
Definition: classpnp.h:735
PGUIDREGINFO GuidRegInfo
Definition: classpnp.h:606
#define __callback
Definition: sal.h:1746
unsigned short USHORT
Definition: pedump.c:61
ULONG GuidCount
Definition: classpnp.h:490
ULONG NTAPI ClassQueryTimeOutRegistryValue(IN PDEVICE_OBJECT DeviceObject)
Definition: class.c:6190
#define _In_z_
Definition: no_sal2.h:239
PCLASS_DEV_INFO DevInfo
Definition: classpnp.h:596
enum _MEDIA_CHANGE_DETECTION_STATE * PMEDIA_CHANGE_DETECTION_STATE
NTSTATUS NTAPI ClassGetDescriptor(IN PDEVICE_OBJECT DeviceObject, IN PSTORAGE_PROPERTY_ID PropertyId, OUT PSTORAGE_DESCRIPTOR_HEADER *Descriptor)
Definition: class.c:6364
VOID NTAPI ClassScanForSpecial(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, IN CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList[], IN PCLASS_SCAN_FOR_SPECIAL_HANDLER Function)
Definition: utils.c:213
PCLASS_PRIVATE_COMMON_DATA PrivateCommonData
Definition: classpnp.h:609
_In_opt_ PWSTR _In_ PWSTR ParameterName
Definition: classpnp.h:1209
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
VOID NTAPI ClassInitializeSrbLookasideList(IN PCOMMON_DEVICE_EXTENSION CommonExtension, IN ULONG NumberElements)
Definition: obsolete.c:941
PCLASS_PRIVATE_PDO_DATA PrivatePdoData
Definition: classpnp.h:633
_In_ PIRP _In_ ULONG _In_ ULONG _In_reads_bytes_(BufferSize) PUCHAR Buffer)
struct _PHYSICAL_DEVICE_EXTENSION PHYSICAL_DEVICE_EXTENSION
ULONG MillisecondsDelayOnRetry
Definition: classpnp.h:448
_In_ PCHAR DeviceName
Definition: classpnp.h:1036
unsigned int * PULONG
Definition: retypes.h:1
SCSIPORTAPI NTSTATUS NTAPI ClassInternalIoControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
_IRQL_requires_(DISPATCH_LEVEL) typedef VOID(NTAPI *PCLASS_TICK)(_In_ PDEVICE_OBJECT DeviceObject)
SCSIPORTAPI VOID ClassDebugPrint(_In_ CLASS_DEBUG_LEVEL DebugPrintLevel, _In_z_ PCCHAR DebugMessage,...)
PDEVICE_OBJECT LowerDeviceObject
Definition: classpnp.h:574
FAILURE_PREDICTION_METHOD
Definition: classpnp.h:229
struct _CLASS_INTERPRET_SENSE_INFO2 * PCLASS_INTERPRET_SENSE_INFO2
Definition: bcd.h:199
VOID NTAPI ClassInvalidateBusRelations(IN PDEVICE_OBJECT Fdo)
Definition: class.c:6915
_In_ BOOLEAN AllowDriveToSleep
Definition: classpnp.h:1082
IO_COMPLETION_ROUTINE * PIO_COMPLETION_ROUTINE
Definition: iotypes.h:2474
_In_ PCHAR _In_ ULONG _In_ ULONG InquiryDataLength
Definition: classpnp.h:1039
_In_ BOOLEAN Wait
Definition: cctypes.h:23
UCHAR StackSize
Definition: classpnp.h:503
CLASS_DEV_INFO PdoData
Definition: classpnp.h:522
_In_ ULONG NumberElements
Definition: classpnp.h:944
VOID NTAPI ClassInitializeMediaChangeDetection(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, IN PUCHAR EventPrefix)
Definition: autorun.c:2058
IN ULONG IN ULONG Tag
Definition: evtlib.h:155
#define _Out_range_(lb, ub)
Definition: no_sal2.h:366
KSPIN_LOCK SpinLock
Definition: classpnp.h:279
DEVICE_TYPE DeviceType
Definition: classpnp.h:502
BOOLEAN NTAPI ClassMarkChildMissing(IN PPHYSICAL_DEVICE_EXTENSION Child, IN BOOLEAN AcquireChildLock)
Definition: class.c:6657
signed char * PCHAR
Definition: retypes.h:7
Definition: iotypes.h:166
struct _DICTIONARY * PDICTIONARY
struct _CLASS_POWER_OPTIONS CLASS_POWER_OPTIONS
#define SCSIPORTAPI
Definition: srb.h:541
NTSTATUS NTAPI ClassStopUnitPowerHandler(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
CLASS_INIT_DATA InitData
Definition: classpnp.h:556
struct _CLASS_DEV_INFO CLASS_DEV_INFO
PVOID PIRP
Definition: usb.h:38
IN OUT PIRP IN ULONG IN ULONG IN ULONG OUT PULONG InstanceLengthArray IN ULONG BufferAvail
Definition: wmilib.h:45
unsigned int ULONG
Definition: retypes.h:1
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
PCLASS_EXECUTE_WMI_METHOD ClassExecuteWmiMethod
Definition: classpnp.h:496
VOID History(INT, LPTSTR)
Definition: history.c:288
DICTIONARY FileObjectDictionary
Definition: classpnp.h:607
PDRIVER_DISPATCH * DispatchTable
Definition: classpnp.h:614
ULONGLONG REGHANDLE
Definition: evntprov.h:48
struct _CLASSPNP_SCAN_FOR_SPECIAL_INFO * PCLASSPNP_SCAN_FOR_SPECIAL_INFO
NTSTATUS(NTAPI * PCLASS_SHUTDOWN_FLUSH)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: class2.h:72
Definition: File.h:15
KSPIN_LOCK RemoveTrackingSpinlock
Definition: classpnp.h:579
enum _CLASS_DEBUG_LEVEL CLASS_DEBUG_LEVEL
NTSTATUS NTAPI ClassInitializeTestUnitPolling(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, IN BOOLEAN AllowDriveToSleep)
Definition: autorun.c:2023
_In_ PCHAR _In_ ULONG DeviceNumber
Definition: classpnp.h:1036
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
VOID NTAPI ClassUpdateInformationInRegistry(IN PDEVICE_OBJECT Fdo, IN PCHAR DeviceName, IN ULONG DeviceNumber, IN PINQUIRYDATA InquiryData, IN ULONG InquiryDataLength)
Definition: class.c:7322
PCLASS_DRIVER_EXTENSION NTAPI ClassGetDriverExtension(IN PDRIVER_OBJECT DriverObject)
Definition: class.c:7236
SCSIPORTAPI VOID NTAPI ClassReleaseChildLock(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
_In_ FAILURE_PREDICTION_METHOD FailurePredictionMethod
Definition: classpnp.h:1108
struct _CLASS_WORKING_SET * PCLASS_WORKING_SET
#define DUMMYSTRUCTNAME
Definition: ntbasedef.h:58
struct _CLASS_WMI_INFO CLASS_WMI_INFO
PFILE_OBJECT FileObject
Definition: classpnp.h:532
struct _CLASS_POWER_OPTIONS * PCLASS_POWER_OPTIONS
PCLASS_WMI_FUNCTION_CONTROL ClassWmiFunctionControl
Definition: classpnp.h:497
SENSE_DATA NormalizedSenseData
Definition: classpnp.h:449
_In_ CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList[]
Definition: classpnp.h:1281
ULONG DeviceExtensionSize
Definition: classpnp.h:501
__callback PCLASS_INTERPRET_SENSE_INFO Interpret
Definition: classpnp.h:549
NTSTATUS(NTAPI * PCLASS_CREATE_CLOSE)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: class2.h:76
SCSI_REQUEST_BLOCK ReleaseQueueSrb
Definition: classpnp.h:729
_CLASS_DEBUG_LEVEL
Definition: classpnp.h:208
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
FILE_OBJECT_EXTENSION KernelModeMcnContext
Definition: classpnp.h:724
_Must_inspect_result_ SCSIPORTAPI NTSTATUS NTAPI ClassReadDriveCapacity(_In_ PDEVICE_OBJECT DeviceObject)
IN OUT PULONG IN OUT PUNICODE_STRING OUT PUNICODE_STRING *RegistryPath IN OUT PUNICODE_STRING MofResourceName
Definition: wmilib.h:28
PCLASS_QUERY_WMI_REGINFO ClassQueryWmiRegInfo
Definition: classpnp.h:492
_In_opt_ PIRP _In_ PSCSI_REQUEST_BLOCK _In_ UCHAR _In_ ULONG IoDeviceCode
Definition: classpnp.h:465
NTSTATUS NTAPI ClassWmiFireEvent(IN PDEVICE_OBJECT DeviceObject, IN LPGUID Guid, IN ULONG InstanceIndex, IN ULONG EventDataSize, IN PVOID EventData)
Definition: classwmi.c:721
struct _CLASS_DRIVER_EXTENSION CLASS_DRIVER_EXTENSION
DEVICE_POWER_STATE DevicePowerState
Definition: classpnp.h:700
SCSIPORTAPI NTSTATUS NTAPI ClassAsynchronousCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Event)
Definition: class.c:2168
PCLASS_QUERY_PNP_CAPABILITIES ClassQueryPnpCapabilities
Definition: classpnp.h:515
IN ULONG PathId
Definition: srb.h:474
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966
SCSIPORTAPI NTSTATUS NTAPI ClassForwardIrpSynchronous(_In_ PCOMMON_DEVICE_EXTENSION CommonExtension, _In_ PIRP Irp)