- Implement RtlGetLastNtStatus, RtlGetLastWin32Error, RtlRestoreLastWin32Error, RtlSe...
[reactos.git] / reactos / lib / rtl / error.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * PURPOSE: Rtl error functions
6 * FILE: lib/rtl/error.c
7 * PROGRAMER: Eric Kohl
8 * REVISION HISTORY:
9 * 22/07/99: Added RtlNtStatusToDosError.
10 * 1999-11-30: Added RtlNtStatusToPsxErrno.
11 * 1999-12-18: STDCALL RtlNtStatusToDosError
12 */
13
14 /*
15 * Partially taken from WINE, original copyright:
16 *
17 * Copyright 2000 Alexandre Julliard
18 */
19
20 /* INCLUDES *****************************************************************/
21
22 #include <ddk/ntddk.h>
23 #include <errors.h>
24
25 #define NDEBUG
26 #include <debug.h>
27
28 #ifndef HIWORD
29 #define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
30 #endif
31 #ifndef LOWORD
32 #define LOWORD(l) ((WORD)(l))
33 #endif
34
35 /* TYPES *******************************************************************/
36
37 typedef struct _ERROR_TABLE
38 {
39 ULONG Start;
40 ULONG End;
41 const WORD *Table;
42 }
43 ERROR_TABLE, *PERROR_TABLE;
44
45
46 /* FUNCTIONS ***************************************************************/
47
48 static const WORD table_00000103[11] =
49 {
50 ERROR_IO_PENDING, /* 00000103 (STATUS_PENDING) */
51 ERROR_MR_MID_NOT_FOUND, /* 00000104 (STATUS_REPARSE) */
52 ERROR_MORE_DATA, /* 00000105 (STATUS_MORE_ENTRIES) */
53 ERROR_NOT_ALL_ASSIGNED, /* 00000106 (STATUS_NOT_ALL_ASSIGNED) */
54 ERROR_SOME_NOT_MAPPED, /* 00000107 (STATUS_SOME_NOT_MAPPED) */
55 ERROR_MR_MID_NOT_FOUND, /* 00000108 (STATUS_OPLOCK_BREAK_IN_PROCESS) */
56 ERROR_MR_MID_NOT_FOUND, /* 00000109 (STATUS_VOLUME_MOUNTED) */
57 ERROR_MR_MID_NOT_FOUND, /* 0000010a (STATUS_RXACT_COMMITTED) */
58 ERROR_MR_MID_NOT_FOUND, /* 0000010b (STATUS_NOTIFY_CLEANUP) */
59 ERROR_NOTIFY_ENUM_DIR, /* 0000010c (STATUS_NOTIFY_ENUM_DIR) */
60 ERROR_NO_QUOTAS_FOR_ACCOUNT /* 0000010d (STATUS_NO_QUOTAS_FOR_ACCOUNT) */
61 // /* 0000010e (STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED) */
62 };
63
64 static const WORD table_40000002[12] =
65 {
66 ERROR_INVALID_PARAMETER, /* 40000002 */
67 ERROR_MR_MID_NOT_FOUND, /* 40000003 */
68 ERROR_MR_MID_NOT_FOUND, /* 40000004 */
69 ERROR_MR_MID_NOT_FOUND, /* 40000005 */
70 ERROR_LOCAL_USER_SESSION_KEY, /* 40000006 (STATUS_LOCAL_USER_SESSION_KEY) */
71 ERROR_MR_MID_NOT_FOUND, /* 40000007 */
72 ERROR_MORE_WRITES, /* 40000008 (STATUS_SERIAL_MORE_WRITES) */
73 ERROR_REGISTRY_RECOVERED, /* 40000009 (STATUS_REGISTRY_RECOVERED) */
74 ERROR_MR_MID_NOT_FOUND, /* 4000000a */
75 ERROR_MR_MID_NOT_FOUND, /* 4000000b */
76 ERROR_COUNTER_TIMEOUT, /* 4000000c (STATUS_SERIAL_COUNTER_TIMEOUT) */
77 ERROR_NULL_LM_PASSWORD /* 4000000d (STATUS_NULL_LM_PASSWORD) */
78 };
79
80 static const WORD table_40020056[1] =
81 {
82 RPC_S_UUID_LOCAL_ONLY /* 40020056 */
83 };
84
85 static const WORD table_400200af[1] =
86 {
87 RPC_S_SEND_INCOMPLETE /* 400200af */
88 };
89
90 static const WORD table_80000001[38] =
91 {
92 0, /* 80000001 (STATUS_GUARD_PAGE_VIOLATION) */
93 ERROR_NOACCESS, /* 80000002 (STATUS_DATATYPE_MISALIGNMENT) */
94 0, /* 80000003 (STATUS_BREAKPOINT) */
95 0, /* 80000004 (STATUS_SINGLE_STEP) */
96 ERROR_MORE_DATA, /* 80000005 (STATUS_BUFFER_OVERFLOW) */
97 ERROR_NO_MORE_FILES, /* 80000006 (STATUS_NO_MORE_FILES) */
98 ERROR_MR_MID_NOT_FOUND, /* 80000007 (STATUS_WAKE_SYSTEM_DEBUGGER) */
99 ERROR_MR_MID_NOT_FOUND, /* 80000008 */
100 ERROR_MR_MID_NOT_FOUND, /* 80000009 */
101 ERROR_MR_MID_NOT_FOUND, /* 8000000a (STATUS_HANDLES_CLOSED) */
102 ERROR_NO_INHERITANCE, /* 8000000b (STATUS_NO_INHERITANCE) */
103 ERROR_MR_MID_NOT_FOUND, /* 8000000c (STATUS_GUID_SUBSTITUTION_MADE) */
104 ERROR_PARTIAL_COPY, /* 8000000d (STATUS_PARTIAL_COPY) */
105 ERROR_OUT_OF_PAPER, /* 8000000e (STATUS_DEVICE_PAPER_EMPTY) */
106 ERROR_NOT_READY, /* 8000000f (STATUS_DEVICE_POWERED_OFF) */
107 ERROR_NOT_READY, /* 80000010 (STATUS_DEVICE_OFF_LINE) */
108 ERROR_BUSY, /* 80000011 (STATUS_DEVICE_BUSY) */
109 ERROR_NO_MORE_ITEMS, /* 80000012 (STATUS_NO_MORE_EAS) */
110 ERROR_INVALID_EA_NAME, /* 80000013 (STATUS_INVALID_EA_NAME) */
111 ERROR_EA_LIST_INCONSISTENT, /* 80000014 (STATUS_EA_LIST_INCONSISTENT) */
112 ERROR_EA_LIST_INCONSISTENT, /* 80000015 (STATUS_INVALID_EA_FLAG) */
113 ERROR_MEDIA_CHANGED, /* 80000016 (STATUS_VERIFY_REQUIRED) */
114 ERROR_MR_MID_NOT_FOUND, /* 80000017 (STATUS_EXTRANEOUS_INFORMATION) */
115 ERROR_MR_MID_NOT_FOUND, /* 80000018 (STATUS_RXACT_COMMIT_NECESSARY) */
116 ERROR_MR_MID_NOT_FOUND, /* 80000019 */
117 ERROR_NO_MORE_ITEMS, /* 8000001a (STATUS_NO_MORE_ENTRIES) */
118 ERROR_FILEMARK_DETECTED, /* 8000001b (STATUS_FILEMARK_DETECTED) */
119 ERROR_MEDIA_CHANGED, /* 8000001c (STATUS_MEDIA_CHANGED) */
120 ERROR_BUS_RESET, /* 8000001d (STATUS_BUS_RESET) */
121 ERROR_END_OF_MEDIA, /* 8000001e (STATUS_END_OF_MEDIA) */
122 ERROR_BEGINNING_OF_MEDIA, /* 8000001f (STATUS_BEGINNING_OF_MEDIA) */
123 ERROR_MR_MID_NOT_FOUND, /* 80000020 (STATUS_MEDIA_CHECK) */
124 ERROR_SETMARK_DETECTED, /* 80000021 (STATUS_SETMARK_DETECTED) */
125 ERROR_NO_DATA_DETECTED, /* 80000022 (STATUS_NO_DATA_DETECTED) */
126 ERROR_MR_MID_NOT_FOUND, /* 80000023 (STATUS_REDIRECTOR_HAS_OPEN_HANDLES) */
127 ERROR_MR_MID_NOT_FOUND, /* 80000024 (STATUS_SERVER_HAS_OPEN_HANDLES) */
128 ERROR_ACTIVE_CONNECTIONS, /* 80000025 (STATUS_ALREADY_DISCONNECTED) */
129 ERROR_MR_MID_NOT_FOUND /* 80000026 (STATUS_LONGJUMP) */
130 };
131
132 static const WORD table_80090300[23] =
133 {
134 ERROR_NO_SYSTEM_RESOURCES, /* 80090300 */
135 ERROR_INVALID_HANDLE, /* 80090301 */
136 ERROR_INVALID_FUNCTION, /* 80090302 */
137 ERROR_BAD_NETPATH, /* 80090303 */
138 ERROR_INTERNAL_ERROR, /* 80090304 */
139 ERROR_NO_SUCH_PACKAGE, /* 80090305 */
140 ERROR_NOT_OWNER, /* 80090306 */
141 ERROR_NO_SUCH_PACKAGE, /* 80090307 */
142 ERROR_INVALID_PARAMETER, /* 80090308 */
143 ERROR_INVALID_PARAMETER, /* 80090309 */
144 ERROR_NOT_SUPPORTED, /* 8009030a */
145 ERROR_CANNOT_IMPERSONATE, /* 8009030b */
146 ERROR_LOGON_FAILURE, /* 8009030c */
147 ERROR_INVALID_PARAMETER, /* 8009030d */
148 ERROR_NO_SUCH_LOGON_SESSION, /* 8009030e */
149 ERROR_ACCESS_DENIED, /* 8009030f */
150 ERROR_ACCESS_DENIED, /* 80090310 */
151 ERROR_NO_LOGON_SERVERS, /* 80090311 */
152 ERROR_MR_MID_NOT_FOUND, /* 80090312 */
153 ERROR_MR_MID_NOT_FOUND, /* 80090313 */
154 ERROR_MR_MID_NOT_FOUND, /* 80090314 */
155 ERROR_MR_MID_NOT_FOUND, /* 80090315 */
156 ERROR_NO_SUCH_PACKAGE /* 80090316 */
157 };
158
159 static const WORD table_c0000001[411] =
160 {
161 ERROR_GEN_FAILURE, /* c0000001 (STATUS_UNSUCCESSFUL) */
162 ERROR_INVALID_FUNCTION, /* c0000002 (STATUS_NOT_IMPLEMENTED) */
163 ERROR_INVALID_PARAMETER, /* c0000003 (STATUS_INVALID_INFO_CLASS) */
164 ERROR_BAD_LENGTH, /* c0000004 (STATUS_INFO_LENGTH_MISMATCH) */
165 ERROR_NOACCESS, /* c0000005 (STATUS_ACCESS_VIOLATION) */
166 ERROR_SWAPERROR, /* c0000006 (STATUS_IN_PAGE_ERROR) */
167 ERROR_PAGEFILE_QUOTA, /* c0000007 (STATUS_PAGEFILE_QUOTA) */
168 ERROR_INVALID_HANDLE, /* c0000008 (STATUS_INVALID_HANDLE) */
169 ERROR_STACK_OVERFLOW, /* c0000009 (STATUS_BAD_INITIAL_STACK) */
170 ERROR_BAD_EXE_FORMAT, /* c000000a (STATUS_BAD_INITIAL_PC) */
171 ERROR_INVALID_PARAMETER, /* c000000b (STATUS_INVALID_CID) */
172 ERROR_MR_MID_NOT_FOUND, /* c000000c (STATUS_TIMER_NOT_CANCELED) */
173 ERROR_INVALID_PARAMETER, /* c000000d (STATUS_INVALID_PARAMETER) */
174 ERROR_FILE_NOT_FOUND, /* c000000e (STATUS_NO_SUCH_DEVICE) */
175 ERROR_FILE_NOT_FOUND, /* c000000f (STATUS_NO_SUCH_FILE) */
176 ERROR_INVALID_FUNCTION, /* c0000010 (STATUS_INVALID_DEVICE_REQUEST) */
177 ERROR_HANDLE_EOF, /* c0000011 (STATUS_END_OF_FILE) */
178 ERROR_WRONG_DISK, /* c0000012 (STATUS_WRONG_VOLUME) */
179 ERROR_NOT_READY, /* c0000013 (STATUS_NO_MEDIA_IN_DEVICE) */
180 ERROR_UNRECOGNIZED_MEDIA, /* c0000014 (STATUS_UNRECOGNIZED_MEDIA) */
181 ERROR_SECTOR_NOT_FOUND, /* c0000015 (STATUS_NONEXISTENT_SECTOR) */
182 ERROR_MORE_DATA, /* c0000016 (STATUS_MORE_PROCESSING_REQUIRED) */
183 ERROR_NOT_ENOUGH_MEMORY, /* c0000017 (STATUS_NO_MEMORY) */
184 ERROR_INVALID_ADDRESS, /* c0000018 (STATUS_CONFLICTING_ADDRESSES) */
185 ERROR_INVALID_ADDRESS, /* c0000019 (STATUS_NOT_MAPPED_VIEW) */
186 ERROR_INVALID_PARAMETER, /* c000001a (STATUS_UNABLE_TO_FREE_VM) */
187 ERROR_INVALID_PARAMETER, /* c000001b (STATUS_UNABLE_TO_DELETE_SECTION) */
188 ERROR_INVALID_FUNCTION, /* c000001c (STATUS_INVALID_SYSTEM_SERVICE) */
189 0, /* c000001d (STATUS_ILLEGAL_INSTRUCTION) */
190 ERROR_ACCESS_DENIED, /* c000001e (STATUS_INVALID_LOCK_SEQUENCE) */
191 ERROR_ACCESS_DENIED, /* c000001f (STATUS_INVALID_VIEW_SIZE) */
192 ERROR_BAD_EXE_FORMAT, /* c0000020 (STATUS_INVALID_FILE_FOR_SECTION) */
193 ERROR_ACCESS_DENIED, /* c0000021 (STATUS_ALREADY_COMMITTED) */
194 ERROR_ACCESS_DENIED, /* c0000022 (STATUS_ACCESS_DENIED) */
195 ERROR_INSUFFICIENT_BUFFER, /* c0000023 (STATUS_BUFFER_TOO_SMALL) */
196 ERROR_INVALID_HANDLE, /* c0000024 (STATUS_OBJECT_TYPE_MISMATCH) */
197 0, /* c0000025 (STATUS_NONCONTINUABLE_EXCEPTION) */
198 0, /* c0000026 (STATUS_INVALID_DISPOSITION) */
199 ERROR_MR_MID_NOT_FOUND, /* c0000027 (STATUS_UNWIND) */
200 ERROR_MR_MID_NOT_FOUND, /* c0000028 (STATUS_BAD_STACK) */
201 ERROR_MR_MID_NOT_FOUND, /* c0000029 (STATUS_INVALID_UNWIND_TARGET) */
202 ERROR_NOT_LOCKED, /* c000002a (STATUS_NOT_LOCKED) */
203 0, /* c000002b (STATUS_PARITY_ERROR) */
204 ERROR_INVALID_ADDRESS, /* c000002c (STATUS_UNABLE_TO_DECOMMIT_VM) */
205 ERROR_INVALID_ADDRESS, /* c000002d (STATUS_NOT_COMMITTED) */
206 ERROR_MR_MID_NOT_FOUND, /* c000002e (STATUS_INVALID_PORT_ATTRIBUTES) */
207 ERROR_MR_MID_NOT_FOUND, /* c000002f (STATUS_PORT_MESSAGE_TOO_LONG) */
208 ERROR_INVALID_PARAMETER, /* c0000030 (STATUS_INVALID_PARAMETER_MIX) */
209 ERROR_MR_MID_NOT_FOUND, /* c0000031 (STATUS_INVALID_QUOTA_LOWER) */
210 ERROR_DISK_CORRUPT, /* c0000032 (STATUS_DISK_CORRUPT_ERROR) */
211 ERROR_INVALID_NAME, /* c0000033 (STATUS_OBJECT_NAME_INVALID) */
212 ERROR_FILE_NOT_FOUND, /* c0000034 (STATUS_OBJECT_NAME_NOT_FOUND) */
213 ERROR_ALREADY_EXISTS, /* c0000035 (STATUS_OBJECT_NAME_COLLISION) */
214 ERROR_MR_MID_NOT_FOUND, /* c0000036 */
215 ERROR_INVALID_HANDLE, /* c0000037 (STATUS_PORT_DISCONNECTED) */
216 ERROR_MR_MID_NOT_FOUND, /* c0000038 (STATUS_DEVICE_ALREADY_ATTACHED) */
217 ERROR_BAD_PATHNAME, /* c0000039 (STATUS_OBJECT_PATH_INVALID) */
218 ERROR_PATH_NOT_FOUND, /* c000003a (STATUS_OBJECT_PATH_NOT_FOUND) */
219 ERROR_BAD_PATHNAME, /* c000003b (STATUS_PATH_SYNTAX_BAD) */
220 ERROR_IO_DEVICE, /* c000003c (STATUS_DATA_OVERRUN) */
221 ERROR_IO_DEVICE, /* c000003d (STATUS_DATA_LATE_ERROR) */
222 ERROR_CRC, /* c000003e (STATUS_DATA_ERROR) */
223 ERROR_CRC, /* c000003f (STATUS_CRC_ERROR) */
224 ERROR_NOT_ENOUGH_MEMORY, /* c0000040 (STATUS_SECTION_TOO_BIG) */
225 ERROR_ACCESS_DENIED, /* c0000041 (STATUS_PORT_CONNECTION_REFUSED) */
226 ERROR_INVALID_HANDLE, /* c0000042 (STATUS_INVALID_PORT_HANDLE) */
227 ERROR_SHARING_VIOLATION, /* c0000043 (STATUS_SHARING_VIOLATION) */
228 ERROR_NOT_ENOUGH_QUOTA, /* c0000044 (STATUS_QUOTA_EXCEEDED) */
229 ERROR_INVALID_PARAMETER, /* c0000045 (STATUS_INVALID_PAGE_PROTECTION) */
230 ERROR_NOT_OWNER, /* c0000046 (STATUS_MUTANT_NOT_OWNED) */
231 ERROR_TOO_MANY_POSTS, /* c0000047 (STATUS_SEMAPHORE_LIMIT_EXCEEDED) */
232 ERROR_INVALID_PARAMETER, /* c0000048 (STATUS_PORT_ALREADY_SET) */
233 ERROR_INVALID_PARAMETER, /* c0000049 (STATUS_SECTION_NOT_IMAGE) */
234 ERROR_SIGNAL_REFUSED, /* c000004a (STATUS_SUSPEND_COUNT_EXCEEDED) */
235 ERROR_ACCESS_DENIED, /* c000004b (STATUS_THREAD_IS_TERMINATING) */
236 ERROR_INVALID_PARAMETER, /* c000004c (STATUS_BAD_WORKING_SET_LIMIT) */
237 ERROR_INVALID_PARAMETER, /* c000004d (STATUS_INCOMPATIBLE_FILE_MAP) */
238 ERROR_INVALID_PARAMETER, /* c000004e (STATUS_SECTION_PROTECTION) */
239 ERROR_MR_MID_NOT_FOUND, /* c000004f (STATUS_EAS_NOT_SUPPORTED) */
240 ERROR_EA_LIST_INCONSISTENT, /* c0000050 (STATUS_EA_TOO_LARGE) */
241 ERROR_FILE_CORRUPT, /* c0000051 (STATUS_NONEXISTENT_EA_ENTRY) */
242 ERROR_FILE_CORRUPT, /* c0000052 (STATUS_NO_EAS_ON_FILE) */
243 ERROR_FILE_CORRUPT, /* c0000053 (STATUS_EA_CORRUPT_ERROR) */
244 ERROR_LOCK_VIOLATION, /* c0000054 (STATUS_FILE_LOCK_CONFLICT) */
245 ERROR_LOCK_VIOLATION, /* c0000055 (STATUS_LOCK_NOT_GRANTED) */
246 ERROR_ACCESS_DENIED, /* c0000056 (STATUS_DELETE_PENDING) */
247 ERROR_NOT_SUPPORTED, /* c0000057 (STATUS_CTL_FILE_NOT_SUPPORTED) */
248 ERROR_UNKNOWN_REVISION, /* c0000058 (STATUS_UNKNOWN_REVISION) */
249 ERROR_REVISION_MISMATCH, /* c0000059 (STATUS_REVISION_MISMATCH) */
250 ERROR_INVALID_OWNER, /* c000005a (STATUS_INVALID_OWNER) */
251 ERROR_INVALID_PRIMARY_GROUP, /* c000005b (STATUS_INVALID_PRIMARY_GROUP) */
252 ERROR_NO_IMPERSONATION_TOKEN, /* c000005c (STATUS_NO_IMPERSONATION_TOKEN) */
253 ERROR_CANT_DISABLE_MANDATORY, /* c000005d (STATUS_CANT_DISABLE_MANDATORY) */
254 ERROR_NO_LOGON_SERVERS, /* c000005e (STATUS_NO_LOGON_SERVERS) */
255 ERROR_NO_SUCH_LOGON_SESSION, /* c000005f (STATUS_NO_SUCH_LOGON_SESSION) */
256 ERROR_NO_SUCH_PRIVILEGE, /* c0000060 (STATUS_NO_SUCH_PRIVILEGE) */
257 ERROR_PRIVILEGE_NOT_HELD, /* c0000061 (STATUS_PRIVILEGE_NOT_HELD) */
258 ERROR_INVALID_ACCOUNT_NAME, /* c0000062 (STATUS_INVALID_ACCOUNT_NAME) */
259 ERROR_USER_EXISTS, /* c0000063 (STATUS_USER_EXISTS) */
260 ERROR_NO_SUCH_USER, /* c0000064 (STATUS_NO_SUCH_USER) */
261 ERROR_GROUP_EXISTS, /* c0000065 (STATUS_GROUP_EXISTS) */
262 ERROR_NO_SUCH_GROUP, /* c0000066 (STATUS_NO_SUCH_GROUP) */
263 ERROR_MEMBER_IN_GROUP, /* c0000067 (STATUS_MEMBER_IN_GROUP) */
264 ERROR_MEMBER_NOT_IN_GROUP, /* c0000068 (STATUS_MEMBER_NOT_IN_GROUP) */
265 ERROR_LAST_ADMIN, /* c0000069 (STATUS_LAST_ADMIN) */
266 ERROR_INVALID_PASSWORD, /* c000006a (STATUS_WRONG_PASSWORD) */
267 ERROR_ILL_FORMED_PASSWORD, /* c000006b (STATUS_ILL_FORMED_PASSWORD) */
268 ERROR_PASSWORD_RESTRICTION, /* c000006c (STATUS_PASSWORD_RESTRICTION) */
269 ERROR_LOGON_FAILURE, /* c000006d (STATUS_LOGON_FAILURE) */
270 ERROR_ACCOUNT_RESTRICTION, /* c000006e (STATUS_ACCOUNT_RESTRICTION) */
271 ERROR_INVALID_LOGON_HOURS, /* c000006f (STATUS_INVALID_LOGON_HOURS) */
272 ERROR_INVALID_WORKSTATION, /* c0000070 (STATUS_INVALID_WORKSTATION) */
273 ERROR_PASSWORD_EXPIRED, /* c0000071 (STATUS_PASSWORD_EXPIRED) */
274 ERROR_ACCOUNT_DISABLED, /* c0000072 (STATUS_ACCOUNT_DISABLED) */
275 ERROR_NONE_MAPPED, /* c0000073 (STATUS_NONE_MAPPED) */
276 ERROR_TOO_MANY_LUIDS_REQUESTED, /* c0000074 (STATUS_TOO_MANY_LUIDS_REQUESTED) */
277 ERROR_LUIDS_EXHAUSTED, /* c0000075 (STATUS_LUIDS_EXHAUSTED) */
278 ERROR_INVALID_SUB_AUTHORITY, /* c0000076 (STATUS_INVALID_SUB_AUTHORITY) */
279 ERROR_INVALID_ACL, /* c0000077 (STATUS_INVALID_ACL) */
280 ERROR_INVALID_SID, /* c0000078 (STATUS_INVALID_SID) */
281 ERROR_INVALID_SECURITY_DESCR, /* c0000079 (STATUS_INVALID_SECURITY_DESCR) */
282 ERROR_PROC_NOT_FOUND, /* c000007a (STATUS_PROCEDURE_NOT_FOUND) */
283 ERROR_BAD_EXE_FORMAT, /* c000007b (STATUS_INVALID_IMAGE_FORMAT) */
284 ERROR_NO_TOKEN, /* c000007c (STATUS_NO_TOKEN) */
285 ERROR_BAD_INHERITANCE_ACL, /* c000007d (STATUS_BAD_INHERITANCE_ACL) */
286 ERROR_NOT_LOCKED, /* c000007e (STATUS_RANGE_NOT_LOCKED) */
287 ERROR_DISK_FULL, /* c000007f (STATUS_DISK_FULL) */
288 ERROR_SERVER_DISABLED, /* c0000080 (STATUS_SERVER_DISABLED) */
289 ERROR_SERVER_NOT_DISABLED, /* c0000081 (STATUS_SERVER_NOT_DISABLED) */
290 ERROR_TOO_MANY_NAMES, /* c0000082 (STATUS_TOO_MANY_GUIDS_REQUESTED) */
291 ERROR_NO_MORE_ITEMS, /* c0000083 (STATUS_GUIDS_EXHAUSTED) */
292 ERROR_INVALID_ID_AUTHORITY, /* c0000084 (STATUS_INVALID_ID_AUTHORITY) */
293 ERROR_NO_MORE_ITEMS, /* c0000085 (STATUS_AGENTS_EXHAUSTED) */
294 ERROR_LABEL_TOO_LONG, /* c0000086 (STATUS_INVALID_VOLUME_LABEL) */
295 ERROR_OUTOFMEMORY, /* c0000087 (STATUS_SECTION_NOT_EXTENDED) */
296 ERROR_INVALID_ADDRESS, /* c0000088 (STATUS_NOT_MAPPED_DATA) */
297 ERROR_RESOURCE_DATA_NOT_FOUND, /* c0000089 (STATUS_RESOURCE_DATA_NOT_FOUND) */
298 ERROR_RESOURCE_TYPE_NOT_FOUND, /* c000008a (STATUS_RESOURCE_TYPE_NOT_FOUND) */
299 ERROR_RESOURCE_NAME_NOT_FOUND, /* c000008b (STATUS_RESOURCE_NAME_NOT_FOUND) */
300 0, /* c000008c (STATUS_ARRAY_BOUNDS_EXCEEDED) */
301 0, /* c000008d (STATUS_FLOAT_DENORMAL_OPERAND) */
302 0, /* c000008e (STATUS_FLOAT_DIVIDE_BY_ZERO) */
303 0, /* c000008f (STATUS_FLOAT_INEXACT_RESULT) */
304 0, /* c0000090 (STATUS_FLOAT_INVALID_OPERATION) */
305 0, /* c0000091 (STATUS_FLOAT_OVERFLOW) */
306 0, /* c0000092 (STATUS_FLOAT_STACK_CHECK) */
307 0, /* c0000093 (STATUS_FLOAT_UNDERFLOW) */
308 0, /* c0000094 (STATUS_INTEGER_DIVIDE_BY_ZERO) */
309 ERROR_ARITHMETIC_OVERFLOW, /* c0000095 (STATUS_INTEGER_OVERFLOW) */
310 0, /* c0000096 (STATUS_PRIVILEGED_INSTRUCTION) */
311 ERROR_NOT_ENOUGH_MEMORY, /* c0000097 (STATUS_TOO_MANY_PAGING_FILES) */
312 ERROR_FILE_INVALID, /* c0000098 (STATUS_FILE_INVALID) */
313 ERROR_ALLOTTED_SPACE_EXCEEDED, /* c0000099 (STATUS_ALLOTTED_SPACE_EXCEEDED) */
314 ERROR_NO_SYSTEM_RESOURCES, /* c000009a (STATUS_INSUFFICIENT_RESOURCES) */
315 ERROR_PATH_NOT_FOUND, /* c000009b (STATUS_DFS_EXIT_PATH_FOUND) */
316 ERROR_CRC, /* c000009c (STATUS_DEVICE_DATA_ERROR) */
317 ERROR_NOT_READY, /* c000009d (STATUS_DEVICE_NOT_CONNECTED) */
318 ERROR_NOT_READY, /* c000009e (STATUS_DEVICE_POWER_FAILURE) */
319 ERROR_INVALID_ADDRESS, /* c000009f (STATUS_FREE_VM_NOT_AT_BASE) */
320 ERROR_INVALID_ADDRESS, /* c00000a0 (STATUS_MEMORY_NOT_ALLOCATED) */
321 ERROR_WORKING_SET_QUOTA, /* c00000a1 (STATUS_WORKING_SET_QUOTA) */
322 ERROR_WRITE_PROTECT, /* c00000a2 (STATUS_MEDIA_WRITE_PROTECTED) */
323 ERROR_NOT_READY, /* c00000a3 (STATUS_DEVICE_NOT_READY) */
324 ERROR_INVALID_GROUP_ATTRIBUTES, /* c00000a4 (STATUS_INVALID_GROUP_ATTRIBUTES) */
325 ERROR_BAD_IMPERSONATION_LEVEL, /* c00000a5 (STATUS_BAD_IMPERSONATION_LEVEL) */
326 ERROR_CANT_OPEN_ANONYMOUS, /* c00000a6 (STATUS_CANT_OPEN_ANONYMOUS) */
327 ERROR_BAD_VALIDATION_CLASS, /* c00000a7 (STATUS_BAD_VALIDATION_CLASS) */
328 ERROR_BAD_TOKEN_TYPE, /* c00000a8 (STATUS_BAD_TOKEN_TYPE)*/
329 ERROR_MR_MID_NOT_FOUND, /* c00000a9 (STATUS_BAD_MASTER_BOOT_RECORD) */
330 ERROR_MR_MID_NOT_FOUND, /* c00000aa (STATUS_INSTRUCTION_MISALIGNMENT) */
331 ERROR_PIPE_BUSY, /* c00000ab (STATUS_INSTANCE_NOT_AVAILABLE) */
332 ERROR_PIPE_BUSY, /* c00000ac (STATUS_PIPE_NOT_AVAILABLE) */
333 ERROR_BAD_PIPE, /* c00000ad (STATUS_INVALID_PIPE_STATE) */
334 ERROR_PIPE_BUSY, /* c00000ae (STATUS_PIPE_BUSY) */
335 ERROR_INVALID_FUNCTION, /* c00000af (STATUS_ILLEGAL_FUNCTION) */
336 ERROR_PIPE_NOT_CONNECTED, /* c00000b0 (STATUS_PIPE_DISCONNECTED) */
337 ERROR_NO_DATA, /* c00000b1 (STATUS_PIPE_CLOSING) */
338 ERROR_PIPE_CONNECTED, /* c00000b2 (STATUS_PIPE_CONNECTED) */
339 ERROR_PIPE_LISTENING, /* c00000b3 (STATUS_PIPE_LISTENING) */
340 ERROR_BAD_PIPE, /* c00000b4 (STATUS_INVALID_READ_MODE) */
341 ERROR_SEM_TIMEOUT, /* c00000b5 (STATUS_IO_TIMEOUT) */
342 ERROR_HANDLE_EOF, /* c00000b6 (STATUS_FILE_FORCED_CLOSED) */
343 ERROR_MR_MID_NOT_FOUND, /* c00000b7 (STATUS_PROFILING_NOT_STARTED) */
344 ERROR_MR_MID_NOT_FOUND, /* c00000b8 (STATUS_PROFILING_NOT_STOPPED) */
345 ERROR_MR_MID_NOT_FOUND, /* c00000b9 (STATUS_COULD_NOT_INTERPRET) */
346 ERROR_ACCESS_DENIED, /* c00000ba (STATUS_FILE_IS_A_DIRECTORY) */
347 ERROR_NOT_SUPPORTED, /* c00000bb (STATUS_NOT_SUPPORTED) */
348 ERROR_REM_NOT_LIST, /* c00000bc (STATUS_REMOTE_NOT_LISTENING) */
349 ERROR_DUP_NAME, /* c00000bd (STATUS_DUPLICATE_NAME) */
350 ERROR_BAD_NETPATH, /* c00000be (STATUS_BAD_NETWORK_PATH) */
351 ERROR_NETWORK_BUSY, /* c00000bf (STATUS_NETWORK_BUSY) */
352 ERROR_DEV_NOT_EXIST, /* c00000c0 (STATUS_DEVICE_DOES_NOT_EXIST) */
353 ERROR_TOO_MANY_CMDS, /* c00000c1 (STATUS_TOO_MANY_COMMANDS) */
354 ERROR_ADAP_HDW_ERR, /* c00000c2 (STATUS_ADAPTER_HARDWARE_ERROR) */
355 ERROR_BAD_NET_RESP, /* c00000c3 (STATUS_INVALID_NETWORK_RESPONSE) */
356 ERROR_UNEXP_NET_ERR, /* c00000c4 (STATUS_UNEXPECTED_NETWORK_ERROR) */
357 ERROR_BAD_REM_ADAP, /* c00000c5 (STATUS_BAD_REMOTE_ADAPTER) */
358 ERROR_PRINTQ_FULL, /* c00000c6 (STATUS_PRINT_QUEUE_FULL) */
359 ERROR_NO_SPOOL_SPACE, /* c00000c7 (STATUS_NO_SPOOL_SPACE) */
360 ERROR_PRINT_CANCELLED, /* c00000c8 (STATUS_PRINT_CANCELLED) */
361 ERROR_NETNAME_DELETED, /* c00000c9 (STATUS_NETWORK_NAME_DELETED) */
362 ERROR_NETWORK_ACCESS_DENIED, /* c00000ca (STATUS_NETWORK_ACCESS_DENIED) */
363 ERROR_BAD_DEV_TYPE, /* c00000cb (STATUS_BAD_DEVICE_TYPE) */
364 ERROR_BAD_NET_NAME, /* c00000cc (STATUS_BAD_NETWORK_NAME) */
365 ERROR_TOO_MANY_NAMES, /* c00000cd (STATUS_TOO_MANY_NAMES) */
366 ERROR_TOO_MANY_SESS, /* c00000ce (STATUS_TOO_MANY_SESSIONS) */
367 ERROR_SHARING_PAUSED, /* c00000cf (STATUS_SHARING_PAUSED) */
368 ERROR_REQ_NOT_ACCEP, /* c00000d0 (STATUS_REQUEST_NOT_ACCEPTED) */
369 ERROR_REDIR_PAUSED, /* c00000d1 (STATUS_REDIRECTOR_PAUSED) */
370 ERROR_NET_WRITE_FAULT, /* c00000d2 (STATUS_NET_WRITE_FAULT) */
371 ERROR_MR_MID_NOT_FOUND, /* c00000d3 (STATUS_PROFILING_AT_LIMIT) */
372 ERROR_NOT_SAME_DEVICE, /* c00000d4 (STATUS_NOT_SAME_DEVICE) */
373 ERROR_MR_MID_NOT_FOUND, /* c00000d5 (STATUS_FILE_RENAMED) */
374 ERROR_VC_DISCONNECTED, /* c00000d6 (STATUS_VIRTUAL_CIRCUIT_CLOSED) */
375 ERROR_NO_SECURITY_ON_OBJECT, /* c00000d7 (STATUS_NO_SECURITY_ON_OBJECT) */
376 ERROR_MR_MID_NOT_FOUND, /* c00000d8 (STATUS_CANT_WAIT) */
377 ERROR_NO_DATA, /* c00000d9 (STATUS_PIPE_EMPTY) */
378 ERROR_CANT_ACCESS_DOMAIN_INFO, /* c00000da (STATUS_CANT_ACCESS_DOMAIN_INFO) */
379 ERROR_MR_MID_NOT_FOUND, /* c00000db (STATUS_CANT_TERMINATE_SELF) */
380 ERROR_INVALID_SERVER_STATE, /* c00000dc (STATUS_INVALID_SERVER_STATE) */
381 ERROR_INVALID_DOMAIN_STATE, /* c00000dd (STATUS_INVALID_DOMAIN_STATE) */
382 ERROR_INVALID_DOMAIN_ROLE, /* c00000de (STATUS_INVALID_DOMAIN_ROLE) */
383 ERROR_NO_SUCH_DOMAIN, /* c00000df (STATUS_NO_SUCH_DOMAIN) */
384 ERROR_DOMAIN_EXISTS, /* c00000e0 (STATUS_DOMAIN_EXISTS) */
385 ERROR_DOMAIN_LIMIT_EXCEEDED, /* c00000e1 (STATUS_DOMAIN_LIMIT_EXCEEDED) */
386 ERROR_MR_MID_NOT_FOUND, /* c00000e2 (STATUS_OPLOCK_NOT_GRANTED) */
387 ERROR_MR_MID_NOT_FOUND, /* c00000e3 (STATUS_INVALID_OPLOCK_PROTOCOL) */
388 ERROR_INTERNAL_DB_CORRUPTION, /* c00000e4 (STATUS_INTERNAL_DB_CORRUPTION) */
389 ERROR_INTERNAL_ERROR, /* c00000e5 (STATUS_INTERNAL_ERROR) */
390 ERROR_GENERIC_NOT_MAPPED, /* c00000e6 (STATUS_GENERIC_NOT_MAPPED) */
391 ERROR_BAD_DESCRIPTOR_FORMAT, /* c00000e7 (STATUS_BAD_DESCRIPTOR_FORMAT) */
392 ERROR_INVALID_USER_BUFFER, /* c00000e8 (STATUS_INVALID_USER_BUFFER) */
393 ERROR_MR_MID_NOT_FOUND, /* c00000e9 (STATUS_UNEXPECTED_IO_ERROR) */
394 ERROR_MR_MID_NOT_FOUND, /* c00000ea (STATUS_UNEXPECTED_MM_CREATE_ERR) */
395 ERROR_MR_MID_NOT_FOUND, /* c00000eb (STATUS_UNEXPECTED_MM_MAP_ERROR) */
396 ERROR_MR_MID_NOT_FOUND, /* c00000ec (STATUS_UNEXPECTED_MM_EXTEND_ERR) */
397 ERROR_NOT_LOGON_PROCESS, /* c00000ed (STATUS_NOT_LOGON_PROCESS) */
398 ERROR_LOGON_SESSION_EXISTS, /* c00000ee (STATUS_LOGON_SESSION_EXISTS) */
399 ERROR_INVALID_PARAMETER, /* c00000ef (STATUS_INVALID_PARAMETER_1) */
400 ERROR_INVALID_PARAMETER, /* c00000f0 (STATUS_INVALID_PARAMETER_2) */
401 ERROR_INVALID_PARAMETER, /* c00000f1 (STATUS_INVALID_PARAMETER_3) */
402 ERROR_INVALID_PARAMETER, /* c00000f2 (STATUS_INVALID_PARAMETER_4) */
403 ERROR_INVALID_PARAMETER, /* c00000f3 (STATUS_INVALID_PARAMETER_5) */
404 ERROR_INVALID_PARAMETER, /* c00000f4 (STATUS_INVALID_PARAMETER_6) */
405 ERROR_INVALID_PARAMETER, /* c00000f5 (STATUS_INVALID_PARAMETER_7) */
406 ERROR_INVALID_PARAMETER, /* c00000f6 (STATUS_INVALID_PARAMETER_8) */
407 ERROR_INVALID_PARAMETER, /* c00000f7 (STATUS_INVALID_PARAMETER_9) */
408 ERROR_INVALID_PARAMETER, /* c00000f8 (STATUS_INVALID_PARAMETER_10) */
409 ERROR_INVALID_PARAMETER, /* c00000f9 (STATUS_INVALID_PARAMETER_11) */
410 ERROR_INVALID_PARAMETER, /* c00000fa (STATUS_INVALID_PARAMETER_12) */
411 ERROR_PATH_NOT_FOUND, /* c00000fb (STATUS_REDIRECTOR_NOT_STARTED) */
412 ERROR_MR_MID_NOT_FOUND, /* c00000fc (STATUS_REDIRECTOR_STARTED) */
413 ERROR_STACK_OVERFLOW, /* c00000fd (STATUS_STACK_OVERFLOW) */
414 ERROR_NO_SUCH_PACKAGE, /* c00000fe (STATUS_NO_SUCH_PACKAGE) */
415 ERROR_MR_MID_NOT_FOUND, /* c00000ff (STATUS_BAD_FUNCTION_TABLE) */
416 ERROR_ENVVAR_NOT_FOUND, /* c0000100 (STATUS_VARIABLE_NOT_FOUND) */
417 ERROR_DIR_NOT_EMPTY, /* c0000101 (STATUS_DIRECTORY_NOT_EMPTY) */
418 ERROR_FILE_CORRUPT, /* c0000102 (STATUS_FILE_CORRUPT_ERROR) */
419 ERROR_DIRECTORY, /* c0000103 (STATUS_NOT_A_DIRECTORY) */
420 ERROR_BAD_LOGON_SESSION_STATE, /* c0000104 (STATUS_BAD_LOGON_SESSION_STATE) */
421 ERROR_LOGON_SESSION_COLLISION, /* c0000105 (STATUS_LOGON_SESSION_COLLISION) */
422 ERROR_FILENAME_EXCED_RANGE, /* c0000106 (STATUS_NAME_TOO_LONG) */
423 ERROR_MR_MID_NOT_FOUND, /* c0000107 (STATUS_FILES_OPEN) */
424 ERROR_DEVICE_IN_USE, /* c0000108 (STATUS_CONNECTION_IN_USE) */
425 ERROR_MR_MID_NOT_FOUND, /* c0000109 (STATUS_MESSAGE_NOT_FOUND) */
426 ERROR_ACCESS_DENIED, /* c000010a (STATUS_PROCESS_IS_TERMINATING) */
427 ERROR_INVALID_LOGON_TYPE, /* c000010b (STATUS_INVALID_LOGON_TYPE) */
428 ERROR_MR_MID_NOT_FOUND, /* c000010c (STATUS_NO_GUID_TRANSLATION) */
429 ERROR_CANNOT_IMPERSONATE, /* c000010d (STATUS_CANNOT_IMPERSONATE) */
430 ERROR_SERVICE_ALREADY_RUNNING, /* c000010e (STATUS_IMAGE_ALREADY_LOADED) */
431 ERROR_MR_MID_NOT_FOUND, /* c000010f (STATUS_ABIOS_NOT_PRESENT) */
432 ERROR_MR_MID_NOT_FOUND, /* c0000110 (STATUS_ABIOS_LID_NOT_EXIST) */
433 ERROR_MR_MID_NOT_FOUND, /* c0000111 (STATUS_ABIOS_LID_ALREADY_OWNED) */
434 ERROR_MR_MID_NOT_FOUND, /* c0000112 (STATUS_ABIOS_NOT_LID_OWNER) */
435 ERROR_MR_MID_NOT_FOUND, /* c0000113 (STATUS_ABIOS_INVALID_COMMAND) */
436 ERROR_MR_MID_NOT_FOUND, /* c0000114 (STATUS_ABIOS_INVALID_LID) */
437 ERROR_MR_MID_NOT_FOUND, /* c0000115 (STATUS_ABIOS_SELECTOR_NOT_AVAILABLE) */
438 ERROR_MR_MID_NOT_FOUND, /* c0000116 (STATUS_ABIOS_INVALID_SELECTOR) */
439 ERROR_MR_MID_NOT_FOUND, /* c0000117 (STATUS_NO_LDT) */
440 ERROR_MR_MID_NOT_FOUND, /* c0000118 (STATUS_INVALID_LDT_SIZE) */
441 ERROR_MR_MID_NOT_FOUND, /* c0000119 (STATUS_INVALID_LDT_OFFSET) */
442 ERROR_MR_MID_NOT_FOUND, /* c000011a (STATUS_INVALID_LDT_DESCRIPTOR) */
443 ERROR_BAD_EXE_FORMAT, /* c000011b (STATUS_INVALID_IMAGE_NE_FORMAT) */
444 ERROR_RXACT_INVALID_STATE, /* c000011c (STATUS_RXACT_INVALID_STATE) */
445 ERROR_RXACT_COMMIT_FAILURE, /* c000011d (STATUS_RXACT_COMMIT_FAILURE) */
446 ERROR_FILE_INVALID, /* c000011e (STATUS_MAPPED_FILE_SIZE_ZERO) */
447 ERROR_TOO_MANY_OPEN_FILES, /* c000011f (STATUS_TOO_MANY_OPENED_FILES) */
448 ERROR_OPERATION_ABORTED, /* c0000120 (STATUS_CANCELLED) */
449 ERROR_ACCESS_DENIED, /* c0000121 (STATUS_CANNOT_DELETE) */
450 ERROR_INVALID_COMPUTERNAME, /* c0000122 (STATUS_INVALID_COMPUTER_NAME) */
451 ERROR_ACCESS_DENIED, /* c0000123 (STATUS_FILE_DELETED) */
452 ERROR_SPECIAL_ACCOUNT, /* c0000124 (STATUS_SPECIAL_ACCOUNT) */
453 ERROR_SPECIAL_GROUP, /* c0000125 (STATUS_SPECIAL_GROUP) */
454 ERROR_SPECIAL_USER, /* c0000126 (STATUS_SPECIAL_USER) */
455 ERROR_MEMBERS_PRIMARY_GROUP, /* c0000127 (STATUS_MEMBERS_PRIMARY_GROUP) */
456 ERROR_INVALID_HANDLE, /* c0000128 (STATUS_FILE_CLOSED) */
457 ERROR_MR_MID_NOT_FOUND, /* c0000129 (STATUS_TOO_MANY_THREADS) */
458 ERROR_MR_MID_NOT_FOUND, /* c000012a (STATUS_THREAD_NOT_IN_PROCESS) */
459 ERROR_TOKEN_ALREADY_IN_USE, /* c000012b (STATUS_TOKEN_ALREADY_IN_USE) */
460 ERROR_MR_MID_NOT_FOUND, /* c000012c (STATUS_PAGEFILE_QUOTA_EXCEEDED) */
461 ERROR_COMMITMENT_LIMIT, /* c000012d (STATUS_COMMITMENT_LIMIT) */
462 ERROR_BAD_EXE_FORMAT, /* c000012e (STATUS_INVALID_IMAGE_LE_FORMAT) */
463 ERROR_BAD_EXE_FORMAT, /* c000012f (STATUS_INVALID_IMAGE_NOT_MZ) */
464 ERROR_BAD_EXE_FORMAT, /* c0000130 (STATUS_INVALID_IMAGE_PROTECT) */
465 ERROR_BAD_EXE_FORMAT, /* c0000131 (STATUS_INVALID_IMAGE_WIN_16) */
466 ERROR_MR_MID_NOT_FOUND, /* c0000132 (STATUS_LOGON_SERVER_CONFLICT) */
467 ERROR_MR_MID_NOT_FOUND, /* c0000133 (STATUS_TIME_DIFFERENCE_AT_DC) */
468 ERROR_MR_MID_NOT_FOUND, /* c0000134 (STATUS_SYNCHRONIZATION_REQUIRED) */
469 ERROR_MOD_NOT_FOUND, /* c0000135 (STATUS_DLL_NOT_FOUND) */
470 ERROR_MR_MID_NOT_FOUND, /* c0000136 (STATUS_OPEN_FAILED) */
471 ERROR_MR_MID_NOT_FOUND, /* c0000137 (STATUS_IO_PRIVILEGE_FAILED) */
472 ERROR_INVALID_ORDINAL, /* c0000138 (STATUS_ORDINAL_NOT_FOUND) */
473 ERROR_PROC_NOT_FOUND, /* c0000139 (STATUS_ENTRYPOINT_NOT_FOUND) */
474 ERROR_MR_MID_NOT_FOUND, /* c000013a (STATUS_CONTROL_C_EXIT) */
475 ERROR_NETNAME_DELETED, /* c000013b (STATUS_LOCAL_DISCONNECT) */
476 ERROR_NETNAME_DELETED, /* c000013c (STATUS_REMOTE_DISCONNECT) */
477 ERROR_REM_NOT_LIST, /* c000013d (STATUS_REMOTE_RESOURCES) */
478 ERROR_UNEXP_NET_ERR, /* c000013e (STATUS_LINK_FAILED) */
479 ERROR_UNEXP_NET_ERR, /* c000013f (STATUS_LINK_TIMEOUT) */
480 ERROR_UNEXP_NET_ERR, /* c0000140 (STATUS_INVALID_CONNECTION) */
481 ERROR_UNEXP_NET_ERR, /* c0000141 (STATUS_INVALID_ADDRESS) */
482 ERROR_DLL_INIT_FAILED, /* c0000142 (STATUS_DLL_INIT_FAILED) */
483 ERROR_MR_MID_NOT_FOUND, /* c0000143 (STATUS_MISSING_SYSTEMFILE) */
484 ERROR_MR_MID_NOT_FOUND, /* c0000144 (STATUS_UNHANDLED_EXCEPTION) */
485 ERROR_MR_MID_NOT_FOUND, /* c0000145 (STATUS_APP_INIT_FAILURE) */
486 ERROR_MR_MID_NOT_FOUND, /* c0000146 (STATUS_PAGEFILE_CREATE_FAILED) */
487 ERROR_MR_MID_NOT_FOUND, /* c0000147 (STATUS_NO_PAGEFILE) */
488 ERROR_INVALID_LEVEL, /* c0000148 (STATUS_INVALID_LEVEL) */
489 ERROR_INVALID_PASSWORD, /* c0000149 (STATUS_WRONG_PASSWORD_CORE) */
490 ERROR_MR_MID_NOT_FOUND, /* c000014a (STATUS_ILLEGAL_FLOAT_CONTEXT) */
491 ERROR_BROKEN_PIPE, /* c000014b (STATUS_PIPE_BROKEN) */
492 ERROR_BADDB, /* c000014c (STATUS_REGISTRY_CORRUPT) */
493 ERROR_REGISTRY_IO_FAILED, /* c000014d (STATUS_REGISTRY_IO_FAILED) */
494 ERROR_MR_MID_NOT_FOUND, /* c000014e (STATUS_NO_EVENT_PAIR) */
495 ERROR_UNRECOGNIZED_VOLUME, /* c000014f (STATUS_UNRECOGNIZED_VOLUME) */
496 ERROR_SERIAL_NO_DEVICE, /* c0000150 (STATUS_SERIAL_NO_DEVICE_INITED) */
497 ERROR_NO_SUCH_ALIAS, /* c0000151 (STATUS_NO_SUCH_ALIAS) */
498 ERROR_MEMBER_NOT_IN_ALIAS, /* c0000152 (STATUS_MEMBER_NOT_IN_ALIAS) */
499 ERROR_MEMBER_IN_ALIAS, /* c0000153 (STATUS_MEMBER_IN_ALIAS) */
500 ERROR_ALIAS_EXISTS, /* c0000154 (STATUS_ALIAS_EXISTS) */
501 ERROR_LOGON_NOT_GRANTED, /* c0000155 (STATUS_LOGON_NOT_GRANTED) */
502 ERROR_TOO_MANY_SECRETS, /* c0000156 (STATUS_TOO_MANY_SECRETS) */
503 ERROR_SECRET_TOO_LONG, /* c0000157 (STATUS_SECRET_TOO_LONG) */
504 ERROR_INTERNAL_DB_ERROR, /* c0000158 (STATUS_INTERNAL_DB_ERROR) */
505 ERROR_FULLSCREEN_MODE, /* c0000159 (STATUS_FULLSCREEN_MODE) */
506 ERROR_TOO_MANY_CONTEXT_IDS, /* c000015a (STATUS_TOO_MANY_CONTEXT_IDS) */
507 ERROR_LOGON_TYPE_NOT_GRANTED, /* c000015b (STATUS_LOGON_TYPE_NOT_GRANTED) */
508 ERROR_NOT_REGISTRY_FILE, /* c000015c (STATUS_NOT_REGISTRY_FILE) */
509 ERROR_NT_CROSS_ENCRYPTION_REQUIRED, /* c000015d (STATUS_NT_CROSS_ENCRYPTION_REQUIRED) */
510 ERROR_MR_MID_NOT_FOUND, /* c000015e (STATUS_DOMAIN_CTRLR_CONFIG_ERROR) */
511 ERROR_IO_DEVICE, /* c000015f (STATUS_FT_MISSING_MEMBER) */
512 ERROR_MR_MID_NOT_FOUND, /* c0000160 (STATUS_ILL_FORMED_SERVICE_ENTRY) */
513 ERROR_MR_MID_NOT_FOUND, /* c0000161 (STATUS_ILLEGAL_CHARACTER) */
514 ERROR_NO_UNICODE_TRANSLATION, /* c0000162 (STATUS_UNMAPPABLE_CHARACTER) */
515 ERROR_MR_MID_NOT_FOUND, /* c0000163 (STATUS_UNDEFINED_CHARACTER) */
516 ERROR_MR_MID_NOT_FOUND, /* c0000164 (STATUS_FLOPPY_VOLUME) */
517 ERROR_FLOPPY_ID_MARK_NOT_FOUND, /* c0000165 (STATUS_FLOPPY_ID_MARK_NOT_FOUND) */
518 ERROR_FLOPPY_WRONG_CYLINDER, /* c0000166 (STATUS_FLOPPY_WRONG_CYLINDER) */
519 ERROR_FLOPPY_UNKNOWN_ERROR, /* c0000167 (STATUS_FLOPPY_UNKNOWN_ERROR) */
520 ERROR_FLOPPY_BAD_REGISTERS, /* c0000168 (STATUS_FLOPPY_BAD_REGISTERS) */
521 ERROR_DISK_RECALIBRATE_FAILED, /* c0000169 (STATUS_DISK_RECALIBRATE_FAILED) */
522 ERROR_DISK_OPERATION_FAILED, /* c000016a (STATUS_DISK_OPERATION_FAILED) */
523 ERROR_DISK_RESET_FAILED, /* c000016b (STATUS_DISK_RESET_FAILED) */
524 ERROR_IRQ_BUSY, /* c000016c (STATUS_SHARED_IRQ_BUSY) */
525 ERROR_IO_DEVICE, /* c000016d (STATUS_FT_ORPHANING) */
526 ERROR_MR_MID_NOT_FOUND, /* c000016e (STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT) */
527 ERROR_MR_MID_NOT_FOUND, /* c000016f */
528 ERROR_MR_MID_NOT_FOUND, /* c0000170 */
529 ERROR_MR_MID_NOT_FOUND, /* c0000171 */
530 ERROR_PARTITION_FAILURE, /* c0000172 (STATUS_PARTITION_FAILURE) */
531 ERROR_INVALID_BLOCK_LENGTH, /* c0000173 (STATUS_INVALID_BLOCK_LENGTH) */
532 ERROR_DEVICE_NOT_PARTITIONED, /* c0000174 (STATUS_DEVICE_NOT_PARTITIONED) */
533 ERROR_UNABLE_TO_LOCK_MEDIA, /* c0000175 (STATUS_UNABLE_TO_LOCK_MEDIA) */
534 ERROR_UNABLE_TO_UNLOAD_MEDIA, /* c0000176 (STATUS_UNABLE_TO_UNLOAD_MEDIA) */
535 ERROR_EOM_OVERFLOW, /* c0000177 (STATUS_EOM_OVERFLOW) */
536 ERROR_NO_MEDIA_IN_DRIVE, /* c0000178 (STATUS_NO_MEDIA) */
537 ERROR_MR_MID_NOT_FOUND, /* c0000179 */
538 ERROR_NO_SUCH_MEMBER, /* c000017a (STATUS_NO_SUCH_MEMBER) */
539 ERROR_INVALID_MEMBER, /* c000017b (STATUS_INVALID_MEMBER) */
540 ERROR_KEY_DELETED, /* c000017c (STATUS_KEY_DELETED) */
541 ERROR_NO_LOG_SPACE, /* c000017d (STATUS_NO_LOG_SPACE) */
542 ERROR_TOO_MANY_SIDS, /* c000017e (STATUS_TOO_MANY_SIDS) */
543 ERROR_LM_CROSS_ENCRYPTION_REQUIRED, /* c000017f (STATUS_LM_CROSS_ENCRYPTION_REQUIRED) */
544 ERROR_KEY_HAS_CHILDREN, /* c0000180 (STATUS_KEY_HAS_CHILDREN) */
545 ERROR_CHILD_MUST_BE_VOLATILE, /* c0000181 (STATUS_CHILD_MUST_BE_VOLATILE) */
546 ERROR_INVALID_PARAMETER, /* c0000182 (STATUS_DEVICE_CONFIGURATION_ERROR) */
547 ERROR_IO_DEVICE, /* c0000183 (STATUS_DRIVER_INTERNAL_ERROR) */
548 ERROR_BAD_COMMAND, /* c0000184 (STATUS_INVALID_DEVICE_STATE) */
549 ERROR_IO_DEVICE, /* c0000185 (STATUS_IO_DEVICE_ERROR) */
550 ERROR_IO_DEVICE, /* c0000186 (STATUS_DEVICE_PROTOCOL_ERROR) */
551 ERROR_MR_MID_NOT_FOUND, /* c0000187 (STATUS_BACKUP_CONTROLLER) */
552 ERROR_LOG_FILE_FULL, /* c0000188 (STATUS_LOG_FILE_FULL) */
553 ERROR_WRITE_PROTECT, /* c0000189 (STATUS_TOO_LATE) */
554 ERROR_NO_TRUST_LSA_SECRET, /* c000018a (STATUS_NO_TRUST_LSA_SECRET) */
555 ERROR_NO_TRUST_SAM_ACCOUNT, /* c000018b (STATUS_NO_TRUST_SAM_ACCOUNT) */
556 ERROR_TRUSTED_DOMAIN_FAILURE, /* c000018c (STATUS_TRUSTED_DOMAIN_FAILURE) */
557 ERROR_TRUSTED_RELATIONSHIP_FAILURE, /* c000018d (STATUS_TRUSTED_RELATIONSHIP_FAILURE) */
558 ERROR_EVENTLOG_FILE_CORRUPT, /* c000018e (STATUS_EVENTLOG_FILE_CORRUPT) */
559 ERROR_EVENTLOG_CANT_START, /* c000018f (STATUS_EVENTLOG_CANT_START) */
560 ERROR_TRUST_FAILURE, /* c0000190 (STATUS_TRUST_FAILURE) */
561 ERROR_MR_MID_NOT_FOUND, /* c0000191 (STATUS_MUTANT_LIMIT_EXCEEDED) */
562 ERROR_NETLOGON_NOT_STARTED, /* c0000192 (STATUS_NETLOGON_NOT_STARTED) */
563 ERROR_ACCOUNT_EXPIRED, /* c0000193 (STATUS_ACCOUNT_EXPIRED) */
564 ERROR_POSSIBLE_DEADLOCK, /* c0000194 (STATUS_POSSIBLE_DEADLOCK) */
565 ERROR_SESSION_CREDENTIAL_CONFLICT, /* c0000195 (STATUS_NETWORK_CREDENTIAL_CONFLICT) */
566 ERROR_REMOTE_SESSION_LIMIT_EXCEEDED, /* c0000196 (STATUS_REMOTE_SESSION_LIMIT) */
567 ERROR_EVENTLOG_FILE_CHANGED, /* c0000197 (STATUS_EVENTLOG_FILE_CHANGED) */
568 ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT,/* c0000198 (STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT) */
569 ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT,/* c0000199 (STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT) */
570 ERROR_NOLOGON_SERVER_TRUST_ACCOUNT, /* c000019a (STATUS_NOLOGON_SERVER_TRUST_ACCOUNT) */
571 ERROR_DOMAIN_TRUST_INCONSISTENT /* c000019b (STATUS_DOMAIN_TRUST_INCONSISTENT) */
572 };
573
574 static const WORD table_c0000202[109] =
575 {
576 ERROR_NO_USER_SESSION_KEY, /* c0000202 (STATUS_NO_USER_SESSION_KEY) */
577 ERROR_UNEXP_NET_ERR, /* c0000203 (STATUS_USER_SESSION_DELETED) */
578 ERROR_RESOURCE_LANG_NOT_FOUND, /* c0000204 (STATUS_RESOURCE_LANG_NOT_FOUND) */
579 ERROR_NOT_ENOUGH_SERVER_MEMORY, /* c0000205 (STATUS_INSUFF_SERVER_RESOURCES) */
580 ERROR_INVALID_USER_BUFFER, /* c0000206 (STATUS_INVALID_BUFFER_SIZE) */
581 ERROR_INVALID_NETNAME, /* c0000207 (STATUS_INVALID_ADDRESS_COMPONENT) */
582 ERROR_INVALID_NETNAME, /* c0000208 (STATUS_INVALID_ADDRESS_WILDCARD) */
583 ERROR_TOO_MANY_NAMES, /* c0000209 (STATUS_TOO_MANY_ADDRESSES) */
584 ERROR_DUP_NAME, /* c000020a (STATUS_ADDRESS_ALREADY_EXISTS) */
585 ERROR_NETNAME_DELETED, /* c000020b (STATUS_ADDRESS_CLOSED) */
586 ERROR_NETNAME_DELETED, /* c000020c (STATUS_CONNECTION_DISCONNECTED) */
587 ERROR_NETNAME_DELETED, /* c000020d (STATUS_CONNECTION_RESET) */
588 ERROR_TOO_MANY_NAMES, /* c000020e (STATUS_TOO_MANY_NODES) */
589 ERROR_UNEXP_NET_ERR, /* c000020f (STATUS_TRANSACTION_ABORTED) */
590 ERROR_UNEXP_NET_ERR, /* c0000210 (STATUS_TRANSACTION_TIMED_OUT) */
591 ERROR_UNEXP_NET_ERR, /* c0000211 (STATUS_TRANSACTION_NO_RELEASE) */
592 ERROR_UNEXP_NET_ERR, /* c0000212 (STATUS_TRANSACTION_NO_MATCH) */
593 ERROR_UNEXP_NET_ERR, /* c0000213 (STATUS_TRANSACTION_RESPONDED) */
594 ERROR_UNEXP_NET_ERR, /* c0000214 (STATUS_TRANSACTION_INVALID_ID) */
595 ERROR_UNEXP_NET_ERR, /* c0000215 (STATUS_TRANSACTION_INVALID_TYPE) */
596 ERROR_NOT_SUPPORTED, /* c0000216 (STATUS_NOT_SERVER_SESSION) */
597 ERROR_NOT_SUPPORTED, /* c0000217 (STATUS_NOT_CLIENT_SESSION) */
598 ERROR_MR_MID_NOT_FOUND, /* c0000218 (STATUS_CANNOT_LOAD_REGISTRY_FILE) */
599 ERROR_MR_MID_NOT_FOUND, /* c0000219 */
600 ERROR_MR_MID_NOT_FOUND, /* c000021a */
601 ERROR_MR_MID_NOT_FOUND, /* c000021b */
602 ERROR_NO_BROWSER_SERVERS_FOUND, /* c000021c (STATUS_NO_BROWSER_SERVERS_FOUND) */
603 ERROR_MR_MID_NOT_FOUND, /* c000021d */
604 ERROR_MR_MID_NOT_FOUND, /* c000021e */
605 ERROR_MR_MID_NOT_FOUND, /* c000021f */
606 ERROR_MAPPED_ALIGNMENT, /* c0000220 (STATUS_MAPPED_ALIGNMENT) */
607 ERROR_BAD_EXE_FORMAT, /* c0000221 (STATUS_IMAGE_CHECKSUM_MISMATCH) */
608 ERROR_MR_MID_NOT_FOUND, /* c0000222 */
609 ERROR_MR_MID_NOT_FOUND, /* c0000223 */
610 ERROR_PASSWORD_MUST_CHANGE, /* c0000224 (STATUS_PASSWORD_MUST_CHANGE) */
611 ERROR_MR_MID_NOT_FOUND, /* c0000225 */
612 ERROR_MR_MID_NOT_FOUND, /* c0000226 */
613 ERROR_MR_MID_NOT_FOUND, /* c0000227 */
614 ERROR_MR_MID_NOT_FOUND, /* c0000228 */
615 ERROR_MR_MID_NOT_FOUND, /* c0000229 */
616 0, /* c000022a */
617 0, /* c000022b */
618 ERROR_MR_MID_NOT_FOUND, /* c000022c */
619 ERROR_MR_MID_NOT_FOUND, /* c000022d */
620 ERROR_MR_MID_NOT_FOUND, /* c000022e */
621 ERROR_MR_MID_NOT_FOUND, /* c000022f */
622 ERROR_MR_MID_NOT_FOUND, /* c0000230 */
623 ERROR_MR_MID_NOT_FOUND, /* c0000231 */
624 ERROR_MR_MID_NOT_FOUND, /* c0000232 */
625 ERROR_DOMAIN_CONTROLLER_NOT_FOUND, /* c0000233 */
626 ERROR_ACCOUNT_LOCKED_OUT, /* c0000234 */
627 ERROR_INVALID_HANDLE, /* c0000235 */
628 ERROR_CONNECTION_REFUSED, /* c0000236 */
629 ERROR_GRACEFUL_DISCONNECT, /* c0000237 */
630 ERROR_ADDRESS_ALREADY_ASSOCIATED, /* c0000238 */
631 ERROR_ADDRESS_NOT_ASSOCIATED, /* c0000239 */
632 ERROR_CONNECTION_INVALID, /* c000023a */
633 ERROR_CONNECTION_ACTIVE, /* c000023b */
634 ERROR_NETWORK_UNREACHABLE, /* c000023c */
635 ERROR_HOST_UNREACHABLE, /* c000023d */
636 ERROR_PROTOCOL_UNREACHABLE, /* c000023e */
637 ERROR_PORT_UNREACHABLE, /* c000023f */
638 ERROR_REQUEST_ABORTED, /* c0000240 */
639 ERROR_CONNECTION_ABORTED, /* c0000241 */
640 ERROR_MR_MID_NOT_FOUND, /* c0000242 */
641 ERROR_USER_MAPPED_FILE, /* c0000243 */
642 ERROR_MR_MID_NOT_FOUND, /* c0000244 */
643 ERROR_MR_MID_NOT_FOUND, /* c0000245 */
644 ERROR_CONNECTION_COUNT_LIMIT, /* c0000246 */
645 ERROR_LOGIN_TIME_RESTRICTION, /* c0000247 */
646 ERROR_LOGIN_WKSTA_RESTRICTION, /* c0000248 */
647 ERROR_BAD_EXE_FORMAT, /* c0000249 */
648 ERROR_MR_MID_NOT_FOUND, /* c000024a */
649 ERROR_MR_MID_NOT_FOUND, /* c000024b */
650 ERROR_MR_MID_NOT_FOUND, /* c000024c */
651 ERROR_MR_MID_NOT_FOUND, /* c000024d */
652 ERROR_MR_MID_NOT_FOUND, /* c000024e */
653 ERROR_MR_MID_NOT_FOUND, /* c000024f */
654 ERROR_MR_MID_NOT_FOUND, /* c0000250 */
655 ERROR_MR_MID_NOT_FOUND, /* c0000251 */
656 ERROR_MR_MID_NOT_FOUND, /* c0000252 */
657 ERROR_INTERNAL_ERROR, /* c0000253 */
658 ERROR_MR_MID_NOT_FOUND, /* c0000254 */
659 ERROR_MR_MID_NOT_FOUND, /* c0000255 */
660 ERROR_MR_MID_NOT_FOUND, /* c0000256 */
661 ERROR_HOST_UNREACHABLE, /* c0000257 */
662 ERROR_MR_MID_NOT_FOUND, /* c0000258 */
663 ERROR_LICENSE_QUOTA_EXCEEDED, /* c0000259 */
664 ERROR_MR_MID_NOT_FOUND, /* c000025a */
665 ERROR_MR_MID_NOT_FOUND, /* c000025b */
666 ERROR_MR_MID_NOT_FOUND, /* c000025c */
667 ERROR_MR_MID_NOT_FOUND, /* c000025d */
668 ERROR_SERVICE_DISABLED, /* c000025e */
669 ERROR_MR_MID_NOT_FOUND, /* c000025f */
670 ERROR_MR_MID_NOT_FOUND, /* c0000260 */
671 ERROR_MR_MID_NOT_FOUND, /* c0000261 */
672 ERROR_INVALID_ORDINAL, /* c0000262 */
673 ERROR_PROC_NOT_FOUND, /* c0000263 */
674 ERROR_NOT_OWNER, /* c0000264 */
675 ERROR_TOO_MANY_LINKS, /* c0000265 */
676 ERROR_MR_MID_NOT_FOUND, /* c0000266 */
677 ERROR_MR_MID_NOT_FOUND, /* c0000267 */
678 ERROR_MR_MID_NOT_FOUND, /* c0000268 */
679 ERROR_MR_MID_NOT_FOUND, /* c0000269 */
680 ERROR_MR_MID_NOT_FOUND, /* c000026a */
681 ERROR_MR_MID_NOT_FOUND, /* c000026b */
682 ERROR_MR_MID_NOT_FOUND, /* c000026c */
683 ERROR_MR_MID_NOT_FOUND, /* c000026d */
684 ERROR_NOT_READY /* c000026e (STATUS_VOLUME_DISMOUNTED) */
685 };
686
687 static const WORD table_c0020001[88] =
688 {
689 RPC_S_INVALID_STRING_BINDING, /* c0020001 (RPC_NT_INVALID_STRING_BINDING) */
690 RPC_S_WRONG_KIND_OF_BINDING, /* c0020002 (RPC_NT_WRONG_KIND_OF_BINDING) */
691 ERROR_INVALID_HANDLE, /* c0020003 (RPC_NT_INVALID_BINDING) */
692 RPC_S_PROTSEQ_NOT_SUPPORTED, /* c0020004 (RPC_NT_PROTSEQ_NOT_SUPPORTED) */
693 RPC_S_INVALID_RPC_PROTSEQ, /* c0020005 (RPC_NT_INVALID_RPC_PROTSEQ) */
694 RPC_S_INVALID_STRING_UUID, /* c0020006 (RPC_NT_INVALID_STRING_UUID) */
695 RPC_S_INVALID_ENDPOINT_FORMAT, /* c0020007 (RPC_NT_INVALID_ENDPOINT_FORMAT) */
696 RPC_S_INVALID_NET_ADDR, /* c0020008 (RPC_NT_INVALID_NET_ADDR) */
697 RPC_S_NO_ENDPOINT_FOUND, /* c0020009 (RPC_NT_NO_ENDPOINT_FOUND) */
698 RPC_S_INVALID_TIMEOUT, /* c002000a (RPC_NT_INVALID_TIMEOUT) */
699 RPC_S_OBJECT_NOT_FOUND, /* c002000b (RPC_NT_OBJECT_NOT_FOUND) */
700 RPC_S_ALREADY_REGISTERED, /* c002000c (RPC_NT_ALREADY_REGISTERED) */
701 RPC_S_TYPE_ALREADY_REGISTERED, /* c002000d (RPC_NT_TYPE_ALREADY_REGISTERED) */
702 RPC_S_ALREADY_LISTENING, /* c002000e (RPC_NT_ALREADY_LISTENING) */
703 RPC_S_NO_PROTSEQS_REGISTERED, /* c002000f (RPC_NT_NO_PROTSEQS_REGISTERED) */
704 RPC_S_NOT_LISTENING, /* c0020010 (RPC_NT_NOT_LISTENING) */
705 RPC_S_UNKNOWN_MGR_TYPE, /* c0020011 (RPC_NT_UNKNOWN_MGR_TYPE) */
706 RPC_S_UNKNOWN_IF, /* c0020012 (RPC_NT_UNKNOWN_IF) */
707 RPC_S_NO_BINDINGS, /* c0020013 (RPC_NT_NO_BINDINGS) */
708 RPC_S_NO_PROTSEQS, /* c0020014 (RPC_NT_NO_PROTSEQS) */
709 RPC_S_CANT_CREATE_ENDPOINT, /* c0020015 (RPC_NT_CANT_CREATE_ENDPOINT) */
710 RPC_S_OUT_OF_RESOURCES, /* c0020016 (RPC_NT_OUT_OF_RESOURCES) */
711 RPC_S_SERVER_UNAVAILABLE, /* c0020017 (RPC_NT_SERVER_UNAVAILABLE) */
712 RPC_S_SERVER_TOO_BUSY, /* c0020018 (RPC_NT_SERVER_TOO_BUSY) */
713 RPC_S_INVALID_NETWORK_OPTIONS, /* c0020019 (RPC_NT_INVALID_NETWORK_OPTIONS) */
714 RPC_S_NO_CALL_ACTIVE, /* c002001a (RPC_NT_NO_CALL_ACTIVE) */
715 RPC_S_CALL_FAILED, /* c002001b (RPC_NT_CALL_FAILED) */
716 RPC_S_CALL_FAILED_DNE, /* c002001c (RPC_NT_CALL_FAILED_DNE) */
717 RPC_S_PROTOCOL_ERROR, /* c002001d (RPC_NT_PROTOCOL_ERROR) */
718 ERROR_MR_MID_NOT_FOUND, /* c002001e */
719 RPC_S_UNSUPPORTED_TRANS_SYN, /* c002001f (RPC_NT_UNSUPPORTED_TRANS_SYN) */
720 ERROR_MR_MID_NOT_FOUND, /* c0020020 */
721 RPC_S_UNSUPPORTED_TYPE, /* c0020021 (RPC_NT_UNSUPPORTED_TYPE) */
722 RPC_S_INVALID_TAG, /* c0020022 (RPC_NT_INVALID_TAG) */
723 RPC_S_INVALID_BOUND, /* c0020023 (RPC_NT_INVALID_BOUND) */
724 RPC_S_NO_ENTRY_NAME, /* c0020024 (RPC_NT_NO_ENTRY_NAME) */
725 RPC_S_INVALID_NAME_SYNTAX, /* c0020025 (RPC_NT_INVALID_NAME_SYNTAX) */
726 RPC_S_UNSUPPORTED_NAME_SYNTAX, /* c0020026 (RPC_NT_UNSUPPORTED_NAME_SYNTAX) */
727 ERROR_MR_MID_NOT_FOUND, /* c0020027 */
728 RPC_S_UUID_NO_ADDRESS, /* c0020028 (RPC_NT_UUID_NO_ADDRESS) */
729 RPC_S_DUPLICATE_ENDPOINT, /* c0020029 (RPC_NT_DUPLICATE_ENDPOINT) */
730 RPC_S_UNKNOWN_AUTHN_TYPE, /* c002002a (RPC_NT_UNKNOWN_AUTHN_TYPE) */
731 RPC_S_MAX_CALLS_TOO_SMALL, /* c002002b (RPC_NT_MAX_CALLS_TOO_SMALL) */
732 RPC_S_STRING_TOO_LONG, /* c002002c (RPC_NT_STRING_TOO_LONG) */
733 RPC_S_PROTSEQ_NOT_FOUND, /* c002002d (RPC_NT_PROTSEQ_NOT_FOUND) */
734 RPC_S_PROCNUM_OUT_OF_RANGE, /* c002002e (RPC_NT_PROCNUM_OUT_OF_RANGE) */
735 RPC_S_BINDING_HAS_NO_AUTH, /* c002002f (RPC_NT_BINDING_HAS_NO_AUTH) */
736 RPC_S_UNKNOWN_AUTHN_SERVICE, /* c0020030 (RPC_NT_UNKNOWN_AUTHN_SERVICE) */
737 RPC_S_UNKNOWN_AUTHN_LEVEL, /* c0020031 (RPC_NT_UNKNOWN_AUTHN_LEVEL) */
738 RPC_S_INVALID_AUTH_IDENTITY, /* c0020032 (RPC_NT_INVALID_AUTH_IDENTITY) */
739 RPC_S_UNKNOWN_AUTHZ_SERVICE, /* c0020033 (RPC_NT_UNKNOWN_AUTHZ_SERVICE) */
740 EPT_S_INVALID_ENTRY, /* c0020034 (EPT_NT_INVALID_ENTRY) */
741 EPT_S_CANT_PERFORM_OP, /* c0020035 (EPT_NT_CANT_PERFORM_OP) */
742 EPT_S_NOT_REGISTERED, /* c0020036 (EPT_NT_NOT_REGISTERED) */
743 RPC_S_NOTHING_TO_EXPORT, /* c0020037 (RPC_NT_NOTHING_TO_EXPORT) */
744 RPC_S_INCOMPLETE_NAME, /* c0020038 (RPC_NT_INCOMPLETE_NAME) */
745 RPC_S_INVALID_VERS_OPTION, /* c0020039 (RPC_NT_INVALID_VERS_OPTION) */
746 RPC_S_NO_MORE_MEMBERS, /* c002003a (RPC_NT_NO_MORE_MEMBERS) */
747 RPC_S_NOT_ALL_OBJS_UNEXPORTED, /* c002003b (RPC_NT_NOT_ALL_OBJS_UNEXPORTED) */
748 RPC_S_INTERFACE_NOT_FOUND, /* c002003c (RPC_NT_INTERFACE_NOT_FOUND) */
749 RPC_S_ENTRY_ALREADY_EXISTS, /* c002003d (RPC_NT_ENTRY_ALREADY_EXISTS) */
750 RPC_S_ENTRY_NOT_FOUND, /* c002003e (RPC_NT_ENTRY_NOT_FOUND) */
751 RPC_S_NAME_SERVICE_UNAVAILABLE, /* c002003f (RPC_NT_NAME_SERVICE_UNAVAILABLE) */
752 RPC_S_INVALID_NAF_ID, /* c0020040 (RPC_NT_INVALID_NAF_ID) */
753 RPC_S_CANNOT_SUPPORT, /* c0020041 (RPC_NT_CANNOT_SUPPORT) */
754 RPC_S_NO_CONTEXT_AVAILABLE, /* c0020042 (RPC_NT_NO_CONTEXT_AVAILABLE) */
755 RPC_S_INTERNAL_ERROR, /* c0020043 (RPC_NT_INTERNAL_ERROR) */
756 RPC_S_ZERO_DIVIDE, /* c0020044 (RPC_NT_ZERO_DIVIDE) */
757 RPC_S_ADDRESS_ERROR, /* c0020045 (RPC_NT_ADDRESS_ERROR) */
758 RPC_S_FP_DIV_ZERO, /* c0020046 (RPC_NT_FP_DIV_ZERO) */
759 RPC_S_FP_UNDERFLOW, /* c0020047 (RPC_NT_FP_UNDERFLOW) */
760 RPC_S_FP_OVERFLOW, /* c0020048 (RPC_NT_FP_OVERFLOW) */
761 RPC_S_CALL_IN_PROGRESS, /* c0020049 (RPC_NT_CALL_IN_PROGRESS) */
762 RPC_S_NO_MORE_BINDINGS, /* c002004a (RPC_NT_NO_MORE_BINDINGS) */
763 RPC_S_GROUP_MEMBER_NOT_FOUND, /* c002004b (RPC_NT_GROUP_MEMBER_NOT_FOUND) */
764 EPT_S_CANT_CREATE, /* c002004c (EPT_NT_CANT_CREATE) */
765 RPC_S_INVALID_OBJECT, /* c002004d (RPC_NT_INVALID_OBJECT) */
766 ERROR_MR_MID_NOT_FOUND, /* c002004e */
767 RPC_S_NO_INTERFACES, /* c002004f */
768 RPC_S_CALL_CANCELLED, /* c0020050 */
769 RPC_S_BINDING_INCOMPLETE, /* c0020051 */
770 RPC_S_COMM_FAILURE, /* c0020052 */
771 RPC_S_UNSUPPORTED_AUTHN_LEVEL, /* c0020053 */
772 RPC_S_NO_PRINC_NAME, /* c0020054 */
773 RPC_S_NOT_RPC_ERROR, /* c0020055 */
774 ERROR_MR_MID_NOT_FOUND, /* c0020056 */
775 RPC_S_SEC_PKG_ERROR, /* c0020057 */
776 RPC_S_NOT_CANCELLED /* c0020058 */
777 };
778
779 static const WORD table_c0030001[12] =
780 {
781 RPC_X_NO_MORE_ENTRIES, /* c0030001 (RPC_NT_NO_MORE_ENTRIES) */
782 RPC_X_SS_CHAR_TRANS_OPEN_FAIL, /* c0030002 (RPC_NT_SS_CHAR_TRANS_OPEN_FAIL) */
783 RPC_X_SS_CHAR_TRANS_SHORT_FILE, /* c0030003 (RPC_NT_SS_CHAR_TRANS_SHORT_FILE) */
784 ERROR_INVALID_HANDLE, /* c0030004 (RPC_NT_SS_IN_NULL_CONTEXT) */
785 ERROR_INVALID_HANDLE, /* c0030005 (RPC_NT_SS_CONTEXT_MISMATCH)*/
786 RPC_X_SS_CONTEXT_DAMAGED, /* c0030006 (RPC_NT_SS_CONTEXT_DAMAGED) */
787 RPC_X_SS_HANDLES_MISMATCH, /* c0030007 (RPC_NT_SS_HANDLES_MISMATCH) */
788 RPC_X_SS_CANNOT_GET_CALL_HANDLE, /* c0030008 (RPC_NT_SS_CANNOT_GET_CALL_HANDLE) */
789 RPC_X_NULL_REF_POINTER, /* c0030009 (RPC_NT_NULL_REF_POINTER) */
790 RPC_X_ENUM_VALUE_OUT_OF_RANGE, /* c003000a (RPC_NT_ENUM_VALUE_OUT_OF_RANGE) */
791 RPC_X_BYTE_COUNT_TOO_SMALL, /* c003000b (RPC_NT_BYTE_COUNT_TOO_SMALL) */
792 RPC_X_BAD_STUB_DATA /* c003000c (RPC_NT_BAD_STUB_DATA) */
793 };
794
795 static const WORD table_c0030059[6] =
796 {
797 RPC_X_INVALID_ES_ACTION, /* c0030059 */
798 RPC_X_WRONG_ES_VERSION, /* c003005a */
799 RPC_X_WRONG_STUB_VERSION, /* c003005b */
800 RPC_X_INVALID_PIPE_OBJECT, /* c003005c */
801 RPC_X_WRONG_PIPE_ORDER, /* c003005d */
802 RPC_X_WRONG_PIPE_VERSION /* c003005e */
803 };
804
805 static const ERROR_TABLE ErrorTable[] =
806 {
807 {
808 0x00000103, 0x0000010e, table_00000103
809 },
810 { 0x40000002, 0x4000000e, table_40000002 },
811 { 0x40020056, 0x40020057, table_40020056 },
812 { 0x400200af, 0x400200b0, table_400200af },
813 { 0x80000001, 0x80000027, table_80000001 },
814 { 0x80090300, 0x80090317, table_80090300 },
815 { 0xc0000001, 0xc000019c, table_c0000001 },
816 { 0xc0000202, 0xc000026f, table_c0000202 },
817 { 0xc0020001, 0xc0020059, table_c0020001 },
818 { 0xc0030001, 0xc003000d, table_c0030001 },
819 { 0xc0030059, 0xc003005f, table_c0030059 },
820 { 0, 0, 0 } /* last entry */
821 };
822
823
824 /* FUNCTIONS ***************************************************************/
825
826 /*
827 * @implemented
828 */
829 VOID
830 STDCALL
831 RtlAssert(PVOID FailedAssertion,
832 PVOID FileName,
833 ULONG LineNumber,
834 PCHAR Message)
835 {
836 if (NULL != Message)
837 {
838 DbgPrint("Assertion \'%s\' failed at %s line %d: %s\n",
839 (PCHAR)FailedAssertion,
840 (PCHAR)FileName,
841 LineNumber,
842 Message);
843 }
844 else
845 {
846 DbgPrint("Assertion \'%s\' failed at %s line %d\n",
847 (PCHAR)FailedAssertion,
848 (PCHAR)FileName,
849 LineNumber);
850 }
851
852 DbgBreakPoint();
853 }
854
855 /*
856 * @unimplemented
857 */
858 NTSTATUS
859 STDCALL
860 RtlMapSecurityErrorToNtStatus(
861 IN ULONG SecurityError
862 )
863 {
864 UNIMPLEMENTED;
865 return STATUS_NOT_IMPLEMENTED;
866 }
867
868 /**********************************************************************
869 * NAME EXPORTED
870 * RtlNtStatusToDosErrorNoTeb
871 *
872 * DESCRIPTION
873 * Convert an Executive status ID into a DOS error number
874 * (winerror.h).
875 *
876 * ARGUMENTS
877 * Status The Executive status ID to convert.
878 *
879 * RETURN VALUE
880 * dos error as in winerror.h
881 *
882 * REMARK
883 * RtlNtStatusToDosErrorNoTeb() does the real work.
884 *
885 * @implemented
886 */
887 DWORD STDCALL
888 RtlNtStatusToDosErrorNoTeb(IN NTSTATUS Status)
889 {
890 PERROR_TABLE Table = (PERROR_TABLE)ErrorTable;
891
892 if (!Status || (Status & 0x20000000))
893 return Status;
894
895 /* 0xd... is equivalent to 0xc... */
896 if ((Status & 0xf0000000) == 0xd0000000)
897 Status &= ~0x10000000;
898
899 while (Table->Start)
900 {
901 if ((ULONG)Status < Table->Start)
902 break;
903
904 if ((ULONG)Status < Table->End)
905 {
906 DWORD ret = Table->Table[(ULONG)Status - Table->Start];
907 if (!ret)
908 ret = Status; /* 0 means 1:1 mapping */
909 else if (ret == ERROR_MR_MID_NOT_FOUND)
910 {
911 DPRINT1("RTL: RtlNtStatusToDosErrorNoTeb(0x%lx): no valid W32 error mapping\n", Status);
912 }
913 return ret;
914 }
915 Table++;
916 }
917
918 /* now some special cases */
919 if (HIWORD(Status) == 0xc001)
920 return LOWORD(Status);
921 if (HIWORD(Status) == 0x8007)
922 return LOWORD(Status);
923
924 DbgPrint("RTL: RtlNtStatusToDosErrorNoTeb(0x%lx): no valid W32 error mapping\n", Status);
925
926 return ERROR_MR_MID_NOT_FOUND;
927 }
928
929
930 /**********************************************************************
931 * NAME EXPORTED
932 * RtlNtStatusToDosError
933 *
934 * DESCRIPTION
935 * Convert an Executive status ID into a DOS error number
936 * (winerror.h).
937 *
938 * ARGUMENTS
939 * Status The Executive status ID to convert.
940 *
941 * RETURN VALUE
942 * dos error as in winerror.h
943 *
944 * REMARK
945 * RtlNtStatusToDosErrorNoTeb() does the real work.
946 *
947 * @implemented
948 */
949 DWORD STDCALL
950 RtlNtStatusToDosError(IN NTSTATUS Status)
951 {
952 PTEB Teb = NtCurrentTeb ();
953
954 if (NULL != Teb)
955 {
956 Teb->LastStatusValue = Status;
957 }
958 return RtlNtStatusToDosErrorNoTeb(Status);
959 }
960
961
962 /**********************************************************************
963 * NAME EXPORTED
964 * RtlNtStatusToPsxErrno
965 *
966 * DESCRIPTION
967 * Convert an Executive status ID into a POSIX error number
968 * (errno.h).
969 *
970 * NOTE
971 * Not present in the legacy WNT (a ReactOS extension to support
972 * the POSIX+ subsystem).
973 *
974 * ARGUMENTS
975 * Status The Executive status ID to convert.
976 *
977 * RETURN VALUE
978 * errno as in errno.h
979 *
980 * REVISIONS
981 * 1999-11-30 ea
982 */
983 INT STDCALL
984 RtlNtStatusToPsxErrno(IN NTSTATUS Status)
985 {
986 #if 0
987 switch (Status)
988 {}
989 #endif
990
991 return -1; /* generic POSIX error */
992 }
993
994
995 /*
996 * @implemented
997 */
998 NTSTATUS STDCALL
999 RtlGetLastNtStatus(VOID)
1000 {
1001 return NtCurrentTeb()->LastStatusValue;
1002 }
1003
1004
1005 /*
1006 * @implemented
1007 */
1008 ULONG STDCALL
1009 RtlGetLastWin32Error(VOID)
1010 {
1011 return NtCurrentTeb()->LastErrorValue;
1012 }
1013
1014
1015 /*
1016 * @implemented
1017 */
1018 VOID STDCALL
1019 RtlSetLastWin32Error(IN ULONG Error)
1020 {
1021 NtCurrentTeb()->LastErrorValue = Error;
1022 }
1023
1024
1025 /*
1026 * @implemented
1027 */
1028 VOID STDCALL
1029 RtlSetLastWin32ErrorAndNtStatusFromNtStatus(IN NTSTATUS Status)
1030 {
1031 NtCurrentTeb()->LastErrorValue = RtlNtStatusToDosError(Status);
1032 }
1033
1034 /* EOF */