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