Built a complete translation table for RtlNtStatusToDosError.
[wine] / dlls / ntdll / error.c
1 /*
2  * NTDLL error handling
3  * 
4  * Copyright 2000 Alexandre Julliard
5  */
6
7 #include "config.h"
8 #include "ntddk.h"
9 #include "winerror.h"
10 #include "debugtools.h"
11
12 DEFAULT_DEBUG_CHANNEL(ntdll);
13
14 struct error_table
15 {
16     DWORD       start;
17     DWORD       end;
18     const WORD *table;
19 };
20
21 static const struct error_table error_table[];
22
23 /**************************************************************************
24  *           RtlNtStatusToDosError
25  */
26 DWORD WINAPI RtlNtStatusToDosError( DWORD status )
27 {
28     const struct error_table *table = error_table;
29
30     if (!status || (status & 0x20000000)) return status;
31
32     /* 0xd... is equivalent to 0xc... */
33     if ((status & 0xf0000000) == 0xd0000000) status &= ~0x10000000;
34
35     while (table->start)
36     {
37         if (status < table->start) break;
38         if (status < table->end)
39         {
40             DWORD ret = table->table[status - table->start];
41             if (!ret) ret = status;  /* 0 means 1:1 mapping */
42             else if (ret == ERROR_MR_MID_NOT_FOUND) FIXME( "no mapping for %08lx\n", status );
43             return ret;
44         }
45         table++;
46     }
47
48     /* now some special cases */
49     if (HIWORD(status) == 0xc001) return LOWORD(status);
50     if (HIWORD(status) == 0x8007) return LOWORD(status);
51     FIXME( "no mapping for %08lx\n", status );
52     return ERROR_MR_MID_NOT_FOUND;
53 }
54
55
56 /* conversion tables */
57
58 static const WORD table_00000103[11] =
59 {
60    ERROR_IO_PENDING,                       /* 00000103 (STATUS_PENDING) */
61    ERROR_MR_MID_NOT_FOUND,                 /* 00000104 */
62    ERROR_MORE_DATA,                        /* 00000105 */
63    ERROR_NOT_ALL_ASSIGNED,                 /* 00000106 */
64    ERROR_SOME_NOT_MAPPED,                  /* 00000107 */
65    ERROR_MR_MID_NOT_FOUND,                 /* 00000108 */
66    ERROR_MR_MID_NOT_FOUND,                 /* 00000109 */
67    ERROR_MR_MID_NOT_FOUND,                 /* 0000010a */
68    ERROR_MR_MID_NOT_FOUND,                 /* 0000010b */
69    ERROR_NOTIFY_ENUM_DIR,                  /* 0000010c */
70    ERROR_NO_QUOTAS_FOR_ACCOUNT             /* 0000010d */
71 };
72
73 static const WORD table_40000002[12] =
74 {
75    ERROR_INVALID_PARAMETER,                /* 40000002 */
76    ERROR_MR_MID_NOT_FOUND,                 /* 40000003 */
77    ERROR_MR_MID_NOT_FOUND,                 /* 40000004 */
78    ERROR_MR_MID_NOT_FOUND,                 /* 40000005 */
79    ERROR_LOCAL_USER_SESSION_KEY,           /* 40000006 */
80    ERROR_MR_MID_NOT_FOUND,                 /* 40000007 */
81    ERROR_MORE_WRITES,                      /* 40000008 */
82    ERROR_REGISTRY_RECOVERED,               /* 40000009 */
83    ERROR_MR_MID_NOT_FOUND,                 /* 4000000a */
84    ERROR_MR_MID_NOT_FOUND,                 /* 4000000b */
85    ERROR_COUNTER_TIMEOUT,                  /* 4000000c */
86    ERROR_NULL_LM_PASSWORD                  /* 4000000d */
87 };
88
89 static const WORD table_40020056[1] =
90 {
91    RPC_S_UUID_LOCAL_ONLY                   /* 40020056 */
92 };
93
94 static const WORD table_400200af[1] =
95 {
96    RPC_S_SEND_INCOMPLETE                   /* 400200af */
97 };
98
99 static const WORD table_80000001[37] =
100 {
101    0,                                      /* 80000001 (STATUS_GUARD_PAGE_VIOLATION) */
102    ERROR_NOACCESS,                         /* 80000002 (STATUS_DATATYPE_MISALIGNMENT) */
103    0,                                      /* 80000003 (STATUS_BREAKPOINT) */
104    0,                                      /* 80000004 (STATUS_SINGLE_STEP) */
105    ERROR_MORE_DATA,                        /* 80000005 (STATUS_BUFFER_OVERFLOW) */
106    ERROR_NO_MORE_FILES,                    /* 80000006 (STATUS_NO_MORE_FILES) */
107    ERROR_MR_MID_NOT_FOUND,                 /* 80000007 (STATUS_WAKE_SYSTEM_DEBUGGER) */
108    ERROR_MR_MID_NOT_FOUND,                 /* 80000008 */
109    ERROR_MR_MID_NOT_FOUND,                 /* 80000009 */
110    ERROR_MR_MID_NOT_FOUND,                 /* 8000000a (STATUS_HANDLES_CLOSED) */
111    ERROR_NO_INHERITANCE,                   /* 8000000b (STATUS_NO_INHERITANCE) */
112    ERROR_MR_MID_NOT_FOUND,                 /* 8000000c (STATUS_GUID_SUBSTITUTION_MADE) */
113    ERROR_PARTIAL_COPY,                     /* 8000000d (STATUS_PARTIAL_COPY) */
114    ERROR_OUT_OF_PAPER,                     /* 8000000e (STATUS_DEVICE_PAPER_EMPTY) */
115    ERROR_NOT_READY,                        /* 8000000f (STATUS_DEVICE_POWERED_OFF) */
116    ERROR_NOT_READY,                        /* 80000010 (STATUS_DEVICE_OFF_LINE) */
117    ERROR_BUSY,                             /* 80000011 (STATUS_DEVICE_BUSY) */
118    ERROR_NO_MORE_ITEMS,                    /* 80000012 (STATUS_NO_MORE_EAS) */
119    ERROR_INVALID_EA_NAME,                  /* 80000013 (STATUS_INVALID_EA_NAME) */
120    ERROR_EA_LIST_INCONSISTENT,             /* 80000014 (STATUS_EA_LIST_INCONSISTENT) */
121    ERROR_EA_LIST_INCONSISTENT,             /* 80000015 (STATUS_INVALID_EA_FLAG) */
122    ERROR_MEDIA_CHANGED,                    /* 80000016 (STATUS_VERIFY_REQUIRED) */
123    ERROR_MR_MID_NOT_FOUND,                 /* 80000017 (STATUS_EXTRANEOUS_INFORMATION) */
124    ERROR_MR_MID_NOT_FOUND,                 /* 80000018 (STATUS_RXACT_COMMIT_NECESSARY) */
125    ERROR_MR_MID_NOT_FOUND,                 /* 80000019 */
126    ERROR_NO_MORE_ITEMS,                    /* 8000001a (STATUS_NO_MORE_ENTRIES) */
127    ERROR_FILEMARK_DETECTED,                /* 8000001b (STATUS_FILEMARK_DETECTED) */
128    ERROR_MEDIA_CHANGED,                    /* 8000001c (STATUS_MEDIA_CHANGED) */
129    ERROR_BUS_RESET,                        /* 8000001d (STATUS_BUS_RESET) */
130    ERROR_END_OF_MEDIA,                     /* 8000001e (STATUS_END_OF_MEDIA) */
131    ERROR_BEGINNING_OF_MEDIA,               /* 8000001f (STATUS_BEGINNING_OF_MEDIA) */
132    ERROR_MR_MID_NOT_FOUND,                 /* 80000020 (STATUS_MEDIA_CHECK) */
133    ERROR_SETMARK_DETECTED,                 /* 80000021 (STATUS_SETMARK_DETECTED) */
134    ERROR_NO_DATA_DETECTED,                 /* 80000022 (STATUS_NO_DATA_DETECTED) */
135    ERROR_MR_MID_NOT_FOUND,                 /* 80000023 (STATUS_REDIRECTOR_HAS_OPEN_HANDLES) */
136    ERROR_MR_MID_NOT_FOUND,                 /* 80000024 (STATUS_SERVER_HAS_OPEN_HANDLES) */
137    ERROR_ACTIVE_CONNECTIONS                /* 80000025 (STATUS_ALREADY_DISCONNECTED) */
138 };
139
140 static const WORD table_80090300[23] =
141 {
142    ERROR_NO_SYSTEM_RESOURCES,              /* 80090300 */
143    ERROR_INVALID_HANDLE,                   /* 80090301 */
144    ERROR_INVALID_FUNCTION,                 /* 80090302 */
145    ERROR_BAD_NETPATH,                      /* 80090303 */
146    ERROR_INTERNAL_ERROR,                   /* 80090304 */
147    ERROR_NO_SUCH_PACKAGE,                  /* 80090305 */
148    ERROR_NOT_OWNER,                        /* 80090306 */
149    ERROR_NO_SUCH_PACKAGE,                  /* 80090307 */
150    ERROR_INVALID_PARAMETER,                /* 80090308 */
151    ERROR_INVALID_PARAMETER,                /* 80090309 */
152    ERROR_NOT_SUPPORTED,                    /* 8009030a */
153    ERROR_CANNOT_IMPERSONATE,               /* 8009030b */
154    ERROR_LOGON_FAILURE,                    /* 8009030c */
155    ERROR_INVALID_PARAMETER,                /* 8009030d */
156    ERROR_NO_SUCH_LOGON_SESSION,            /* 8009030e */
157    ERROR_ACCESS_DENIED,                    /* 8009030f */
158    ERROR_ACCESS_DENIED,                    /* 80090310 */
159    ERROR_NO_LOGON_SERVERS,                 /* 80090311 */
160    ERROR_MR_MID_NOT_FOUND,                 /* 80090312 */
161    ERROR_MR_MID_NOT_FOUND,                 /* 80090313 */
162    ERROR_MR_MID_NOT_FOUND,                 /* 80090314 */
163    ERROR_MR_MID_NOT_FOUND,                 /* 80090315 */
164    ERROR_NO_SUCH_PACKAGE                   /* 80090316 */
165 };
166
167 static const WORD table_c0000001[411] =
168 {
169    ERROR_GEN_FAILURE,                      /* c0000001 (STATUS_UNSUCCESSFUL) */
170    ERROR_INVALID_FUNCTION,                 /* c0000002 (STATUS_NOT_IMPLEMENTED) */
171    ERROR_INVALID_PARAMETER,                /* c0000003 (STATUS_INVALID_INFO_CLASS) */
172    ERROR_BAD_LENGTH,                       /* c0000004 (STATUS_INFO_LENGTH_MISMATCH) */
173    ERROR_NOACCESS,                         /* c0000005 (STATUS_ACCESS_VIOLATION) */
174    ERROR_SWAPERROR,                        /* c0000006 (STATUS_IN_PAGE_ERROR) */
175    ERROR_PAGEFILE_QUOTA,                   /* c0000007 (STATUS_PAGEFILE_QUOTA) */
176    ERROR_INVALID_HANDLE,                   /* c0000008 (STATUS_INVALID_HANDLE) */
177    ERROR_STACK_OVERFLOW,                   /* c0000009 (STATUS_BAD_INITIAL_STACK) */
178    ERROR_BAD_EXE_FORMAT,                   /* c000000a (STATUS_BAD_INITIAL_PC) */
179    ERROR_INVALID_PARAMETER,                /* c000000b (STATUS_INVALID_CID) */
180    ERROR_MR_MID_NOT_FOUND,                 /* c000000c (STATUS_TIMER_NOT_CANCELED) */
181    ERROR_INVALID_PARAMETER,                /* c000000d (STATUS_INVALID_PARAMETER) */
182    ERROR_FILE_NOT_FOUND,                   /* c000000e (STATUS_NO_SUCH_DEVICE) */
183    ERROR_FILE_NOT_FOUND,                   /* c000000f (STATUS_NO_SUCH_FILE) */
184    ERROR_INVALID_FUNCTION,                 /* c0000010 (STATUS_INVALID_DEVICE_REQUEST) */
185    ERROR_HANDLE_EOF,                       /* c0000011 (STATUS_END_OF_FILE) */
186    ERROR_WRONG_DISK,                       /* c0000012 (STATUS_WRONG_VOLUME) */
187    ERROR_NOT_READY,                        /* c0000013 (STATUS_NO_MEDIA_IN_DEVICE) */
188    ERROR_UNRECOGNIZED_MEDIA,               /* c0000014 (STATUS_UNRECOGNIZED_MEDIA) */
189    ERROR_SECTOR_NOT_FOUND,                 /* c0000015 (STATUS_NONEXISTENT_SECTOR) */
190    ERROR_MORE_DATA,                        /* c0000016 (STATUS_MORE_PROCESSING_REQUIRED) */
191    ERROR_NOT_ENOUGH_MEMORY,                /* c0000017 (STATUS_NO_MEMORY) */
192    ERROR_INVALID_ADDRESS,                  /* c0000018 (STATUS_CONFLICTING_ADDRESSES) */
193    ERROR_INVALID_ADDRESS,                  /* c0000019 (STATUS_NOT_MAPPED_VIEW) */
194    ERROR_INVALID_PARAMETER,                /* c000001a (STATUS_UNABLE_TO_FREE_VM) */
195    ERROR_INVALID_PARAMETER,                /* c000001b (STATUS_UNABLE_TO_DELETE_SECTION) */
196    ERROR_INVALID_FUNCTION,                 /* c000001c (STATUS_INVALID_SYSTEM_SERVICE) */
197    0,                                      /* c000001d (STATUS_ILLEGAL_INSTRUCTION) */
198    ERROR_ACCESS_DENIED,                    /* c000001e (STATUS_INVALID_LOCK_SEQUENCE) */
199    ERROR_ACCESS_DENIED,                    /* c000001f (STATUS_INVALID_VIEW_SIZE) */
200    ERROR_BAD_EXE_FORMAT,                   /* c0000020 (STATUS_INVALID_FILE_FOR_SECTION) */
201    ERROR_ACCESS_DENIED,                    /* c0000021 (STATUS_ALREADY_COMMITTED) */
202    ERROR_ACCESS_DENIED,                    /* c0000022 (STATUS_ACCESS_DENIED) */
203    ERROR_INSUFFICIENT_BUFFER,              /* c0000023 (STATUS_BUFFER_TOO_SMALL) */
204    ERROR_INVALID_HANDLE,                   /* c0000024 (STATUS_OBJECT_TYPE_MISMATCH) */
205    0,                                      /* c0000025 (STATUS_NONCONTINUABLE_EXCEPTION) */
206    0,                                      /* c0000026 (STATUS_INVALID_DISPOSITION) */
207    ERROR_MR_MID_NOT_FOUND,                 /* c0000027 (STATUS_UNWIND) */
208    ERROR_MR_MID_NOT_FOUND,                 /* c0000028 (STATUS_BAD_STACK) */
209    ERROR_MR_MID_NOT_FOUND,                 /* c0000029 (STATUS_INVALID_UNWIND_TARGET) */
210    ERROR_NOT_LOCKED,                       /* c000002a (STATUS_NOT_LOCKED) */
211    0,                                      /* c000002b (STATUS_PARITY_ERROR) */
212    ERROR_INVALID_ADDRESS,                  /* c000002c (STATUS_UNABLE_TO_DECOMMIT_VM) */
213    ERROR_INVALID_ADDRESS,                  /* c000002d (STATUS_NOT_COMMITTED) */
214    ERROR_MR_MID_NOT_FOUND,                 /* c000002e (STATUS_INVALID_PORT_ATTRIBUTES) */
215    ERROR_MR_MID_NOT_FOUND,                 /* c000002f (STATUS_PORT_MESSAGE_TOO_LONG) */
216    ERROR_INVALID_PARAMETER,                /* c0000030 (STATUS_INVALID_PARAMETER_MIX) */
217    ERROR_MR_MID_NOT_FOUND,                 /* c0000031 (STATUS_INVALID_QUOTA_LOWER) */
218    ERROR_DISK_CORRUPT,                     /* c0000032 (STATUS_DISK_CORRUPT_ERROR) */
219    ERROR_INVALID_NAME,                     /* c0000033 (STATUS_OBJECT_NAME_INVALID) */
220    ERROR_FILE_NOT_FOUND,                   /* c0000034 (STATUS_OBJECT_NAME_NOT_FOUND) */
221    ERROR_ALREADY_EXISTS,                   /* c0000035 (STATUS_OBJECT_NAME_COLLISION) */
222    ERROR_MR_MID_NOT_FOUND,                 /* c0000036 */
223    ERROR_INVALID_HANDLE,                   /* c0000037 (STATUS_PORT_DISCONNECTED) */
224    ERROR_MR_MID_NOT_FOUND,                 /* c0000038 (STATUS_DEVICE_ALREADY_ATTACHED) */
225    ERROR_BAD_PATHNAME,                     /* c0000039 (STATUS_OBJECT_PATH_INVALID) */
226    ERROR_PATH_NOT_FOUND,                   /* c000003a (STATUS_OBJECT_PATH_NOT_FOUND) */
227    ERROR_BAD_PATHNAME,                     /* c000003b (STATUS_PATH_SYNTAX_BAD) */
228    ERROR_IO_DEVICE,                        /* c000003c (STATUS_DATA_OVERRUN) */
229    ERROR_IO_DEVICE,                        /* c000003d (STATUS_DATA_LATE_ERROR) */
230    ERROR_CRC,                              /* c000003e (STATUS_DATA_ERROR) */
231    ERROR_CRC,                              /* c000003f (STATUS_CRC_ERROR) */
232    ERROR_NOT_ENOUGH_MEMORY,                /* c0000040 (STATUS_SECTION_TOO_BIG) */
233    ERROR_ACCESS_DENIED,                    /* c0000041 (STATUS_PORT_CONNECTION_REFUSED) */
234    ERROR_INVALID_HANDLE,                   /* c0000042 (STATUS_INVALID_PORT_HANDLE) */
235    ERROR_SHARING_VIOLATION,                /* c0000043 (STATUS_SHARING_VIOLATION) */
236    ERROR_NOT_ENOUGH_QUOTA,                 /* c0000044 (STATUS_QUOTA_EXCEEDED) */
237    ERROR_INVALID_PARAMETER,                /* c0000045 (STATUS_INVALID_PAGE_PROTECTION) */
238    ERROR_NOT_OWNER,                        /* c0000046 (STATUS_MUTANT_NOT_OWNED) */
239    ERROR_TOO_MANY_POSTS,                   /* c0000047 (STATUS_SEMAPHORE_LIMIT_EXCEEDED) */
240    ERROR_INVALID_PARAMETER,                /* c0000048 (STATUS_PORT_ALREADY_SET) */
241    ERROR_INVALID_PARAMETER,                /* c0000049 */
242    ERROR_SIGNAL_REFUSED,                   /* c000004a (STATUS_SUSPEND_COUNT_EXCEEDED) */
243    ERROR_ACCESS_DENIED,                    /* c000004b */
244    ERROR_INVALID_PARAMETER,                /* c000004c */
245    ERROR_INVALID_PARAMETER,                /* c000004d */
246    ERROR_INVALID_PARAMETER,                /* c000004e */
247    ERROR_MR_MID_NOT_FOUND,                 /* c000004f */
248    ERROR_EA_LIST_INCONSISTENT,             /* c0000050 */
249    ERROR_FILE_CORRUPT,                     /* c0000051 */
250    ERROR_FILE_CORRUPT,                     /* c0000052 */
251    ERROR_FILE_CORRUPT,                     /* c0000053 */
252    ERROR_LOCK_VIOLATION,                   /* c0000054 (STATUS_LOCK_NOT_GRANTED) */
253    ERROR_LOCK_VIOLATION,                   /* c0000055 (STATUS_FILE_LOCK_CONFLICT) */
254    ERROR_ACCESS_DENIED,                    /* c0000056 */
255    ERROR_NOT_SUPPORTED,                    /* c0000057 */
256    ERROR_UNKNOWN_REVISION,                 /* c0000058 (STATUS_UNKNOWN_REVISION) */
257    ERROR_REVISION_MISMATCH,                /* c0000059 */
258    ERROR_INVALID_OWNER,                    /* c000005a */
259    ERROR_INVALID_PRIMARY_GROUP,            /* c000005b */
260    ERROR_NO_IMPERSONATION_TOKEN,           /* c000005c */
261    ERROR_CANT_DISABLE_MANDATORY,           /* c000005d */
262    ERROR_NO_LOGON_SERVERS,                 /* c000005e */
263    ERROR_NO_SUCH_LOGON_SESSION,            /* c000005f */
264    ERROR_NO_SUCH_PRIVILEGE,                /* c0000060 */
265    ERROR_PRIVILEGE_NOT_HELD,               /* c0000061 */
266    ERROR_INVALID_ACCOUNT_NAME,             /* c0000062 */
267    ERROR_USER_EXISTS,                      /* c0000063 */
268    ERROR_NO_SUCH_USER,                     /* c0000064 */
269    ERROR_GROUP_EXISTS,                     /* c0000065 */
270    ERROR_NO_SUCH_GROUP,                    /* c0000066 */
271    ERROR_MEMBER_IN_GROUP,                  /* c0000067 */
272    ERROR_MEMBER_NOT_IN_GROUP,              /* c0000068 */
273    ERROR_LAST_ADMIN,                       /* c0000069 */
274    ERROR_INVALID_PASSWORD,                 /* c000006a */
275    ERROR_ILL_FORMED_PASSWORD,              /* c000006b */
276    ERROR_PASSWORD_RESTRICTION,             /* c000006c */
277    ERROR_LOGON_FAILURE,                    /* c000006d */
278    ERROR_ACCOUNT_RESTRICTION,              /* c000006e */
279    ERROR_INVALID_LOGON_HOURS,              /* c000006f */
280    ERROR_INVALID_WORKSTATION,              /* c0000070 */
281    ERROR_PASSWORD_EXPIRED,                 /* c0000071 */
282    ERROR_ACCOUNT_DISABLED,                 /* c0000072 */
283    ERROR_NONE_MAPPED,                      /* c0000073 */
284    ERROR_TOO_MANY_LUIDS_REQUESTED,         /* c0000074 */
285    ERROR_LUIDS_EXHAUSTED,                  /* c0000075 */
286    ERROR_INVALID_SUB_AUTHORITY,            /* c0000076 */
287    ERROR_INVALID_ACL,                      /* c0000077 */
288    ERROR_INVALID_SID,                      /* c0000078 */
289    ERROR_INVALID_SECURITY_DESCR,           /* c0000079 (STATUS_INVALID_SECURITY_DESCR) */
290    ERROR_PROC_NOT_FOUND,                   /* c000007a */
291    ERROR_BAD_EXE_FORMAT,                   /* c000007b */
292    ERROR_NO_TOKEN,                         /* c000007c */
293    ERROR_BAD_INHERITANCE_ACL,              /* c000007d */
294    ERROR_NOT_LOCKED,                       /* c000007e */
295    ERROR_DISK_FULL,                        /* c000007f (STATUS_DISK_FULL) */
296    ERROR_SERVER_DISABLED,                  /* c0000080 */
297    ERROR_SERVER_NOT_DISABLED,              /* c0000081 */
298    ERROR_TOO_MANY_NAMES,                   /* c0000082 */
299    ERROR_NO_MORE_ITEMS,                    /* c0000083 */
300    ERROR_INVALID_ID_AUTHORITY,             /* c0000084 */
301    ERROR_NO_MORE_ITEMS,                    /* c0000085 */
302    ERROR_LABEL_TOO_LONG,                   /* c0000086 */
303    ERROR_OUTOFMEMORY,                      /* c0000087 (STATUS_SECTION_NOT_EXTENDED) */
304    ERROR_INVALID_ADDRESS,                  /* c0000088 */
305    ERROR_RESOURCE_DATA_NOT_FOUND,          /* c0000089 */
306    ERROR_RESOURCE_TYPE_NOT_FOUND,          /* c000008a */
307    ERROR_RESOURCE_NAME_NOT_FOUND,          /* c000008b */
308    0,                                      /* c000008c (STATUS_ARRAY_BOUNDS_EXCEEDED) */
309    0,                                      /* c000008d (STATUS_FLOAT_DENORMAL_OPERAND) */
310    0,                                      /* c000008e (STATUS_FLOAT_DIVIDE_BY_ZERO) */
311    0,                                      /* c000008f (STATUS_FLOAT_INEXACT_RESULT) */
312    0,                                      /* c0000090 (STATUS_FLOAT_INVALID_OPERATION) */
313    0,                                      /* c0000091 (STATUS_FLOAT_OVERFLOW) */
314    0,                                      /* c0000092 (STATUS_FLOAT_STACK_CHECK) */
315    0,                                      /* c0000093 (STATUS_FLOAT_UNDERFLOW) */
316    0,                                      /* c0000094 (STATUS_INTEGER_DIVIDE_BY_ZERO) */
317    ERROR_ARITHMETIC_OVERFLOW,              /* c0000095 (STATUS_INTEGER_OVERFLOW) */
318    0,                                      /* c0000096 (STATUS_PRIVILEGED_INSTRUCTION) */
319    ERROR_NOT_ENOUGH_MEMORY,                /* c0000097 */
320    ERROR_FILE_INVALID,                     /* c0000098 */
321    ERROR_ALLOTTED_SPACE_EXCEEDED,          /* c0000099 */
322    ERROR_NO_SYSTEM_RESOURCES,              /* c000009a */
323    ERROR_PATH_NOT_FOUND,                   /* c000009b */
324    ERROR_CRC,                              /* c000009c */
325    ERROR_NOT_READY,                        /* c000009d */
326    ERROR_NOT_READY,                        /* c000009e */
327    ERROR_INVALID_ADDRESS,                  /* c000009f */
328    ERROR_INVALID_ADDRESS,                  /* c00000a0 */
329    ERROR_WORKING_SET_QUOTA,                /* c00000a1 */
330    ERROR_WRITE_PROTECT,                    /* c00000a2 */
331    ERROR_NOT_READY,                        /* c00000a3 */
332    ERROR_INVALID_GROUP_ATTRIBUTES,         /* c00000a4 */
333    ERROR_BAD_IMPERSONATION_LEVEL,          /* c00000a5 */
334    ERROR_CANT_OPEN_ANONYMOUS,              /* c00000a6 */
335    ERROR_BAD_VALIDATION_CLASS,             /* c00000a7 */
336    ERROR_BAD_TOKEN_TYPE,                   /* c00000a8 */
337    ERROR_MR_MID_NOT_FOUND,                 /* c00000a9 */
338    ERROR_MR_MID_NOT_FOUND,                 /* c00000aa */
339    ERROR_PIPE_BUSY,                        /* c00000ab */
340    ERROR_PIPE_BUSY,                        /* c00000ac */
341    ERROR_BAD_PIPE,                         /* c00000ad */
342    ERROR_PIPE_BUSY,                        /* c00000ae */
343    ERROR_INVALID_FUNCTION,                 /* c00000af */
344    ERROR_PIPE_NOT_CONNECTED,               /* c00000b0 */
345    ERROR_NO_DATA,                          /* c00000b1 */
346    ERROR_PIPE_CONNECTED,                   /* c00000b2 */
347    ERROR_PIPE_LISTENING,                   /* c00000b3 */
348    ERROR_BAD_PIPE,                         /* c00000b4 */
349    ERROR_SEM_TIMEOUT,                      /* c00000b5 */
350    ERROR_HANDLE_EOF,                       /* c00000b6 */
351    ERROR_MR_MID_NOT_FOUND,                 /* c00000b7 */
352    ERROR_MR_MID_NOT_FOUND,                 /* c00000b8 */
353    ERROR_MR_MID_NOT_FOUND,                 /* c00000b9 */
354    ERROR_ACCESS_DENIED,                    /* c00000ba */
355    ERROR_NOT_SUPPORTED,                    /* c00000bb */
356    ERROR_REM_NOT_LIST,                     /* c00000bc */
357    ERROR_DUP_NAME,                         /* c00000bd */
358    ERROR_BAD_NETPATH,                      /* c00000be */
359    ERROR_NETWORK_BUSY,                     /* c00000bf */
360    ERROR_DEV_NOT_EXIST,                    /* c00000c0 */
361    ERROR_TOO_MANY_CMDS,                    /* c00000c1 */
362    ERROR_ADAP_HDW_ERR,                     /* c00000c2 */
363    ERROR_BAD_NET_RESP,                     /* c00000c3 */
364    ERROR_UNEXP_NET_ERR,                    /* c00000c4 */
365    ERROR_BAD_REM_ADAP,                     /* c00000c5 */
366    ERROR_PRINTQ_FULL,                      /* c00000c6 */
367    ERROR_NO_SPOOL_SPACE,                   /* c00000c7 */
368    ERROR_PRINT_CANCELLED,                  /* c00000c8 */
369    ERROR_NETNAME_DELETED,                  /* c00000c9 */
370    ERROR_NETWORK_ACCESS_DENIED,            /* c00000ca */
371    ERROR_BAD_DEV_TYPE,                     /* c00000cb */
372    ERROR_BAD_NET_NAME,                     /* c00000cc */
373    ERROR_TOO_MANY_NAMES,                   /* c00000cd */
374    ERROR_TOO_MANY_SESS,                    /* c00000ce */
375    ERROR_SHARING_PAUSED,                   /* c00000cf */
376    ERROR_REQ_NOT_ACCEP,                    /* c00000d0 */
377    ERROR_REDIR_PAUSED,                     /* c00000d1 */
378    ERROR_NET_WRITE_FAULT,                  /* c00000d2 */
379    ERROR_MR_MID_NOT_FOUND,                 /* c00000d3 */
380    ERROR_NOT_SAME_DEVICE,                  /* c00000d4 */
381    ERROR_MR_MID_NOT_FOUND,                 /* c00000d5 */
382    ERROR_VC_DISCONNECTED,                  /* c00000d6 */
383    ERROR_NO_SECURITY_ON_OBJECT,            /* c00000d7 */
384    ERROR_MR_MID_NOT_FOUND,                 /* c00000d8 */
385    ERROR_NO_DATA,                          /* c00000d9 */
386    ERROR_CANT_ACCESS_DOMAIN_INFO,          /* c00000da */
387    ERROR_MR_MID_NOT_FOUND,                 /* c00000db */
388    ERROR_INVALID_SERVER_STATE,             /* c00000dc */
389    ERROR_INVALID_DOMAIN_STATE,             /* c00000dd */
390    ERROR_INVALID_DOMAIN_ROLE,              /* c00000de */
391    ERROR_NO_SUCH_DOMAIN,                   /* c00000df */
392    ERROR_DOMAIN_EXISTS,                    /* c00000e0 */
393    ERROR_DOMAIN_LIMIT_EXCEEDED,            /* c00000e1 */
394    ERROR_MR_MID_NOT_FOUND,                 /* c00000e2 */
395    ERROR_MR_MID_NOT_FOUND,                 /* c00000e3 */
396    ERROR_INTERNAL_DB_CORRUPTION,           /* c00000e4 */
397    ERROR_INTERNAL_ERROR,                   /* c00000e5 */
398    ERROR_GENERIC_NOT_MAPPED,               /* c00000e6 */
399    ERROR_BAD_DESCRIPTOR_FORMAT,            /* c00000e7 */
400    ERROR_INVALID_USER_BUFFER,              /* c00000e8 */
401    ERROR_MR_MID_NOT_FOUND,                 /* c00000e9 */
402    ERROR_MR_MID_NOT_FOUND,                 /* c00000ea */
403    ERROR_MR_MID_NOT_FOUND,                 /* c00000eb */
404    ERROR_MR_MID_NOT_FOUND,                 /* c00000ec */
405    ERROR_NOT_LOGON_PROCESS,                /* c00000ed */
406    ERROR_LOGON_SESSION_EXISTS,             /* c00000ee */
407    ERROR_INVALID_PARAMETER,                /* c00000ef */
408    ERROR_INVALID_PARAMETER,                /* c00000f0 (STATUS_INVALID_PARAMETER_2) */
409    ERROR_INVALID_PARAMETER,                /* c00000f1 */
410    ERROR_INVALID_PARAMETER,                /* c00000f2 */
411    ERROR_INVALID_PARAMETER,                /* c00000f3 */
412    ERROR_INVALID_PARAMETER,                /* c00000f4 */
413    ERROR_INVALID_PARAMETER,                /* c00000f5 */
414    ERROR_INVALID_PARAMETER,                /* c00000f6 */
415    ERROR_INVALID_PARAMETER,                /* c00000f7 */
416    ERROR_INVALID_PARAMETER,                /* c00000f8 */
417    ERROR_INVALID_PARAMETER,                /* c00000f9 */
418    ERROR_INVALID_PARAMETER,                /* c00000fa */
419    ERROR_PATH_NOT_FOUND,                   /* c00000fb */
420    ERROR_MR_MID_NOT_FOUND,                 /* c00000fc */
421    ERROR_STACK_OVERFLOW,                   /* c00000fd (STATUS_STACK_OVERFLOW) */
422    ERROR_NO_SUCH_PACKAGE,                  /* c00000fe */
423    ERROR_MR_MID_NOT_FOUND,                 /* c00000ff */
424    ERROR_ENVVAR_NOT_FOUND,                 /* c0000100 */
425    ERROR_DIR_NOT_EMPTY,                    /* c0000101 (STATUS_DIRECTORY_NOT_EMPTY) */
426    ERROR_FILE_CORRUPT,                     /* c0000102 */
427    ERROR_DIRECTORY,                        /* c0000103 */
428    ERROR_BAD_LOGON_SESSION_STATE,          /* c0000104 */
429    ERROR_LOGON_SESSION_COLLISION,          /* c0000105 */
430    ERROR_FILENAME_EXCED_RANGE,             /* c0000106 */
431    ERROR_MR_MID_NOT_FOUND,                 /* c0000107 */
432    ERROR_DEVICE_IN_USE,                    /* c0000108 */
433    ERROR_MR_MID_NOT_FOUND,                 /* c0000109 */
434    ERROR_ACCESS_DENIED,                    /* c000010a */
435    ERROR_INVALID_LOGON_TYPE,               /* c000010b */
436    ERROR_MR_MID_NOT_FOUND,                 /* c000010c */
437    ERROR_CANNOT_IMPERSONATE,               /* c000010d */
438    ERROR_SERVICE_ALREADY_RUNNING,          /* c000010e */
439    ERROR_MR_MID_NOT_FOUND,                 /* c000010f */
440    ERROR_MR_MID_NOT_FOUND,                 /* c0000110 */
441    ERROR_MR_MID_NOT_FOUND,                 /* c0000111 */
442    ERROR_MR_MID_NOT_FOUND,                 /* c0000112 */
443    ERROR_MR_MID_NOT_FOUND,                 /* c0000113 */
444    ERROR_MR_MID_NOT_FOUND,                 /* c0000114 */
445    ERROR_MR_MID_NOT_FOUND,                 /* c0000115 */
446    ERROR_MR_MID_NOT_FOUND,                 /* c0000116 */
447    ERROR_MR_MID_NOT_FOUND,                 /* c0000117 */
448    ERROR_MR_MID_NOT_FOUND,                 /* c0000118 */
449    ERROR_MR_MID_NOT_FOUND,                 /* c0000119 */
450    ERROR_MR_MID_NOT_FOUND,                 /* c000011a */
451    ERROR_BAD_EXE_FORMAT,                   /* c000011b */
452    ERROR_RXACT_INVALID_STATE,              /* c000011c */
453    ERROR_RXACT_COMMIT_FAILURE,             /* c000011d */
454    ERROR_FILE_INVALID,                     /* c000011e */
455    ERROR_TOO_MANY_OPEN_FILES,              /* c000011f (STATUS_TOO_MANY_OPENED_FILES) */
456    ERROR_OPERATION_ABORTED,                /* c0000120 */
457    ERROR_ACCESS_DENIED,                    /* c0000121 */
458    ERROR_INVALID_COMPUTERNAME,             /* c0000122 */
459    ERROR_ACCESS_DENIED,                    /* c0000123 */
460    ERROR_SPECIAL_ACCOUNT,                  /* c0000124 */
461    ERROR_SPECIAL_GROUP,                    /* c0000125 */
462    ERROR_SPECIAL_USER,                     /* c0000126 */
463    ERROR_MEMBERS_PRIMARY_GROUP,            /* c0000127 */
464    ERROR_INVALID_HANDLE,                   /* c0000128 */
465    ERROR_MR_MID_NOT_FOUND,                 /* c0000129 */
466    ERROR_MR_MID_NOT_FOUND,                 /* c000012a */
467    ERROR_TOKEN_ALREADY_IN_USE,             /* c000012b */
468    ERROR_MR_MID_NOT_FOUND,                 /* c000012c */
469    ERROR_COMMITMENT_LIMIT,                 /* c000012d */
470    ERROR_BAD_EXE_FORMAT,                   /* c000012e */
471    ERROR_BAD_EXE_FORMAT,                   /* c000012f */
472    ERROR_BAD_EXE_FORMAT,                   /* c0000130 */
473    ERROR_BAD_EXE_FORMAT,                   /* c0000131 */
474    ERROR_MR_MID_NOT_FOUND,                 /* c0000132 */
475    ERROR_MR_MID_NOT_FOUND,                 /* c0000133 */
476    ERROR_MR_MID_NOT_FOUND,                 /* c0000134 */
477    ERROR_MOD_NOT_FOUND,                    /* c0000135 */
478    ERROR_MR_MID_NOT_FOUND,                 /* c0000136 */
479    ERROR_MR_MID_NOT_FOUND,                 /* c0000137 */
480    ERROR_INVALID_ORDINAL,                  /* c0000138 */
481    ERROR_PROC_NOT_FOUND,                   /* c0000139 */
482    ERROR_MR_MID_NOT_FOUND,                 /* c000013a (STATUS_CONTROL_C_EXIT) */
483    ERROR_NETNAME_DELETED,                  /* c000013b */
484    ERROR_NETNAME_DELETED,                  /* c000013c */
485    ERROR_REM_NOT_LIST,                     /* c000013d */
486    ERROR_UNEXP_NET_ERR,                    /* c000013e */
487    ERROR_UNEXP_NET_ERR,                    /* c000013f */
488    ERROR_UNEXP_NET_ERR,                    /* c0000140 */
489    ERROR_UNEXP_NET_ERR,                    /* c0000141 */
490    ERROR_DLL_INIT_FAILED,                  /* c0000142 */
491    ERROR_MR_MID_NOT_FOUND,                 /* c0000143 */
492    ERROR_MR_MID_NOT_FOUND,                 /* c0000144 */
493    ERROR_MR_MID_NOT_FOUND,                 /* c0000145 */
494    ERROR_MR_MID_NOT_FOUND,                 /* c0000146 */
495    ERROR_MR_MID_NOT_FOUND,                 /* c0000147 */
496    ERROR_INVALID_LEVEL,                    /* c0000148 */
497    ERROR_INVALID_PASSWORD,                 /* c0000149 */
498    ERROR_MR_MID_NOT_FOUND,                 /* c000014a */
499    ERROR_BROKEN_PIPE,                      /* c000014b (STATUS_PIPE_BROKEN) */
500    ERROR_BADDB,                            /* c000014c */
501    ERROR_REGISTRY_IO_FAILED,               /* c000014d */
502    ERROR_MR_MID_NOT_FOUND,                 /* c000014e */
503    ERROR_UNRECOGNIZED_VOLUME,              /* c000014f */
504    ERROR_SERIAL_NO_DEVICE,                 /* c0000150 */
505    ERROR_NO_SUCH_ALIAS,                    /* c0000151 */
506    ERROR_MEMBER_NOT_IN_ALIAS,              /* c0000152 */
507    ERROR_MEMBER_IN_ALIAS,                  /* c0000153 */
508    ERROR_ALIAS_EXISTS,                     /* c0000154 */
509    ERROR_LOGON_NOT_GRANTED,                /* c0000155 */
510    ERROR_TOO_MANY_SECRETS,                 /* c0000156 */
511    ERROR_SECRET_TOO_LONG,                  /* c0000157 */
512    ERROR_INTERNAL_DB_ERROR,                /* c0000158 */
513    ERROR_FULLSCREEN_MODE,                  /* c0000159 */
514    ERROR_TOO_MANY_CONTEXT_IDS,             /* c000015a */
515    ERROR_LOGON_TYPE_NOT_GRANTED,           /* c000015b */
516    ERROR_NOT_REGISTRY_FILE,                /* c000015c (STATUS_NOT_REGISTRY_FILE) */
517    ERROR_NT_CROSS_ENCRYPTION_REQUIRED,     /* c000015d */
518    ERROR_MR_MID_NOT_FOUND,                 /* c000015e */
519    ERROR_IO_DEVICE,                        /* c000015f */
520    ERROR_MR_MID_NOT_FOUND,                 /* c0000160 */
521    ERROR_MR_MID_NOT_FOUND,                 /* c0000161 */
522    ERROR_NO_UNICODE_TRANSLATION,           /* c0000162 */
523    ERROR_MR_MID_NOT_FOUND,                 /* c0000163 */
524    ERROR_MR_MID_NOT_FOUND,                 /* c0000164 */
525    ERROR_FLOPPY_ID_MARK_NOT_FOUND,         /* c0000165 */
526    ERROR_FLOPPY_WRONG_CYLINDER,            /* c0000166 */
527    ERROR_FLOPPY_UNKNOWN_ERROR,             /* c0000167 */
528    ERROR_FLOPPY_BAD_REGISTERS,             /* c0000168 */
529    ERROR_DISK_RECALIBRATE_FAILED,          /* c0000169 */
530    ERROR_DISK_OPERATION_FAILED,            /* c000016a */
531    ERROR_DISK_RESET_FAILED,                /* c000016b */
532    ERROR_IRQ_BUSY,                         /* c000016c */
533    ERROR_IO_DEVICE,                        /* c000016d */
534    ERROR_MR_MID_NOT_FOUND,                 /* c000016e */
535    ERROR_MR_MID_NOT_FOUND,                 /* c000016f */
536    ERROR_MR_MID_NOT_FOUND,                 /* c0000170 */
537    ERROR_MR_MID_NOT_FOUND,                 /* c0000171 */
538    ERROR_PARTITION_FAILURE,                /* c0000172 (STATUS_PARTITION_FAILURE) */
539    ERROR_INVALID_BLOCK_LENGTH,             /* c0000173 (STATUS_INVALID_BLOCK_LENGTH) */
540    ERROR_DEVICE_NOT_PARTITIONED,           /* c0000174 (STATUS_DEVICE_NOT_PARTITIONED) */
541    ERROR_UNABLE_TO_LOCK_MEDIA,             /* c0000175 (STATUS_UNABLE_TO_LOCK_MEDIA) */
542    ERROR_UNABLE_TO_UNLOAD_MEDIA,           /* c0000176 (STATUS_UNABLE_TO_UNLOAD_MEDIA) */
543    ERROR_EOM_OVERFLOW,                     /* c0000177 (STATUS_EOM_OVERFLOW) */
544    ERROR_NO_MEDIA_IN_DRIVE,                /* c0000178 (STATUS_NO_MEDIA) */
545    ERROR_MR_MID_NOT_FOUND,                 /* c0000179 */
546    ERROR_NO_SUCH_MEMBER,                   /* c000017a (STATUS_NO_SUCH_MEMBER) */
547    ERROR_INVALID_MEMBER,                   /* c000017b (STATUS_INVALID_MEMBER) */
548    ERROR_KEY_DELETED,                      /* c000017c (STATUS_KEY_DELETED) */
549    ERROR_NO_LOG_SPACE,                     /* c000017d (STATUS_NO_LOG_SPACE) */
550    ERROR_TOO_MANY_SIDS,                    /* c000017e (STATUS_TOO_MANY_SIDS) */
551    ERROR_LM_CROSS_ENCRYPTION_REQUIRED,     /* c000017f (STATUS_LM_CROSS_ENCRYPTION_REQUIRED) */
552    ERROR_KEY_HAS_CHILDREN,                 /* c0000180 (STATUS_KEY_HAS_CHILDREN) */
553    ERROR_CHILD_MUST_BE_VOLATILE,           /* c0000181 (STATUS_CHILD_MUST_BE_VOLATILE) */
554    ERROR_INVALID_PARAMETER,                /* c0000182 */
555    ERROR_IO_DEVICE,                        /* c0000183 (STATUS_DRIVER_INTERNAL_ERROR) */
556    ERROR_BAD_COMMAND,                      /* c0000184 (STATUS_INVALID_DEVICE_STATE) */
557    ERROR_IO_DEVICE,                        /* c0000185 (STATUS_IO_DEVICE_ERROR) */
558    ERROR_IO_DEVICE,                        /* c0000186 (STATUS_DEVICE_PROTOCOL_ERROR) */
559    ERROR_MR_MID_NOT_FOUND,                 /* c0000187 (STATUS_BACKUP_CONTROLLER) */
560    ERROR_LOG_FILE_FULL,                    /* c0000188 (STATUS_LOG_FILE_FULL) */
561    ERROR_WRITE_PROTECT,                    /* c0000189 (STATUS_TOO_LATE) */
562    ERROR_NO_TRUST_LSA_SECRET,              /* c000018a (STATUS_NO_TRUST_LSA_SECRET) */
563    ERROR_NO_TRUST_SAM_ACCOUNT,             /* c000018b (STATUS_NO_TRUST_SAM_ACCOUNT) */
564    ERROR_TRUSTED_DOMAIN_FAILURE,           /* c000018c (STATUS_TRUSTED_DOMAIN_FAILURE) */
565    ERROR_TRUSTED_RELATIONSHIP_FAILURE,     /* c000018d (STATUS_TRUSTED_RELATIONSHIP_FAILURE) */
566    ERROR_EVENTLOG_FILE_CORRUPT,            /* c000018e (STATUS_EVENTLOG_FILE_CORRUPT) */
567    ERROR_EVENTLOG_CANT_START,              /* c000018f (STATUS_EVENTLOG_CANT_START) */
568    ERROR_TRUST_FAILURE,                    /* c0000190 (STATUS_TRUST_FAILURE) */
569    ERROR_MR_MID_NOT_FOUND,                 /* c0000191 (STATUS_MUTANT_LIMIT_EXCEEDED) */
570    ERROR_NETLOGON_NOT_STARTED,             /* c0000192 (STATUS_NETLOGON_NOT_STARTED) */
571    ERROR_ACCOUNT_EXPIRED,                  /* c0000193 (STATUS_ACCOUNT_EXPIRED) */
572    ERROR_POSSIBLE_DEADLOCK,                /* c0000194 (STATUS_POSSIBLE_DEADLOCK) */
573    ERROR_SESSION_CREDENTIAL_CONFLICT,      /* c0000195 (STATUS_NETWORK_CREDENTIAL_CONFLICT) */
574    ERROR_REMOTE_SESSION_LIMIT_EXCEEDED,    /* c0000196 (STATUS_REMOTE_SESSION_LIMIT) */
575    ERROR_EVENTLOG_FILE_CHANGED,            /* c0000197 (STATUS_EVENTLOG_FILE_CHANGED) */
576    ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT,/* c0000198 (STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT) */
577    ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT,/* c0000199 (STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT) */
578    ERROR_NOLOGON_SERVER_TRUST_ACCOUNT,     /* c000019a (STATUS_NOLOGON_SERVER_TRUST_ACCOUNT) */
579    ERROR_DOMAIN_TRUST_INCONSISTENT         /* c000019b (STATUS_DOMAIN_TRUST_INCONSISTENT) */
580 };
581
582 static const WORD table_c0000202[109] =
583 {
584    ERROR_NO_USER_SESSION_KEY,              /* c0000202 */
585    ERROR_UNEXP_NET_ERR,                    /* c0000203 */
586    ERROR_RESOURCE_LANG_NOT_FOUND,          /* c0000204 (STATUS_RESOURCE_LANG_NOT_FOUND) */
587    ERROR_NOT_ENOUGH_SERVER_MEMORY,         /* c0000205 */
588    ERROR_INVALID_USER_BUFFER,              /* c0000206 */
589    ERROR_INVALID_NETNAME,                  /* c0000207 */
590    ERROR_INVALID_NETNAME,                  /* c0000208 */
591    ERROR_TOO_MANY_NAMES,                   /* c0000209 */
592    ERROR_DUP_NAME,                         /* c000020a */
593    ERROR_NETNAME_DELETED,                  /* c000020b */
594    ERROR_NETNAME_DELETED,                  /* c000020c */
595    ERROR_NETNAME_DELETED,                  /* c000020d */
596    ERROR_TOO_MANY_NAMES,                   /* c000020e */
597    ERROR_UNEXP_NET_ERR,                    /* c000020f */
598    ERROR_UNEXP_NET_ERR,                    /* c0000210 */
599    ERROR_UNEXP_NET_ERR,                    /* c0000211 */
600    ERROR_UNEXP_NET_ERR,                    /* c0000212 */
601    ERROR_UNEXP_NET_ERR,                    /* c0000213 */
602    ERROR_UNEXP_NET_ERR,                    /* c0000214 */
603    ERROR_UNEXP_NET_ERR,                    /* c0000215 */
604    ERROR_NOT_SUPPORTED,                    /* c0000216 */
605    ERROR_NOT_SUPPORTED,                    /* c0000217 */
606    ERROR_MR_MID_NOT_FOUND,                 /* c0000218 */
607    ERROR_MR_MID_NOT_FOUND,                 /* c0000219 */
608    ERROR_MR_MID_NOT_FOUND,                 /* c000021a */
609    ERROR_MR_MID_NOT_FOUND,                 /* c000021b */
610    ERROR_NO_BROWSER_SERVERS_FOUND,         /* c000021c */
611    ERROR_MR_MID_NOT_FOUND,                 /* c000021d */
612    ERROR_MR_MID_NOT_FOUND,                 /* c000021e */
613    ERROR_MR_MID_NOT_FOUND,                 /* c000021f */
614    ERROR_MAPPED_ALIGNMENT,                 /* c0000220 */
615    ERROR_BAD_EXE_FORMAT,                   /* c0000221 */
616    ERROR_MR_MID_NOT_FOUND,                 /* c0000222 */
617    ERROR_MR_MID_NOT_FOUND,                 /* c0000223 */
618    ERROR_PASSWORD_MUST_CHANGE,             /* c0000224 */
619    ERROR_MR_MID_NOT_FOUND,                 /* c0000225 */
620    ERROR_MR_MID_NOT_FOUND,                 /* c0000226 */
621    ERROR_MR_MID_NOT_FOUND,                 /* c0000227 */
622    ERROR_MR_MID_NOT_FOUND,                 /* c0000228 */
623    ERROR_MR_MID_NOT_FOUND,                 /* c0000229 */
624    0,                                      /* c000022a */
625    0,                                      /* c000022b */
626    ERROR_MR_MID_NOT_FOUND,                 /* c000022c */
627    ERROR_MR_MID_NOT_FOUND,                 /* c000022d */
628    ERROR_MR_MID_NOT_FOUND,                 /* c000022e */
629    ERROR_MR_MID_NOT_FOUND,                 /* c000022f */
630    ERROR_MR_MID_NOT_FOUND,                 /* c0000230 */
631    ERROR_MR_MID_NOT_FOUND,                 /* c0000231 */
632    ERROR_MR_MID_NOT_FOUND,                 /* c0000232 */
633    ERROR_DOMAIN_CONTROLLER_NOT_FOUND,      /* c0000233 */
634    ERROR_ACCOUNT_LOCKED_OUT,               /* c0000234 */
635    ERROR_INVALID_HANDLE,                   /* c0000235 */
636    ERROR_CONNECTION_REFUSED,               /* c0000236 */
637    ERROR_GRACEFUL_DISCONNECT,              /* c0000237 */
638    ERROR_ADDRESS_ALREADY_ASSOCIATED,       /* c0000238 */
639    ERROR_ADDRESS_NOT_ASSOCIATED,           /* c0000239 */
640    ERROR_CONNECTION_INVALID,               /* c000023a */
641    ERROR_CONNECTION_ACTIVE,                /* c000023b */
642    ERROR_NETWORK_UNREACHABLE,              /* c000023c */
643    ERROR_HOST_UNREACHABLE,                 /* c000023d */
644    ERROR_PROTOCOL_UNREACHABLE,             /* c000023e */
645    ERROR_PORT_UNREACHABLE,                 /* c000023f */
646    ERROR_REQUEST_ABORTED,                  /* c0000240 */
647    ERROR_CONNECTION_ABORTED,               /* c0000241 */
648    ERROR_MR_MID_NOT_FOUND,                 /* c0000242 */
649    ERROR_USER_MAPPED_FILE,                 /* c0000243 */
650    ERROR_MR_MID_NOT_FOUND,                 /* c0000244 */
651    ERROR_MR_MID_NOT_FOUND,                 /* c0000245 */
652    ERROR_CONNECTION_COUNT_LIMIT,           /* c0000246 */
653    ERROR_LOGIN_TIME_RESTRICTION,           /* c0000247 */
654    ERROR_LOGIN_WKSTA_RESTRICTION,          /* c0000248 */
655    ERROR_BAD_EXE_FORMAT,                   /* c0000249 */
656    ERROR_MR_MID_NOT_FOUND,                 /* c000024a */
657    ERROR_MR_MID_NOT_FOUND,                 /* c000024b */
658    ERROR_MR_MID_NOT_FOUND,                 /* c000024c */
659    ERROR_MR_MID_NOT_FOUND,                 /* c000024d */
660    ERROR_MR_MID_NOT_FOUND,                 /* c000024e */
661    ERROR_MR_MID_NOT_FOUND,                 /* c000024f */
662    ERROR_MR_MID_NOT_FOUND,                 /* c0000250 */
663    ERROR_MR_MID_NOT_FOUND,                 /* c0000251 */
664    ERROR_MR_MID_NOT_FOUND,                 /* c0000252 */
665    ERROR_INTERNAL_ERROR,                   /* c0000253 */
666    ERROR_MR_MID_NOT_FOUND,                 /* c0000254 */
667    ERROR_MR_MID_NOT_FOUND,                 /* c0000255 */
668    ERROR_MR_MID_NOT_FOUND,                 /* c0000256 */
669    ERROR_HOST_UNREACHABLE,                 /* c0000257 */
670    ERROR_MR_MID_NOT_FOUND,                 /* c0000258 */
671    ERROR_LICENSE_QUOTA_EXCEEDED,           /* c0000259 */
672    ERROR_MR_MID_NOT_FOUND,                 /* c000025a */
673    ERROR_MR_MID_NOT_FOUND,                 /* c000025b */
674    ERROR_MR_MID_NOT_FOUND,                 /* c000025c */
675    ERROR_MR_MID_NOT_FOUND,                 /* c000025d */
676    ERROR_SERVICE_DISABLED,                 /* c000025e */
677    ERROR_MR_MID_NOT_FOUND,                 /* c000025f */
678    ERROR_MR_MID_NOT_FOUND,                 /* c0000260 */
679    ERROR_MR_MID_NOT_FOUND,                 /* c0000261 */
680    ERROR_INVALID_ORDINAL,                  /* c0000262 */
681    ERROR_PROC_NOT_FOUND,                   /* c0000263 */
682    ERROR_NOT_OWNER,                        /* c0000264 */
683    ERROR_TOO_MANY_LINKS,                   /* c0000265 */
684    ERROR_MR_MID_NOT_FOUND,                 /* c0000266 */
685    ERROR_MR_MID_NOT_FOUND,                 /* c0000267 */
686    ERROR_MR_MID_NOT_FOUND,                 /* c0000268 */
687    ERROR_MR_MID_NOT_FOUND,                 /* c0000269 */
688    ERROR_MR_MID_NOT_FOUND,                 /* c000026a */
689    ERROR_MR_MID_NOT_FOUND,                 /* c000026b */
690    ERROR_MR_MID_NOT_FOUND,                 /* c000026c */
691    ERROR_MR_MID_NOT_FOUND,                 /* c000026d */
692    ERROR_NOT_READY                         /* c000026e */
693 };
694
695 static const WORD table_c0020001[88] =
696 {
697    RPC_S_INVALID_STRING_BINDING,           /* c0020001 */
698    RPC_S_WRONG_KIND_OF_BINDING,            /* c0020002 */
699    ERROR_INVALID_HANDLE,                   /* c0020003 */
700    RPC_S_PROTSEQ_NOT_SUPPORTED,            /* c0020004 */
701    RPC_S_INVALID_RPC_PROTSEQ,              /* c0020005 */
702    RPC_S_INVALID_STRING_UUID,              /* c0020006 */
703    RPC_S_INVALID_ENDPOINT_FORMAT,          /* c0020007 */
704    RPC_S_INVALID_NET_ADDR,                 /* c0020008 */
705    RPC_S_NO_ENDPOINT_FOUND,                /* c0020009 */
706    RPC_S_INVALID_TIMEOUT,                  /* c002000a */
707    RPC_S_OBJECT_NOT_FOUND,                 /* c002000b */
708    RPC_S_ALREADY_REGISTERED,               /* c002000c */
709    RPC_S_TYPE_ALREADY_REGISTERED,          /* c002000d */
710    RPC_S_ALREADY_LISTENING,                /* c002000e */
711    RPC_S_NO_PROTSEQS_REGISTERED,           /* c002000f */
712    RPC_S_NOT_LISTENING,                    /* c0020010 */
713    RPC_S_UNKNOWN_MGR_TYPE,                 /* c0020011 */
714    RPC_S_UNKNOWN_IF,                       /* c0020012 */
715    RPC_S_NO_BINDINGS,                      /* c0020013 */
716    RPC_S_NO_PROTSEQS,                      /* c0020014 */
717    RPC_S_CANT_CREATE_ENDPOINT,             /* c0020015 */
718    RPC_S_OUT_OF_RESOURCES,                 /* c0020016 */
719    RPC_S_SERVER_UNAVAILABLE,               /* c0020017 */
720    RPC_S_SERVER_TOO_BUSY,                  /* c0020018 */
721    RPC_S_INVALID_NETWORK_OPTIONS,          /* c0020019 */
722    RPC_S_NO_CALL_ACTIVE,                   /* c002001a */
723    RPC_S_CALL_FAILED,                      /* c002001b */
724    RPC_S_CALL_FAILED_DNE,                  /* c002001c */
725    RPC_S_PROTOCOL_ERROR,                   /* c002001d */
726    ERROR_MR_MID_NOT_FOUND,                 /* c002001e */
727    RPC_S_UNSUPPORTED_TRANS_SYN,            /* c002001f */
728    ERROR_MR_MID_NOT_FOUND,                 /* c0020020 */
729    RPC_S_UNSUPPORTED_TYPE,                 /* c0020021 */
730    RPC_S_INVALID_TAG,                      /* c0020022 */
731    RPC_S_INVALID_BOUND,                    /* c0020023 */
732    RPC_S_NO_ENTRY_NAME,                    /* c0020024 */
733    RPC_S_INVALID_NAME_SYNTAX,              /* c0020025 */
734    RPC_S_UNSUPPORTED_NAME_SYNTAX,          /* c0020026 */
735    ERROR_MR_MID_NOT_FOUND,                 /* c0020027 */
736    RPC_S_UUID_NO_ADDRESS,                  /* c0020028 */
737    RPC_S_DUPLICATE_ENDPOINT,               /* c0020029 */
738    RPC_S_UNKNOWN_AUTHN_TYPE,               /* c002002a */
739    RPC_S_MAX_CALLS_TOO_SMALL,              /* c002002b */
740    RPC_S_STRING_TOO_LONG,                  /* c002002c */
741    RPC_S_PROTSEQ_NOT_FOUND,                /* c002002d */
742    RPC_S_PROCNUM_OUT_OF_RANGE,             /* c002002e */
743    RPC_S_BINDING_HAS_NO_AUTH,              /* c002002f */
744    RPC_S_UNKNOWN_AUTHN_SERVICE,            /* c0020030 */
745    RPC_S_UNKNOWN_AUTHN_LEVEL,              /* c0020031 */
746    RPC_S_INVALID_AUTH_IDENTITY,            /* c0020032 */
747    RPC_S_UNKNOWN_AUTHZ_SERVICE,            /* c0020033 */
748    EPT_S_INVALID_ENTRY,                    /* c0020034 */
749    EPT_S_CANT_PERFORM_OP,                  /* c0020035 */
750    EPT_S_NOT_REGISTERED,                   /* c0020036 */
751    RPC_S_NOTHING_TO_EXPORT,                /* c0020037 */
752    RPC_S_INCOMPLETE_NAME,                  /* c0020038 */
753    RPC_S_INVALID_VERS_OPTION,              /* c0020039 */
754    RPC_S_NO_MORE_MEMBERS,                  /* c002003a */
755    RPC_S_NOT_ALL_OBJS_UNEXPORTED,          /* c002003b */
756    RPC_S_INTERFACE_NOT_FOUND,              /* c002003c */
757    RPC_S_ENTRY_ALREADY_EXISTS,             /* c002003d */
758    RPC_S_ENTRY_NOT_FOUND,                  /* c002003e */
759    RPC_S_NAME_SERVICE_UNAVAILABLE,         /* c002003f */
760    RPC_S_INVALID_NAF_ID,                   /* c0020040 */
761    RPC_S_CANNOT_SUPPORT,                   /* c0020041 */
762    RPC_S_NO_CONTEXT_AVAILABLE,             /* c0020042 */
763    RPC_S_INTERNAL_ERROR,                   /* c0020043 */
764    RPC_S_ZERO_DIVIDE,                      /* c0020044 */
765    RPC_S_ADDRESS_ERROR,                    /* c0020045 */
766    RPC_S_FP_DIV_ZERO,                      /* c0020046 */
767    RPC_S_FP_UNDERFLOW,                     /* c0020047 */
768    RPC_S_FP_OVERFLOW,                      /* c0020048 */
769    RPC_S_CALL_IN_PROGRESS,                 /* c0020049 */
770    RPC_S_NO_MORE_BINDINGS,                 /* c002004a */
771    RPC_S_GROUP_MEMBER_NOT_FOUND,           /* c002004b */
772    EPT_S_CANT_CREATE,                      /* c002004c */
773    RPC_S_INVALID_OBJECT,                   /* c002004d */
774    ERROR_MR_MID_NOT_FOUND,                 /* c002004e */
775    RPC_S_NO_INTERFACES,                    /* c002004f */
776    RPC_S_CALL_CANCELLED,                   /* c0020050 */
777    RPC_S_BINDING_INCOMPLETE,               /* c0020051 */
778    RPC_S_COMM_FAILURE,                     /* c0020052 */
779    RPC_S_UNSUPPORTED_AUTHN_LEVEL,          /* c0020053 */
780    RPC_S_NO_PRINC_NAME,                    /* c0020054 */
781    RPC_S_NOT_RPC_ERROR,                    /* c0020055 */
782    ERROR_MR_MID_NOT_FOUND,                 /* c0020056 */
783    RPC_S_SEC_PKG_ERROR,                    /* c0020057 */
784    RPC_S_NOT_CANCELLED                     /* c0020058 */
785 };
786
787 static const WORD table_c0030001[12] =
788 {
789    RPC_X_NO_MORE_ENTRIES,                  /* c0030001 */
790    RPC_X_SS_CHAR_TRANS_OPEN_FAIL,          /* c0030002 */
791    RPC_X_SS_CHAR_TRANS_SHORT_FILE,         /* c0030003 */
792    ERROR_INVALID_HANDLE,                   /* c0030004 */
793    ERROR_INVALID_HANDLE,                   /* c0030005 */
794    RPC_X_SS_CONTEXT_DAMAGED,               /* c0030006 */
795    RPC_X_SS_HANDLES_MISMATCH,              /* c0030007 */
796    RPC_X_SS_CANNOT_GET_CALL_HANDLE,        /* c0030008 */
797    RPC_X_NULL_REF_POINTER,                 /* c0030009 */
798    RPC_X_ENUM_VALUE_OUT_OF_RANGE,          /* c003000a */
799    RPC_X_BYTE_COUNT_TOO_SMALL,             /* c003000b */
800    RPC_X_BAD_STUB_DATA                     /* c003000c */
801 };
802
803 static const WORD table_c0030059[6] =
804 {
805    RPC_X_INVALID_ES_ACTION,                /* c0030059 */
806    RPC_X_WRONG_ES_VERSION,                 /* c003005a */
807    RPC_X_WRONG_STUB_VERSION,               /* c003005b */
808    RPC_X_INVALID_PIPE_OBJECT,              /* c003005c */
809    RPC_X_WRONG_PIPE_ORDER,                 /* c003005d */
810    RPC_X_WRONG_PIPE_VERSION                /* c003005e */
811 };
812
813 static const struct error_table error_table[] =
814 {
815     { 0x00000103, 0x0000010e, table_00000103 },
816     { 0x40000002, 0x4000000e, table_40000002 },
817     { 0x40020056, 0x40020057, table_40020056 },
818     { 0x400200af, 0x400200b0, table_400200af },
819     { 0x80000001, 0x80000026, table_80000001 },
820     { 0x80090300, 0x80090317, table_80090300 },
821     { 0xc0000001, 0xc000019c, table_c0000001 },
822     { 0xc0000202, 0xc000026f, table_c0000202 },
823     { 0xc0020001, 0xc0020059, table_c0020001 },
824     { 0xc0030001, 0xc003000d, table_c0030001 },
825     { 0xc0030059, 0xc003005f, table_c0030059 },
826     { 0, 0, 0 }  /* last entry */
827 };