ea8e6f1c5447a317c337816a729b8a3ffca5dc4f
[reactos.git] / reactos / lib / fslib / ext2lib / Disk.c
1 /*
2 * PROJECT: Mke2fs
3 * FILE: Disk.c
4 * PROGRAMMER: Matt Wu <mattwu@163.com>
5 * HOMEPAGE: http://ext2.yeah.net
6 */
7
8 /* INCLUDES **************************************************************/
9
10 #include "Mke2fs.h"
11 #include <debug.h>
12
13 /* DEFINITIONS ***********************************************************/
14
15
16
17 /* FUNCTIONS *************************************************************/
18
19 PCCHAR
20 Ext2StatusToString ( IN NTSTATUS Status )
21 {
22 switch (Status)
23 {
24 case 0x00000000: return "STATUS_SUCCESS";
25 case 0x00000001: return "STATUS_WAIT_1";
26 case 0x00000002: return "STATUS_WAIT_2";
27 case 0x00000003: return "STATUS_WAIT_3";
28 case 0x0000003F: return "STATUS_WAIT_63";
29 case 0x00000080: return "STATUS_ABANDONED_WAIT_0";
30 case 0x000000BF: return "STATUS_ABANDONED_WAIT_63";
31 case 0x000000C0: return "STATUS_USER_APC";
32 case 0x00000100: return "STATUS_KERNEL_APC";
33 case 0x00000101: return "STATUS_ALERTED";
34 case 0x00000102: return "STATUS_TIMEOUT";
35 case 0x00000103: return "STATUS_PENDING";
36 case 0x00000104: return "STATUS_REPARSE";
37 case 0x00000105: return "STATUS_MORE_ENTRIES";
38 case 0x00000106: return "STATUS_NOT_ALL_ASSIGNED";
39 case 0x00000107: return "STATUS_SOME_NOT_MAPPED";
40 case 0x00000108: return "STATUS_OPLOCK_BREAK_IN_PROGRESS";
41 case 0x00000109: return "STATUS_VOLUME_MOUNTED";
42 case 0x0000010A: return "STATUS_RXACT_COMMITTED";
43 case 0x0000010B: return "STATUS_NOTIFY_CLEANUP";
44 case 0x0000010C: return "STATUS_NOTIFY_ENUM_DIR";
45 case 0x0000010D: return "STATUS_NO_QUOTAS_FOR_ACCOUNT";
46 case 0x0000010E: return "STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED";
47 case 0x00000110: return "STATUS_PAGE_FAULT_TRANSITION";
48 case 0x00000111: return "STATUS_PAGE_FAULT_DEMAND_ZERO";
49 case 0x00000112: return "STATUS_PAGE_FAULT_COPY_ON_WRITE";
50 case 0x00000113: return "STATUS_PAGE_FAULT_GUARD_PAGE";
51 case 0x00000114: return "STATUS_PAGE_FAULT_PAGING_FILE";
52 case 0x00000115: return "STATUS_CACHE_PAGE_LOCKED";
53 case 0x00000116: return "STATUS_CRASH_DUMP";
54 case 0x00000117: return "STATUS_BUFFER_ALL_ZEROS";
55 case 0x00000118: return "STATUS_REPARSE_OBJECT";
56 case 0x00000119: return "STATUS_RESOURCE_REQUIREMENTS_CHANGED";
57 case 0x00000120: return "STATUS_TRANSLATION_COMPLETE";
58 case 0x00000121: return "STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY";
59 case 0x00010001: return "DBG_EXCEPTION_HANDLED";
60 case 0x00010002: return "DBG_CONTINUE";
61 case 0x40000000: return "STATUS_OBJECT_NAME_EXISTS";
62 case 0x40000001: return "STATUS_THREAD_WAS_SUSPENDED";
63 case 0x40000002: return "STATUS_WORKING_SET_LIMIT_RANGE";
64 case 0x40000003: return "STATUS_IMAGE_NOT_AT_BASE";
65 case 0x40000004: return "STATUS_RXACT_STATE_CREATED";
66 case 0x40000005: return "STATUS_SEGMENT_NOTIFICATION";
67 case 0x40000006: return "STATUS_LOCAL_USER_SESSION_KEY";
68 case 0x40000007: return "STATUS_BAD_CURRENT_DIRECTORY";
69 case 0x40000008: return "STATUS_SERIAL_MORE_WRITES";
70 case 0x40000009: return "STATUS_REGISTRY_RECOVERED";
71 case 0x4000000A: return "STATUS_FT_READ_RECOVERY_FROM_BACKUP";
72 case 0x4000000B: return "STATUS_FT_WRITE_RECOVERY";
73 case 0x4000000C: return "STATUS_SERIAL_COUNTER_TIMEOUT";
74 case 0x4000000D: return "STATUS_NULL_LM_PASSWORD";
75 case 0x4000000E: return "STATUS_IMAGE_MACHINE_TYPE_MISMATCH";
76 case 0x4000000F: return "STATUS_RECEIVE_PARTIAL";
77 case 0x40000010: return "STATUS_RECEIVE_EXPEDITED";
78 case 0x40000011: return "STATUS_RECEIVE_PARTIAL_EXPEDITED";
79 case 0x40000012: return "STATUS_EVENT_DONE";
80 case 0x40000013: return "STATUS_EVENT_PENDING";
81 case 0x40000014: return "STATUS_CHECKING_FILE_SYSTEM";
82 case 0x40000015: return "STATUS_FATAL_APP_EXIT";
83 case 0x40000016: return "STATUS_PREDEFINED_HANDLE";
84 case 0x40000017: return "STATUS_WAS_UNLOCKED";
85 case 0x40000018: return "STATUS_SERVICE_NOTIFICATION";
86 case 0x40000019: return "STATUS_WAS_LOCKED";
87 case 0x4000001A: return "STATUS_LOG_HARD_ERROR";
88 case 0x4000001B: return "STATUS_ALREADY_WIN32";
89 case 0x4000001C: return "STATUS_WX86_UNSIMULATE";
90 case 0x4000001D: return "STATUS_WX86_CONTINUE";
91 case 0x4000001E: return "STATUS_WX86_SINGLE_STEP";
92 case 0x4000001F: return "STATUS_WX86_BREAKPOINT";
93 case 0x40000020: return "STATUS_WX86_EXCEPTION_CONTINUE";
94 case 0x40000021: return "STATUS_WX86_EXCEPTION_LASTCHANCE";
95 case 0x40000022: return "STATUS_WX86_EXCEPTION_CHAIN";
96 case 0x40000023: return "STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE";
97 case 0x40000024: return "STATUS_NO_YIELD_PERFORMED";
98 case 0x40000025: return "STATUS_TIMER_RESUME_IGNORED";
99 case 0x40000026: return "STATUS_ARBITRATION_UNHANDLED";
100 case 0x40000027: return "STATUS_CARDBUS_NOT_SUPPORTED";
101 case 0x40000028: return "STATUS_WX86_CREATEWX86TIB";
102 case 0x40000029: return "STATUS_MP_PROCESSOR_MISMATCH";
103 case 0x40010001: return "DBG_REPLY_LATER";
104 case 0x40010002: return "DBG_UNABLE_TO_PROVIDE_HANDLE";
105 case 0x40010003: return "DBG_TERMINATE_THREAD";
106 case 0x40010004: return "DBG_TERMINATE_PROCESS";
107 case 0x40010005: return "DBG_CONTROL_C";
108 case 0x40010006: return "DBG_PRINTEXCEPTION_C";
109 case 0x40010007: return "DBG_RIPEXCEPTION";
110 case 0x40010008: return "DBG_CONTROL_BREAK";
111 case 0x80000001: return "STATUS_GUARD_PAGE_VIOLATION";
112 case 0x80000002: return "STATUS_DATATYPE_MISALIGNMENT";
113 case 0x80000003: return "STATUS_BREAKPOINT";
114 case 0x80000004: return "STATUS_SINGLE_STEP";
115 case 0x80000005: return "STATUS_BUFFER_OVERFLOW";
116 case 0x80000006: return "STATUS_NO_MORE_FILES";
117 case 0x80000007: return "STATUS_WAKE_SYSTEM_DEBUGGER";
118 case 0x8000000A: return "STATUS_HANDLES_CLOSED";
119 case 0x8000000B: return "STATUS_NO_INHERITANCE";
120 case 0x8000000C: return "STATUS_GUID_SUBSTITUTION_MADE";
121 case 0x8000000D: return "STATUS_PARTIAL_COPY";
122 case 0x8000000E: return "STATUS_DEVICE_PAPER_EMPTY";
123 case 0x8000000F: return "STATUS_DEVICE_POWERED_OFF";
124 case 0x80000010: return "STATUS_DEVICE_OFF_LINE";
125 case 0x80000011: return "STATUS_DEVICE_BUSY";
126 case 0x80000012: return "STATUS_NO_MORE_EAS";
127 case 0x80000013: return "STATUS_INVALID_EA_NAME";
128 case 0x80000014: return "STATUS_EA_LIST_INCONSISTENT";
129 case 0x80000015: return "STATUS_INVALID_EA_FLAG";
130 case 0x80000016: return "STATUS_VERIFY_REQUIRED";
131 case 0x80000017: return "STATUS_EXTRANEOUS_INFORMATION";
132 case 0x80000018: return "STATUS_RXACT_COMMIT_NECESSARY";
133 case 0x8000001A: return "STATUS_NO_MORE_ENTRIES";
134 case 0x8000001B: return "STATUS_FILEMARK_DETECTED";
135 case 0x8000001C: return "STATUS_MEDIA_CHANGED";
136 case 0x8000001D: return "STATUS_BUS_RESET";
137 case 0x8000001E: return "STATUS_END_OF_MEDIA";
138 case 0x8000001F: return "STATUS_BEGINNING_OF_MEDIA";
139 case 0x80000020: return "STATUS_MEDIA_CHECK";
140 case 0x80000021: return "STATUS_SETMARK_DETECTED";
141 case 0x80000022: return "STATUS_NO_DATA_DETECTED";
142 case 0x80000023: return "STATUS_REDIRECTOR_HAS_OPEN_HANDLES";
143 case 0x80000024: return "STATUS_SERVER_HAS_OPEN_HANDLES";
144 case 0x80000025: return "STATUS_ALREADY_DISCONNECTED";
145 case 0x80000026: return "STATUS_LONGJUMP";
146 case 0x80010001: return "DBG_EXCEPTION_NOT_HANDLED";
147 case 0xC0000001: return "STATUS_UNSUCCESSFUL";
148 case 0xC0000002: return "STATUS_NOT_IMPLEMENTED";
149 case 0xC0000003: return "STATUS_INVALID_INFO_CLASS";
150 case 0xC0000004: return "STATUS_INFO_LENGTH_MISMATCH";
151 case 0xC0000005: return "STATUS_ACCESS_VIOLATION";
152 case 0xC0000006: return "STATUS_IN_PAGE_ERROR";
153 case 0xC0000007: return "STATUS_PAGEFILE_QUOTA";
154 case 0xC0000008: return "STATUS_INVALID_HANDLE";
155 case 0xC0000009: return "STATUS_BAD_INITIAL_STACK";
156 case 0xC000000A: return "STATUS_BAD_INITIAL_PC";
157 case 0xC000000B: return "STATUS_INVALID_CID";
158 case 0xC000000C: return "STATUS_TIMER_NOT_CANCELED";
159 case 0xC000000D: return "STATUS_INVALID_PARAMETER";
160 case 0xC000000E: return "STATUS_NO_SUCH_DEVICE";
161 case 0xC000000F: return "STATUS_NO_SUCH_FILE";
162 case 0xC0000010: return "STATUS_INVALID_DEVICE_REQUEST";
163 case 0xC0000011: return "STATUS_END_OF_FILE";
164 case 0xC0000012: return "STATUS_WRONG_VOLUME";
165 case 0xC0000013: return "STATUS_NO_MEDIA_IN_DEVICE";
166 case 0xC0000014: return "STATUS_UNRECOGNIZED_MEDIA";
167 case 0xC0000015: return "STATUS_NONEXISTENT_SECTOR";
168 case 0xC0000016: return "STATUS_MORE_PROCESSING_REQUIRED";
169 case 0xC0000017: return "STATUS_NO_MEMORY";
170 case 0xC0000018: return "STATUS_CONFLICTING_ADDRESSES";
171 case 0xC0000019: return "STATUS_NOT_MAPPED_VIEW";
172 case 0xC000001A: return "STATUS_UNABLE_TO_FREE_VM";
173 case 0xC000001B: return "STATUS_UNABLE_TO_DELETE_SECTION";
174 case 0xC000001C: return "STATUS_INVALID_SYSTEM_SERVICE";
175 case 0xC000001D: return "STATUS_ILLEGAL_INSTRUCTION";
176 case 0xC000001E: return "STATUS_INVALID_LOCK_SEQUENCE";
177 case 0xC000001F: return "STATUS_INVALID_VIEW_SIZE";
178 case 0xC0000020: return "STATUS_INVALID_FILE_FOR_SECTION";
179 case 0xC0000021: return "STATUS_ALREADY_COMMITTED";
180 case 0xC0000022: return "STATUS_ACCESS_DENIED";
181 case 0xC0000023: return "STATUS_BUFFER_TOO_SMALL";
182 case 0xC0000024: return "STATUS_OBJECT_TYPE_MISMATCH";
183 case 0xC0000025: return "STATUS_NONCONTINUABLE_EXCEPTION";
184 case 0xC0000026: return "STATUS_INVALID_DISPOSITION";
185 case 0xC0000027: return "STATUS_UNWIND";
186 case 0xC0000028: return "STATUS_BAD_STACK";
187 case 0xC0000029: return "STATUS_INVALID_UNWIND_TARGET";
188 case 0xC000002A: return "STATUS_NOT_LOCKED";
189 case 0xC000002B: return "STATUS_PARITY_ERROR";
190 case 0xC000002C: return "STATUS_UNABLE_TO_DECOMMIT_VM";
191 case 0xC000002D: return "STATUS_NOT_COMMITTED";
192 case 0xC000002E: return "STATUS_INVALID_PORT_ATTRIBUTES";
193 case 0xC000002F: return "STATUS_PORT_MESSAGE_TOO_LONG";
194 case 0xC0000030: return "STATUS_INVALID_PARAMETER_MIX";
195 case 0xC0000031: return "STATUS_INVALID_QUOTA_LOWER";
196 case 0xC0000032: return "STATUS_DISK_CORRUPT_ERROR";
197 case 0xC0000033: return "STATUS_OBJECT_NAME_INVALID";
198 case 0xC0000034: return "STATUS_OBJECT_NAME_NOT_FOUND";
199 case 0xC0000035: return "STATUS_OBJECT_NAME_COLLISION";
200 case 0xC0000037: return "STATUS_PORT_DISCONNECTED";
201 case 0xC0000038: return "STATUS_DEVICE_ALREADY_ATTACHED";
202 case 0xC0000039: return "STATUS_OBJECT_PATH_INVALID";
203 case 0xC000003A: return "STATUS_OBJECT_PATH_NOT_FOUND";
204 case 0xC000003B: return "STATUS_OBJECT_PATH_SYNTAX_BAD";
205 case 0xC000003C: return "STATUS_DATA_OVERRUN";
206 case 0xC000003D: return "STATUS_DATA_LATE_ERROR";
207 case 0xC000003E: return "STATUS_DATA_ERROR";
208 case 0xC000003F: return "STATUS_CRC_ERROR";
209 case 0xC0000040: return "STATUS_SECTION_TOO_BIG";
210 case 0xC0000041: return "STATUS_PORT_CONNECTION_REFUSED";
211 case 0xC0000042: return "STATUS_INVALID_PORT_HANDLE";
212 case 0xC0000043: return "STATUS_SHARING_VIOLATION";
213 case 0xC0000044: return "STATUS_QUOTA_EXCEEDED";
214 case 0xC0000045: return "STATUS_INVALID_PAGE_PROTECTION";
215 case 0xC0000046: return "STATUS_MUTANT_NOT_OWNED";
216 case 0xC0000047: return "STATUS_SEMAPHORE_LIMIT_EXCEEDED";
217 case 0xC0000048: return "STATUS_PORT_ALREADY_SET";
218 case 0xC0000049: return "STATUS_SECTION_NOT_IMAGE";
219 case 0xC000004A: return "STATUS_SUSPEND_COUNT_EXCEEDED";
220 case 0xC000004B: return "STATUS_THREAD_IS_TERMINATING";
221 case 0xC000004C: return "STATUS_BAD_WORKING_SET_LIMIT";
222 case 0xC000004D: return "STATUS_INCOMPATIBLE_FILE_MAP";
223 case 0xC000004E: return "STATUS_SECTION_PROTECTION";
224 case 0xC000004F: return "STATUS_EAS_NOT_SUPPORTED";
225 case 0xC0000050: return "STATUS_EA_TOO_LARGE";
226 case 0xC0000051: return "STATUS_NONEXISTENT_EA_ENTRY";
227 case 0xC0000052: return "STATUS_NO_EAS_ON_FILE";
228 case 0xC0000053: return "STATUS_EA_CORRUPT_ERROR";
229 case 0xC0000054: return "STATUS_FILE_LOCK_CONFLICT";
230 case 0xC0000055: return "STATUS_LOCK_NOT_GRANTED";
231 case 0xC0000056: return "STATUS_DELETE_PENDING";
232 case 0xC0000057: return "STATUS_CTL_FILE_NOT_SUPPORTED";
233 case 0xC0000058: return "STATUS_UNKNOWN_REVISION";
234 case 0xC0000059: return "STATUS_REVISION_MISMATCH";
235 case 0xC000005A: return "STATUS_INVALID_OWNER";
236 case 0xC000005B: return "STATUS_INVALID_PRIMARY_GROUP";
237 case 0xC000005C: return "STATUS_NO_IMPERSONATION_TOKEN";
238 case 0xC000005D: return "STATUS_CANT_DISABLE_MANDATORY";
239 case 0xC000005E: return "STATUS_NO_LOGON_SERVERS";
240 case 0xC000005F: return "STATUS_NO_SUCH_LOGON_SESSION";
241 case 0xC0000060: return "STATUS_NO_SUCH_PRIVILEGE";
242 case 0xC0000061: return "STATUS_PRIVILEGE_NOT_HELD";
243 case 0xC0000062: return "STATUS_INVALID_ACCOUNT_NAME";
244 case 0xC0000063: return "STATUS_USER_EXISTS";
245 case 0xC0000064: return "STATUS_NO_SUCH_USER";
246 case 0xC0000065: return "STATUS_GROUP_EXISTS";
247 case 0xC0000066: return "STATUS_NO_SUCH_GROUP";
248 case 0xC0000067: return "STATUS_MEMBER_IN_GROUP";
249 case 0xC0000068: return "STATUS_MEMBER_NOT_IN_GROUP";
250 case 0xC0000069: return "STATUS_LAST_ADMIN";
251 case 0xC000006A: return "STATUS_WRONG_PASSWORD";
252 case 0xC000006B: return "STATUS_ILL_FORMED_PASSWORD";
253 case 0xC000006C: return "STATUS_PASSWORD_RESTRICTION";
254 case 0xC000006D: return "STATUS_LOGON_FAILURE";
255 case 0xC000006E: return "STATUS_ACCOUNT_RESTRICTION";
256 case 0xC000006F: return "STATUS_INVALID_LOGON_HOURS";
257 case 0xC0000070: return "STATUS_INVALID_WORKSTATION";
258 case 0xC0000071: return "STATUS_PASSWORD_EXPIRED";
259 case 0xC0000072: return "STATUS_ACCOUNT_DISABLED";
260 case 0xC0000073: return "STATUS_NONE_MAPPED";
261 case 0xC0000074: return "STATUS_TOO_MANY_LUIDS_REQUESTED";
262 case 0xC0000075: return "STATUS_LUIDS_EXHAUSTED";
263 case 0xC0000076: return "STATUS_INVALID_SUB_AUTHORITY";
264 case 0xC0000077: return "STATUS_INVALID_ACL";
265 case 0xC0000078: return "STATUS_INVALID_SID";
266 case 0xC0000079: return "STATUS_INVALID_SECURITY_DESCR";
267 case 0xC000007A: return "STATUS_PROCEDURE_NOT_FOUND";
268 case 0xC000007B: return "STATUS_INVALID_IMAGE_FORMAT";
269 case 0xC000007C: return "STATUS_NO_TOKEN";
270 case 0xC000007D: return "STATUS_BAD_INHERITANCE_ACL";
271 case 0xC000007E: return "STATUS_RANGE_NOT_LOCKED";
272 case 0xC000007F: return "STATUS_DISK_FULL";
273 case 0xC0000080: return "STATUS_SERVER_DISABLED";
274 case 0xC0000081: return "STATUS_SERVER_NOT_DISABLED";
275 case 0xC0000082: return "STATUS_TOO_MANY_GUIDS_REQUESTED";
276 case 0xC0000083: return "STATUS_GUIDS_EXHAUSTED";
277 case 0xC0000084: return "STATUS_INVALID_ID_AUTHORITY";
278 case 0xC0000085: return "STATUS_AGENTS_EXHAUSTED";
279 case 0xC0000086: return "STATUS_INVALID_VOLUME_LABEL";
280 case 0xC0000087: return "STATUS_SECTION_NOT_EXTENDED";
281 case 0xC0000088: return "STATUS_NOT_MAPPED_DATA";
282 case 0xC0000089: return "STATUS_RESOURCE_DATA_NOT_FOUND";
283 case 0xC000008A: return "STATUS_RESOURCE_TYPE_NOT_FOUND";
284 case 0xC000008B: return "STATUS_RESOURCE_NAME_NOT_FOUND";
285 case 0xC000008C: return "STATUS_ARRAY_BOUNDS_EXCEEDED";
286 case 0xC000008D: return "STATUS_FLOAT_DENORMAL_OPERAND";
287 case 0xC000008E: return "STATUS_FLOAT_DIVIDE_BY_ZERO";
288 case 0xC000008F: return "STATUS_FLOAT_INEXACT_RESULT";
289 case 0xC0000090: return "STATUS_FLOAT_INVALID_OPERATION";
290 case 0xC0000091: return "STATUS_FLOAT_OVERFLOW";
291 case 0xC0000092: return "STATUS_FLOAT_STACK_CHECK";
292 case 0xC0000093: return "STATUS_FLOAT_UNDERFLOW";
293 case 0xC0000094: return "STATUS_INTEGER_DIVIDE_BY_ZERO";
294 case 0xC0000095: return "STATUS_INTEGER_OVERFLOW";
295 case 0xC0000096: return "STATUS_PRIVILEGED_INSTRUCTION";
296 case 0xC0000097: return "STATUS_TOO_MANY_PAGING_FILES";
297 case 0xC0000098: return "STATUS_FILE_INVALID";
298 case 0xC0000099: return "STATUS_ALLOTTED_SPACE_EXCEEDED";
299 case 0xC000009A: return "STATUS_INSUFFICIENT_RESOURCES";
300 case 0xC000009B: return "STATUS_DFS_EXIT_PATH_FOUND";
301 case 0xC000009C: return "STATUS_DEVICE_DATA_ERROR";
302 case 0xC000009D: return "STATUS_DEVICE_NOT_CONNECTED";
303 case 0xC000009E: return "STATUS_DEVICE_POWER_FAILURE";
304 case 0xC000009F: return "STATUS_FREE_VM_NOT_AT_BASE";
305 case 0xC00000A0: return "STATUS_MEMORY_NOT_ALLOCATED";
306 case 0xC00000A1: return "STATUS_WORKING_SET_QUOTA";
307 case 0xC00000A2: return "STATUS_MEDIA_WRITE_PROTECTED";
308 case 0xC00000A3: return "STATUS_DEVICE_NOT_READY";
309 case 0xC00000A4: return "STATUS_INVALID_GROUP_ATTRIBUTES";
310 case 0xC00000A5: return "STATUS_BAD_IMPERSONATION_LEVEL";
311 case 0xC00000A6: return "STATUS_CANT_OPEN_ANONYMOUS";
312 case 0xC00000A7: return "STATUS_BAD_VALIDATION_CLASS";
313 case 0xC00000A8: return "STATUS_BAD_TOKEN_TYPE";
314 case 0xC00000A9: return "STATUS_BAD_MASTER_BOOT_RECORD";
315 case 0xC00000AA: return "STATUS_INSTRUCTION_MISALIGNMENT";
316 case 0xC00000AB: return "STATUS_INSTANCE_NOT_AVAILABLE";
317 case 0xC00000AC: return "STATUS_PIPE_NOT_AVAILABLE";
318 case 0xC00000AD: return "STATUS_INVALID_PIPE_STATE";
319 case 0xC00000AE: return "STATUS_PIPE_BUSY";
320 case 0xC00000AF: return "STATUS_ILLEGAL_FUNCTION";
321 case 0xC00000B0: return "STATUS_PIPE_DISCONNECTED";
322 case 0xC00000B1: return "STATUS_PIPE_CLOSING";
323 case 0xC00000B2: return "STATUS_PIPE_CONNECTED";
324 case 0xC00000B3: return "STATUS_PIPE_LISTENING";
325 case 0xC00000B4: return "STATUS_INVALID_READ_MODE";
326 case 0xC00000B5: return "STATUS_IO_TIMEOUT";
327 case 0xC00000B6: return "STATUS_FILE_FORCED_CLOSED";
328 case 0xC00000B7: return "STATUS_PROFILING_NOT_STARTED";
329 case 0xC00000B8: return "STATUS_PROFILING_NOT_STOPPED";
330 case 0xC00000B9: return "STATUS_COULD_NOT_INTERPRET";
331 case 0xC00000BA: return "STATUS_FILE_IS_A_DIRECTORY";
332 case 0xC00000BB: return "STATUS_NOT_SUPPORTED";
333 case 0xC00000BC: return "STATUS_REMOTE_NOT_LISTENING";
334 case 0xC00000BD: return "STATUS_DUPLICATE_NAME";
335 case 0xC00000BE: return "STATUS_BAD_NETWORK_PATH";
336 case 0xC00000BF: return "STATUS_NETWORK_BUSY";
337 case 0xC00000C0: return "STATUS_DEVICE_DOES_NOT_EXIST";
338 case 0xC00000C1: return "STATUS_TOO_MANY_COMMANDS";
339 case 0xC00000C2: return "STATUS_ADAPTER_HARDWARE_ERROR";
340 case 0xC00000C3: return "STATUS_INVALID_NETWORK_RESPONSE";
341 case 0xC00000C4: return "STATUS_UNEXPECTED_NETWORK_ERROR";
342 case 0xC00000C5: return "STATUS_BAD_REMOTE_ADAPTER";
343 case 0xC00000C6: return "STATUS_PRINT_QUEUE_FULL";
344 case 0xC00000C7: return "STATUS_NO_SPOOL_SPACE";
345 case 0xC00000C8: return "STATUS_PRINT_CANCELLED";
346 case 0xC00000C9: return "STATUS_NETWORK_NAME_DELETED";
347 case 0xC00000CA: return "STATUS_NETWORK_ACCESS_DENIED";
348 case 0xC00000CB: return "STATUS_BAD_DEVICE_TYPE";
349 case 0xC00000CC: return "STATUS_BAD_NETWORK_NAME";
350 case 0xC00000CD: return "STATUS_TOO_MANY_NAMES";
351 case 0xC00000CE: return "STATUS_TOO_MANY_SESSIONS";
352 case 0xC00000CF: return "STATUS_SHARING_PAUSED";
353 case 0xC00000D0: return "STATUS_REQUEST_NOT_ACCEPTED";
354 case 0xC00000D1: return "STATUS_REDIRECTOR_PAUSED";
355 case 0xC00000D2: return "STATUS_NET_WRITE_FAULT";
356 case 0xC00000D3: return "STATUS_PROFILING_AT_LIMIT";
357 case 0xC00000D4: return "STATUS_NOT_SAME_DEVICE";
358 case 0xC00000D5: return "STATUS_FILE_RENAMED";
359 case 0xC00000D6: return "STATUS_VIRTUAL_CIRCUIT_CLOSED";
360 case 0xC00000D7: return "STATUS_NO_SECURITY_ON_OBJECT";
361 case 0xC00000D8: return "STATUS_CANT_WAIT";
362 case 0xC00000D9: return "STATUS_PIPE_EMPTY";
363 case 0xC00000DA: return "STATUS_CANT_ACCESS_DOMAIN_INFO";
364 case 0xC00000DB: return "STATUS_CANT_TERMINATE_SELF";
365 case 0xC00000DC: return "STATUS_INVALID_SERVER_STATE";
366 case 0xC00000DD: return "STATUS_INVALID_DOMAIN_STATE";
367 case 0xC00000DE: return "STATUS_INVALID_DOMAIN_ROLE";
368 case 0xC00000DF: return "STATUS_NO_SUCH_DOMAIN";
369 case 0xC00000E0: return "STATUS_DOMAIN_EXISTS";
370 case 0xC00000E1: return "STATUS_DOMAIN_LIMIT_EXCEEDED";
371 case 0xC00000E2: return "STATUS_OPLOCK_NOT_GRANTED";
372 case 0xC00000E3: return "STATUS_INVALID_OPLOCK_PROTOCOL";
373 case 0xC00000E4: return "STATUS_INTERNAL_DB_CORRUPTION";
374 case 0xC00000E5: return "STATUS_INTERNAL_ERROR";
375 case 0xC00000E6: return "STATUS_GENERIC_NOT_MAPPED";
376 case 0xC00000E7: return "STATUS_BAD_DESCRIPTOR_FORMAT";
377 case 0xC00000E8: return "STATUS_INVALID_USER_BUFFER";
378 case 0xC00000E9: return "STATUS_UNEXPECTED_IO_ERROR";
379 case 0xC00000EA: return "STATUS_UNEXPECTED_MM_CREATE_ERR";
380 case 0xC00000EB: return "STATUS_UNEXPECTED_MM_MAP_ERROR";
381 case 0xC00000EC: return "STATUS_UNEXPECTED_MM_EXTEND_ERR";
382 case 0xC00000ED: return "STATUS_NOT_LOGON_PROCESS";
383 case 0xC00000EE: return "STATUS_LOGON_SESSION_EXISTS";
384 case 0xC00000EF: return "STATUS_INVALID_PARAMETER_1";
385 case 0xC00000F0: return "STATUS_INVALID_PARAMETER_2";
386 case 0xC00000F1: return "STATUS_INVALID_PARAMETER_3";
387 case 0xC00000F2: return "STATUS_INVALID_PARAMETER_4";
388 case 0xC00000F3: return "STATUS_INVALID_PARAMETER_5";
389 case 0xC00000F4: return "STATUS_INVALID_PARAMETER_6";
390 case 0xC00000F5: return "STATUS_INVALID_PARAMETER_7";
391 case 0xC00000F6: return "STATUS_INVALID_PARAMETER_8";
392 case 0xC00000F7: return "STATUS_INVALID_PARAMETER_9";
393 case 0xC00000F8: return "STATUS_INVALID_PARAMETER_10";
394 case 0xC00000F9: return "STATUS_INVALID_PARAMETER_11";
395 case 0xC00000FA: return "STATUS_INVALID_PARAMETER_12";
396 case 0xC00000FB: return "STATUS_REDIRECTOR_NOT_STARTED";
397 case 0xC00000FC: return "STATUS_REDIRECTOR_STARTED";
398 case 0xC00000FD: return "STATUS_STACK_OVERFLOW";
399 case 0xC00000FE: return "STATUS_NO_SUCH_PACKAGE";
400 case 0xC00000FF: return "STATUS_BAD_FUNCTION_TABLE";
401 case 0xC0000100: return "STATUS_VARIABLE_NOT_FOUND";
402 case 0xC0000101: return "STATUS_DIRECTORY_NOT_EMPTY";
403 case 0xC0000102: return "STATUS_FILE_CORRUPT_ERROR";
404 case 0xC0000103: return "STATUS_NOT_A_DIRECTORY";
405 case 0xC0000104: return "STATUS_BAD_LOGON_SESSION_STATE";
406 case 0xC0000105: return "STATUS_LOGON_SESSION_COLLISION";
407 case 0xC0000106: return "STATUS_NAME_TOO_LONG";
408 case 0xC0000107: return "STATUS_FILES_OPEN";
409 case 0xC0000108: return "STATUS_CONNECTION_IN_USE";
410 case 0xC0000109: return "STATUS_MESSAGE_NOT_FOUND";
411 case 0xC000010A: return "STATUS_PROCESS_IS_TERMINATING";
412 case 0xC000010B: return "STATUS_INVALID_LOGON_TYPE";
413 case 0xC000010C: return "STATUS_NO_GUID_TRANSLATION";
414 case 0xC000010D: return "STATUS_CANNOT_IMPERSONATE";
415 case 0xC000010E: return "STATUS_IMAGE_ALREADY_LOADED";
416 case 0xC000010F: return "STATUS_ABIOS_NOT_PRESENT";
417 case 0xC0000110: return "STATUS_ABIOS_LID_NOT_EXIST";
418 case 0xC0000111: return "STATUS_ABIOS_LID_ALREADY_OWNED";
419 case 0xC0000112: return "STATUS_ABIOS_NOT_LID_OWNER";
420 case 0xC0000113: return "STATUS_ABIOS_INVALID_COMMAND";
421 case 0xC0000114: return "STATUS_ABIOS_INVALID_LID";
422 case 0xC0000115: return "STATUS_ABIOS_SELECTOR_NOT_AVAILABLE";
423 case 0xC0000116: return "STATUS_ABIOS_INVALID_SELECTOR";
424 case 0xC0000117: return "STATUS_NO_LDT";
425 case 0xC0000118: return "STATUS_INVALID_LDT_SIZE";
426 case 0xC0000119: return "STATUS_INVALID_LDT_OFFSET";
427 case 0xC000011A: return "STATUS_INVALID_LDT_DESCRIPTOR";
428 case 0xC000011B: return "STATUS_INVALID_IMAGE_NE_FORMAT";
429 case 0xC000011C: return "STATUS_RXACT_INVALID_STATE";
430 case 0xC000011D: return "STATUS_RXACT_COMMIT_FAILURE";
431 case 0xC000011E: return "STATUS_MAPPED_FILE_SIZE_ZERO";
432 case 0xC000011F: return "STATUS_TOO_MANY_OPENED_FILES";
433 case 0xC0000120: return "STATUS_CANCELLED";
434 case 0xC0000121: return "STATUS_CANNOT_DELETE";
435 case 0xC0000122: return "STATUS_INVALID_COMPUTER_NAME";
436 case 0xC0000123: return "STATUS_FILE_DELETED";
437 case 0xC0000124: return "STATUS_SPECIAL_ACCOUNT";
438 case 0xC0000125: return "STATUS_SPECIAL_GROUP";
439 case 0xC0000126: return "STATUS_SPECIAL_USER";
440 case 0xC0000127: return "STATUS_MEMBERS_PRIMARY_GROUP";
441 case 0xC0000128: return "STATUS_FILE_CLOSED";
442 case 0xC0000129: return "STATUS_TOO_MANY_THREADS";
443 case 0xC000012A: return "STATUS_THREAD_NOT_IN_PROCESS";
444 case 0xC000012B: return "STATUS_TOKEN_ALREADY_IN_USE";
445 case 0xC000012C: return "STATUS_PAGEFILE_QUOTA_EXCEEDED";
446 case 0xC000012D: return "STATUS_COMMITMENT_LIMIT";
447 case 0xC000012E: return "STATUS_INVALID_IMAGE_LE_FORMAT";
448 case 0xC000012F: return "STATUS_INVALID_IMAGE_NOT_MZ";
449 case 0xC0000130: return "STATUS_INVALID_IMAGE_PROTECT";
450 case 0xC0000131: return "STATUS_INVALID_IMAGE_WIN_16";
451 case 0xC0000132: return "STATUS_LOGON_SERVER_CONFLICT";
452 case 0xC0000133: return "STATUS_TIME_DIFFERENCE_AT_DC";
453 case 0xC0000134: return "STATUS_SYNCHRONIZATION_REQUIRED";
454 case 0xC0000135: return "STATUS_DLL_NOT_FOUND";
455 case 0xC0000136: return "STATUS_OPEN_FAILED";
456 case 0xC0000137: return "STATUS_IO_PRIVILEGE_FAILED";
457 case 0xC0000138: return "STATUS_ORDINAL_NOT_FOUND";
458 case 0xC0000139: return "STATUS_ENTRYPOINT_NOT_FOUND";
459 case 0xC000013A: return "STATUS_CONTROL_C_EXIT";
460 case 0xC000013B: return "STATUS_LOCAL_DISCONNECT";
461 case 0xC000013C: return "STATUS_REMOTE_DISCONNECT";
462 case 0xC000013D: return "STATUS_REMOTE_RESOURCES";
463 case 0xC000013E: return "STATUS_LINK_FAILED";
464 case 0xC000013F: return "STATUS_LINK_TIMEOUT";
465 case 0xC0000140: return "STATUS_INVALID_CONNECTION";
466 case 0xC0000141: return "STATUS_INVALID_ADDRESS";
467 case 0xC0000142: return "STATUS_DLL_INIT_FAILED";
468 case 0xC0000143: return "STATUS_MISSING_SYSTEMFILE";
469 case 0xC0000144: return "STATUS_UNHANDLED_EXCEPTION";
470 case 0xC0000145: return "STATUS_APP_INIT_FAILURE";
471 case 0xC0000146: return "STATUS_PAGEFILE_CREATE_FAILED";
472 case 0xC0000147: return "STATUS_NO_PAGEFILE";
473 case 0xC0000148: return "STATUS_INVALID_LEVEL";
474 case 0xC0000149: return "STATUS_WRONG_PASSWORD_CORE";
475 case 0xC000014A: return "STATUS_ILLEGAL_FLOAT_CONTEXT";
476 case 0xC000014B: return "STATUS_PIPE_BROKEN";
477 case 0xC000014C: return "STATUS_REGISTRY_CORRUPT";
478 case 0xC000014D: return "STATUS_REGISTRY_IO_FAILED";
479 case 0xC000014E: return "STATUS_NO_EVENT_PAIR";
480 case 0xC000014F: return "STATUS_UNRECOGNIZED_VOLUME";
481 case 0xC0000150: return "STATUS_SERIAL_NO_DEVICE_INITED";
482 case 0xC0000151: return "STATUS_NO_SUCH_ALIAS";
483 case 0xC0000152: return "STATUS_MEMBER_NOT_IN_ALIAS";
484 case 0xC0000153: return "STATUS_MEMBER_IN_ALIAS";
485 case 0xC0000154: return "STATUS_ALIAS_EXISTS";
486 case 0xC0000155: return "STATUS_LOGON_NOT_GRANTED";
487 case 0xC0000156: return "STATUS_TOO_MANY_SECRETS";
488 case 0xC0000157: return "STATUS_SECRET_TOO_LONG";
489 case 0xC0000158: return "STATUS_INTERNAL_DB_ERROR";
490 case 0xC0000159: return "STATUS_FULLSCREEN_MODE";
491 case 0xC000015A: return "STATUS_TOO_MANY_CONTEXT_IDS";
492 case 0xC000015B: return "STATUS_LOGON_TYPE_NOT_GRANTED";
493 case 0xC000015C: return "STATUS_NOT_REGISTRY_FILE";
494 case 0xC000015D: return "STATUS_NT_CROSS_ENCRYPTION_REQUIRED";
495 case 0xC000015E: return "STATUS_DOMAIN_CTRLR_CONFIG_ERROR";
496 case 0xC000015F: return "STATUS_FT_MISSING_MEMBER";
497 case 0xC0000160: return "STATUS_ILL_FORMED_SERVICE_ENTRY";
498 case 0xC0000161: return "STATUS_ILLEGAL_CHARACTER";
499 case 0xC0000162: return "STATUS_UNMAPPABLE_CHARACTER";
500 case 0xC0000163: return "STATUS_UNDEFINED_CHARACTER";
501 case 0xC0000164: return "STATUS_FLOPPY_VOLUME";
502 case 0xC0000165: return "STATUS_FLOPPY_ID_MARK_NOT_FOUND";
503 case 0xC0000166: return "STATUS_FLOPPY_WRONG_CYLINDER";
504 case 0xC0000167: return "STATUS_FLOPPY_UNKNOWN_ERROR";
505 case 0xC0000168: return "STATUS_FLOPPY_BAD_REGISTERS";
506 case 0xC0000169: return "STATUS_DISK_RECALIBRATE_FAILED";
507 case 0xC000016A: return "STATUS_DISK_OPERATION_FAILED";
508 case 0xC000016B: return "STATUS_DISK_RESET_FAILED";
509 case 0xC000016C: return "STATUS_SHARED_IRQ_BUSY";
510 case 0xC000016D: return "STATUS_FT_ORPHANING";
511 case 0xC000016E: return "STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT";
512 case 0xC0000172: return "STATUS_PARTITION_FAILURE";
513 case 0xC0000173: return "STATUS_INVALID_BLOCK_LENGTH";
514 case 0xC0000174: return "STATUS_DEVICE_NOT_PARTITIONED";
515 case 0xC0000175: return "STATUS_UNABLE_TO_LOCK_MEDIA";
516 case 0xC0000176: return "STATUS_UNABLE_TO_UNLOAD_MEDIA";
517 case 0xC0000177: return "STATUS_EOM_OVERFLOW";
518 case 0xC0000178: return "STATUS_NO_MEDIA";
519 case 0xC000017A: return "STATUS_NO_SUCH_MEMBER";
520 case 0xC000017B: return "STATUS_INVALID_MEMBER";
521 case 0xC000017C: return "STATUS_KEY_DELETED";
522 case 0xC000017D: return "STATUS_NO_LOG_SPACE";
523 case 0xC000017E: return "STATUS_TOO_MANY_SIDS";
524 case 0xC000017F: return "STATUS_LM_CROSS_ENCRYPTION_REQUIRED";
525 case 0xC0000180: return "STATUS_KEY_HAS_CHILDREN";
526 case 0xC0000181: return "STATUS_CHILD_MUST_BE_VOLATILE";
527 case 0xC0000182: return "STATUS_DEVICE_CONFIGURATION_ERROR";
528 case 0xC0000183: return "STATUS_DRIVER_INTERNAL_ERROR";
529 case 0xC0000184: return "STATUS_INVALID_DEVICE_STATE";
530 case 0xC0000185: return "STATUS_IO_DEVICE_ERROR";
531 case 0xC0000186: return "STATUS_DEVICE_PROTOCOL_ERROR";
532 case 0xC0000187: return "STATUS_BACKUP_CONTROLLER";
533 case 0xC0000188: return "STATUS_LOG_FILE_FULL";
534 case 0xC0000189: return "STATUS_TOO_LATE";
535 case 0xC000018A: return "STATUS_NO_TRUST_LSA_SECRET";
536 case 0xC000018B: return "STATUS_NO_TRUST_SAM_ACCOUNT";
537 case 0xC000018C: return "STATUS_TRUSTED_DOMAIN_FAILURE";
538 case 0xC000018D: return "STATUS_TRUSTED_RELATIONSHIP_FAILURE";
539 case 0xC000018E: return "STATUS_EVENTLOG_FILE_CORRUPT";
540 case 0xC000018F: return "STATUS_EVENTLOG_CANT_START";
541 case 0xC0000190: return "STATUS_TRUST_FAILURE";
542 case 0xC0000191: return "STATUS_MUTANT_LIMIT_EXCEEDED";
543 case 0xC0000192: return "STATUS_NETLOGON_NOT_STARTED";
544 case 0xC0000193: return "STATUS_ACCOUNT_EXPIRED";
545 case 0xC0000194: return "STATUS_POSSIBLE_DEADLOCK";
546 case 0xC0000195: return "STATUS_NETWORK_CREDENTIAL_CONFLICT";
547 case 0xC0000196: return "STATUS_REMOTE_SESSION_LIMIT";
548 case 0xC0000197: return "STATUS_EVENTLOG_FILE_CHANGED";
549 case 0xC0000198: return "STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT";
550 case 0xC0000199: return "STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT";
551 case 0xC000019A: return "STATUS_NOLOGON_SERVER_TRUST_ACCOUNT";
552 case 0xC000019B: return "STATUS_DOMAIN_TRUST_INCONSISTENT";
553 case 0xC000019C: return "STATUS_FS_DRIVER_REQUIRED";
554 case 0xC0000202: return "STATUS_NO_USER_SESSION_KEY";
555 case 0xC0000203: return "STATUS_USER_SESSION_DELETED";
556 case 0xC0000204: return "STATUS_RESOURCE_LANG_NOT_FOUND";
557 case 0xC0000205: return "STATUS_INSUFF_SERVER_RESOURCES";
558 case 0xC0000206: return "STATUS_INVALID_BUFFER_SIZE";
559 case 0xC0000207: return "STATUS_INVALID_ADDRESS_COMPONENT";
560 case 0xC0000208: return "STATUS_INVALID_ADDRESS_WILDCARD";
561 case 0xC0000209: return "STATUS_TOO_MANY_ADDRESSES";
562 case 0xC000020A: return "STATUS_ADDRESS_ALREADY_EXISTS";
563 case 0xC000020B: return "STATUS_ADDRESS_CLOSED";
564 case 0xC000020C: return "STATUS_CONNECTION_DISCONNECTED";
565 case 0xC000020D: return "STATUS_CONNECTION_RESET";
566 case 0xC000020E: return "STATUS_TOO_MANY_NODES";
567 case 0xC000020F: return "STATUS_TRANSACTION_ABORTED";
568 case 0xC0000210: return "STATUS_TRANSACTION_TIMED_OUT";
569 case 0xC0000211: return "STATUS_TRANSACTION_NO_RELEASE";
570 case 0xC0000212: return "STATUS_TRANSACTION_NO_MATCH";
571 case 0xC0000213: return "STATUS_TRANSACTION_RESPONDED";
572 case 0xC0000214: return "STATUS_TRANSACTION_INVALID_ID";
573 case 0xC0000215: return "STATUS_TRANSACTION_INVALID_TYPE";
574 case 0xC0000216: return "STATUS_NOT_SERVER_SESSION";
575 case 0xC0000217: return "STATUS_NOT_CLIENT_SESSION";
576 case 0xC0000218: return "STATUS_CANNOT_LOAD_REGISTRY_FILE";
577 case 0xC0000219: return "STATUS_DEBUG_ATTACH_FAILED";
578 case 0xC000021A: return "STATUS_SYSTEM_PROCESS_TERMINATED";
579 case 0xC000021B: return "STATUS_DATA_NOT_ACCEPTED";
580 case 0xC000021C: return "STATUS_NO_BROWSER_SERVERS_FOUND";
581 case 0xC000021D: return "STATUS_VDM_HARD_ERROR";
582 case 0xC000021E: return "STATUS_DRIVER_CANCEL_TIMEOUT";
583 case 0xC000021F: return "STATUS_REPLY_MESSAGE_MISMATCH";
584 case 0xC0000220: return "STATUS_MAPPED_ALIGNMENT";
585 case 0xC0000221: return "STATUS_IMAGE_CHECKSUM_MISMATCH";
586 case 0xC0000222: return "STATUS_LOST_WRITEBEHIND_DATA";
587 case 0xC0000223: return "STATUS_CLIENT_SERVER_PARAMETERS_INVALID";
588 case 0xC0000224: return "STATUS_PASSWORD_MUST_CHANGE";
589 case 0xC0000225: return "STATUS_NOT_FOUND";
590 case 0xC0000226: return "STATUS_NOT_TINY_STREAM";
591 case 0xC0000227: return "STATUS_RECOVERY_FAILURE";
592 case 0xC0000228: return "STATUS_STACK_OVERFLOW_READ";
593 case 0xC0000229: return "STATUS_FAIL_CHECK";
594 case 0xC000022A: return "STATUS_DUPLICATE_OBJECTID";
595 case 0xC000022B: return "STATUS_OBJECTID_EXISTS";
596 case 0xC000022C: return "STATUS_CONVERT_TO_LARGE";
597 case 0xC000022D: return "STATUS_RETRY";
598 case 0xC000022E: return "STATUS_FOUND_OUT_OF_SCOPE";
599 case 0xC000022F: return "STATUS_ALLOCATE_BUCKET";
600 case 0xC0000230: return "STATUS_PROPSET_NOT_FOUND";
601 case 0xC0000231: return "STATUS_MARSHALL_OVERFLOW";
602 case 0xC0000232: return "STATUS_INVALID_VARIANT";
603 case 0xC0000233: return "STATUS_DOMAIN_CONTROLLER_NOT_FOUND";
604 case 0xC0000234: return "STATUS_ACCOUNT_LOCKED_OUT";
605 case 0xC0000235: return "STATUS_HANDLE_NOT_CLOSABLE";
606 case 0xC0000236: return "STATUS_CONNECTION_REFUSED";
607 case 0xC0000237: return "STATUS_GRACEFUL_DISCONNECT";
608 case 0xC0000238: return "STATUS_ADDRESS_ALREADY_ASSOCIATED";
609 case 0xC0000239: return "STATUS_ADDRESS_NOT_ASSOCIATED";
610 case 0xC000023A: return "STATUS_CONNECTION_INVALID";
611 case 0xC000023B: return "STATUS_CONNECTION_ACTIVE";
612 case 0xC000023C: return "STATUS_NETWORK_UNREACHABLE";
613 case 0xC000023D: return "STATUS_HOST_UNREACHABLE";
614 case 0xC000023E: return "STATUS_PROTOCOL_UNREACHABLE";
615 case 0xC000023F: return "STATUS_PORT_UNREACHABLE";
616 case 0xC0000240: return "STATUS_REQUEST_ABORTED";
617 case 0xC0000241: return "STATUS_CONNECTION_ABORTED";
618 case 0xC0000242: return "STATUS_BAD_COMPRESSION_BUFFER";
619 case 0xC0000243: return "STATUS_USER_MAPPED_FILE";
620 case 0xC0000244: return "STATUS_AUDIT_FAILED";
621 case 0xC0000245: return "STATUS_TIMER_RESOLUTION_NOT_SET";
622 case 0xC0000246: return "STATUS_CONNECTION_COUNT_LIMIT";
623 case 0xC0000247: return "STATUS_LOGIN_TIME_RESTRICTION";
624 case 0xC0000248: return "STATUS_LOGIN_WKSTA_RESTRICTION";
625 case 0xC0000249: return "STATUS_IMAGE_MP_UP_MISMATCH";
626 case 0xC0000250: return "STATUS_INSUFFICIENT_LOGON_INFO";
627 case 0xC0000251: return "STATUS_BAD_DLL_ENTRYPOINT";
628 case 0xC0000252: return "STATUS_BAD_SERVICE_ENTRYPOINT";
629 case 0xC0000253: return "STATUS_LPC_REPLY_LOST";
630 case 0xC0000254: return "STATUS_IP_ADDRESS_CONFLICT1";
631 case 0xC0000255: return "STATUS_IP_ADDRESS_CONFLICT2";
632 case 0xC0000256: return "STATUS_REGISTRY_QUOTA_LIMIT";
633 case 0xC0000257: return "STATUS_PATH_NOT_COVERED";
634 case 0xC0000258: return "STATUS_NO_CALLBACK_ACTIVE";
635 case 0xC0000259: return "STATUS_LICENSE_QUOTA_EXCEEDED";
636 case 0xC000025A: return "STATUS_PWD_TOO_SHORT";
637 case 0xC000025B: return "STATUS_PWD_TOO_RECENT";
638 case 0xC000025C: return "STATUS_PWD_HISTORY_CONFLICT";
639 case 0xC000025E: return "STATUS_PLUGPLAY_NO_DEVICE";
640 case 0xC000025F: return "STATUS_UNSUPPORTED_COMPRESSION";
641 case 0xC0000260: return "STATUS_INVALID_HW_PROFILE";
642 case 0xC0000261: return "STATUS_INVALID_PLUGPLAY_DEVICE_PATH";
643 case 0xC0000262: return "STATUS_DRIVER_ORDINAL_NOT_FOUND";
644 case 0xC0000263: return "STATUS_DRIVER_ENTRYPOINT_NOT_FOUND";
645 case 0xC0000264: return "STATUS_RESOURCE_NOT_OWNED";
646 case 0xC0000265: return "STATUS_TOO_MANY_LINKS";
647 case 0xC0000266: return "STATUS_QUOTA_LIST_INCONSISTENT";
648 case 0xC0000267: return "STATUS_FILE_IS_OFFLINE";
649 case 0xC0000268: return "STATUS_EVALUATION_EXPIRATION";
650 case 0xC0000269: return "STATUS_ILLEGAL_DLL_RELOCATION";
651 case 0xC000026A: return "STATUS_LICENSE_VIOLATION";
652 case 0xC000026B: return "STATUS_DLL_INIT_FAILED_LOGOFF";
653 case 0xC000026C: return "STATUS_DRIVER_UNABLE_TO_LOAD";
654 case 0xC000026D: return "STATUS_DFS_UNAVAILABLE";
655 case 0xC000026E: return "STATUS_VOLUME_DISMOUNTED";
656 case 0xC000026F: return "STATUS_WX86_INTERNAL_ERROR";
657 case 0xC0000270: return "STATUS_WX86_FLOAT_STACK_CHECK";
658 case 0xC0000271: return "STATUS_VALIDATE_CONTINUE";
659 case 0xC0000272: return "STATUS_NO_MATCH";
660 case 0xC0000273: return "STATUS_NO_MORE_MATCHES";
661 case 0xC0000275: return "STATUS_NOT_A_REPARSE_POINT";
662 case 0xC0000276: return "STATUS_IO_REPARSE_TAG_INVALID";
663 case 0xC0000277: return "STATUS_IO_REPARSE_TAG_MISMATCH";
664 case 0xC0000278: return "STATUS_IO_REPARSE_DATA_INVALID";
665 case 0xC0000279: return "STATUS_IO_REPARSE_TAG_NOT_HANDLED";
666 case 0xC0000280: return "STATUS_REPARSE_POINT_NOT_RESOLVED";
667 case 0xC0000281: return "STATUS_DIRECTORY_IS_A_REPARSE_POINT";
668 case 0xC0000282: return "STATUS_RANGE_LIST_CONFLICT";
669 case 0xC0000283: return "STATUS_SOURCE_ELEMENT_EMPTY";
670 case 0xC0000284: return "STATUS_DESTINATION_ELEMENT_FULL";
671 case 0xC0000285: return "STATUS_ILLEGAL_ELEMENT_ADDRESS";
672 case 0xC0000286: return "STATUS_MAGAZINE_NOT_PRESENT";
673 case 0xC0000287: return "STATUS_REINITIALIZATION_NEEDED";
674 case 0x80000288: return "STATUS_DEVICE_REQUIRES_CLEANING";
675 case 0x80000289: return "STATUS_DEVICE_DOOR_OPEN";
676 case 0xC000028A: return "STATUS_ENCRYPTION_FAILED";
677 case 0xC000028B: return "STATUS_DECRYPTION_FAILED";
678 case 0xC000028C: return "STATUS_RANGE_NOT_FOUND";
679 case 0xC000028D: return "STATUS_NO_RECOVERY_POLICY";
680 case 0xC000028E: return "STATUS_NO_EFS";
681 case 0xC000028F: return "STATUS_WRONG_EFS";
682 case 0xC0000290: return "STATUS_NO_USER_KEYS";
683 case 0xC0000291: return "STATUS_FILE_NOT_ENCRYPTED";
684 case 0xC0000292: return "STATUS_NOT_EXPORT_FORMAT";
685 case 0xC0000293: return "STATUS_FILE_ENCRYPTED";
686 case 0x40000294: return "STATUS_WAKE_SYSTEM";
687 case 0xC0000295: return "STATUS_WMI_GUID_NOT_FOUND";
688 case 0xC0000296: return "STATUS_WMI_INSTANCE_NOT_FOUND";
689 case 0xC0000297: return "STATUS_WMI_ITEMID_NOT_FOUND";
690 case 0xC0000298: return "STATUS_WMI_TRY_AGAIN";
691 case 0xC0000299: return "STATUS_SHARED_POLICY";
692 case 0xC000029A: return "STATUS_POLICY_OBJECT_NOT_FOUND";
693 case 0xC000029B: return "STATUS_POLICY_ONLY_IN_DS";
694 case 0xC000029C: return "STATUS_VOLUME_NOT_UPGRADED";
695 case 0xC000029D: return "STATUS_REMOTE_STORAGE_NOT_ACTIVE";
696 case 0xC000029E: return "STATUS_REMOTE_STORAGE_MEDIA_ERROR";
697 case 0xC000029F: return "STATUS_NO_TRACKING_SERVICE";
698 case 0xC00002A0: return "STATUS_SERVER_SID_MISMATCH";
699 case 0xC00002A1: return "STATUS_DS_NO_ATTRIBUTE_OR_VALUE";
700 case 0xC00002A2: return "STATUS_DS_INVALID_ATTRIBUTE_SYNTAX";
701 case 0xC00002A3: return "STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED";
702 case 0xC00002A4: return "STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS";
703 case 0xC00002A5: return "STATUS_DS_BUSY";
704 case 0xC00002A6: return "STATUS_DS_UNAVAILABLE";
705 case 0xC00002A7: return "STATUS_DS_NO_RIDS_ALLOCATED";
706 case 0xC00002A8: return "STATUS_DS_NO_MORE_RIDS";
707 case 0xC00002A9: return "STATUS_DS_INCORRECT_ROLE_OWNER";
708 case 0xC00002AA: return "STATUS_DS_RIDMGR_INIT_ERROR";
709 case 0xC00002AB: return "STATUS_DS_OBJ_CLASS_VIOLATION";
710 case 0xC00002AC: return "STATUS_DS_CANT_ON_NON_LEAF";
711 case 0xC00002AD: return "STATUS_DS_CANT_ON_RDN";
712 case 0xC00002AE: return "STATUS_DS_CANT_MOD_OBJ_CLASS";
713 case 0xC00002AF: return "STATUS_DS_CROSS_DOM_MOVE_FAILED";
714 case 0xC00002B0: return "STATUS_DS_GC_NOT_AVAILABLE";
715 case 0xC00002B1: return "STATUS_DIRECTORY_SERVICE_REQUIRED";
716 case 0xC00002B2: return "STATUS_REPARSE_ATTRIBUTE_CONFLICT";
717 case 0xC00002B3: return "STATUS_CANT_ENABLE_DENY_ONLY";
718 case 0xC00002B4: return "STATUS_FLOAT_MULTIPLE_FAULTS";
719 case 0xC00002B5: return "STATUS_FLOAT_MULTIPLE_TRAPS";
720 case 0xC00002B6: return "STATUS_DEVICE_REMOVED";
721 case 0xC00002B7: return "STATUS_JOURNAL_DELETE_IN_PROGRESS";
722 case 0xC00002B8: return "STATUS_JOURNAL_NOT_ACTIVE";
723 case 0xC00002B9: return "STATUS_NOINTERFACE";
724 case 0xC00002C1: return "STATUS_DS_ADMIN_LIMIT_EXCEEDED";
725 case 0xC00002C2: return "STATUS_DRIVER_FAILED_SLEEP";
726 case 0xC00002C3: return "STATUS_MUTUAL_AUTHENTICATION_FAILED";
727 case 0xC00002C4: return "STATUS_CORRUPT_SYSTEM_FILE";
728 case 0xC00002C5: return "STATUS_DATATYPE_MISALIGNMENT_ERROR";
729 case 0xC00002C6: return "STATUS_WMI_READ_ONLY";
730 case 0xC00002C7: return "STATUS_WMI_SET_FAILURE";
731 case 0xC00002C8: return "STATUS_COMMITMENT_MINIMUM";
732 case 0xC00002C9: return "STATUS_REG_NAT_CONSUMPTION";
733 case 0xC00002CA: return "STATUS_TRANSPORT_FULL";
734 case 0xC00002CB: return "STATUS_DS_SAM_INIT_FAILURE";
735 case 0xC00002CC: return "STATUS_ONLY_IF_CONNECTED";
736 case 0xC00002CD: return "STATUS_DS_SENSITIVE_GROUP_VIOLATION";
737 case 0xC00002CE: return "STATUS_PNP_RESTART_ENUMERATION";
738 case 0xC00002CF: return "STATUS_JOURNAL_ENTRY_DELETED";
739 case 0xC00002D0: return "STATUS_DS_CANT_MOD_PRIMARYGROUPID";
740 case 0xC00002D1: return "STATUS_SYSTEM_IMAGE_BAD_SIGNATURE";
741 case 0xC00002D2: return "STATUS_PNP_REBOOT_REQUIRED";
742 case 0xC00002D3: return "STATUS_POWER_STATE_INVALID";
743 case 0xC00002D4: return "STATUS_DS_INVALID_GROUP_TYPE";
744 case 0xC00002D5: return "STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN";
745 case 0xC00002D6: return "STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN";
746 case 0xC00002D7: return "STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER";
747 case 0xC00002D8: return "STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER";
748 case 0xC00002D9: return "STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER";
749 case 0xC00002DA: return "STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER";
750 case 0xC00002DB: return "STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER";
751 case 0xC00002DC: return "STATUS_DS_HAVE_PRIMARY_MEMBERS";
752 case 0xC00002DD: return "STATUS_WMI_NOT_SUPPORTED";
753 case 0xC00002DE: return "STATUS_INSUFFICIENT_POWER";
754 case 0xC00002DF: return "STATUS_SAM_NEED_BOOTKEY_PASSWORD";
755 case 0xC00002E0: return "STATUS_SAM_NEED_BOOTKEY_FLOPPY";
756 case 0xC00002E1: return "STATUS_DS_CANT_START";
757 case 0xC00002E2: return "STATUS_DS_INIT_FAILURE";
758 case 0xC00002E3: return "STATUS_SAM_INIT_FAILURE";
759 case 0xC00002E4: return "STATUS_DS_GC_REQUIRED";
760 case 0xC00002E5: return "STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY";
761 case 0xC00002E6: return "STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS";
762 case 0xC00002E7: return "STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED";
763 case 0xC00002E8: return "STATUS_MULTIPLE_FAULT_VIOLATION";
764 case 0xC0000300: return "STATUS_NOT_SUPPORTED_ON_SBS";
765 case 0xC0009898: return "STATUS_WOW_ASSERTION";
766 case 0xC0010001: return "DBG_NO_STATE_CHANGE";
767 case 0xC0010002: return "DBG_APP_NOT_IDLE";
768 case 0xC0020001: return "RPC_NT_INVALID_STRING_BINDING";
769 case 0xC0020002: return "RPC_NT_WRONG_KIND_OF_BINDING";
770 case 0xC0020003: return "RPC_NT_INVALID_BINDING";
771 case 0xC0020004: return "RPC_NT_PROTSEQ_NOT_SUPPORTED";
772 case 0xC0020005: return "RPC_NT_INVALID_RPC_PROTSEQ";
773 case 0xC0020006: return "RPC_NT_INVALID_STRING_UUID";
774 case 0xC0020007: return "RPC_NT_INVALID_ENDPOINT_FORMAT";
775 case 0xC0020008: return "RPC_NT_INVALID_NET_ADDR";
776 case 0xC0020009: return "RPC_NT_NO_ENDPOINT_FOUND";
777 case 0xC002000A: return "RPC_NT_INVALID_TIMEOUT";
778 case 0xC002000B: return "RPC_NT_OBJECT_NOT_FOUND";
779 case 0xC002000C: return "RPC_NT_ALREADY_REGISTERED";
780 case 0xC002000D: return "RPC_NT_TYPE_ALREADY_REGISTERED";
781 case 0xC002000E: return "RPC_NT_ALREADY_LISTENING";
782 case 0xC002000F: return "RPC_NT_NO_PROTSEQS_REGISTERED";
783 case 0xC0020010: return "RPC_NT_NOT_LISTENING";
784 case 0xC0020011: return "RPC_NT_UNKNOWN_MGR_TYPE";
785 case 0xC0020012: return "RPC_NT_UNKNOWN_IF";
786 case 0xC0020013: return "RPC_NT_NO_BINDINGS";
787 case 0xC0020014: return "RPC_NT_NO_PROTSEQS";
788 case 0xC0020015: return "RPC_NT_CANT_CREATE_ENDPOINT";
789 case 0xC0020016: return "RPC_NT_OUT_OF_RESOURCES";
790 case 0xC0020017: return "RPC_NT_SERVER_UNAVAILABLE";
791 case 0xC0020018: return "RPC_NT_SERVER_TOO_BUSY";
792 case 0xC0020019: return "RPC_NT_INVALID_NETWORK_OPTIONS";
793 case 0xC002001A: return "RPC_NT_NO_CALL_ACTIVE";
794 case 0xC002001B: return "RPC_NT_CALL_FAILED";
795 case 0xC002001C: return "RPC_NT_CALL_FAILED_DNE";
796 case 0xC002001D: return "RPC_NT_PROTOCOL_ERROR";
797 case 0xC002001F: return "RPC_NT_UNSUPPORTED_TRANS_SYN";
798 case 0xC0020021: return "RPC_NT_UNSUPPORTED_TYPE";
799 case 0xC0020022: return "RPC_NT_INVALID_TAG";
800 case 0xC0020023: return "RPC_NT_INVALID_BOUND";
801 case 0xC0020024: return "RPC_NT_NO_ENTRY_NAME";
802 case 0xC0020025: return "RPC_NT_INVALID_NAME_SYNTAX";
803 case 0xC0020026: return "RPC_NT_UNSUPPORTED_NAME_SYNTAX";
804 case 0xC0020028: return "RPC_NT_UUID_NO_ADDRESS";
805 case 0xC0020029: return "RPC_NT_DUPLICATE_ENDPOINT";
806 case 0xC002002A: return "RPC_NT_UNKNOWN_AUTHN_TYPE";
807 case 0xC002002B: return "RPC_NT_MAX_CALLS_TOO_SMALL";
808 case 0xC002002C: return "RPC_NT_STRING_TOO_LONG";
809 case 0xC002002D: return "RPC_NT_PROTSEQ_NOT_FOUND";
810 case 0xC002002E: return "RPC_NT_PROCNUM_OUT_OF_RANGE";
811 case 0xC002002F: return "RPC_NT_BINDING_HAS_NO_AUTH";
812 case 0xC0020030: return "RPC_NT_UNKNOWN_AUTHN_SERVICE";
813 case 0xC0020031: return "RPC_NT_UNKNOWN_AUTHN_LEVEL";
814 case 0xC0020032: return "RPC_NT_INVALID_AUTH_IDENTITY";
815 case 0xC0020033: return "RPC_NT_UNKNOWN_AUTHZ_SERVICE";
816 case 0xC0020034: return "EPT_NT_INVALID_ENTRY";
817 case 0xC0020035: return "EPT_NT_CANT_PERFORM_OP";
818 case 0xC0020036: return "EPT_NT_NOT_REGISTERED";
819 case 0xC0020037: return "RPC_NT_NOTHING_TO_EXPORT";
820 case 0xC0020038: return "RPC_NT_INCOMPLETE_NAME";
821 case 0xC0020039: return "RPC_NT_INVALID_VERS_OPTION";
822 case 0xC002003A: return "RPC_NT_NO_MORE_MEMBERS";
823 case 0xC002003B: return "RPC_NT_NOT_ALL_OBJS_UNEXPORTED";
824 case 0xC002003C: return "RPC_NT_INTERFACE_NOT_FOUND";
825 case 0xC002003D: return "RPC_NT_ENTRY_ALREADY_EXISTS";
826 case 0xC002003E: return "RPC_NT_ENTRY_NOT_FOUND";
827 case 0xC002003F: return "RPC_NT_NAME_SERVICE_UNAVAILABLE";
828 case 0xC0020040: return "RPC_NT_INVALID_NAF_ID";
829 case 0xC0020041: return "RPC_NT_CANNOT_SUPPORT";
830 case 0xC0020042: return "RPC_NT_NO_CONTEXT_AVAILABLE";
831 case 0xC0020043: return "RPC_NT_INTERNAL_ERROR";
832 case 0xC0020044: return "RPC_NT_ZERO_DIVIDE";
833 case 0xC0020045: return "RPC_NT_ADDRESS_ERROR";
834 case 0xC0020046: return "RPC_NT_FP_DIV_ZERO";
835 case 0xC0020047: return "RPC_NT_FP_UNDERFLOW";
836 case 0xC0020048: return "RPC_NT_FP_OVERFLOW";
837 case 0xC0030001: return "RPC_NT_NO_MORE_ENTRIES";
838 case 0xC0030002: return "RPC_NT_SS_CHAR_TRANS_OPEN_FAIL";
839 case 0xC0030003: return "RPC_NT_SS_CHAR_TRANS_SHORT_FILE";
840 case 0xC0030004: return "RPC_NT_SS_IN_NULL_CONTEXT";
841 case 0xC0030005: return "RPC_NT_SS_CONTEXT_MISMATCH";
842 case 0xC0030006: return "RPC_NT_SS_CONTEXT_DAMAGED";
843 case 0xC0030007: return "RPC_NT_SS_HANDLES_MISMATCH";
844 case 0xC0030008: return "RPC_NT_SS_CANNOT_GET_CALL_HANDLE";
845 case 0xC0030009: return "RPC_NT_NULL_REF_POINTER";
846 case 0xC003000A: return "RPC_NT_ENUM_VALUE_OUT_OF_RANGE";
847 case 0xC003000B: return "RPC_NT_BYTE_COUNT_TOO_SMALL";
848 case 0xC003000C: return "RPC_NT_BAD_STUB_DATA";
849 case 0xC0020049: return "RPC_NT_CALL_IN_PROGRESS";
850 case 0xC002004A: return "RPC_NT_NO_MORE_BINDINGS";
851 case 0xC002004B: return "RPC_NT_GROUP_MEMBER_NOT_FOUND";
852 case 0xC002004C: return "EPT_NT_CANT_CREATE";
853 case 0xC002004D: return "RPC_NT_INVALID_OBJECT";
854 case 0xC002004F: return "RPC_NT_NO_INTERFACES";
855 case 0xC0020050: return "RPC_NT_CALL_CANCELLED";
856 case 0xC0020051: return "RPC_NT_BINDING_INCOMPLETE";
857 case 0xC0020052: return "RPC_NT_COMM_FAILURE";
858 case 0xC0020053: return "RPC_NT_UNSUPPORTED_AUTHN_LEVEL";
859 case 0xC0020054: return "RPC_NT_NO_PRINC_NAME";
860 case 0xC0020055: return "RPC_NT_NOT_RPC_ERROR";
861 case 0x40020056: return "RPC_NT_UUID_LOCAL_ONLY";
862 case 0xC0020057: return "RPC_NT_SEC_PKG_ERROR";
863 case 0xC0020058: return "RPC_NT_NOT_CANCELLED";
864 case 0xC0030059: return "RPC_NT_INVALID_ES_ACTION";
865 case 0xC003005A: return "RPC_NT_WRONG_ES_VERSION";
866 case 0xC003005B: return "RPC_NT_WRONG_STUB_VERSION";
867 case 0xC003005C: return "RPC_NT_INVALID_PIPE_OBJECT";
868 case 0xC003005D: return "RPC_NT_INVALID_PIPE_OPERATION";
869 case 0xC003005E: return "RPC_NT_WRONG_PIPE_VERSION";
870 case 0xC003005F: return "RPC_NT_PIPE_CLOSED";
871 case 0xC0030060: return "RPC_NT_PIPE_DISCIPLINE_ERROR";
872 case 0xC0030061: return "RPC_NT_PIPE_EMPTY";
873 case 0xC0020062: return "RPC_NT_INVALID_ASYNC_HANDLE";
874 case 0xC0020063: return "RPC_NT_INVALID_ASYNC_CALL";
875 case 0x400200AF: return "RPC_NT_SEND_INCOMPLETE";
876 case 0xC0140001: return "STATUS_ACPI_INVALID_OPCODE";
877 case 0xC0140002: return "STATUS_ACPI_STACK_OVERFLOW";
878 case 0xC0140003: return "STATUS_ACPI_ASSERT_FAILED";
879 case 0xC0140004: return "STATUS_ACPI_INVALID_INDEX";
880 case 0xC0140005: return "STATUS_ACPI_INVALID_ARGUMENT";
881 case 0xC0140006: return "STATUS_ACPI_FATAL";
882 case 0xC0140007: return "STATUS_ACPI_INVALID_SUPERNAME";
883 case 0xC0140008: return "STATUS_ACPI_INVALID_ARGTYPE";
884 case 0xC0140009: return "STATUS_ACPI_INVALID_OBJTYPE";
885 case 0xC014000A: return "STATUS_ACPI_INVALID_TARGETTYPE";
886 case 0xC014000B: return "STATUS_ACPI_INCORRECT_ARGUMENT_COUNT";
887 case 0xC014000C: return "STATUS_ACPI_ADDRESS_NOT_MAPPED";
888 case 0xC014000D: return "STATUS_ACPI_INVALID_EVENTTYPE";
889 case 0xC014000E: return "STATUS_ACPI_HANDLER_COLLISION";
890 case 0xC014000F: return "STATUS_ACPI_INVALID_DATA";
891 case 0xC0140010: return "STATUS_ACPI_INVALID_REGION";
892 case 0xC0140011: return "STATUS_ACPI_INVALID_ACCESS_SIZE";
893 case 0xC0140012: return "STATUS_ACPI_ACQUIRE_GLOBAL_LOCK";
894 case 0xC0140013: return "STATUS_ACPI_ALREADY_INITIALIZED";
895 case 0xC0140014: return "STATUS_ACPI_NOT_INITIALIZED";
896 case 0xC0140015: return "STATUS_ACPI_INVALID_MUTEX_LEVEL";
897 case 0xC0140016: return "STATUS_ACPI_MUTEX_NOT_OWNED";
898 case 0xC0140017: return "STATUS_ACPI_MUTEX_NOT_OWNER";
899 case 0xC0140018: return "STATUS_ACPI_RS_ACCESS";
900 case 0xC0140019: return "STATUS_ACPI_INVALID_TABLE";
901 case 0xC0140020: return "STATUS_ACPI_REG_HANDLER_FAILED";
902 case 0xC0140021: return "STATUS_ACPI_POWER_REQUEST_FAILED";
903 case 0xC00A0001: return "STATUS_CTX_WINSTATION_NAME_INVALID";
904 case 0xC00A0002: return "STATUS_CTX_INVALID_PD";
905 case 0xC00A0003: return "STATUS_CTX_PD_NOT_FOUND";
906 case 0x400A0004: return "STATUS_CTX_CDM_CONNECT";
907 case 0x400A0005: return "STATUS_CTX_CDM_DISCONNECT";
908 case 0xC00A0006: return "STATUS_CTX_CLOSE_PENDING";
909 case 0xC00A0007: return "STATUS_CTX_NO_OUTBUF";
910 case 0xC00A0008: return "STATUS_CTX_MODEM_INF_NOT_FOUND";
911 case 0xC00A0009: return "STATUS_CTX_INVALID_MODEMNAME";
912 case 0xC00A000A: return "STATUS_CTX_RESPONSE_ERROR";
913 case 0xC00A000B: return "STATUS_CTX_MODEM_RESPONSE_TIMEOUT";
914 case 0xC00A000C: return "STATUS_CTX_MODEM_RESPONSE_NO_CARRIER";
915 case 0xC00A000D: return "STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE";
916 case 0xC00A000E: return "STATUS_CTX_MODEM_RESPONSE_BUSY";
917 case 0xC00A000F: return "STATUS_CTX_MODEM_RESPONSE_VOICE";
918 case 0xC00A0010: return "STATUS_CTX_TD_ERROR";
919 case 0xC00A0012: return "STATUS_CTX_LICENSE_CLIENT_INVALID";
920 case 0xC00A0013: return "STATUS_CTX_LICENSE_NOT_AVAILABLE";
921 case 0xC00A0014: return "STATUS_CTX_LICENSE_EXPIRED";
922 case 0xC00A0015: return "STATUS_CTX_WINSTATION_NOT_FOUND";
923 case 0xC00A0016: return "STATUS_CTX_WINSTATION_NAME_COLLISION";
924 case 0xC00A0017: return "STATUS_CTX_WINSTATION_BUSY";
925 case 0xC00A0018: return "STATUS_CTX_BAD_VIDEO_MODE";
926 case 0xC00A0022: return "STATUS_CTX_GRAPHICS_INVALID";
927 case 0xC00A0024: return "STATUS_CTX_NOT_CONSOLE";
928 case 0xC00A0026: return "STATUS_CTX_CLIENT_QUERY_TIMEOUT";
929 case 0xC00A0027: return "STATUS_CTX_CONSOLE_DISCONNECT";
930 case 0xC00A0028: return "STATUS_CTX_CONSOLE_CONNECT";
931 case 0xC00A002A: return "STATUS_CTX_SHADOW_DENIED";
932 case 0xC00A002B: return "STATUS_CTX_WINSTATION_ACCESS_DENIED";
933 case 0xC00A002E: return "STATUS_CTX_INVALID_WD";
934 case 0xC00A002F: return "STATUS_CTX_WD_NOT_FOUND";
935 case 0xC00A0030: return "STATUS_CTX_SHADOW_INVALID";
936 case 0xC00A0031: return "STATUS_CTX_SHADOW_DISABLED";
937 case 0xC00A0032: return "STATUS_RDP_PROTOCOL_ERROR";
938 case 0xC00A0033: return "STATUS_CTX_CLIENT_LICENSE_NOT_SET";
939 case 0xC00A0034: return "STATUS_CTX_CLIENT_LICENSE_IN_USE";
940 case 0xC0040035: return "STATUS_PNP_BAD_MPS_TABLE";
941 case 0xC0040036: return "STATUS_PNP_TRANSLATION_FAILED";
942 case 0xC0040037: return "STATUS_PNP_IRQ_TRANSLATION_FAILED";
943 default: return "STATUS_UNKNOWN";
944 }
945 }
946
947 /*
948 * Ext2ReadDisk
949 * Read data from disk ...
950 *
951 * ARGUMENTS:
952 * VolumeHandle: Volume Handle
953 * Offset : Disk Offset
954 * Length : Data Length to be read
955 * Buffer : ...
956 *
957 * RETURNS:
958 * Success: STATUS_SUCCESS
959 * Fail: ...
960 *
961 * NOTES:
962 * Both Length and Offset should be SECTOR_SIZE aligned.
963 */
964 NTSTATUS
965 Ext2ReadDisk( PEXT2_FILESYS Ext2Sys,
966 ULONGLONG Offset,
967 ULONG Length,
968 PVOID Buffer )
969 {
970 LARGE_INTEGER Address;
971 NTSTATUS Status;
972 ULONG AlignedLength;
973
974 IO_STATUS_BLOCK IoStatus;
975
976 PVOID NonPagedBuffer = NULL;
977
978 ASSERT(Buffer != NULL);
979
980 #if 0
981 if (Ext2Sys->bFile)
982 {
983 Address.QuadPart = Offset;
984
985 Status = NtReadFile( Ext2Sys->MediaHandle,
986 0,
987 NULL,
988 NULL,
989 &IoStatus,
990 Buffer,
991 Length,
992 &Address,
993 NULL );
994 }
995 else
996 #endif
997 {
998 Address.QuadPart = Offset & (~((ULONGLONG)SECTOR_SIZE - 1));
999
1000 AlignedLength = (Length + SECTOR_SIZE - 1)&(~(SECTOR_SIZE - 1));
1001
1002 AlignedLength += ((ULONG)(Offset - Address.QuadPart) + SECTOR_SIZE - 1)
1003 & (~(SECTOR_SIZE - 1));
1004
1005 NonPagedBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, AlignedLength);
1006 if (!NonPagedBuffer)
1007 {
1008 Status = STATUS_INSUFFICIENT_RESOURCES;
1009 goto errorout;
1010 }
1011
1012 Status = NtReadFile( Ext2Sys->MediaHandle,
1013 0,
1014 NULL,
1015 NULL,
1016 &IoStatus,
1017 NonPagedBuffer,
1018 AlignedLength,
1019 &Address,
1020 NULL );
1021
1022 if (!NT_SUCCESS(Status))
1023 {
1024 goto errorout;
1025 }
1026
1027 RtlCopyMemory( Buffer,
1028 (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart),
1029 Length );
1030 }
1031
1032 errorout:
1033
1034 if (NonPagedBuffer)
1035 RtlFreeHeap(RtlGetProcessHeap(), 0, NonPagedBuffer);
1036
1037 return Status;
1038 }
1039
1040
1041 /*
1042 * Ext2WriteDisk
1043 * Write data to disk ...
1044 *
1045 * ARGUMENTS:
1046 * VolumeHandle: Volume Handle
1047 * Offset : Disk Offset
1048 * Length : Data Length to be written
1049 * Buffer : Data to be written ...
1050 *
1051 * RETURNS:
1052 * Success: STATUS_SUCCESS
1053 * Fail: ...
1054 *
1055 * NOTES:
1056 * Both Length and Offset should be SECTOR_SIZE aligned.
1057 */
1058
1059 NTSTATUS
1060 Ext2WriteDisk( PEXT2_FILESYS Ext2Sys,
1061 ULONGLONG Offset,
1062 ULONG Length,
1063 PVOID Buffer )
1064 {
1065 LARGE_INTEGER Address;
1066 NTSTATUS Status;
1067 ULONG AlignedLength;
1068
1069 IO_STATUS_BLOCK IoStatus;
1070
1071 PVOID NonPagedBuffer = NULL;
1072
1073 ASSERT(Buffer != NULL);
1074
1075 #if 0
1076 if (Ext2Sys->bFile)
1077 {
1078 Address.QuadPart = Offset;
1079
1080 Status = NtWriteFile( Ext2Sys->MediaHandle,
1081 0,
1082 NULL,
1083 NULL,
1084 &IoStatus,
1085 Buffer,
1086 Length,
1087 &Address,
1088 NULL );
1089 }
1090 else
1091 #endif
1092 {
1093 Address.QuadPart = Offset & (~((ULONGLONG)SECTOR_SIZE - 1));
1094
1095 AlignedLength = (Length + SECTOR_SIZE - 1)&(~(SECTOR_SIZE - 1));
1096
1097 AlignedLength += ((ULONG)(Offset - Address.QuadPart) + SECTOR_SIZE - 1)
1098 & (~(SECTOR_SIZE - 1));
1099
1100 NonPagedBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, AlignedLength);
1101 if (!NonPagedBuffer)
1102 {
1103 Status = STATUS_INSUFFICIENT_RESOURCES;
1104 goto errorout;
1105 }
1106
1107 if ((AlignedLength != Length) || (Address.QuadPart != (LONGLONG)Offset))
1108 {
1109 Status = NtReadFile( Ext2Sys->MediaHandle,
1110 0,
1111 NULL,
1112 NULL,
1113 &IoStatus,
1114 NonPagedBuffer,
1115 AlignedLength,
1116 &Address,
1117 NULL );
1118
1119 if (!NT_SUCCESS(Status))
1120 {
1121 goto errorout;
1122 }
1123 }
1124
1125 RtlCopyMemory( (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart),
1126 Buffer, Length );
1127
1128 Status = NtWriteFile( Ext2Sys->MediaHandle,
1129 0,
1130 NULL,
1131 NULL,
1132 &IoStatus,
1133 NonPagedBuffer,
1134 AlignedLength,
1135 &Address,
1136 NULL );
1137 }
1138
1139 errorout:
1140
1141 if (NonPagedBuffer)
1142 RtlFreeHeap(RtlGetProcessHeap(), 0, NonPagedBuffer);
1143
1144 return Status;
1145 }
1146
1147
1148 /*
1149 * Ext2GetMediaInfo
1150 * Get volume gemmetry information ...
1151 *
1152 * ARGUMENTS:
1153 * VolumeHandle: Volume handle.
1154 *
1155 * RETURNS:
1156 * Success or Fail
1157 *
1158 * NOTES:
1159 * N/A
1160 */
1161
1162 NTSTATUS
1163 Ext2GetMediaInfo( PEXT2_FILESYS Ext2Sys )
1164 {
1165 NTSTATUS Status;
1166 IO_STATUS_BLOCK IoSb;
1167
1168 Status = NtDeviceIoControlFile( Ext2Sys->MediaHandle,
1169 NULL, NULL, NULL, &IoSb,
1170 IOCTL_DISK_GET_DRIVE_GEOMETRY,
1171 &(Ext2Sys->DiskGeometry), sizeof(DISK_GEOMETRY),
1172 &(Ext2Sys->DiskGeometry), sizeof(DISK_GEOMETRY));
1173
1174
1175 if (!NT_SUCCESS(Status))
1176 {
1177 goto errorout;
1178 }
1179
1180 Status = NtDeviceIoControlFile( Ext2Sys->MediaHandle,
1181 NULL, NULL, NULL, &IoSb,
1182 IOCTL_DISK_GET_PARTITION_INFO,
1183 &(Ext2Sys->PartInfo), sizeof(PARTITION_INFORMATION),
1184 &(Ext2Sys->PartInfo), sizeof(PARTITION_INFORMATION));
1185
1186 if (!NT_SUCCESS(Status))
1187 {
1188 goto errorout;
1189 }
1190
1191 errorout:
1192
1193 return Status;
1194 }
1195
1196
1197 /*
1198 * Ext2LockVolume
1199 * Lock the volume ...
1200 *
1201 * ARGUMENTS:
1202 * VolumeHandle: Volume handle.
1203 *
1204 * RETURNS:
1205 * Success or Fail
1206 *
1207 * NOTES:
1208 * N/A
1209 */
1210
1211
1212 NTSTATUS
1213 Ext2LockVolume( PEXT2_FILESYS Ext2Sys )
1214 {
1215 NTSTATUS Status;
1216 IO_STATUS_BLOCK IoSb;
1217
1218 Status = NtFsControlFile( Ext2Sys->MediaHandle,
1219 NULL, NULL, NULL, &IoSb,
1220 FSCTL_LOCK_VOLUME,
1221 NULL, 0, NULL, 0 );
1222
1223 if (!NT_SUCCESS(Status))
1224 {
1225 DPRINT1("Mke2fs: Error when locking volume: Status = %lxh %s...\n",
1226 Status, Ext2StatusToString(Status));
1227
1228 goto errorout;
1229 }
1230
1231 errorout:
1232
1233 return Status;
1234 }
1235
1236
1237 NTSTATUS
1238 Ext2UnLockVolume( PEXT2_FILESYS Ext2Sys )
1239 {
1240 NTSTATUS Status;
1241 IO_STATUS_BLOCK IoSb;
1242
1243 Status = NtFsControlFile( Ext2Sys->MediaHandle,
1244 NULL, NULL, NULL, &IoSb,
1245 FSCTL_UNLOCK_VOLUME,
1246 NULL, 0, NULL, 0 );
1247
1248 if (!NT_SUCCESS(Status))
1249 {
1250 DPRINT1("Mke2fs: Error when unlocking volume ...\n");
1251 goto errorout;
1252 }
1253
1254 errorout:
1255
1256 return Status;
1257 }
1258
1259
1260 NTSTATUS
1261 Ext2DisMountVolume( PEXT2_FILESYS Ext2Sys )
1262 {
1263 NTSTATUS Status;
1264 IO_STATUS_BLOCK IoSb;
1265
1266 Status = NtFsControlFile( Ext2Sys->MediaHandle,
1267 NULL, NULL, NULL, &IoSb,
1268 FSCTL_DISMOUNT_VOLUME,
1269 NULL, 0, NULL, 0 );
1270
1271 if (!NT_SUCCESS(Status))
1272 {
1273 DPRINT1("Mke2fs: Error when dismounting volume ...\n");
1274 goto errorout;
1275 }
1276
1277 errorout:
1278
1279 return Status;
1280 }
1281
1282 NTSTATUS
1283 Ext2OpenDevice( PEXT2_FILESYS Ext2Sys,
1284 PUNICODE_STRING DeviceName )
1285 {
1286 NTSTATUS Status;
1287 OBJECT_ATTRIBUTES ObjectAttributes;
1288 HANDLE FileHandle;
1289 IO_STATUS_BLOCK Iosb;
1290
1291 //
1292 // Setup the name in an object attributes structure.
1293 // Note that we create a name that is case INsensitive
1294 //
1295 InitializeObjectAttributes(&ObjectAttributes, // ptr to structure
1296 DeviceName, // ptr to file spec
1297 OBJ_CASE_INSENSITIVE, // attributes
1298 NULL, // root directory handle
1299 NULL ); // ptr to security descriptor
1300
1301 //
1302 // Do the create. In this particular case, we'll have the I/O Manager
1303 // make our write requests syncrhonous for our convenience.
1304 //
1305 Status = NtCreateFile(&FileHandle, // returned file handle
1306 (GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE), // desired access
1307 &ObjectAttributes, // ptr to object attributes
1308 &Iosb, // ptr to I/O status block
1309 0, // allocation size
1310 FILE_ATTRIBUTE_NORMAL, // file attributes
1311 FILE_SHARE_WRITE | FILE_SHARE_READ, // share access
1312 FILE_OPEN /*FILE_SUPERSEDE*/, // create disposition
1313 FILE_SYNCHRONOUS_IO_NONALERT, // create options
1314 NULL, // ptr to extended attributes
1315 0); // length of ea buffer
1316
1317 //
1318 // Check the system service status
1319 //
1320 if( !NT_SUCCESS(Status) )
1321 {
1322 DPRINT1("Mke2fs: Create system service failed status = 0x%lx\n", Status);
1323 return Status;
1324 }
1325
1326
1327 //
1328 // Check the returned status too...
1329 //
1330 if(!NT_SUCCESS(Iosb.Status) )
1331 {
1332 DPRINT1("Mke2fs: Create failed with status = 0x%lx\n",Iosb.Status);
1333 return Status;
1334 }
1335
1336 Ext2Sys->MediaHandle = FileHandle;
1337
1338 return Status;
1339 }
1340
1341
1342 NTSTATUS
1343 Ext2CloseDevice( PEXT2_FILESYS Ext2Sys)
1344 {
1345 NTSTATUS Status = STATUS_SUCCESS;
1346
1347 if(Ext2Sys->MediaHandle)
1348 {
1349 Status = NtClose(Ext2Sys->MediaHandle);
1350 }
1351
1352 return Status;
1353 }