1#pragma autorecover
2#pragma namespace("\\\\.\\Root\\WMI")
3
4[WMI, guid("F903D6EC-8647-438f-9E42-891F4733EDAF")]
5
6class MSStorageDriver_ScsiRequestBlock {
7	[read, WmiDataId(1), Description("Length")]
8	uint16 length;
9
10	[read, WmiDataId(2), DisplayInHex, Description("Function")]
11	uint8 function;
12
13	[read, WmiDataId(3), DisplayInHex, Description("SRB Status")]
14	uint8 srbStatus;
15
16	[read, WmiDataId(4), DisplayInHex, Description("SCSI Status")]
17	uint8 scsiStatus;
18
19	[read, WmiDataId(5), DisplayInHex, Description("Path ID")]
20	uint8 pathID;
21
22	[read, WmiDataId(6), DisplayInHex, Description("Target ID")]
23	uint8 targetID;
24
25	[read, WmiDataId(7), DisplayInHex, Description("LUN")]
26	uint8 lun;
27
28	[read, WmiDataId(8), DisplayInHex, Description("Queue Tag")]
29	uint8 queueTag;
30
31	[read, WmiDataId(9), DisplayInHex, Description("Queue Action")]
32	uint8 queueAction;
33
34	[read, WmiDataId(10), DisplayInHex, Description("CDB Length")]
35	uint8 cdbLength;
36
37	[read, WmiDataId(11), DisplayInHex, Description("Sense Info Buffer Length")]
38	uint8 senseInfoBufferLength;
39
40	[read, WmiDataId(12), DisplayInHex, Description("SRB Flags")]
41	uint32 srbFlags;
42
43	[read, WmiDataId(13), DisplayInHex, Description("Data Transfer Length")]
44	uint32 dataTransferLength;
45
46	[read, WmiDataId(14), DisplayInHex, Description("Time Out Value")]
47	uint32 timeOutValue;
48
49	[read, WmiDataId(15), DisplayInHex, Description("Data Buffer Pointer")]
50	uint64 dataBuffer;
51
52	[read, WmiDataId(16), DisplayInHex, Description("Sense Info Buffer Pointer")]
53	uint64 senseInfoBuffer;
54
55	[read, WmiDataId(17), DisplayInHex, Description("Next SRB Pointer")]
56	uint64 nextSRB;
57
58	[read, WmiDataId(18), DisplayInHex, Description("Original Request Pointer")]
59	uint64 originalRequest;
60
61	[read, WmiDataId(19), DisplayInHex, Description("SRB Extension Pointer")]
62	uint64 srbExtension;
63
64	[read, WmiDataId(20), DisplayInHex, Description("Internal Status")]
65	uint32 internalStatus;
66
67	[read, WmiDataId(21), DisplayInHex, Description("Reserved (only available in Win64)")]
68	uint32 reserved;
69
70	[read, WmiDataId(22), DisplayInHex, Description("CDB")]
71	uint8 cdb[16];
72};
73
74[WMI, guid("9065566F-5FD6-4b40-9961-98E3A3DD174E")]
75
76class MSStorageDriver_SenseData {
77	[read, WmiDataId(1), Description("Error Code")]
78	uint8 errorCode;
79
80	[read, WmiDataId(2), Description("Valid")]
81	boolean valid;
82
83	[read, WmiDataId(3), Description("Segment Number")]
84	uint8 segmentNumber;
85
86	[read, WmiDataId(4), Description("Sense Key")]
87	uint8 senseKey;
88
89	[read, WmiDataId(5), Description("Reserved")]
90	boolean reserved;
91
92	[read, WmiDataId(6), Description("Incorrect Length")]
93	boolean incorrectLength;
94
95	[read, WmiDataId(7), Description("End Of Media")]
96	boolean endOfMedia;
97
98	[read, WmiDataId(8), Description("File Mark")]
99	boolean fileMark;
100
101	[read, WmiDataId(9), Description("Information")]
102	uint8 information[4];
103
104	[read, WmiDataId(10), Description("Additional Sense Length")]
105	uint8 additionalSenseLength;
106
107	[read, WmiDataId(11), Description("Command Specific Information")]
108	uint8 commandSpecificInformation[4];
109
110	[read, WmiDataId(12), Description("Additional Sense Code")]
111	uint8 additionalSenseCode;
112
113	[read, WmiDataId(13), Description("Additional Sense Code Qualifier")]
114	uint8 additionalSenseCodeQualifier;
115
116	[read, WmiDataId(14), Description("Field Replaceable Unit Code")]
117	uint8 fieldReplaceableUnitCode;
118
119	[read, WmiDataId(15), Description("Sense Key Specific")]
120	uint8 senseKeySpecific[3];
121};
122
123[WMI, guid("0C9BF007-50E9-407e-A9DA-0F33800E4B45")]
124
125class MSStorageDriver_ClassErrorLogEntry {
126	[read, WmiDataId(1), Description("Tick Count")]
127	uint64 tickCount;
128
129	[read, WmiDataId(2), Description("Port Number")]
130	uint32 portNumber;
131
132	[read, WmiDataId(3), Description("Error Paging")]
133	boolean errorPaging;
134
135	[read, WmiDataId(4), Description("Error Retried")]
136	boolean errorRetried;
137
138	[read, WmiDataId(5), Description("Error Unhandled")]
139	boolean errorUnhandled;
140
141	[read, WmiDataId(6), DisplayInHex, Description("Error Reserved")]
142	uint8 errorReserved;
143
144	[read, WmiDataId(7), DisplayInHex, Description("Reserved")]
145	uint8 reserved[3];
146
147	[read, WmiDataId(8), Description("SCSI Request Block")]
148	MSStorageDriver_ScsiRequestBlock srb;
149
150	[read, WmiDataId(9), Description("Sense Data")]
151	MSStorageDriver_SenseData senseData;
152
153	[read, WmiDataId(10), Description("Event Time")]
154	datetime eventTime;
155};
156
157[Dynamic, Provider("WMIProv"),
158WMI, Description("MS Storage Class Driver Error Log"),
159guid("D5A9A51E-03F9-404d-9722-15F90EB07038"),
160locale("MS\\0x409")]
161
162class MSStorageDriver_ClassErrorLog {
163	[key, read]
164	string InstanceName;
165
166	[read]
167	boolean Active;
168
169	[read,
170	WmiDataId(1),
171	Description("Number of Error Log Entries")]
172	uint32 numEntries;
173
174	[read,
175	WmiDataId(2),
176	Description("Error Log Array")]
177	MSStorageDriver_ClassErrorLogEntry logEntries[16];
178};