1 /* -*-C-*-
2 
3 Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
4     1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Massachusetts
6     Institute of Technology
7 
8 This file is part of MIT/GNU Scheme.
9 
10 MIT/GNU Scheme is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or (at
13 your option) any later version.
14 
15 MIT/GNU Scheme is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with MIT/GNU Scheme; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
23 USA.
24 
25 */
26 
27 #define SCM_NTTOP_C
28 #include "nt.h"
29 #include "nttop.h"
30 #include "osctty.h"
31 #include "prims.h"
32 #include "errors.h"
33 #include "option.h"
34 #include "outf.h"
35 #include "ntscmlib.h"
36 
37 extern void execute_reload_cleanups (void);
38 
39 extern void NT_gui_init (void);
40 extern void NT_initialize_channels (void);
41 extern void NT_initialize_directory_reader (void);
42 extern void NT_initialize_processes (void);
43 extern void NT_initialize_signals (void);
44 extern void NT_initialize_sockets (void);
45 extern void NT_initialize_traps (void);
46 extern void NT_initialize_tty (void);
47 
48 extern void NT_reset_channels (void);
49 
50 extern void NT_restore_channels (void);
51 extern void NT_restore_signals (void);
52 extern void NT_restore_traps (void);
53 
54 /* reset_interruptable_extent */
55 
56 extern const char * OS_Name;
57 extern const char * OS_Variant;
58 
59 static const char * w32_error_message (DWORD);
60 static int syserr_to_unix_error_code (enum syserr_names);
61 static void initialize_locks (void);
62 static DWORD syserr_to_win32_error_code (enum syserr_names);
63 static enum syserr_names win32_error_code_to_syserr (DWORD);
64 
65 BOOL
win32_under_win32s_p()66 win32_under_win32s_p ()
67 {
68   OSVERSIONINFO info;
69   (info.dwOSVersionInfoSize) = (sizeof (info));
70   (void) GetVersionEx (&info);
71   return ((info.dwPlatformId) == VER_PLATFORM_WIN32s);
72 }
73 
74 WIN32_SYSTEM_UTILITIES win32_system_utilities;
75 
76 HINSTANCE win32_system_utilities_dll = 0;
77 
78 void
NT_initialize_win32_system_utilities()79 NT_initialize_win32_system_utilities ()
80 {
81 #ifdef USE_SCHEME_DLL
82   char * dll_name = win32_under_win32s_p() ? "SCHEME31.DLL" : "SCHEME32.DLL";
83   char * entry_name = "install_win32_system_utilities";
84   FARPROC install;
85 
86   win32_system_utilities_dll = LoadLibrary (dll_name);
87   if (win32_system_utilities_dll == NULL) {
88     outf_fatal ("MIT/GNU Scheme is unable to find or load %s\n"
89 		"This essential MIT/GNU Scheme file should be in the\n"
90 		"same directory as SCHEME.EXE",
91 		dll_name);
92     outf_flush_fatal();
93     abort ();
94   }
95 
96   install = GetProcAddress (win32_system_utilities_dll, entry_name);
97   if (install==NULL) {
98     outf_fatal ("Something is wrong with %s\n"
99 		"It does not have an entry called \"%s\".",
100 		dll_name, entry_name);
101     outf_flush_fatal ();
102     abort ();
103   }
104 
105   install (&win32_system_utilities);
106 #else
107   extern void FAR WINAPI install_win32_system_utilities
108     (WIN32_SYSTEM_UTILITIES *);
109   install_win32_system_utilities (&win32_system_utilities);
110 #endif
111 }
112 
113 static int interactive;
114 
115 int
OS_under_emacs_p(void)116 OS_under_emacs_p (void)
117 {
118   return (option_emacs_subprocess);
119 }
120 
121 enum windows_type NT_windows_type;
122 
123 static int
empty_string_p(const char * s)124 empty_string_p (const char * s)
125 {
126   const char * p = s;
127   while (1)
128     switch (*p++)
129       {
130       case '\0':
131 	return (1);
132       case ' ':
133       case '\t':
134 	break;
135       default:
136 	return (0);
137       }
138 }
139 
140 void
OS_initialize(void)141 OS_initialize (void)
142 {
143   interactive = 1;
144 
145   initialize_locks ();
146   NT_gui_init ();
147   NT_initialize_channels ();
148   NT_initialize_tty ();
149   NT_initialize_signals ();
150   NT_initialize_traps ();
151   NT_initialize_directory_reader ();
152   NT_initialize_processes ();
153   NT_initialize_sockets ();
154 
155   OS_Name = "NT";
156   {
157     OSVERSIONINFO info;
158     char * p = (malloc (250));
159 
160     (info.dwOSVersionInfoSize) = (sizeof (info));
161     (void) GetVersionEx (&info);
162 
163     if ((info.dwPlatformId) == VER_PLATFORM_WIN32_NT)
164       {
165 	sprintf (p, "Microsoft Windows NT %u.%u (Build %u",
166 		 (info.dwMajorVersion),
167 		 (info.dwMinorVersion),
168 		 (info.dwBuildNumber));
169 	if (!empty_string_p (info.szCSDVersion))
170 	  {
171 	    strcat (p, "; ");
172 	    strcat (p, (info.szCSDVersion));
173 	  }
174 	strcat (p, ")");
175 	NT_windows_type = wintype_nt;
176       }
177     else if ((info.dwPlatformId) == VER_PLATFORM_WIN32_WINDOWS)
178       {
179 	sprintf (p, "Microsoft Windows %s (Build %u",
180 		 (((info.dwMinorVersion) == 0)
181 		  ? "95"
182 		  : ((info.dwMinorVersion) == 10)
183 		  ? "98"
184 		  : "9?"),
185 		 (LOWORD (info.dwBuildNumber)));
186 	if (!empty_string_p (info.szCSDVersion))
187 	  {
188 	    strcat (p, "; ");
189 	    strcat (p, (info.szCSDVersion));
190 	  }
191 	strcat (p, ")");
192 	NT_windows_type = wintype_95;
193       }
194     else
195       {
196 	sprintf (p, "Microsoft Windows %u.%u",
197 		 (info.dwMajorVersion),
198 		 (info.dwMinorVersion));
199 	NT_windows_type = wintype_31;
200       }
201     strcat (p, " IA-32");
202     OS_Variant = p;
203   }
204 }
205 
206 void
OS_announcement(void)207 OS_announcement (void)
208 {
209 }
210 
211 void
OS_reset(void)212 OS_reset (void)
213 {
214   /* There should really be a reset for each initialize above, but the
215      rest seem innocuous.  */
216   NT_reset_channels ();
217   execute_reload_cleanups ();
218 }
219 
220 void
OS_quit(int code,int abnormal_p)221 OS_quit (int code, int abnormal_p)
222 {
223   outf_console ("\nScheme has terminated abnormally!\n");
224   OS_restore_external_state ();
225 }
226 
227 /* Memory Allocation */
228 
229 static LPVOID NT_heap_base;
230 static DWORD NT_heap_size;
231 static DWORD NT_heap_error;
232 #define SCHEME_ADDR_LIMIT 0x04000000
233 
234 void
NT_preallocate_heap(void)235 NT_preallocate_heap (void)
236 {
237   MEMORY_BASIC_INFORMATION largest;
238   DWORD scan = 0;
239   (largest.RegionSize) = 0;
240   while (scan < SCHEME_ADDR_LIMIT)
241     {
242       MEMORY_BASIC_INFORMATION info;
243       (void) VirtualQuery (((LPCVOID) scan), (&info), (sizeof (info)));
244       if ((info.State) == MEM_FREE)
245 	{
246 	  DWORD end = (scan + (info.RegionSize));
247 	  if (end > SCHEME_ADDR_LIMIT)
248 	    (info.RegionSize) -= (end - SCHEME_ADDR_LIMIT);
249 	  if ((info.RegionSize) > (largest.RegionSize))
250 	    largest = info;
251 	}
252       scan += (info.RegionSize);
253     }
254   NT_heap_size = (largest.RegionSize);
255   NT_heap_base
256     = (VirtualAlloc ((largest.BaseAddress),
257 		     NT_heap_size,
258 		     MEM_RESERVE,
259 		     PAGE_EXECUTE_READWRITE));
260   if (NT_heap_base == 0)
261     NT_heap_error = (GetLastError ());
262 }
263 
264 char *
NT_allocate_heap(unsigned long size,unsigned long * handle)265 NT_allocate_heap (unsigned long size, unsigned long * handle)
266 {
267   if (NT_heap_base == 0)
268     {
269       SYSTEM_INFO info;
270       LPVOID start = 0;
271       LPVOID base;
272       GetSystemInfo (&info);
273       while (1)
274 	{
275 	  start = (((char *) start) + (info . dwPageSize));
276 	  base
277 	    = (VirtualAlloc (start,
278 			     size,
279 			     (MEM_RESERVE | MEM_COMMIT),
280 			     PAGE_EXECUTE_READWRITE));
281 	  if (base != 0)
282 	    break;
283 	}
284       (* handle) = size;
285       return ((char *) base);
286     }
287   else
288     {
289       DWORD size2 = ((size <= NT_heap_size) ? size : NT_heap_size);
290       LPVOID base
291 	= (VirtualAlloc (NT_heap_base,
292 			 size2,
293 			 MEM_COMMIT,
294 			 PAGE_EXECUTE_READWRITE));
295       (* handle) = size2;
296       return ((char *) base);
297     }
298 }
299 
300 void
NT_release_heap(char * area,unsigned long handle)301 NT_release_heap (char * area, unsigned long handle)
302 {
303   VirtualFree (((LPVOID) area),
304 	       ((DWORD) handle),
305 	       ((DWORD) MEM_DECOMMIT));
306   if (NT_heap_base == 0)
307     VirtualFree (((LPVOID) area),
308 		 ((DWORD) 0),
309 		 ((DWORD) MEM_RELEASE));
310   else
311     VirtualFree (NT_heap_base,
312 		 ((DWORD) 0),
313 		 ((DWORD) MEM_RELEASE));
314 }
315 
316 #ifndef EAGAIN
317 #define EAGAIN ERRNO_NONBLOCK
318 #endif
319 
320 enum syserr_names
OS_error_code_to_syserr(int code)321 OS_error_code_to_syserr (int code)
322 {
323   switch (code)
324   {
325     case E2BIG:		return (syserr_arg_list_too_long);
326     case EACCES:	return (syserr_permission_denied);
327     case EAGAIN:	return (syserr_resource_temporarily_unavailable);
328     case EBADF:		return (syserr_bad_file_descriptor);
329     case EDEADLOCK:	return (syserr_resource_deadlock_avoided);
330     case EDOM:		return (syserr_domain_error);
331     case EEXIST:	return (syserr_unix_file_exists);
332     case EINTR:		return (syserr_interrupted_function_call);
333     case EINVAL:	return (syserr_invalid_argument);
334     case EMFILE:	return (syserr_unix_too_many_open_files);
335     case ENOENT:	return (syserr_no_such_file_or_directory);
336     case ENOEXEC:	return (syserr_exec_format_error);
337     case ENOMEM:	return (syserr_not_enough_space);
338     case ENOTDIR:	return (syserr_not_a_directory);
339     case ERANGE:	return (syserr_result_too_large);
340     default:		return (syserr_unknown);
341   }
342 }
343 
344 const char *
OS_error_code_to_message(unsigned int syserr)345 OS_error_code_to_message (unsigned int syserr)
346 {
347   static const char * last_message = 0;
348   if (last_message != 0)
349     {
350       OS_free ((void *) last_message);
351       last_message = 0;
352     }
353   if (syserr < FIRST_UNIX_ERROR_CODE)
354     {
355       last_message
356 	= (w32_error_message
357 	   (syserr_to_win32_error_code ((enum syserr_names) syserr)));
358       /* The runtime system is assuming that the messages have no period,
359 	 and adding its own.  */
360       if (last_message != 0)
361 	{
362 	  unsigned int length = (strlen (last_message));
363 	  if ((length > 0) && ((last_message [length - 1]) == '.'))
364 	    (((char *) last_message) [length - 1]) = '\0';
365 	}
366       return (last_message);
367     }
368   else
369     {
370 #ifdef CL386
371       extern char * sys_errlist [];
372       extern int sys_nerr;
373 #endif
374       int code = (syserr_to_unix_error_code ((enum syserr_names) syserr));
375       return (((code > 0) && (code <= sys_nerr)) ? (sys_errlist [code]) : 0);
376     }
377 }
378 
379 void
NT_error_api_call(DWORD code,enum syscall_names name)380 NT_error_api_call (DWORD code, enum syscall_names name)
381 {
382   error_in_system_call ((win32_error_code_to_syserr (code)), name);
383 }
384 
385 void
NT_error_unix_call(int code,enum syscall_names name)386 NT_error_unix_call (int code, enum syscall_names name)
387 {
388   error_in_system_call ((OS_error_code_to_syserr (code)), name);
389 }
390 
391 static const char *
w32_error_message(DWORD rc)392 w32_error_message (DWORD rc)
393 {
394   char * buffer;
395   char * result;
396   DWORD length
397     = (FormatMessage ((FORMAT_MESSAGE_ALLOCATE_BUFFER
398 		       | FORMAT_MESSAGE_FROM_SYSTEM),
399 		      0,
400 		      rc,
401 		      (MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT)),
402 		      ((LPTSTR) (&buffer)),
403 		      0,
404 		      0));
405 
406   if (length == 0)
407     return (0);
408   /* Assumes that we're using ANSI rather than Unicode characters.  */
409   result = (OS_malloc ((strlen (buffer)) + 1));
410   {
411     char * from = buffer;
412     char * to = result;
413     while (1)
414       {
415 	char c = (*from++);
416 	(*to++) = c;
417 	if (c == '\0')
418 	  break;
419       }
420     if (((to - 3) >= result)
421 	&& ((to[-3]) == '\r')
422 	&& ((to[-2]) == '\n'))
423       (to[-3]) = '\0';
424   }
425   (void) LocalFree (buffer);
426   return (result);
427 }
428 
429 static int
syserr_to_unix_error_code(enum syserr_names syserr)430 syserr_to_unix_error_code (enum syserr_names syserr)
431 {
432   switch (syserr)
433     {
434     case syserr_arg_list_too_long:			return (E2BIG);
435     case syserr_bad_file_descriptor:			return (EBADF);
436     case syserr_domain_error:				return (EDOM);
437     case syserr_exec_format_error:			return (ENOEXEC);
438     case syserr_unix_file_exists:			return (EEXIST);
439     case syserr_interrupted_function_call:		return (EINTR);
440     case syserr_invalid_argument:			return (EINVAL);
441     case syserr_no_such_file_or_directory:		return (ENOENT);
442     case syserr_not_a_directory:			return (ENOTDIR);
443     case syserr_not_enough_space:			return (ENOMEM);
444     case syserr_permission_denied:			return (EACCES);
445     case syserr_resource_deadlock_avoided:		return (EDEADLOCK);
446     case syserr_resource_temporarily_unavailable:	return (EAGAIN);
447     case syserr_result_too_large:			return (ERANGE);
448     case syserr_unix_too_many_open_files:		return (EMFILE);
449     default: 						return (0);
450     }
451 }
452 
453 void
NT_prim_check_errno(enum syscall_names name)454 NT_prim_check_errno (enum syscall_names name)
455 {
456   if (errno != EINTR)
457     NT_error_unix_call (errno, name);
458   deliver_pending_interrupts ();
459 }
460 
461 void
OS_restore_external_state(void)462 OS_restore_external_state (void)
463 {
464   NT_restore_traps ();
465   NT_restore_signals ();
466   NT_restore_channels ();
467 }
468 
469 #ifndef __OPEN_WATCOM_14__
470 void
bcopy(const char * s1,char * s2,int n)471 bcopy (const char * s1, char * s2, int n)
472 {
473   while (n-- > 0)
474     *s2++ = *s1++;
475 }
476 #endif
477 
478 void *
OS_malloc_init(size_t size)479 OS_malloc_init (size_t size)
480 {
481   return (malloc (size));
482 }
483 
484 void *
OS_malloc(size_t size)485 OS_malloc (size_t size)
486 {
487   void * result = (malloc (size));
488   if (result == 0)
489     NT_error_unix_call (ENOMEM, syscall_malloc);
490   return (result);
491 }
492 
493 void *
OS_realloc(void * ptr,size_t size)494 OS_realloc (void * ptr, size_t size)
495 {
496   void * result = (realloc (ptr, size));
497   if (result == 0)
498     NT_error_unix_call (ENOMEM, syscall_realloc);
499   return (result);
500 }
501 
502 void
OS_free(void * ptr)503 OS_free (void * ptr)
504 {
505   free (ptr);
506 }
507 
508 void
OS_syscall_names(unsigned long * length,const char *** names)509 OS_syscall_names (unsigned long * length, const char *** names)
510 {
511   (*length) = ((sizeof (syscall_names_table)) / (sizeof (char *)));
512   (*names) = syscall_names_table;
513 }
514 
515 void
OS_syserr_names(unsigned long * length,const char *** names)516 OS_syserr_names (unsigned long * length, const char *** names)
517 {
518   (*length) = ((sizeof (syserr_names_table)) / (sizeof (char *)));
519   (*names) = syserr_names_table;
520 }
521 
522 static CRITICAL_SECTION interrupt_registers_lock;
523 
524 static void
initialize_locks(void)525 initialize_locks (void)
526 {
527   InitializeCriticalSection (&interrupt_registers_lock);
528 }
529 
530 void
OS_grab_interrupt_registers(void)531 OS_grab_interrupt_registers (void)
532 {
533   EnterCriticalSection (&interrupt_registers_lock);
534 }
535 
536 void
OS_release_interrupt_registers(void)537 OS_release_interrupt_registers (void)
538 {
539   LeaveCriticalSection (&interrupt_registers_lock);
540 }
541 
542 /* Machine-generated procedure, do not edit: */
543 static DWORD
syserr_to_win32_error_code(enum syserr_names syserr)544 syserr_to_win32_error_code (enum syserr_names syserr)
545 {
546   switch (syserr)
547     {
548     case syserr_invalid_function: return (ERROR_INVALID_FUNCTION);
549     case syserr_file_not_found: return (ERROR_FILE_NOT_FOUND);
550     case syserr_path_not_found: return (ERROR_PATH_NOT_FOUND);
551     case syserr_too_many_open_files: return (ERROR_TOO_MANY_OPEN_FILES);
552     case syserr_access_denied: return (ERROR_ACCESS_DENIED);
553     case syserr_invalid_handle: return (ERROR_INVALID_HANDLE);
554     case syserr_arena_trashed: return (ERROR_ARENA_TRASHED);
555     case syserr_not_enough_memory: return (ERROR_NOT_ENOUGH_MEMORY);
556     case syserr_invalid_block: return (ERROR_INVALID_BLOCK);
557     case syserr_bad_environment: return (ERROR_BAD_ENVIRONMENT);
558     case syserr_bad_format: return (ERROR_BAD_FORMAT);
559     case syserr_invalid_access: return (ERROR_INVALID_ACCESS);
560     case syserr_invalid_data: return (ERROR_INVALID_DATA);
561     case syserr_outofmemory: return (ERROR_OUTOFMEMORY);
562     case syserr_invalid_drive: return (ERROR_INVALID_DRIVE);
563     case syserr_current_directory: return (ERROR_CURRENT_DIRECTORY);
564     case syserr_not_same_device: return (ERROR_NOT_SAME_DEVICE);
565     case syserr_no_more_files: return (ERROR_NO_MORE_FILES);
566     case syserr_write_protect: return (ERROR_WRITE_PROTECT);
567     case syserr_bad_unit: return (ERROR_BAD_UNIT);
568     case syserr_not_ready: return (ERROR_NOT_READY);
569     case syserr_bad_command: return (ERROR_BAD_COMMAND);
570     case syserr_crc: return (ERROR_CRC);
571     case syserr_bad_length: return (ERROR_BAD_LENGTH);
572     case syserr_seek: return (ERROR_SEEK);
573     case syserr_not_dos_disk: return (ERROR_NOT_DOS_DISK);
574     case syserr_sector_not_found: return (ERROR_SECTOR_NOT_FOUND);
575     case syserr_out_of_paper: return (ERROR_OUT_OF_PAPER);
576     case syserr_write_fault: return (ERROR_WRITE_FAULT);
577     case syserr_read_fault: return (ERROR_READ_FAULT);
578     case syserr_gen_failure: return (ERROR_GEN_FAILURE);
579     case syserr_sharing_violation: return (ERROR_SHARING_VIOLATION);
580     case syserr_lock_violation: return (ERROR_LOCK_VIOLATION);
581     case syserr_wrong_disk: return (ERROR_WRONG_DISK);
582     case syserr_sharing_buffer_exceeded: return (ERROR_SHARING_BUFFER_EXCEEDED);
583     case syserr_handle_eof: return (ERROR_HANDLE_EOF);
584     case syserr_handle_disk_full: return (ERROR_HANDLE_DISK_FULL);
585     case syserr_not_supported: return (ERROR_NOT_SUPPORTED);
586     case syserr_rem_not_list: return (ERROR_REM_NOT_LIST);
587     case syserr_dup_name: return (ERROR_DUP_NAME);
588     case syserr_bad_netpath: return (ERROR_BAD_NETPATH);
589     case syserr_network_busy: return (ERROR_NETWORK_BUSY);
590     case syserr_dev_not_exist: return (ERROR_DEV_NOT_EXIST);
591     case syserr_too_many_cmds: return (ERROR_TOO_MANY_CMDS);
592     case syserr_adap_hdw_err: return (ERROR_ADAP_HDW_ERR);
593     case syserr_bad_net_resp: return (ERROR_BAD_NET_RESP);
594     case syserr_unexp_net_err: return (ERROR_UNEXP_NET_ERR);
595     case syserr_bad_rem_adap: return (ERROR_BAD_REM_ADAP);
596     case syserr_printq_full: return (ERROR_PRINTQ_FULL);
597     case syserr_no_spool_space: return (ERROR_NO_SPOOL_SPACE);
598     case syserr_print_cancelled: return (ERROR_PRINT_CANCELLED);
599     case syserr_netname_deleted: return (ERROR_NETNAME_DELETED);
600     case syserr_network_access_denied: return (ERROR_NETWORK_ACCESS_DENIED);
601     case syserr_bad_dev_type: return (ERROR_BAD_DEV_TYPE);
602     case syserr_bad_net_name: return (ERROR_BAD_NET_NAME);
603     case syserr_too_many_names: return (ERROR_TOO_MANY_NAMES);
604     case syserr_too_many_sess: return (ERROR_TOO_MANY_SESS);
605     case syserr_sharing_paused: return (ERROR_SHARING_PAUSED);
606     case syserr_req_not_accep: return (ERROR_REQ_NOT_ACCEP);
607     case syserr_redir_paused: return (ERROR_REDIR_PAUSED);
608     case syserr_file_exists: return (ERROR_FILE_EXISTS);
609     case syserr_cannot_make: return (ERROR_CANNOT_MAKE);
610     case syserr_fail_i24: return (ERROR_FAIL_I24);
611     case syserr_out_of_structures: return (ERROR_OUT_OF_STRUCTURES);
612     case syserr_already_assigned: return (ERROR_ALREADY_ASSIGNED);
613     case syserr_invalid_password: return (ERROR_INVALID_PASSWORD);
614     case syserr_invalid_parameter: return (ERROR_INVALID_PARAMETER);
615     case syserr_net_write_fault: return (ERROR_NET_WRITE_FAULT);
616     case syserr_no_proc_slots: return (ERROR_NO_PROC_SLOTS);
617     case syserr_too_many_semaphores: return (ERROR_TOO_MANY_SEMAPHORES);
618     case syserr_excl_sem_already_owned: return (ERROR_EXCL_SEM_ALREADY_OWNED);
619     case syserr_sem_is_set: return (ERROR_SEM_IS_SET);
620     case syserr_too_many_sem_requests: return (ERROR_TOO_MANY_SEM_REQUESTS);
621     case syserr_invalid_at_interrupt_time: return (ERROR_INVALID_AT_INTERRUPT_TIME);
622     case syserr_sem_owner_died: return (ERROR_SEM_OWNER_DIED);
623     case syserr_sem_user_limit: return (ERROR_SEM_USER_LIMIT);
624     case syserr_disk_change: return (ERROR_DISK_CHANGE);
625     case syserr_drive_locked: return (ERROR_DRIVE_LOCKED);
626     case syserr_broken_pipe: return (ERROR_BROKEN_PIPE);
627     case syserr_open_failed: return (ERROR_OPEN_FAILED);
628     case syserr_buffer_overflow: return (ERROR_BUFFER_OVERFLOW);
629     case syserr_disk_full: return (ERROR_DISK_FULL);
630     case syserr_no_more_search_handles: return (ERROR_NO_MORE_SEARCH_HANDLES);
631     case syserr_invalid_target_handle: return (ERROR_INVALID_TARGET_HANDLE);
632     case syserr_invalid_category: return (ERROR_INVALID_CATEGORY);
633     case syserr_invalid_verify_switch: return (ERROR_INVALID_VERIFY_SWITCH);
634     case syserr_bad_driver_level: return (ERROR_BAD_DRIVER_LEVEL);
635     case syserr_call_not_implemented: return (ERROR_CALL_NOT_IMPLEMENTED);
636     case syserr_sem_timeout: return (ERROR_SEM_TIMEOUT);
637     case syserr_insufficient_buffer: return (ERROR_INSUFFICIENT_BUFFER);
638     case syserr_invalid_name: return (ERROR_INVALID_NAME);
639     case syserr_invalid_level: return (ERROR_INVALID_LEVEL);
640     case syserr_no_volume_label: return (ERROR_NO_VOLUME_LABEL);
641     case syserr_mod_not_found: return (ERROR_MOD_NOT_FOUND);
642     case syserr_proc_not_found: return (ERROR_PROC_NOT_FOUND);
643     case syserr_wait_no_children: return (ERROR_WAIT_NO_CHILDREN);
644     case syserr_child_not_complete: return (ERROR_CHILD_NOT_COMPLETE);
645     case syserr_direct_access_handle: return (ERROR_DIRECT_ACCESS_HANDLE);
646     case syserr_negative_seek: return (ERROR_NEGATIVE_SEEK);
647     case syserr_seek_on_device: return (ERROR_SEEK_ON_DEVICE);
648     case syserr_is_join_target: return (ERROR_IS_JOIN_TARGET);
649     case syserr_is_joined: return (ERROR_IS_JOINED);
650     case syserr_is_substed: return (ERROR_IS_SUBSTED);
651     case syserr_not_joined: return (ERROR_NOT_JOINED);
652     case syserr_not_substed: return (ERROR_NOT_SUBSTED);
653     case syserr_join_to_join: return (ERROR_JOIN_TO_JOIN);
654     case syserr_subst_to_subst: return (ERROR_SUBST_TO_SUBST);
655     case syserr_join_to_subst: return (ERROR_JOIN_TO_SUBST);
656     case syserr_subst_to_join: return (ERROR_SUBST_TO_JOIN);
657     case syserr_busy_drive: return (ERROR_BUSY_DRIVE);
658     case syserr_same_drive: return (ERROR_SAME_DRIVE);
659     case syserr_dir_not_root: return (ERROR_DIR_NOT_ROOT);
660     case syserr_dir_not_empty: return (ERROR_DIR_NOT_EMPTY);
661     case syserr_is_subst_path: return (ERROR_IS_SUBST_PATH);
662     case syserr_is_join_path: return (ERROR_IS_JOIN_PATH);
663     case syserr_path_busy: return (ERROR_PATH_BUSY);
664     case syserr_is_subst_target: return (ERROR_IS_SUBST_TARGET);
665     case syserr_system_trace: return (ERROR_SYSTEM_TRACE);
666     case syserr_invalid_event_count: return (ERROR_INVALID_EVENT_COUNT);
667     case syserr_too_many_muxwaiters: return (ERROR_TOO_MANY_MUXWAITERS);
668     case syserr_invalid_list_format: return (ERROR_INVALID_LIST_FORMAT);
669     case syserr_label_too_long: return (ERROR_LABEL_TOO_LONG);
670     case syserr_too_many_tcbs: return (ERROR_TOO_MANY_TCBS);
671     case syserr_signal_refused: return (ERROR_SIGNAL_REFUSED);
672     case syserr_discarded: return (ERROR_DISCARDED);
673     case syserr_not_locked: return (ERROR_NOT_LOCKED);
674     case syserr_bad_threadid_addr: return (ERROR_BAD_THREADID_ADDR);
675     case syserr_bad_arguments: return (ERROR_BAD_ARGUMENTS);
676     case syserr_bad_pathname: return (ERROR_BAD_PATHNAME);
677     case syserr_signal_pending: return (ERROR_SIGNAL_PENDING);
678     case syserr_max_thrds_reached: return (ERROR_MAX_THRDS_REACHED);
679     case syserr_lock_failed: return (ERROR_LOCK_FAILED);
680     case syserr_busy: return (ERROR_BUSY);
681     case syserr_cancel_violation: return (ERROR_CANCEL_VIOLATION);
682     case syserr_atomic_locks_not_supported: return (ERROR_ATOMIC_LOCKS_NOT_SUPPORTED);
683     case syserr_invalid_segment_number: return (ERROR_INVALID_SEGMENT_NUMBER);
684     case syserr_invalid_ordinal: return (ERROR_INVALID_ORDINAL);
685     case syserr_already_exists: return (ERROR_ALREADY_EXISTS);
686     case syserr_invalid_flag_number: return (ERROR_INVALID_FLAG_NUMBER);
687     case syserr_sem_not_found: return (ERROR_SEM_NOT_FOUND);
688     case syserr_invalid_starting_codeseg: return (ERROR_INVALID_STARTING_CODESEG);
689     case syserr_invalid_stackseg: return (ERROR_INVALID_STACKSEG);
690     case syserr_invalid_moduletype: return (ERROR_INVALID_MODULETYPE);
691     case syserr_invalid_exe_signature: return (ERROR_INVALID_EXE_SIGNATURE);
692     case syserr_exe_marked_invalid: return (ERROR_EXE_MARKED_INVALID);
693     case syserr_bad_exe_format: return (ERROR_BAD_EXE_FORMAT);
694     case syserr_iterated_data_exceeds_64k: return (ERROR_ITERATED_DATA_EXCEEDS_64k);
695     case syserr_invalid_minallocsize: return (ERROR_INVALID_MINALLOCSIZE);
696     case syserr_dynlink_from_invalid_ring: return (ERROR_DYNLINK_FROM_INVALID_RING);
697     case syserr_iopl_not_enabled: return (ERROR_IOPL_NOT_ENABLED);
698     case syserr_invalid_segdpl: return (ERROR_INVALID_SEGDPL);
699     case syserr_autodataseg_exceeds_64k: return (ERROR_AUTODATASEG_EXCEEDS_64k);
700     case syserr_ring2seg_must_be_movable: return (ERROR_RING2SEG_MUST_BE_MOVABLE);
701     case syserr_reloc_chain_xeeds_seglim: return (ERROR_RELOC_CHAIN_XEEDS_SEGLIM);
702     case syserr_infloop_in_reloc_chain: return (ERROR_INFLOOP_IN_RELOC_CHAIN);
703     case syserr_envvar_not_found: return (ERROR_ENVVAR_NOT_FOUND);
704     case syserr_no_signal_sent: return (ERROR_NO_SIGNAL_SENT);
705     case syserr_filename_exced_range: return (ERROR_FILENAME_EXCED_RANGE);
706     case syserr_ring2_stack_in_use: return (ERROR_RING2_STACK_IN_USE);
707     case syserr_meta_expansion_too_long: return (ERROR_META_EXPANSION_TOO_LONG);
708     case syserr_invalid_signal_number: return (ERROR_INVALID_SIGNAL_NUMBER);
709     case syserr_thread_1_inactive: return (ERROR_THREAD_1_INACTIVE);
710     case syserr_locked: return (ERROR_LOCKED);
711     case syserr_too_many_modules: return (ERROR_TOO_MANY_MODULES);
712     case syserr_nesting_not_allowed: return (ERROR_NESTING_NOT_ALLOWED);
713     case syserr_bad_pipe: return (ERROR_BAD_PIPE);
714     case syserr_pipe_busy: return (ERROR_PIPE_BUSY);
715     case syserr_no_data: return (ERROR_NO_DATA);
716     case syserr_pipe_not_connected: return (ERROR_PIPE_NOT_CONNECTED);
717     case syserr_more_data: return (ERROR_MORE_DATA);
718     case syserr_vc_disconnected: return (ERROR_VC_DISCONNECTED);
719     case syserr_invalid_ea_name: return (ERROR_INVALID_EA_NAME);
720     case syserr_ea_list_inconsistent: return (ERROR_EA_LIST_INCONSISTENT);
721     case syserr_no_more_items: return (ERROR_NO_MORE_ITEMS);
722     case syserr_cannot_copy: return (ERROR_CANNOT_COPY);
723     case syserr_directory: return (ERROR_DIRECTORY);
724     case syserr_eas_didnt_fit: return (ERROR_EAS_DIDNT_FIT);
725     case syserr_ea_file_corrupt: return (ERROR_EA_FILE_CORRUPT);
726     case syserr_ea_table_full: return (ERROR_EA_TABLE_FULL);
727     case syserr_invalid_ea_handle: return (ERROR_INVALID_EA_HANDLE);
728     case syserr_eas_not_supported: return (ERROR_EAS_NOT_SUPPORTED);
729     case syserr_not_owner: return (ERROR_NOT_OWNER);
730     case syserr_too_many_posts: return (ERROR_TOO_MANY_POSTS);
731     case syserr_partial_copy: return (ERROR_PARTIAL_COPY);
732     case syserr_mr_mid_not_found: return (ERROR_MR_MID_NOT_FOUND);
733     case syserr_invalid_address: return (ERROR_INVALID_ADDRESS);
734     case syserr_arithmetic_overflow: return (ERROR_ARITHMETIC_OVERFLOW);
735     case syserr_pipe_connected: return (ERROR_PIPE_CONNECTED);
736     case syserr_pipe_listening: return (ERROR_PIPE_LISTENING);
737     case syserr_ea_access_denied: return (ERROR_EA_ACCESS_DENIED);
738     case syserr_operation_aborted: return (ERROR_OPERATION_ABORTED);
739     case syserr_io_incomplete: return (ERROR_IO_INCOMPLETE);
740     case syserr_io_pending: return (ERROR_IO_PENDING);
741     case syserr_noaccess: return (ERROR_NOACCESS);
742     case syserr_swaperror: return (ERROR_SWAPERROR);
743     case syserr_stack_overflow: return (ERROR_STACK_OVERFLOW);
744     case syserr_invalid_message: return (ERROR_INVALID_MESSAGE);
745     case syserr_can_not_complete: return (ERROR_CAN_NOT_COMPLETE);
746     case syserr_invalid_flags: return (ERROR_INVALID_FLAGS);
747     case syserr_unrecognized_volume: return (ERROR_UNRECOGNIZED_VOLUME);
748     case syserr_file_invalid: return (ERROR_FILE_INVALID);
749     case syserr_fullscreen_mode: return (ERROR_FULLSCREEN_MODE);
750     case syserr_no_token: return (ERROR_NO_TOKEN);
751     case syserr_baddb: return (ERROR_BADDB);
752     case syserr_badkey: return (ERROR_BADKEY);
753     case syserr_cantopen: return (ERROR_CANTOPEN);
754     case syserr_cantread: return (ERROR_CANTREAD);
755     case syserr_cantwrite: return (ERROR_CANTWRITE);
756     case syserr_registry_recovered: return (ERROR_REGISTRY_RECOVERED);
757     case syserr_registry_corrupt: return (ERROR_REGISTRY_CORRUPT);
758     case syserr_registry_io_failed: return (ERROR_REGISTRY_IO_FAILED);
759     case syserr_not_registry_file: return (ERROR_NOT_REGISTRY_FILE);
760     case syserr_key_deleted: return (ERROR_KEY_DELETED);
761     case syserr_no_log_space: return (ERROR_NO_LOG_SPACE);
762     case syserr_key_has_children: return (ERROR_KEY_HAS_CHILDREN);
763     case syserr_child_must_be_volatile: return (ERROR_CHILD_MUST_BE_VOLATILE);
764     case syserr_notify_enum_dir: return (ERROR_NOTIFY_ENUM_DIR);
765     case syserr_dependent_services_running: return (ERROR_DEPENDENT_SERVICES_RUNNING);
766     case syserr_invalid_service_control: return (ERROR_INVALID_SERVICE_CONTROL);
767     case syserr_service_request_timeout: return (ERROR_SERVICE_REQUEST_TIMEOUT);
768     case syserr_service_no_thread: return (ERROR_SERVICE_NO_THREAD);
769     case syserr_service_database_locked: return (ERROR_SERVICE_DATABASE_LOCKED);
770     case syserr_service_already_running: return (ERROR_SERVICE_ALREADY_RUNNING);
771     case syserr_invalid_service_account: return (ERROR_INVALID_SERVICE_ACCOUNT);
772     case syserr_service_disabled: return (ERROR_SERVICE_DISABLED);
773     case syserr_circular_dependency: return (ERROR_CIRCULAR_DEPENDENCY);
774     case syserr_service_does_not_exist: return (ERROR_SERVICE_DOES_NOT_EXIST);
775     case syserr_service_cannot_accept_ctrl: return (ERROR_SERVICE_CANNOT_ACCEPT_CTRL);
776     case syserr_service_not_active: return (ERROR_SERVICE_NOT_ACTIVE);
777     case syserr_failed_service_controller_connect: return (ERROR_FAILED_SERVICE_CONTROLLER_CONNECT);
778     case syserr_exception_in_service: return (ERROR_EXCEPTION_IN_SERVICE);
779     case syserr_database_does_not_exist: return (ERROR_DATABASE_DOES_NOT_EXIST);
780     case syserr_service_specific_error: return (ERROR_SERVICE_SPECIFIC_ERROR);
781     case syserr_process_aborted: return (ERROR_PROCESS_ABORTED);
782     case syserr_service_dependency_fail: return (ERROR_SERVICE_DEPENDENCY_FAIL);
783     case syserr_service_logon_failed: return (ERROR_SERVICE_LOGON_FAILED);
784     case syserr_service_start_hang: return (ERROR_SERVICE_START_HANG);
785     case syserr_invalid_service_lock: return (ERROR_INVALID_SERVICE_LOCK);
786     case syserr_service_marked_for_delete: return (ERROR_SERVICE_MARKED_FOR_DELETE);
787     case syserr_service_exists: return (ERROR_SERVICE_EXISTS);
788     case syserr_already_running_lkg: return (ERROR_ALREADY_RUNNING_LKG);
789     case syserr_service_dependency_deleted: return (ERROR_SERVICE_DEPENDENCY_DELETED);
790     case syserr_boot_already_accepted: return (ERROR_BOOT_ALREADY_ACCEPTED);
791     case syserr_service_never_started: return (ERROR_SERVICE_NEVER_STARTED);
792     case syserr_duplicate_service_name: return (ERROR_DUPLICATE_SERVICE_NAME);
793     case syserr_end_of_media: return (ERROR_END_OF_MEDIA);
794     case syserr_filemark_detected: return (ERROR_FILEMARK_DETECTED);
795     case syserr_beginning_of_media: return (ERROR_BEGINNING_OF_MEDIA);
796     case syserr_setmark_detected: return (ERROR_SETMARK_DETECTED);
797     case syserr_no_data_detected: return (ERROR_NO_DATA_DETECTED);
798     case syserr_partition_failure: return (ERROR_PARTITION_FAILURE);
799     case syserr_invalid_block_length: return (ERROR_INVALID_BLOCK_LENGTH);
800     case syserr_device_not_partitioned: return (ERROR_DEVICE_NOT_PARTITIONED);
801     case syserr_unable_to_lock_media: return (ERROR_UNABLE_TO_LOCK_MEDIA);
802     case syserr_unable_to_unload_media: return (ERROR_UNABLE_TO_UNLOAD_MEDIA);
803     case syserr_media_changed: return (ERROR_MEDIA_CHANGED);
804     case syserr_bus_reset: return (ERROR_BUS_RESET);
805     case syserr_no_media_in_drive: return (ERROR_NO_MEDIA_IN_DRIVE);
806     case syserr_no_unicode_translation: return (ERROR_NO_UNICODE_TRANSLATION);
807     case syserr_dll_init_failed: return (ERROR_DLL_INIT_FAILED);
808     case syserr_shutdown_in_progress: return (ERROR_SHUTDOWN_IN_PROGRESS);
809     case syserr_no_shutdown_in_progress: return (ERROR_NO_SHUTDOWN_IN_PROGRESS);
810     case syserr_io_device: return (ERROR_IO_DEVICE);
811     case syserr_serial_no_device: return (ERROR_SERIAL_NO_DEVICE);
812     case syserr_irq_busy: return (ERROR_IRQ_BUSY);
813     case syserr_more_writes: return (ERROR_MORE_WRITES);
814     case syserr_counter_timeout: return (ERROR_COUNTER_TIMEOUT);
815     case syserr_floppy_id_mark_not_found: return (ERROR_FLOPPY_ID_MARK_NOT_FOUND);
816     case syserr_floppy_wrong_cylinder: return (ERROR_FLOPPY_WRONG_CYLINDER);
817     case syserr_floppy_unknown_error: return (ERROR_FLOPPY_UNKNOWN_ERROR);
818     case syserr_floppy_bad_registers: return (ERROR_FLOPPY_BAD_REGISTERS);
819     case syserr_disk_recalibrate_failed: return (ERROR_DISK_RECALIBRATE_FAILED);
820     case syserr_disk_operation_failed: return (ERROR_DISK_OPERATION_FAILED);
821     case syserr_disk_reset_failed: return (ERROR_DISK_RESET_FAILED);
822     case syserr_eom_overflow: return (ERROR_EOM_OVERFLOW);
823     case syserr_not_enough_server_memory: return (ERROR_NOT_ENOUGH_SERVER_MEMORY);
824     case syserr_possible_deadlock: return (ERROR_POSSIBLE_DEADLOCK);
825     case syserr_mapped_alignment: return (ERROR_MAPPED_ALIGNMENT);
826     case syserr_set_power_state_vetoed: return (ERROR_SET_POWER_STATE_VETOED);
827     case syserr_set_power_state_failed: return (ERROR_SET_POWER_STATE_FAILED);
828     case syserr_old_win_version: return (ERROR_OLD_WIN_VERSION);
829     case syserr_app_wrong_os: return (ERROR_APP_WRONG_OS);
830     case syserr_single_instance_app: return (ERROR_SINGLE_INSTANCE_APP);
831     case syserr_rmode_app: return (ERROR_RMODE_APP);
832     case syserr_invalid_dll: return (ERROR_INVALID_DLL);
833     case syserr_no_association: return (ERROR_NO_ASSOCIATION);
834     case syserr_dde_fail: return (ERROR_DDE_FAIL);
835     case syserr_dll_not_found: return (ERROR_DLL_NOT_FOUND);
836     case syserr_bad_username: return (ERROR_BAD_USERNAME);
837     case syserr_not_connected: return (ERROR_NOT_CONNECTED);
838     case syserr_open_files: return (ERROR_OPEN_FILES);
839     case syserr_active_connections: return (ERROR_ACTIVE_CONNECTIONS);
840     case syserr_device_in_use: return (ERROR_DEVICE_IN_USE);
841     case syserr_bad_device: return (ERROR_BAD_DEVICE);
842     case syserr_connection_unavail: return (ERROR_CONNECTION_UNAVAIL);
843     case syserr_device_already_remembered: return (ERROR_DEVICE_ALREADY_REMEMBERED);
844     case syserr_no_net_or_bad_path: return (ERROR_NO_NET_OR_BAD_PATH);
845     case syserr_bad_provider: return (ERROR_BAD_PROVIDER);
846     case syserr_cannot_open_profile: return (ERROR_CANNOT_OPEN_PROFILE);
847     case syserr_bad_profile: return (ERROR_BAD_PROFILE);
848     case syserr_not_container: return (ERROR_NOT_CONTAINER);
849     case syserr_extended_error: return (ERROR_EXTENDED_ERROR);
850     case syserr_invalid_groupname: return (ERROR_INVALID_GROUPNAME);
851     case syserr_invalid_computername: return (ERROR_INVALID_COMPUTERNAME);
852     case syserr_invalid_eventname: return (ERROR_INVALID_EVENTNAME);
853     case syserr_invalid_domainname: return (ERROR_INVALID_DOMAINNAME);
854     case syserr_invalid_servicename: return (ERROR_INVALID_SERVICENAME);
855     case syserr_invalid_netname: return (ERROR_INVALID_NETNAME);
856     case syserr_invalid_sharename: return (ERROR_INVALID_SHARENAME);
857     case syserr_invalid_passwordname: return (ERROR_INVALID_PASSWORDNAME);
858     case syserr_invalid_messagename: return (ERROR_INVALID_MESSAGENAME);
859     case syserr_invalid_messagedest: return (ERROR_INVALID_MESSAGEDEST);
860     case syserr_session_credential_conflict: return (ERROR_SESSION_CREDENTIAL_CONFLICT);
861     case syserr_remote_session_limit_exceeded: return (ERROR_REMOTE_SESSION_LIMIT_EXCEEDED);
862     case syserr_dup_domainname: return (ERROR_DUP_DOMAINNAME);
863     case syserr_no_network: return (ERROR_NO_NETWORK);
864     case syserr_cancelled: return (ERROR_CANCELLED);
865     case syserr_user_mapped_file: return (ERROR_USER_MAPPED_FILE);
866     case syserr_connection_refused: return (ERROR_CONNECTION_REFUSED);
867     case syserr_graceful_disconnect: return (ERROR_GRACEFUL_DISCONNECT);
868     case syserr_address_already_associated: return (ERROR_ADDRESS_ALREADY_ASSOCIATED);
869     case syserr_address_not_associated: return (ERROR_ADDRESS_NOT_ASSOCIATED);
870     case syserr_connection_invalid: return (ERROR_CONNECTION_INVALID);
871     case syserr_connection_active: return (ERROR_CONNECTION_ACTIVE);
872     case syserr_network_unreachable: return (ERROR_NETWORK_UNREACHABLE);
873     case syserr_host_unreachable: return (ERROR_HOST_UNREACHABLE);
874     case syserr_protocol_unreachable: return (ERROR_PROTOCOL_UNREACHABLE);
875     case syserr_port_unreachable: return (ERROR_PORT_UNREACHABLE);
876     case syserr_request_aborted: return (ERROR_REQUEST_ABORTED);
877     case syserr_connection_aborted: return (ERROR_CONNECTION_ABORTED);
878     case syserr_retry: return (ERROR_RETRY);
879     case syserr_connection_count_limit: return (ERROR_CONNECTION_COUNT_LIMIT);
880     case syserr_login_time_restriction: return (ERROR_LOGIN_TIME_RESTRICTION);
881     case syserr_login_wksta_restriction: return (ERROR_LOGIN_WKSTA_RESTRICTION);
882     case syserr_incorrect_address: return (ERROR_INCORRECT_ADDRESS);
883     case syserr_already_registered: return (ERROR_ALREADY_REGISTERED);
884     case syserr_service_not_found: return (ERROR_SERVICE_NOT_FOUND);
885     case syserr_not_authenticated: return (ERROR_NOT_AUTHENTICATED);
886     case syserr_not_logged_on: return (ERROR_NOT_LOGGED_ON);
887     case syserr_continue: return (ERROR_CONTINUE);
888     case syserr_already_initialized: return (ERROR_ALREADY_INITIALIZED);
889     case syserr_no_more_devices: return (ERROR_NO_MORE_DEVICES);
890     case syserr_not_all_assigned: return (ERROR_NOT_ALL_ASSIGNED);
891     case syserr_some_not_mapped: return (ERROR_SOME_NOT_MAPPED);
892     case syserr_no_quotas_for_account: return (ERROR_NO_QUOTAS_FOR_ACCOUNT);
893     case syserr_local_user_session_key: return (ERROR_LOCAL_USER_SESSION_KEY);
894     case syserr_null_lm_password: return (ERROR_NULL_LM_PASSWORD);
895     case syserr_unknown_revision: return (ERROR_UNKNOWN_REVISION);
896     case syserr_revision_mismatch: return (ERROR_REVISION_MISMATCH);
897     case syserr_invalid_owner: return (ERROR_INVALID_OWNER);
898     case syserr_invalid_primary_group: return (ERROR_INVALID_PRIMARY_GROUP);
899     case syserr_no_impersonation_token: return (ERROR_NO_IMPERSONATION_TOKEN);
900     case syserr_cant_disable_mandatory: return (ERROR_CANT_DISABLE_MANDATORY);
901     case syserr_no_logon_servers: return (ERROR_NO_LOGON_SERVERS);
902     case syserr_no_such_logon_session: return (ERROR_NO_SUCH_LOGON_SESSION);
903     case syserr_no_such_privilege: return (ERROR_NO_SUCH_PRIVILEGE);
904     case syserr_privilege_not_held: return (ERROR_PRIVILEGE_NOT_HELD);
905     case syserr_invalid_account_name: return (ERROR_INVALID_ACCOUNT_NAME);
906     case syserr_user_exists: return (ERROR_USER_EXISTS);
907     case syserr_no_such_user: return (ERROR_NO_SUCH_USER);
908     case syserr_group_exists: return (ERROR_GROUP_EXISTS);
909     case syserr_no_such_group: return (ERROR_NO_SUCH_GROUP);
910     case syserr_member_in_group: return (ERROR_MEMBER_IN_GROUP);
911     case syserr_member_not_in_group: return (ERROR_MEMBER_NOT_IN_GROUP);
912     case syserr_last_admin: return (ERROR_LAST_ADMIN);
913     case syserr_wrong_password: return (ERROR_WRONG_PASSWORD);
914     case syserr_ill_formed_password: return (ERROR_ILL_FORMED_PASSWORD);
915     case syserr_password_restriction: return (ERROR_PASSWORD_RESTRICTION);
916     case syserr_logon_failure: return (ERROR_LOGON_FAILURE);
917     case syserr_account_restriction: return (ERROR_ACCOUNT_RESTRICTION);
918     case syserr_invalid_logon_hours: return (ERROR_INVALID_LOGON_HOURS);
919     case syserr_invalid_workstation: return (ERROR_INVALID_WORKSTATION);
920     case syserr_password_expired: return (ERROR_PASSWORD_EXPIRED);
921     case syserr_account_disabled: return (ERROR_ACCOUNT_DISABLED);
922     case syserr_none_mapped: return (ERROR_NONE_MAPPED);
923     case syserr_too_many_luids_requested: return (ERROR_TOO_MANY_LUIDS_REQUESTED);
924     case syserr_luids_exhausted: return (ERROR_LUIDS_EXHAUSTED);
925     case syserr_invalid_sub_authority: return (ERROR_INVALID_SUB_AUTHORITY);
926     case syserr_invalid_acl: return (ERROR_INVALID_ACL);
927     case syserr_invalid_sid: return (ERROR_INVALID_SID);
928     case syserr_invalid_security_descr: return (ERROR_INVALID_SECURITY_DESCR);
929     case syserr_bad_inheritance_acl: return (ERROR_BAD_INHERITANCE_ACL);
930     case syserr_server_disabled: return (ERROR_SERVER_DISABLED);
931     case syserr_server_not_disabled: return (ERROR_SERVER_NOT_DISABLED);
932     case syserr_invalid_id_authority: return (ERROR_INVALID_ID_AUTHORITY);
933     case syserr_allotted_space_exceeded: return (ERROR_ALLOTTED_SPACE_EXCEEDED);
934     case syserr_invalid_group_attributes: return (ERROR_INVALID_GROUP_ATTRIBUTES);
935     case syserr_bad_impersonation_level: return (ERROR_BAD_IMPERSONATION_LEVEL);
936     case syserr_cant_open_anonymous: return (ERROR_CANT_OPEN_ANONYMOUS);
937     case syserr_bad_validation_class: return (ERROR_BAD_VALIDATION_CLASS);
938     case syserr_bad_token_type: return (ERROR_BAD_TOKEN_TYPE);
939     case syserr_no_security_on_object: return (ERROR_NO_SECURITY_ON_OBJECT);
940     case syserr_cant_access_domain_info: return (ERROR_CANT_ACCESS_DOMAIN_INFO);
941     case syserr_invalid_server_state: return (ERROR_INVALID_SERVER_STATE);
942     case syserr_invalid_domain_state: return (ERROR_INVALID_DOMAIN_STATE);
943     case syserr_invalid_domain_role: return (ERROR_INVALID_DOMAIN_ROLE);
944     case syserr_no_such_domain: return (ERROR_NO_SUCH_DOMAIN);
945     case syserr_domain_exists: return (ERROR_DOMAIN_EXISTS);
946     case syserr_domain_limit_exceeded: return (ERROR_DOMAIN_LIMIT_EXCEEDED);
947     case syserr_internal_db_corruption: return (ERROR_INTERNAL_DB_CORRUPTION);
948     case syserr_internal_error: return (ERROR_INTERNAL_ERROR);
949     case syserr_generic_not_mapped: return (ERROR_GENERIC_NOT_MAPPED);
950     case syserr_bad_descriptor_format: return (ERROR_BAD_DESCRIPTOR_FORMAT);
951     case syserr_not_logon_process: return (ERROR_NOT_LOGON_PROCESS);
952     case syserr_logon_session_exists: return (ERROR_LOGON_SESSION_EXISTS);
953     case syserr_no_such_package: return (ERROR_NO_SUCH_PACKAGE);
954     case syserr_bad_logon_session_state: return (ERROR_BAD_LOGON_SESSION_STATE);
955     case syserr_logon_session_collision: return (ERROR_LOGON_SESSION_COLLISION);
956     case syserr_invalid_logon_type: return (ERROR_INVALID_LOGON_TYPE);
957     case syserr_cannot_impersonate: return (ERROR_CANNOT_IMPERSONATE);
958     case syserr_rxact_invalid_state: return (ERROR_RXACT_INVALID_STATE);
959     case syserr_rxact_commit_failure: return (ERROR_RXACT_COMMIT_FAILURE);
960     case syserr_special_account: return (ERROR_SPECIAL_ACCOUNT);
961     case syserr_special_group: return (ERROR_SPECIAL_GROUP);
962     case syserr_special_user: return (ERROR_SPECIAL_USER);
963     case syserr_members_primary_group: return (ERROR_MEMBERS_PRIMARY_GROUP);
964     case syserr_token_already_in_use: return (ERROR_TOKEN_ALREADY_IN_USE);
965     case syserr_no_such_alias: return (ERROR_NO_SUCH_ALIAS);
966     case syserr_member_not_in_alias: return (ERROR_MEMBER_NOT_IN_ALIAS);
967     case syserr_member_in_alias: return (ERROR_MEMBER_IN_ALIAS);
968     case syserr_alias_exists: return (ERROR_ALIAS_EXISTS);
969     case syserr_logon_not_granted: return (ERROR_LOGON_NOT_GRANTED);
970     case syserr_too_many_secrets: return (ERROR_TOO_MANY_SECRETS);
971     case syserr_secret_too_long: return (ERROR_SECRET_TOO_LONG);
972     case syserr_internal_db_error: return (ERROR_INTERNAL_DB_ERROR);
973     case syserr_too_many_context_ids: return (ERROR_TOO_MANY_CONTEXT_IDS);
974     case syserr_logon_type_not_granted: return (ERROR_LOGON_TYPE_NOT_GRANTED);
975     case syserr_nt_cross_encryption_required: return (ERROR_NT_CROSS_ENCRYPTION_REQUIRED);
976     case syserr_no_such_member: return (ERROR_NO_SUCH_MEMBER);
977     case syserr_invalid_member: return (ERROR_INVALID_MEMBER);
978     case syserr_too_many_sids: return (ERROR_TOO_MANY_SIDS);
979     case syserr_lm_cross_encryption_required: return (ERROR_LM_CROSS_ENCRYPTION_REQUIRED);
980     case syserr_no_inheritance: return (ERROR_NO_INHERITANCE);
981     case syserr_file_corrupt: return (ERROR_FILE_CORRUPT);
982     case syserr_disk_corrupt: return (ERROR_DISK_CORRUPT);
983     case syserr_no_user_session_key: return (ERROR_NO_USER_SESSION_KEY);
984     case syserr_license_quota_exceeded: return (ERROR_LICENSE_QUOTA_EXCEEDED);
985     case syserr_invalid_window_handle: return (ERROR_INVALID_WINDOW_HANDLE);
986     case syserr_invalid_menu_handle: return (ERROR_INVALID_MENU_HANDLE);
987     case syserr_invalid_cursor_handle: return (ERROR_INVALID_CURSOR_HANDLE);
988     case syserr_invalid_accel_handle: return (ERROR_INVALID_ACCEL_HANDLE);
989     case syserr_invalid_hook_handle: return (ERROR_INVALID_HOOK_HANDLE);
990     case syserr_invalid_dwp_handle: return (ERROR_INVALID_DWP_HANDLE);
991     case syserr_tlw_with_wschild: return (ERROR_TLW_WITH_WSCHILD);
992     case syserr_cannot_find_wnd_class: return (ERROR_CANNOT_FIND_WND_CLASS);
993     case syserr_window_of_other_thread: return (ERROR_WINDOW_OF_OTHER_THREAD);
994     case syserr_hotkey_already_registered: return (ERROR_HOTKEY_ALREADY_REGISTERED);
995     case syserr_class_already_exists: return (ERROR_CLASS_ALREADY_EXISTS);
996     case syserr_class_does_not_exist: return (ERROR_CLASS_DOES_NOT_EXIST);
997     case syserr_class_has_windows: return (ERROR_CLASS_HAS_WINDOWS);
998     case syserr_invalid_index: return (ERROR_INVALID_INDEX);
999     case syserr_invalid_icon_handle: return (ERROR_INVALID_ICON_HANDLE);
1000     case syserr_private_dialog_index: return (ERROR_PRIVATE_DIALOG_INDEX);
1001     case syserr_listbox_id_not_found: return (ERROR_LISTBOX_ID_NOT_FOUND);
1002     case syserr_no_wildcard_characters: return (ERROR_NO_WILDCARD_CHARACTERS);
1003     case syserr_clipboard_not_open: return (ERROR_CLIPBOARD_NOT_OPEN);
1004     case syserr_hotkey_not_registered: return (ERROR_HOTKEY_NOT_REGISTERED);
1005     case syserr_window_not_dialog: return (ERROR_WINDOW_NOT_DIALOG);
1006     case syserr_control_id_not_found: return (ERROR_CONTROL_ID_NOT_FOUND);
1007     case syserr_invalid_combobox_message: return (ERROR_INVALID_COMBOBOX_MESSAGE);
1008     case syserr_window_not_combobox: return (ERROR_WINDOW_NOT_COMBOBOX);
1009     case syserr_invalid_edit_height: return (ERROR_INVALID_EDIT_HEIGHT);
1010     case syserr_dc_not_found: return (ERROR_DC_NOT_FOUND);
1011     case syserr_invalid_hook_filter: return (ERROR_INVALID_HOOK_FILTER);
1012     case syserr_invalid_filter_proc: return (ERROR_INVALID_FILTER_PROC);
1013     case syserr_hook_needs_hmod: return (ERROR_HOOK_NEEDS_HMOD);
1014     case syserr_global_only_hook: return (ERROR_GLOBAL_ONLY_HOOK);
1015     case syserr_journal_hook_set: return (ERROR_JOURNAL_HOOK_SET);
1016     case syserr_hook_not_installed: return (ERROR_HOOK_NOT_INSTALLED);
1017     case syserr_invalid_lb_message: return (ERROR_INVALID_LB_MESSAGE);
1018     case syserr_setcount_on_bad_lb: return (ERROR_SETCOUNT_ON_BAD_LB);
1019     case syserr_lb_without_tabstops: return (ERROR_LB_WITHOUT_TABSTOPS);
1020     case syserr_destroy_object_of_other_thread: return (ERROR_DESTROY_OBJECT_OF_OTHER_THREAD);
1021     case syserr_child_window_menu: return (ERROR_CHILD_WINDOW_MENU);
1022     case syserr_no_system_menu: return (ERROR_NO_SYSTEM_MENU);
1023     case syserr_invalid_msgbox_style: return (ERROR_INVALID_MSGBOX_STYLE);
1024     case syserr_invalid_spi_value: return (ERROR_INVALID_SPI_VALUE);
1025     case syserr_screen_already_locked: return (ERROR_SCREEN_ALREADY_LOCKED);
1026     case syserr_hwnds_have_diff_parent: return (ERROR_HWNDS_HAVE_DIFF_PARENT);
1027     case syserr_not_child_window: return (ERROR_NOT_CHILD_WINDOW);
1028     case syserr_invalid_gw_command: return (ERROR_INVALID_GW_COMMAND);
1029     case syserr_invalid_thread_id: return (ERROR_INVALID_THREAD_ID);
1030     case syserr_non_mdichild_window: return (ERROR_NON_MDICHILD_WINDOW);
1031     case syserr_popup_already_active: return (ERROR_POPUP_ALREADY_ACTIVE);
1032     case syserr_no_scrollbars: return (ERROR_NO_SCROLLBARS);
1033     case syserr_invalid_scrollbar_range: return (ERROR_INVALID_SCROLLBAR_RANGE);
1034     case syserr_invalid_showwin_command: return (ERROR_INVALID_SHOWWIN_COMMAND);
1035     case syserr_no_system_resources: return (ERROR_NO_SYSTEM_RESOURCES);
1036     case syserr_nonpaged_system_resources: return (ERROR_NONPAGED_SYSTEM_RESOURCES);
1037     case syserr_paged_system_resources: return (ERROR_PAGED_SYSTEM_RESOURCES);
1038     case syserr_working_set_quota: return (ERROR_WORKING_SET_QUOTA);
1039     case syserr_pagefile_quota: return (ERROR_PAGEFILE_QUOTA);
1040     case syserr_commitment_limit: return (ERROR_COMMITMENT_LIMIT);
1041     case syserr_menu_item_not_found: return (ERROR_MENU_ITEM_NOT_FOUND);
1042     case syserr_eventlog_file_corrupt: return (ERROR_EVENTLOG_FILE_CORRUPT);
1043     case syserr_eventlog_cant_start: return (ERROR_EVENTLOG_CANT_START);
1044     case syserr_log_file_full: return (ERROR_LOG_FILE_FULL);
1045     case syserr_eventlog_file_changed: return (ERROR_EVENTLOG_FILE_CHANGED);
1046     case syserr_rpc_s_invalid_string_binding: return (RPC_S_INVALID_STRING_BINDING);
1047     case syserr_rpc_s_wrong_kind_of_binding: return (RPC_S_WRONG_KIND_OF_BINDING);
1048     case syserr_rpc_s_invalid_binding: return (RPC_S_INVALID_BINDING);
1049     case syserr_rpc_s_protseq_not_supported: return (RPC_S_PROTSEQ_NOT_SUPPORTED);
1050     case syserr_rpc_s_invalid_rpc_protseq: return (RPC_S_INVALID_RPC_PROTSEQ);
1051     case syserr_rpc_s_invalid_string_uuid: return (RPC_S_INVALID_STRING_UUID);
1052     case syserr_rpc_s_invalid_endpoint_format: return (RPC_S_INVALID_ENDPOINT_FORMAT);
1053     case syserr_rpc_s_invalid_net_addr: return (RPC_S_INVALID_NET_ADDR);
1054     case syserr_rpc_s_no_endpoint_found: return (RPC_S_NO_ENDPOINT_FOUND);
1055     case syserr_rpc_s_invalid_timeout: return (RPC_S_INVALID_TIMEOUT);
1056     case syserr_rpc_s_object_not_found: return (RPC_S_OBJECT_NOT_FOUND);
1057     case syserr_rpc_s_already_registered: return (RPC_S_ALREADY_REGISTERED);
1058     case syserr_rpc_s_type_already_registered: return (RPC_S_TYPE_ALREADY_REGISTERED);
1059     case syserr_rpc_s_already_listening: return (RPC_S_ALREADY_LISTENING);
1060     case syserr_rpc_s_no_protseqs_registered: return (RPC_S_NO_PROTSEQS_REGISTERED);
1061     case syserr_rpc_s_not_listening: return (RPC_S_NOT_LISTENING);
1062     case syserr_rpc_s_unknown_mgr_type: return (RPC_S_UNKNOWN_MGR_TYPE);
1063     case syserr_rpc_s_unknown_if: return (RPC_S_UNKNOWN_IF);
1064     case syserr_rpc_s_no_bindings: return (RPC_S_NO_BINDINGS);
1065     case syserr_rpc_s_no_protseqs: return (RPC_S_NO_PROTSEQS);
1066     case syserr_rpc_s_cant_create_endpoint: return (RPC_S_CANT_CREATE_ENDPOINT);
1067     case syserr_rpc_s_out_of_resources: return (RPC_S_OUT_OF_RESOURCES);
1068     case syserr_rpc_s_server_unavailable: return (RPC_S_SERVER_UNAVAILABLE);
1069     case syserr_rpc_s_server_too_busy: return (RPC_S_SERVER_TOO_BUSY);
1070     case syserr_rpc_s_invalid_network_options: return (RPC_S_INVALID_NETWORK_OPTIONS);
1071     case syserr_rpc_s_no_call_active: return (RPC_S_NO_CALL_ACTIVE);
1072     case syserr_rpc_s_call_failed: return (RPC_S_CALL_FAILED);
1073     case syserr_rpc_s_call_failed_dne: return (RPC_S_CALL_FAILED_DNE);
1074     case syserr_rpc_s_protocol_error: return (RPC_S_PROTOCOL_ERROR);
1075     case syserr_rpc_s_unsupported_trans_syn: return (RPC_S_UNSUPPORTED_TRANS_SYN);
1076     case syserr_rpc_s_unsupported_type: return (RPC_S_UNSUPPORTED_TYPE);
1077     case syserr_rpc_s_invalid_tag: return (RPC_S_INVALID_TAG);
1078     case syserr_rpc_s_invalid_bound: return (RPC_S_INVALID_BOUND);
1079     case syserr_rpc_s_no_entry_name: return (RPC_S_NO_ENTRY_NAME);
1080     case syserr_rpc_s_invalid_name_syntax: return (RPC_S_INVALID_NAME_SYNTAX);
1081     case syserr_rpc_s_unsupported_name_syntax: return (RPC_S_UNSUPPORTED_NAME_SYNTAX);
1082     case syserr_rpc_s_uuid_no_address: return (RPC_S_UUID_NO_ADDRESS);
1083     case syserr_rpc_s_duplicate_endpoint: return (RPC_S_DUPLICATE_ENDPOINT);
1084     case syserr_rpc_s_unknown_authn_type: return (RPC_S_UNKNOWN_AUTHN_TYPE);
1085     case syserr_rpc_s_max_calls_too_small: return (RPC_S_MAX_CALLS_TOO_SMALL);
1086     case syserr_rpc_s_string_too_long: return (RPC_S_STRING_TOO_LONG);
1087     case syserr_rpc_s_protseq_not_found: return (RPC_S_PROTSEQ_NOT_FOUND);
1088     case syserr_rpc_s_procnum_out_of_range: return (RPC_S_PROCNUM_OUT_OF_RANGE);
1089     case syserr_rpc_s_binding_has_no_auth: return (RPC_S_BINDING_HAS_NO_AUTH);
1090     case syserr_rpc_s_unknown_authn_service: return (RPC_S_UNKNOWN_AUTHN_SERVICE);
1091     case syserr_rpc_s_unknown_authn_level: return (RPC_S_UNKNOWN_AUTHN_LEVEL);
1092     case syserr_rpc_s_invalid_auth_identity: return (RPC_S_INVALID_AUTH_IDENTITY);
1093     case syserr_rpc_s_unknown_authz_service: return (RPC_S_UNKNOWN_AUTHZ_SERVICE);
1094     case syserr_ept_s_invalid_entry: return (EPT_S_INVALID_ENTRY);
1095     case syserr_ept_s_cant_perform_op: return (EPT_S_CANT_PERFORM_OP);
1096     case syserr_ept_s_not_registered: return (EPT_S_NOT_REGISTERED);
1097     case syserr_rpc_s_nothing_to_export: return (RPC_S_NOTHING_TO_EXPORT);
1098     case syserr_rpc_s_incomplete_name: return (RPC_S_INCOMPLETE_NAME);
1099     case syserr_rpc_s_invalid_vers_option: return (RPC_S_INVALID_VERS_OPTION);
1100     case syserr_rpc_s_no_more_members: return (RPC_S_NO_MORE_MEMBERS);
1101     case syserr_rpc_s_not_all_objs_unexported: return (RPC_S_NOT_ALL_OBJS_UNEXPORTED);
1102     case syserr_rpc_s_interface_not_found: return (RPC_S_INTERFACE_NOT_FOUND);
1103     case syserr_rpc_s_entry_already_exists: return (RPC_S_ENTRY_ALREADY_EXISTS);
1104     case syserr_rpc_s_entry_not_found: return (RPC_S_ENTRY_NOT_FOUND);
1105     case syserr_rpc_s_name_service_unavailable: return (RPC_S_NAME_SERVICE_UNAVAILABLE);
1106     case syserr_rpc_s_invalid_naf_id: return (RPC_S_INVALID_NAF_ID);
1107     case syserr_rpc_s_cannot_support: return (RPC_S_CANNOT_SUPPORT);
1108     case syserr_rpc_s_no_context_available: return (RPC_S_NO_CONTEXT_AVAILABLE);
1109     case syserr_rpc_s_internal_error: return (RPC_S_INTERNAL_ERROR);
1110     case syserr_rpc_s_zero_divide: return (RPC_S_ZERO_DIVIDE);
1111     case syserr_rpc_s_address_error: return (RPC_S_ADDRESS_ERROR);
1112     case syserr_rpc_s_fp_div_zero: return (RPC_S_FP_DIV_ZERO);
1113     case syserr_rpc_s_fp_underflow: return (RPC_S_FP_UNDERFLOW);
1114     case syserr_rpc_s_fp_overflow: return (RPC_S_FP_OVERFLOW);
1115     case syserr_rpc_x_no_more_entries: return (RPC_X_NO_MORE_ENTRIES);
1116     case syserr_rpc_x_ss_char_trans_open_fail: return (RPC_X_SS_CHAR_TRANS_OPEN_FAIL);
1117     case syserr_rpc_x_ss_char_trans_short_file: return (RPC_X_SS_CHAR_TRANS_SHORT_FILE);
1118     case syserr_rpc_x_ss_in_null_context: return (RPC_X_SS_IN_NULL_CONTEXT);
1119     case syserr_rpc_x_ss_context_damaged: return (RPC_X_SS_CONTEXT_DAMAGED);
1120     case syserr_rpc_x_ss_handles_mismatch: return (RPC_X_SS_HANDLES_MISMATCH);
1121     case syserr_rpc_x_ss_cannot_get_call_handle: return (RPC_X_SS_CANNOT_GET_CALL_HANDLE);
1122     case syserr_rpc_x_null_ref_pointer: return (RPC_X_NULL_REF_POINTER);
1123     case syserr_rpc_x_enum_value_out_of_range: return (RPC_X_ENUM_VALUE_OUT_OF_RANGE);
1124     case syserr_rpc_x_byte_count_too_small: return (RPC_X_BYTE_COUNT_TOO_SMALL);
1125     case syserr_rpc_x_bad_stub_data: return (RPC_X_BAD_STUB_DATA);
1126     case syserr_invalid_user_buffer: return (ERROR_INVALID_USER_BUFFER);
1127     case syserr_unrecognized_media: return (ERROR_UNRECOGNIZED_MEDIA);
1128     case syserr_no_trust_lsa_secret: return (ERROR_NO_TRUST_LSA_SECRET);
1129     case syserr_no_trust_sam_account: return (ERROR_NO_TRUST_SAM_ACCOUNT);
1130     case syserr_trusted_domain_failure: return (ERROR_TRUSTED_DOMAIN_FAILURE);
1131     case syserr_trusted_relationship_failure: return (ERROR_TRUSTED_RELATIONSHIP_FAILURE);
1132     case syserr_trust_failure: return (ERROR_TRUST_FAILURE);
1133     case syserr_rpc_s_call_in_progress: return (RPC_S_CALL_IN_PROGRESS);
1134     case syserr_netlogon_not_started: return (ERROR_NETLOGON_NOT_STARTED);
1135     case syserr_account_expired: return (ERROR_ACCOUNT_EXPIRED);
1136     case syserr_redirector_has_open_handles: return (ERROR_REDIRECTOR_HAS_OPEN_HANDLES);
1137     case syserr_printer_driver_already_installed: return (ERROR_PRINTER_DRIVER_ALREADY_INSTALLED);
1138     case syserr_unknown_port: return (ERROR_UNKNOWN_PORT);
1139     case syserr_unknown_printer_driver: return (ERROR_UNKNOWN_PRINTER_DRIVER);
1140     case syserr_unknown_printprocessor: return (ERROR_UNKNOWN_PRINTPROCESSOR);
1141     case syserr_invalid_separator_file: return (ERROR_INVALID_SEPARATOR_FILE);
1142     case syserr_invalid_priority: return (ERROR_INVALID_PRIORITY);
1143     case syserr_invalid_printer_name: return (ERROR_INVALID_PRINTER_NAME);
1144     case syserr_printer_already_exists: return (ERROR_PRINTER_ALREADY_EXISTS);
1145     case syserr_invalid_printer_command: return (ERROR_INVALID_PRINTER_COMMAND);
1146     case syserr_invalid_datatype: return (ERROR_INVALID_DATATYPE);
1147     case syserr_invalid_environment: return (ERROR_INVALID_ENVIRONMENT);
1148     case syserr_rpc_s_no_more_bindings: return (RPC_S_NO_MORE_BINDINGS);
1149     case syserr_nologon_interdomain_trust_account: return (ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT);
1150     case syserr_nologon_workstation_trust_account: return (ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT);
1151     case syserr_nologon_server_trust_account: return (ERROR_NOLOGON_SERVER_TRUST_ACCOUNT);
1152     case syserr_domain_trust_inconsistent: return (ERROR_DOMAIN_TRUST_INCONSISTENT);
1153     case syserr_server_has_open_handles: return (ERROR_SERVER_HAS_OPEN_HANDLES);
1154     case syserr_resource_data_not_found: return (ERROR_RESOURCE_DATA_NOT_FOUND);
1155     case syserr_resource_type_not_found: return (ERROR_RESOURCE_TYPE_NOT_FOUND);
1156     case syserr_resource_name_not_found: return (ERROR_RESOURCE_NAME_NOT_FOUND);
1157     case syserr_resource_lang_not_found: return (ERROR_RESOURCE_LANG_NOT_FOUND);
1158     case syserr_not_enough_quota: return (ERROR_NOT_ENOUGH_QUOTA);
1159     case syserr_rpc_s_no_interfaces: return (RPC_S_NO_INTERFACES);
1160     case syserr_rpc_s_call_cancelled: return (RPC_S_CALL_CANCELLED);
1161     case syserr_rpc_s_binding_incomplete: return (RPC_S_BINDING_INCOMPLETE);
1162     case syserr_rpc_s_comm_failure: return (RPC_S_COMM_FAILURE);
1163     case syserr_rpc_s_unsupported_authn_level: return (RPC_S_UNSUPPORTED_AUTHN_LEVEL);
1164     case syserr_rpc_s_no_princ_name: return (RPC_S_NO_PRINC_NAME);
1165     case syserr_rpc_s_not_rpc_error: return (RPC_S_NOT_RPC_ERROR);
1166     case syserr_rpc_s_uuid_local_only: return (RPC_S_UUID_LOCAL_ONLY);
1167     case syserr_rpc_s_sec_pkg_error: return (RPC_S_SEC_PKG_ERROR);
1168     case syserr_rpc_s_not_cancelled: return (RPC_S_NOT_CANCELLED);
1169     case syserr_rpc_x_invalid_es_action: return (RPC_X_INVALID_ES_ACTION);
1170     case syserr_rpc_x_wrong_es_version: return (RPC_X_WRONG_ES_VERSION);
1171     case syserr_rpc_x_wrong_stub_version: return (RPC_X_WRONG_STUB_VERSION);
1172     case syserr_rpc_s_group_member_not_found: return (RPC_S_GROUP_MEMBER_NOT_FOUND);
1173     case syserr_ept_s_cant_create: return (EPT_S_CANT_CREATE);
1174     case syserr_rpc_s_invalid_object: return (RPC_S_INVALID_OBJECT);
1175     case syserr_invalid_time: return (ERROR_INVALID_TIME);
1176     case syserr_invalid_form_name: return (ERROR_INVALID_FORM_NAME);
1177     case syserr_invalid_form_size: return (ERROR_INVALID_FORM_SIZE);
1178     case syserr_already_waiting: return (ERROR_ALREADY_WAITING);
1179     case syserr_printer_deleted: return (ERROR_PRINTER_DELETED);
1180     case syserr_invalid_printer_state: return (ERROR_INVALID_PRINTER_STATE);
1181     case syserr_password_must_change: return (ERROR_PASSWORD_MUST_CHANGE);
1182     case syserr_domain_controller_not_found: return (ERROR_DOMAIN_CONTROLLER_NOT_FOUND);
1183     case syserr_account_locked_out: return (ERROR_ACCOUNT_LOCKED_OUT);
1184     case syserr_no_browser_servers_found: return (ERROR_NO_BROWSER_SERVERS_FOUND);
1185     case syserr_invalid_pixel_format: return (ERROR_INVALID_PIXEL_FORMAT);
1186     case syserr_bad_driver: return (ERROR_BAD_DRIVER);
1187     case syserr_invalid_window_style: return (ERROR_INVALID_WINDOW_STYLE);
1188     case syserr_metafile_not_supported: return (ERROR_METAFILE_NOT_SUPPORTED);
1189     case syserr_transform_not_supported: return (ERROR_TRANSFORM_NOT_SUPPORTED);
1190     case syserr_clipping_not_supported: return (ERROR_CLIPPING_NOT_SUPPORTED);
1191     case syserr_unknown_print_monitor: return (ERROR_UNKNOWN_PRINT_MONITOR);
1192     case syserr_printer_driver_in_use: return (ERROR_PRINTER_DRIVER_IN_USE);
1193     case syserr_spool_file_not_found: return (ERROR_SPOOL_FILE_NOT_FOUND);
1194     case syserr_spl_no_startdoc: return (ERROR_SPL_NO_STARTDOC);
1195     case syserr_spl_no_addjob: return (ERROR_SPL_NO_ADDJOB);
1196     case syserr_print_processor_already_installed: return (ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED);
1197     case syserr_print_monitor_already_installed: return (ERROR_PRINT_MONITOR_ALREADY_INSTALLED);
1198     case syserr_wins_internal: return (ERROR_WINS_INTERNAL);
1199     case syserr_can_not_del_local_wins: return (ERROR_CAN_NOT_DEL_LOCAL_WINS);
1200     case syserr_static_init: return (ERROR_STATIC_INIT);
1201     case syserr_inc_backup: return (ERROR_INC_BACKUP);
1202     case syserr_full_backup: return (ERROR_FULL_BACKUP);
1203     case syserr_rec_non_existent: return (ERROR_REC_NON_EXISTENT);
1204     case syserr_rpl_not_allowed: return (ERROR_RPL_NOT_ALLOWED);
1205 
1206       /* Winsock error codes: */
1207     case syserr_wsaeintr: return (WSAEINTR);
1208     case syserr_wsaebadf: return (WSAEBADF);
1209     case syserr_wsaeacces: return (WSAEACCES);
1210     case syserr_wsaefault: return (WSAEFAULT);
1211     case syserr_wsaeinval: return (WSAEINVAL);
1212     case syserr_wsaemfile: return (WSAEMFILE);
1213     case syserr_wsaewouldblock: return (WSAEWOULDBLOCK);
1214     case syserr_wsaeinprogress: return (WSAEINPROGRESS);
1215     case syserr_wsaealready: return (WSAEALREADY);
1216     case syserr_wsaenotsock: return (WSAENOTSOCK);
1217     case syserr_wsaedestaddrreq: return (WSAEDESTADDRREQ);
1218     case syserr_wsaemsgsize: return (WSAEMSGSIZE);
1219     case syserr_wsaeprototype: return (WSAEPROTOTYPE);
1220     case syserr_wsaenoprotoopt: return (WSAENOPROTOOPT);
1221     case syserr_wsaeprotonosupport: return (WSAEPROTONOSUPPORT);
1222     case syserr_wsaesocktnosupport: return (WSAESOCKTNOSUPPORT);
1223     case syserr_wsaeopnotsupp: return (WSAEOPNOTSUPP);
1224     case syserr_wsaepfnosupport: return (WSAEPFNOSUPPORT);
1225     case syserr_wsaeafnosupport: return (WSAEAFNOSUPPORT);
1226     case syserr_wsaeaddrinuse: return (WSAEADDRINUSE);
1227     case syserr_wsaeaddrnotavail: return (WSAEADDRNOTAVAIL);
1228     case syserr_wsaenetdown: return (WSAENETDOWN);
1229     case syserr_wsaenetunreach: return (WSAENETUNREACH);
1230     case syserr_wsaenetreset: return (WSAENETRESET);
1231     case syserr_wsaeconnaborted: return (WSAECONNABORTED);
1232     case syserr_wsaeconnreset: return (WSAECONNRESET);
1233     case syserr_wsaenobufs: return (WSAENOBUFS);
1234     case syserr_wsaeisconn: return (WSAEISCONN);
1235     case syserr_wsaenotconn: return (WSAENOTCONN);
1236     case syserr_wsaeshutdown: return (WSAESHUTDOWN);
1237     case syserr_wsaetoomanyrefs: return (WSAETOOMANYREFS);
1238     case syserr_wsaetimedout: return (WSAETIMEDOUT);
1239     case syserr_wsaeconnrefused: return (WSAECONNREFUSED);
1240     case syserr_wsaeloop: return (WSAELOOP);
1241     case syserr_wsaenametoolong: return (WSAENAMETOOLONG);
1242     case syserr_wsaehostdown: return (WSAEHOSTDOWN);
1243     case syserr_wsaehostunreach: return (WSAEHOSTUNREACH);
1244     case syserr_wsaenotempty: return (WSAENOTEMPTY);
1245     case syserr_wsaeproclim: return (WSAEPROCLIM);
1246     case syserr_wsaeusers: return (WSAEUSERS);
1247     case syserr_wsaedquot: return (WSAEDQUOT);
1248     case syserr_wsaestale: return (WSAESTALE);
1249     case syserr_wsaeremote: return (WSAEREMOTE);
1250     case syserr_wsaediscon: return (WSAEDISCON);
1251     case syserr_wsasysnotready: return (WSASYSNOTREADY);
1252     case syserr_wsavernotsupported: return (WSAVERNOTSUPPORTED);
1253     case syserr_wsanotinitialised: return (WSANOTINITIALISED);
1254     case syserr_wsahost_not_found: return (WSAHOST_NOT_FOUND);
1255     case syserr_wsatry_again: return (WSATRY_AGAIN);
1256     case syserr_wsano_recovery: return (WSANO_RECOVERY);
1257     case syserr_wsano_data: return (WSANO_DATA);
1258 
1259     default: return (ERROR_SUCCESS);
1260     }
1261 }
1262 
1263 /* Machine-generated procedure, do not edit: */
1264 static enum syserr_names
win32_error_code_to_syserr(DWORD code)1265 win32_error_code_to_syserr (DWORD code)
1266 {
1267   switch (code)
1268     {
1269     case ERROR_SUCCESS: return (syserr_success);
1270     case ERROR_INVALID_FUNCTION: return (syserr_invalid_function);
1271     case ERROR_FILE_NOT_FOUND: return (syserr_file_not_found);
1272     case ERROR_PATH_NOT_FOUND: return (syserr_path_not_found);
1273     case ERROR_TOO_MANY_OPEN_FILES: return (syserr_too_many_open_files);
1274     case ERROR_ACCESS_DENIED: return (syserr_access_denied);
1275     case ERROR_INVALID_HANDLE: return (syserr_invalid_handle);
1276     case ERROR_ARENA_TRASHED: return (syserr_arena_trashed);
1277     case ERROR_NOT_ENOUGH_MEMORY: return (syserr_not_enough_memory);
1278     case ERROR_INVALID_BLOCK: return (syserr_invalid_block);
1279     case ERROR_BAD_ENVIRONMENT: return (syserr_bad_environment);
1280     case ERROR_BAD_FORMAT: return (syserr_bad_format);
1281     case ERROR_INVALID_ACCESS: return (syserr_invalid_access);
1282     case ERROR_INVALID_DATA: return (syserr_invalid_data);
1283     case ERROR_OUTOFMEMORY: return (syserr_outofmemory);
1284     case ERROR_INVALID_DRIVE: return (syserr_invalid_drive);
1285     case ERROR_CURRENT_DIRECTORY: return (syserr_current_directory);
1286     case ERROR_NOT_SAME_DEVICE: return (syserr_not_same_device);
1287     case ERROR_NO_MORE_FILES: return (syserr_no_more_files);
1288     case ERROR_WRITE_PROTECT: return (syserr_write_protect);
1289     case ERROR_BAD_UNIT: return (syserr_bad_unit);
1290     case ERROR_NOT_READY: return (syserr_not_ready);
1291     case ERROR_BAD_COMMAND: return (syserr_bad_command);
1292     case ERROR_CRC: return (syserr_crc);
1293     case ERROR_BAD_LENGTH: return (syserr_bad_length);
1294     case ERROR_SEEK: return (syserr_seek);
1295     case ERROR_NOT_DOS_DISK: return (syserr_not_dos_disk);
1296     case ERROR_SECTOR_NOT_FOUND: return (syserr_sector_not_found);
1297     case ERROR_OUT_OF_PAPER: return (syserr_out_of_paper);
1298     case ERROR_WRITE_FAULT: return (syserr_write_fault);
1299     case ERROR_READ_FAULT: return (syserr_read_fault);
1300     case ERROR_GEN_FAILURE: return (syserr_gen_failure);
1301     case ERROR_SHARING_VIOLATION: return (syserr_sharing_violation);
1302     case ERROR_LOCK_VIOLATION: return (syserr_lock_violation);
1303     case ERROR_WRONG_DISK: return (syserr_wrong_disk);
1304     case ERROR_SHARING_BUFFER_EXCEEDED: return (syserr_sharing_buffer_exceeded);
1305     case ERROR_HANDLE_EOF: return (syserr_handle_eof);
1306     case ERROR_HANDLE_DISK_FULL: return (syserr_handle_disk_full);
1307     case ERROR_NOT_SUPPORTED: return (syserr_not_supported);
1308     case ERROR_REM_NOT_LIST: return (syserr_rem_not_list);
1309     case ERROR_DUP_NAME: return (syserr_dup_name);
1310     case ERROR_BAD_NETPATH: return (syserr_bad_netpath);
1311     case ERROR_NETWORK_BUSY: return (syserr_network_busy);
1312     case ERROR_DEV_NOT_EXIST: return (syserr_dev_not_exist);
1313     case ERROR_TOO_MANY_CMDS: return (syserr_too_many_cmds);
1314     case ERROR_ADAP_HDW_ERR: return (syserr_adap_hdw_err);
1315     case ERROR_BAD_NET_RESP: return (syserr_bad_net_resp);
1316     case ERROR_UNEXP_NET_ERR: return (syserr_unexp_net_err);
1317     case ERROR_BAD_REM_ADAP: return (syserr_bad_rem_adap);
1318     case ERROR_PRINTQ_FULL: return (syserr_printq_full);
1319     case ERROR_NO_SPOOL_SPACE: return (syserr_no_spool_space);
1320     case ERROR_PRINT_CANCELLED: return (syserr_print_cancelled);
1321     case ERROR_NETNAME_DELETED: return (syserr_netname_deleted);
1322     case ERROR_NETWORK_ACCESS_DENIED: return (syserr_network_access_denied);
1323     case ERROR_BAD_DEV_TYPE: return (syserr_bad_dev_type);
1324     case ERROR_BAD_NET_NAME: return (syserr_bad_net_name);
1325     case ERROR_TOO_MANY_NAMES: return (syserr_too_many_names);
1326     case ERROR_TOO_MANY_SESS: return (syserr_too_many_sess);
1327     case ERROR_SHARING_PAUSED: return (syserr_sharing_paused);
1328     case ERROR_REQ_NOT_ACCEP: return (syserr_req_not_accep);
1329     case ERROR_REDIR_PAUSED: return (syserr_redir_paused);
1330     case ERROR_FILE_EXISTS: return (syserr_file_exists);
1331     case ERROR_CANNOT_MAKE: return (syserr_cannot_make);
1332     case ERROR_FAIL_I24: return (syserr_fail_i24);
1333     case ERROR_OUT_OF_STRUCTURES: return (syserr_out_of_structures);
1334     case ERROR_ALREADY_ASSIGNED: return (syserr_already_assigned);
1335     case ERROR_INVALID_PASSWORD: return (syserr_invalid_password);
1336     case ERROR_INVALID_PARAMETER: return (syserr_invalid_parameter);
1337     case ERROR_NET_WRITE_FAULT: return (syserr_net_write_fault);
1338     case ERROR_NO_PROC_SLOTS: return (syserr_no_proc_slots);
1339     case ERROR_TOO_MANY_SEMAPHORES: return (syserr_too_many_semaphores);
1340     case ERROR_EXCL_SEM_ALREADY_OWNED: return (syserr_excl_sem_already_owned);
1341     case ERROR_SEM_IS_SET: return (syserr_sem_is_set);
1342     case ERROR_TOO_MANY_SEM_REQUESTS: return (syserr_too_many_sem_requests);
1343     case ERROR_INVALID_AT_INTERRUPT_TIME: return (syserr_invalid_at_interrupt_time);
1344     case ERROR_SEM_OWNER_DIED: return (syserr_sem_owner_died);
1345     case ERROR_SEM_USER_LIMIT: return (syserr_sem_user_limit);
1346     case ERROR_DISK_CHANGE: return (syserr_disk_change);
1347     case ERROR_DRIVE_LOCKED: return (syserr_drive_locked);
1348     case ERROR_BROKEN_PIPE: return (syserr_broken_pipe);
1349     case ERROR_OPEN_FAILED: return (syserr_open_failed);
1350     case ERROR_BUFFER_OVERFLOW: return (syserr_buffer_overflow);
1351     case ERROR_DISK_FULL: return (syserr_disk_full);
1352     case ERROR_NO_MORE_SEARCH_HANDLES: return (syserr_no_more_search_handles);
1353     case ERROR_INVALID_TARGET_HANDLE: return (syserr_invalid_target_handle);
1354     case ERROR_INVALID_CATEGORY: return (syserr_invalid_category);
1355     case ERROR_INVALID_VERIFY_SWITCH: return (syserr_invalid_verify_switch);
1356     case ERROR_BAD_DRIVER_LEVEL: return (syserr_bad_driver_level);
1357     case ERROR_CALL_NOT_IMPLEMENTED: return (syserr_call_not_implemented);
1358     case ERROR_SEM_TIMEOUT: return (syserr_sem_timeout);
1359     case ERROR_INSUFFICIENT_BUFFER: return (syserr_insufficient_buffer);
1360     case ERROR_INVALID_NAME: return (syserr_invalid_name);
1361     case ERROR_INVALID_LEVEL: return (syserr_invalid_level);
1362     case ERROR_NO_VOLUME_LABEL: return (syserr_no_volume_label);
1363     case ERROR_MOD_NOT_FOUND: return (syserr_mod_not_found);
1364     case ERROR_PROC_NOT_FOUND: return (syserr_proc_not_found);
1365     case ERROR_WAIT_NO_CHILDREN: return (syserr_wait_no_children);
1366     case ERROR_CHILD_NOT_COMPLETE: return (syserr_child_not_complete);
1367     case ERROR_DIRECT_ACCESS_HANDLE: return (syserr_direct_access_handle);
1368     case ERROR_NEGATIVE_SEEK: return (syserr_negative_seek);
1369     case ERROR_SEEK_ON_DEVICE: return (syserr_seek_on_device);
1370     case ERROR_IS_JOIN_TARGET: return (syserr_is_join_target);
1371     case ERROR_IS_JOINED: return (syserr_is_joined);
1372     case ERROR_IS_SUBSTED: return (syserr_is_substed);
1373     case ERROR_NOT_JOINED: return (syserr_not_joined);
1374     case ERROR_NOT_SUBSTED: return (syserr_not_substed);
1375     case ERROR_JOIN_TO_JOIN: return (syserr_join_to_join);
1376     case ERROR_SUBST_TO_SUBST: return (syserr_subst_to_subst);
1377     case ERROR_JOIN_TO_SUBST: return (syserr_join_to_subst);
1378     case ERROR_SUBST_TO_JOIN: return (syserr_subst_to_join);
1379     case ERROR_BUSY_DRIVE: return (syserr_busy_drive);
1380     case ERROR_SAME_DRIVE: return (syserr_same_drive);
1381     case ERROR_DIR_NOT_ROOT: return (syserr_dir_not_root);
1382     case ERROR_DIR_NOT_EMPTY: return (syserr_dir_not_empty);
1383     case ERROR_IS_SUBST_PATH: return (syserr_is_subst_path);
1384     case ERROR_IS_JOIN_PATH: return (syserr_is_join_path);
1385     case ERROR_PATH_BUSY: return (syserr_path_busy);
1386     case ERROR_IS_SUBST_TARGET: return (syserr_is_subst_target);
1387     case ERROR_SYSTEM_TRACE: return (syserr_system_trace);
1388     case ERROR_INVALID_EVENT_COUNT: return (syserr_invalid_event_count);
1389     case ERROR_TOO_MANY_MUXWAITERS: return (syserr_too_many_muxwaiters);
1390     case ERROR_INVALID_LIST_FORMAT: return (syserr_invalid_list_format);
1391     case ERROR_LABEL_TOO_LONG: return (syserr_label_too_long);
1392     case ERROR_TOO_MANY_TCBS: return (syserr_too_many_tcbs);
1393     case ERROR_SIGNAL_REFUSED: return (syserr_signal_refused);
1394     case ERROR_DISCARDED: return (syserr_discarded);
1395     case ERROR_NOT_LOCKED: return (syserr_not_locked);
1396     case ERROR_BAD_THREADID_ADDR: return (syserr_bad_threadid_addr);
1397     case ERROR_BAD_ARGUMENTS: return (syserr_bad_arguments);
1398     case ERROR_BAD_PATHNAME: return (syserr_bad_pathname);
1399     case ERROR_SIGNAL_PENDING: return (syserr_signal_pending);
1400     case ERROR_MAX_THRDS_REACHED: return (syserr_max_thrds_reached);
1401     case ERROR_LOCK_FAILED: return (syserr_lock_failed);
1402     case ERROR_BUSY: return (syserr_busy);
1403     case ERROR_CANCEL_VIOLATION: return (syserr_cancel_violation);
1404     case ERROR_ATOMIC_LOCKS_NOT_SUPPORTED: return (syserr_atomic_locks_not_supported);
1405     case ERROR_INVALID_SEGMENT_NUMBER: return (syserr_invalid_segment_number);
1406     case ERROR_INVALID_ORDINAL: return (syserr_invalid_ordinal);
1407     case ERROR_ALREADY_EXISTS: return (syserr_already_exists);
1408     case ERROR_INVALID_FLAG_NUMBER: return (syserr_invalid_flag_number);
1409     case ERROR_SEM_NOT_FOUND: return (syserr_sem_not_found);
1410     case ERROR_INVALID_STARTING_CODESEG: return (syserr_invalid_starting_codeseg);
1411     case ERROR_INVALID_STACKSEG: return (syserr_invalid_stackseg);
1412     case ERROR_INVALID_MODULETYPE: return (syserr_invalid_moduletype);
1413     case ERROR_INVALID_EXE_SIGNATURE: return (syserr_invalid_exe_signature);
1414     case ERROR_EXE_MARKED_INVALID: return (syserr_exe_marked_invalid);
1415     case ERROR_BAD_EXE_FORMAT: return (syserr_bad_exe_format);
1416     case ERROR_ITERATED_DATA_EXCEEDS_64k: return (syserr_iterated_data_exceeds_64k);
1417     case ERROR_INVALID_MINALLOCSIZE: return (syserr_invalid_minallocsize);
1418     case ERROR_DYNLINK_FROM_INVALID_RING: return (syserr_dynlink_from_invalid_ring);
1419     case ERROR_IOPL_NOT_ENABLED: return (syserr_iopl_not_enabled);
1420     case ERROR_INVALID_SEGDPL: return (syserr_invalid_segdpl);
1421     case ERROR_AUTODATASEG_EXCEEDS_64k: return (syserr_autodataseg_exceeds_64k);
1422     case ERROR_RING2SEG_MUST_BE_MOVABLE: return (syserr_ring2seg_must_be_movable);
1423     case ERROR_RELOC_CHAIN_XEEDS_SEGLIM: return (syserr_reloc_chain_xeeds_seglim);
1424     case ERROR_INFLOOP_IN_RELOC_CHAIN: return (syserr_infloop_in_reloc_chain);
1425     case ERROR_ENVVAR_NOT_FOUND: return (syserr_envvar_not_found);
1426     case ERROR_NO_SIGNAL_SENT: return (syserr_no_signal_sent);
1427     case ERROR_FILENAME_EXCED_RANGE: return (syserr_filename_exced_range);
1428     case ERROR_RING2_STACK_IN_USE: return (syserr_ring2_stack_in_use);
1429     case ERROR_META_EXPANSION_TOO_LONG: return (syserr_meta_expansion_too_long);
1430     case ERROR_INVALID_SIGNAL_NUMBER: return (syserr_invalid_signal_number);
1431     case ERROR_THREAD_1_INACTIVE: return (syserr_thread_1_inactive);
1432     case ERROR_LOCKED: return (syserr_locked);
1433     case ERROR_TOO_MANY_MODULES: return (syserr_too_many_modules);
1434     case ERROR_NESTING_NOT_ALLOWED: return (syserr_nesting_not_allowed);
1435     case ERROR_BAD_PIPE: return (syserr_bad_pipe);
1436     case ERROR_PIPE_BUSY: return (syserr_pipe_busy);
1437     case ERROR_NO_DATA: return (syserr_no_data);
1438     case ERROR_PIPE_NOT_CONNECTED: return (syserr_pipe_not_connected);
1439     case ERROR_MORE_DATA: return (syserr_more_data);
1440     case ERROR_VC_DISCONNECTED: return (syserr_vc_disconnected);
1441     case ERROR_INVALID_EA_NAME: return (syserr_invalid_ea_name);
1442     case ERROR_EA_LIST_INCONSISTENT: return (syserr_ea_list_inconsistent);
1443     case ERROR_NO_MORE_ITEMS: return (syserr_no_more_items);
1444     case ERROR_CANNOT_COPY: return (syserr_cannot_copy);
1445     case ERROR_DIRECTORY: return (syserr_directory);
1446     case ERROR_EAS_DIDNT_FIT: return (syserr_eas_didnt_fit);
1447     case ERROR_EA_FILE_CORRUPT: return (syserr_ea_file_corrupt);
1448     case ERROR_EA_TABLE_FULL: return (syserr_ea_table_full);
1449     case ERROR_INVALID_EA_HANDLE: return (syserr_invalid_ea_handle);
1450     case ERROR_EAS_NOT_SUPPORTED: return (syserr_eas_not_supported);
1451     case ERROR_NOT_OWNER: return (syserr_not_owner);
1452     case ERROR_TOO_MANY_POSTS: return (syserr_too_many_posts);
1453     case ERROR_PARTIAL_COPY: return (syserr_partial_copy);
1454     case ERROR_MR_MID_NOT_FOUND: return (syserr_mr_mid_not_found);
1455     case ERROR_INVALID_ADDRESS: return (syserr_invalid_address);
1456     case ERROR_ARITHMETIC_OVERFLOW: return (syserr_arithmetic_overflow);
1457     case ERROR_PIPE_CONNECTED: return (syserr_pipe_connected);
1458     case ERROR_PIPE_LISTENING: return (syserr_pipe_listening);
1459     case ERROR_EA_ACCESS_DENIED: return (syserr_ea_access_denied);
1460     case ERROR_OPERATION_ABORTED: return (syserr_operation_aborted);
1461     case ERROR_IO_INCOMPLETE: return (syserr_io_incomplete);
1462     case ERROR_IO_PENDING: return (syserr_io_pending);
1463     case ERROR_NOACCESS: return (syserr_noaccess);
1464     case ERROR_SWAPERROR: return (syserr_swaperror);
1465     case ERROR_STACK_OVERFLOW: return (syserr_stack_overflow);
1466     case ERROR_INVALID_MESSAGE: return (syserr_invalid_message);
1467     case ERROR_CAN_NOT_COMPLETE: return (syserr_can_not_complete);
1468     case ERROR_INVALID_FLAGS: return (syserr_invalid_flags);
1469     case ERROR_UNRECOGNIZED_VOLUME: return (syserr_unrecognized_volume);
1470     case ERROR_FILE_INVALID: return (syserr_file_invalid);
1471     case ERROR_FULLSCREEN_MODE: return (syserr_fullscreen_mode);
1472     case ERROR_NO_TOKEN: return (syserr_no_token);
1473     case ERROR_BADDB: return (syserr_baddb);
1474     case ERROR_BADKEY: return (syserr_badkey);
1475     case ERROR_CANTOPEN: return (syserr_cantopen);
1476     case ERROR_CANTREAD: return (syserr_cantread);
1477     case ERROR_CANTWRITE: return (syserr_cantwrite);
1478     case ERROR_REGISTRY_RECOVERED: return (syserr_registry_recovered);
1479     case ERROR_REGISTRY_CORRUPT: return (syserr_registry_corrupt);
1480     case ERROR_REGISTRY_IO_FAILED: return (syserr_registry_io_failed);
1481     case ERROR_NOT_REGISTRY_FILE: return (syserr_not_registry_file);
1482     case ERROR_KEY_DELETED: return (syserr_key_deleted);
1483     case ERROR_NO_LOG_SPACE: return (syserr_no_log_space);
1484     case ERROR_KEY_HAS_CHILDREN: return (syserr_key_has_children);
1485     case ERROR_CHILD_MUST_BE_VOLATILE: return (syserr_child_must_be_volatile);
1486     case ERROR_NOTIFY_ENUM_DIR: return (syserr_notify_enum_dir);
1487     case ERROR_DEPENDENT_SERVICES_RUNNING: return (syserr_dependent_services_running);
1488     case ERROR_INVALID_SERVICE_CONTROL: return (syserr_invalid_service_control);
1489     case ERROR_SERVICE_REQUEST_TIMEOUT: return (syserr_service_request_timeout);
1490     case ERROR_SERVICE_NO_THREAD: return (syserr_service_no_thread);
1491     case ERROR_SERVICE_DATABASE_LOCKED: return (syserr_service_database_locked);
1492     case ERROR_SERVICE_ALREADY_RUNNING: return (syserr_service_already_running);
1493     case ERROR_INVALID_SERVICE_ACCOUNT: return (syserr_invalid_service_account);
1494     case ERROR_SERVICE_DISABLED: return (syserr_service_disabled);
1495     case ERROR_CIRCULAR_DEPENDENCY: return (syserr_circular_dependency);
1496     case ERROR_SERVICE_DOES_NOT_EXIST: return (syserr_service_does_not_exist);
1497     case ERROR_SERVICE_CANNOT_ACCEPT_CTRL: return (syserr_service_cannot_accept_ctrl);
1498     case ERROR_SERVICE_NOT_ACTIVE: return (syserr_service_not_active);
1499     case ERROR_FAILED_SERVICE_CONTROLLER_CONNECT: return (syserr_failed_service_controller_connect);
1500     case ERROR_EXCEPTION_IN_SERVICE: return (syserr_exception_in_service);
1501     case ERROR_DATABASE_DOES_NOT_EXIST: return (syserr_database_does_not_exist);
1502     case ERROR_SERVICE_SPECIFIC_ERROR: return (syserr_service_specific_error);
1503     case ERROR_PROCESS_ABORTED: return (syserr_process_aborted);
1504     case ERROR_SERVICE_DEPENDENCY_FAIL: return (syserr_service_dependency_fail);
1505     case ERROR_SERVICE_LOGON_FAILED: return (syserr_service_logon_failed);
1506     case ERROR_SERVICE_START_HANG: return (syserr_service_start_hang);
1507     case ERROR_INVALID_SERVICE_LOCK: return (syserr_invalid_service_lock);
1508     case ERROR_SERVICE_MARKED_FOR_DELETE: return (syserr_service_marked_for_delete);
1509     case ERROR_SERVICE_EXISTS: return (syserr_service_exists);
1510     case ERROR_ALREADY_RUNNING_LKG: return (syserr_already_running_lkg);
1511     case ERROR_SERVICE_DEPENDENCY_DELETED: return (syserr_service_dependency_deleted);
1512     case ERROR_BOOT_ALREADY_ACCEPTED: return (syserr_boot_already_accepted);
1513     case ERROR_SERVICE_NEVER_STARTED: return (syserr_service_never_started);
1514     case ERROR_DUPLICATE_SERVICE_NAME: return (syserr_duplicate_service_name);
1515     case ERROR_END_OF_MEDIA: return (syserr_end_of_media);
1516     case ERROR_FILEMARK_DETECTED: return (syserr_filemark_detected);
1517     case ERROR_BEGINNING_OF_MEDIA: return (syserr_beginning_of_media);
1518     case ERROR_SETMARK_DETECTED: return (syserr_setmark_detected);
1519     case ERROR_NO_DATA_DETECTED: return (syserr_no_data_detected);
1520     case ERROR_PARTITION_FAILURE: return (syserr_partition_failure);
1521     case ERROR_INVALID_BLOCK_LENGTH: return (syserr_invalid_block_length);
1522     case ERROR_DEVICE_NOT_PARTITIONED: return (syserr_device_not_partitioned);
1523     case ERROR_UNABLE_TO_LOCK_MEDIA: return (syserr_unable_to_lock_media);
1524     case ERROR_UNABLE_TO_UNLOAD_MEDIA: return (syserr_unable_to_unload_media);
1525     case ERROR_MEDIA_CHANGED: return (syserr_media_changed);
1526     case ERROR_BUS_RESET: return (syserr_bus_reset);
1527     case ERROR_NO_MEDIA_IN_DRIVE: return (syserr_no_media_in_drive);
1528     case ERROR_NO_UNICODE_TRANSLATION: return (syserr_no_unicode_translation);
1529     case ERROR_DLL_INIT_FAILED: return (syserr_dll_init_failed);
1530     case ERROR_SHUTDOWN_IN_PROGRESS: return (syserr_shutdown_in_progress);
1531     case ERROR_NO_SHUTDOWN_IN_PROGRESS: return (syserr_no_shutdown_in_progress);
1532     case ERROR_IO_DEVICE: return (syserr_io_device);
1533     case ERROR_SERIAL_NO_DEVICE: return (syserr_serial_no_device);
1534     case ERROR_IRQ_BUSY: return (syserr_irq_busy);
1535     case ERROR_MORE_WRITES: return (syserr_more_writes);
1536     case ERROR_COUNTER_TIMEOUT: return (syserr_counter_timeout);
1537     case ERROR_FLOPPY_ID_MARK_NOT_FOUND: return (syserr_floppy_id_mark_not_found);
1538     case ERROR_FLOPPY_WRONG_CYLINDER: return (syserr_floppy_wrong_cylinder);
1539     case ERROR_FLOPPY_UNKNOWN_ERROR: return (syserr_floppy_unknown_error);
1540     case ERROR_FLOPPY_BAD_REGISTERS: return (syserr_floppy_bad_registers);
1541     case ERROR_DISK_RECALIBRATE_FAILED: return (syserr_disk_recalibrate_failed);
1542     case ERROR_DISK_OPERATION_FAILED: return (syserr_disk_operation_failed);
1543     case ERROR_DISK_RESET_FAILED: return (syserr_disk_reset_failed);
1544     case ERROR_EOM_OVERFLOW: return (syserr_eom_overflow);
1545     case ERROR_NOT_ENOUGH_SERVER_MEMORY: return (syserr_not_enough_server_memory);
1546     case ERROR_POSSIBLE_DEADLOCK: return (syserr_possible_deadlock);
1547     case ERROR_MAPPED_ALIGNMENT: return (syserr_mapped_alignment);
1548     case ERROR_SET_POWER_STATE_VETOED: return (syserr_set_power_state_vetoed);
1549     case ERROR_SET_POWER_STATE_FAILED: return (syserr_set_power_state_failed);
1550     case ERROR_OLD_WIN_VERSION: return (syserr_old_win_version);
1551     case ERROR_APP_WRONG_OS: return (syserr_app_wrong_os);
1552     case ERROR_SINGLE_INSTANCE_APP: return (syserr_single_instance_app);
1553     case ERROR_RMODE_APP: return (syserr_rmode_app);
1554     case ERROR_INVALID_DLL: return (syserr_invalid_dll);
1555     case ERROR_NO_ASSOCIATION: return (syserr_no_association);
1556     case ERROR_DDE_FAIL: return (syserr_dde_fail);
1557     case ERROR_DLL_NOT_FOUND: return (syserr_dll_not_found);
1558     case ERROR_BAD_USERNAME: return (syserr_bad_username);
1559     case ERROR_NOT_CONNECTED: return (syserr_not_connected);
1560     case ERROR_OPEN_FILES: return (syserr_open_files);
1561     case ERROR_ACTIVE_CONNECTIONS: return (syserr_active_connections);
1562     case ERROR_DEVICE_IN_USE: return (syserr_device_in_use);
1563     case ERROR_BAD_DEVICE: return (syserr_bad_device);
1564     case ERROR_CONNECTION_UNAVAIL: return (syserr_connection_unavail);
1565     case ERROR_DEVICE_ALREADY_REMEMBERED: return (syserr_device_already_remembered);
1566     case ERROR_NO_NET_OR_BAD_PATH: return (syserr_no_net_or_bad_path);
1567     case ERROR_BAD_PROVIDER: return (syserr_bad_provider);
1568     case ERROR_CANNOT_OPEN_PROFILE: return (syserr_cannot_open_profile);
1569     case ERROR_BAD_PROFILE: return (syserr_bad_profile);
1570     case ERROR_NOT_CONTAINER: return (syserr_not_container);
1571     case ERROR_EXTENDED_ERROR: return (syserr_extended_error);
1572     case ERROR_INVALID_GROUPNAME: return (syserr_invalid_groupname);
1573     case ERROR_INVALID_COMPUTERNAME: return (syserr_invalid_computername);
1574     case ERROR_INVALID_EVENTNAME: return (syserr_invalid_eventname);
1575     case ERROR_INVALID_DOMAINNAME: return (syserr_invalid_domainname);
1576     case ERROR_INVALID_SERVICENAME: return (syserr_invalid_servicename);
1577     case ERROR_INVALID_NETNAME: return (syserr_invalid_netname);
1578     case ERROR_INVALID_SHARENAME: return (syserr_invalid_sharename);
1579     case ERROR_INVALID_PASSWORDNAME: return (syserr_invalid_passwordname);
1580     case ERROR_INVALID_MESSAGENAME: return (syserr_invalid_messagename);
1581     case ERROR_INVALID_MESSAGEDEST: return (syserr_invalid_messagedest);
1582     case ERROR_SESSION_CREDENTIAL_CONFLICT: return (syserr_session_credential_conflict);
1583     case ERROR_REMOTE_SESSION_LIMIT_EXCEEDED: return (syserr_remote_session_limit_exceeded);
1584     case ERROR_DUP_DOMAINNAME: return (syserr_dup_domainname);
1585     case ERROR_NO_NETWORK: return (syserr_no_network);
1586     case ERROR_CANCELLED: return (syserr_cancelled);
1587     case ERROR_USER_MAPPED_FILE: return (syserr_user_mapped_file);
1588     case ERROR_CONNECTION_REFUSED: return (syserr_connection_refused);
1589     case ERROR_GRACEFUL_DISCONNECT: return (syserr_graceful_disconnect);
1590     case ERROR_ADDRESS_ALREADY_ASSOCIATED: return (syserr_address_already_associated);
1591     case ERROR_ADDRESS_NOT_ASSOCIATED: return (syserr_address_not_associated);
1592     case ERROR_CONNECTION_INVALID: return (syserr_connection_invalid);
1593     case ERROR_CONNECTION_ACTIVE: return (syserr_connection_active);
1594     case ERROR_NETWORK_UNREACHABLE: return (syserr_network_unreachable);
1595     case ERROR_HOST_UNREACHABLE: return (syserr_host_unreachable);
1596     case ERROR_PROTOCOL_UNREACHABLE: return (syserr_protocol_unreachable);
1597     case ERROR_PORT_UNREACHABLE: return (syserr_port_unreachable);
1598     case ERROR_REQUEST_ABORTED: return (syserr_request_aborted);
1599     case ERROR_CONNECTION_ABORTED: return (syserr_connection_aborted);
1600     case ERROR_RETRY: return (syserr_retry);
1601     case ERROR_CONNECTION_COUNT_LIMIT: return (syserr_connection_count_limit);
1602     case ERROR_LOGIN_TIME_RESTRICTION: return (syserr_login_time_restriction);
1603     case ERROR_LOGIN_WKSTA_RESTRICTION: return (syserr_login_wksta_restriction);
1604     case ERROR_INCORRECT_ADDRESS: return (syserr_incorrect_address);
1605     case ERROR_ALREADY_REGISTERED: return (syserr_already_registered);
1606     case ERROR_SERVICE_NOT_FOUND: return (syserr_service_not_found);
1607     case ERROR_NOT_AUTHENTICATED: return (syserr_not_authenticated);
1608     case ERROR_NOT_LOGGED_ON: return (syserr_not_logged_on);
1609     case ERROR_CONTINUE: return (syserr_continue);
1610     case ERROR_ALREADY_INITIALIZED: return (syserr_already_initialized);
1611     case ERROR_NO_MORE_DEVICES: return (syserr_no_more_devices);
1612     case ERROR_NOT_ALL_ASSIGNED: return (syserr_not_all_assigned);
1613     case ERROR_SOME_NOT_MAPPED: return (syserr_some_not_mapped);
1614     case ERROR_NO_QUOTAS_FOR_ACCOUNT: return (syserr_no_quotas_for_account);
1615     case ERROR_LOCAL_USER_SESSION_KEY: return (syserr_local_user_session_key);
1616     case ERROR_NULL_LM_PASSWORD: return (syserr_null_lm_password);
1617     case ERROR_UNKNOWN_REVISION: return (syserr_unknown_revision);
1618     case ERROR_REVISION_MISMATCH: return (syserr_revision_mismatch);
1619     case ERROR_INVALID_OWNER: return (syserr_invalid_owner);
1620     case ERROR_INVALID_PRIMARY_GROUP: return (syserr_invalid_primary_group);
1621     case ERROR_NO_IMPERSONATION_TOKEN: return (syserr_no_impersonation_token);
1622     case ERROR_CANT_DISABLE_MANDATORY: return (syserr_cant_disable_mandatory);
1623     case ERROR_NO_LOGON_SERVERS: return (syserr_no_logon_servers);
1624     case ERROR_NO_SUCH_LOGON_SESSION: return (syserr_no_such_logon_session);
1625     case ERROR_NO_SUCH_PRIVILEGE: return (syserr_no_such_privilege);
1626     case ERROR_PRIVILEGE_NOT_HELD: return (syserr_privilege_not_held);
1627     case ERROR_INVALID_ACCOUNT_NAME: return (syserr_invalid_account_name);
1628     case ERROR_USER_EXISTS: return (syserr_user_exists);
1629     case ERROR_NO_SUCH_USER: return (syserr_no_such_user);
1630     case ERROR_GROUP_EXISTS: return (syserr_group_exists);
1631     case ERROR_NO_SUCH_GROUP: return (syserr_no_such_group);
1632     case ERROR_MEMBER_IN_GROUP: return (syserr_member_in_group);
1633     case ERROR_MEMBER_NOT_IN_GROUP: return (syserr_member_not_in_group);
1634     case ERROR_LAST_ADMIN: return (syserr_last_admin);
1635     case ERROR_WRONG_PASSWORD: return (syserr_wrong_password);
1636     case ERROR_ILL_FORMED_PASSWORD: return (syserr_ill_formed_password);
1637     case ERROR_PASSWORD_RESTRICTION: return (syserr_password_restriction);
1638     case ERROR_LOGON_FAILURE: return (syserr_logon_failure);
1639     case ERROR_ACCOUNT_RESTRICTION: return (syserr_account_restriction);
1640     case ERROR_INVALID_LOGON_HOURS: return (syserr_invalid_logon_hours);
1641     case ERROR_INVALID_WORKSTATION: return (syserr_invalid_workstation);
1642     case ERROR_PASSWORD_EXPIRED: return (syserr_password_expired);
1643     case ERROR_ACCOUNT_DISABLED: return (syserr_account_disabled);
1644     case ERROR_NONE_MAPPED: return (syserr_none_mapped);
1645     case ERROR_TOO_MANY_LUIDS_REQUESTED: return (syserr_too_many_luids_requested);
1646     case ERROR_LUIDS_EXHAUSTED: return (syserr_luids_exhausted);
1647     case ERROR_INVALID_SUB_AUTHORITY: return (syserr_invalid_sub_authority);
1648     case ERROR_INVALID_ACL: return (syserr_invalid_acl);
1649     case ERROR_INVALID_SID: return (syserr_invalid_sid);
1650     case ERROR_INVALID_SECURITY_DESCR: return (syserr_invalid_security_descr);
1651     case ERROR_BAD_INHERITANCE_ACL: return (syserr_bad_inheritance_acl);
1652     case ERROR_SERVER_DISABLED: return (syserr_server_disabled);
1653     case ERROR_SERVER_NOT_DISABLED: return (syserr_server_not_disabled);
1654     case ERROR_INVALID_ID_AUTHORITY: return (syserr_invalid_id_authority);
1655     case ERROR_ALLOTTED_SPACE_EXCEEDED: return (syserr_allotted_space_exceeded);
1656     case ERROR_INVALID_GROUP_ATTRIBUTES: return (syserr_invalid_group_attributes);
1657     case ERROR_BAD_IMPERSONATION_LEVEL: return (syserr_bad_impersonation_level);
1658     case ERROR_CANT_OPEN_ANONYMOUS: return (syserr_cant_open_anonymous);
1659     case ERROR_BAD_VALIDATION_CLASS: return (syserr_bad_validation_class);
1660     case ERROR_BAD_TOKEN_TYPE: return (syserr_bad_token_type);
1661     case ERROR_NO_SECURITY_ON_OBJECT: return (syserr_no_security_on_object);
1662     case ERROR_CANT_ACCESS_DOMAIN_INFO: return (syserr_cant_access_domain_info);
1663     case ERROR_INVALID_SERVER_STATE: return (syserr_invalid_server_state);
1664     case ERROR_INVALID_DOMAIN_STATE: return (syserr_invalid_domain_state);
1665     case ERROR_INVALID_DOMAIN_ROLE: return (syserr_invalid_domain_role);
1666     case ERROR_NO_SUCH_DOMAIN: return (syserr_no_such_domain);
1667     case ERROR_DOMAIN_EXISTS: return (syserr_domain_exists);
1668     case ERROR_DOMAIN_LIMIT_EXCEEDED: return (syserr_domain_limit_exceeded);
1669     case ERROR_INTERNAL_DB_CORRUPTION: return (syserr_internal_db_corruption);
1670     case ERROR_INTERNAL_ERROR: return (syserr_internal_error);
1671     case ERROR_GENERIC_NOT_MAPPED: return (syserr_generic_not_mapped);
1672     case ERROR_BAD_DESCRIPTOR_FORMAT: return (syserr_bad_descriptor_format);
1673     case ERROR_NOT_LOGON_PROCESS: return (syserr_not_logon_process);
1674     case ERROR_LOGON_SESSION_EXISTS: return (syserr_logon_session_exists);
1675     case ERROR_NO_SUCH_PACKAGE: return (syserr_no_such_package);
1676     case ERROR_BAD_LOGON_SESSION_STATE: return (syserr_bad_logon_session_state);
1677     case ERROR_LOGON_SESSION_COLLISION: return (syserr_logon_session_collision);
1678     case ERROR_INVALID_LOGON_TYPE: return (syserr_invalid_logon_type);
1679     case ERROR_CANNOT_IMPERSONATE: return (syserr_cannot_impersonate);
1680     case ERROR_RXACT_INVALID_STATE: return (syserr_rxact_invalid_state);
1681     case ERROR_RXACT_COMMIT_FAILURE: return (syserr_rxact_commit_failure);
1682     case ERROR_SPECIAL_ACCOUNT: return (syserr_special_account);
1683     case ERROR_SPECIAL_GROUP: return (syserr_special_group);
1684     case ERROR_SPECIAL_USER: return (syserr_special_user);
1685     case ERROR_MEMBERS_PRIMARY_GROUP: return (syserr_members_primary_group);
1686     case ERROR_TOKEN_ALREADY_IN_USE: return (syserr_token_already_in_use);
1687     case ERROR_NO_SUCH_ALIAS: return (syserr_no_such_alias);
1688     case ERROR_MEMBER_NOT_IN_ALIAS: return (syserr_member_not_in_alias);
1689     case ERROR_MEMBER_IN_ALIAS: return (syserr_member_in_alias);
1690     case ERROR_ALIAS_EXISTS: return (syserr_alias_exists);
1691     case ERROR_LOGON_NOT_GRANTED: return (syserr_logon_not_granted);
1692     case ERROR_TOO_MANY_SECRETS: return (syserr_too_many_secrets);
1693     case ERROR_SECRET_TOO_LONG: return (syserr_secret_too_long);
1694     case ERROR_INTERNAL_DB_ERROR: return (syserr_internal_db_error);
1695     case ERROR_TOO_MANY_CONTEXT_IDS: return (syserr_too_many_context_ids);
1696     case ERROR_LOGON_TYPE_NOT_GRANTED: return (syserr_logon_type_not_granted);
1697     case ERROR_NT_CROSS_ENCRYPTION_REQUIRED: return (syserr_nt_cross_encryption_required);
1698     case ERROR_NO_SUCH_MEMBER: return (syserr_no_such_member);
1699     case ERROR_INVALID_MEMBER: return (syserr_invalid_member);
1700     case ERROR_TOO_MANY_SIDS: return (syserr_too_many_sids);
1701     case ERROR_LM_CROSS_ENCRYPTION_REQUIRED: return (syserr_lm_cross_encryption_required);
1702     case ERROR_NO_INHERITANCE: return (syserr_no_inheritance);
1703     case ERROR_FILE_CORRUPT: return (syserr_file_corrupt);
1704     case ERROR_DISK_CORRUPT: return (syserr_disk_corrupt);
1705     case ERROR_NO_USER_SESSION_KEY: return (syserr_no_user_session_key);
1706     case ERROR_LICENSE_QUOTA_EXCEEDED: return (syserr_license_quota_exceeded);
1707     case ERROR_INVALID_WINDOW_HANDLE: return (syserr_invalid_window_handle);
1708     case ERROR_INVALID_MENU_HANDLE: return (syserr_invalid_menu_handle);
1709     case ERROR_INVALID_CURSOR_HANDLE: return (syserr_invalid_cursor_handle);
1710     case ERROR_INVALID_ACCEL_HANDLE: return (syserr_invalid_accel_handle);
1711     case ERROR_INVALID_HOOK_HANDLE: return (syserr_invalid_hook_handle);
1712     case ERROR_INVALID_DWP_HANDLE: return (syserr_invalid_dwp_handle);
1713     case ERROR_TLW_WITH_WSCHILD: return (syserr_tlw_with_wschild);
1714     case ERROR_CANNOT_FIND_WND_CLASS: return (syserr_cannot_find_wnd_class);
1715     case ERROR_WINDOW_OF_OTHER_THREAD: return (syserr_window_of_other_thread);
1716     case ERROR_HOTKEY_ALREADY_REGISTERED: return (syserr_hotkey_already_registered);
1717     case ERROR_CLASS_ALREADY_EXISTS: return (syserr_class_already_exists);
1718     case ERROR_CLASS_DOES_NOT_EXIST: return (syserr_class_does_not_exist);
1719     case ERROR_CLASS_HAS_WINDOWS: return (syserr_class_has_windows);
1720     case ERROR_INVALID_INDEX: return (syserr_invalid_index);
1721     case ERROR_INVALID_ICON_HANDLE: return (syserr_invalid_icon_handle);
1722     case ERROR_PRIVATE_DIALOG_INDEX: return (syserr_private_dialog_index);
1723     case ERROR_LISTBOX_ID_NOT_FOUND: return (syserr_listbox_id_not_found);
1724     case ERROR_NO_WILDCARD_CHARACTERS: return (syserr_no_wildcard_characters);
1725     case ERROR_CLIPBOARD_NOT_OPEN: return (syserr_clipboard_not_open);
1726     case ERROR_HOTKEY_NOT_REGISTERED: return (syserr_hotkey_not_registered);
1727     case ERROR_WINDOW_NOT_DIALOG: return (syserr_window_not_dialog);
1728     case ERROR_CONTROL_ID_NOT_FOUND: return (syserr_control_id_not_found);
1729     case ERROR_INVALID_COMBOBOX_MESSAGE: return (syserr_invalid_combobox_message);
1730     case ERROR_WINDOW_NOT_COMBOBOX: return (syserr_window_not_combobox);
1731     case ERROR_INVALID_EDIT_HEIGHT: return (syserr_invalid_edit_height);
1732     case ERROR_DC_NOT_FOUND: return (syserr_dc_not_found);
1733     case ERROR_INVALID_HOOK_FILTER: return (syserr_invalid_hook_filter);
1734     case ERROR_INVALID_FILTER_PROC: return (syserr_invalid_filter_proc);
1735     case ERROR_HOOK_NEEDS_HMOD: return (syserr_hook_needs_hmod);
1736     case ERROR_GLOBAL_ONLY_HOOK: return (syserr_global_only_hook);
1737     case ERROR_JOURNAL_HOOK_SET: return (syserr_journal_hook_set);
1738     case ERROR_HOOK_NOT_INSTALLED: return (syserr_hook_not_installed);
1739     case ERROR_INVALID_LB_MESSAGE: return (syserr_invalid_lb_message);
1740     case ERROR_SETCOUNT_ON_BAD_LB: return (syserr_setcount_on_bad_lb);
1741     case ERROR_LB_WITHOUT_TABSTOPS: return (syserr_lb_without_tabstops);
1742     case ERROR_DESTROY_OBJECT_OF_OTHER_THREAD: return (syserr_destroy_object_of_other_thread);
1743     case ERROR_CHILD_WINDOW_MENU: return (syserr_child_window_menu);
1744     case ERROR_NO_SYSTEM_MENU: return (syserr_no_system_menu);
1745     case ERROR_INVALID_MSGBOX_STYLE: return (syserr_invalid_msgbox_style);
1746     case ERROR_INVALID_SPI_VALUE: return (syserr_invalid_spi_value);
1747     case ERROR_SCREEN_ALREADY_LOCKED: return (syserr_screen_already_locked);
1748     case ERROR_HWNDS_HAVE_DIFF_PARENT: return (syserr_hwnds_have_diff_parent);
1749     case ERROR_NOT_CHILD_WINDOW: return (syserr_not_child_window);
1750     case ERROR_INVALID_GW_COMMAND: return (syserr_invalid_gw_command);
1751     case ERROR_INVALID_THREAD_ID: return (syserr_invalid_thread_id);
1752     case ERROR_NON_MDICHILD_WINDOW: return (syserr_non_mdichild_window);
1753     case ERROR_POPUP_ALREADY_ACTIVE: return (syserr_popup_already_active);
1754     case ERROR_NO_SCROLLBARS: return (syserr_no_scrollbars);
1755     case ERROR_INVALID_SCROLLBAR_RANGE: return (syserr_invalid_scrollbar_range);
1756     case ERROR_INVALID_SHOWWIN_COMMAND: return (syserr_invalid_showwin_command);
1757     case ERROR_NO_SYSTEM_RESOURCES: return (syserr_no_system_resources);
1758     case ERROR_NONPAGED_SYSTEM_RESOURCES: return (syserr_nonpaged_system_resources);
1759     case ERROR_PAGED_SYSTEM_RESOURCES: return (syserr_paged_system_resources);
1760     case ERROR_WORKING_SET_QUOTA: return (syserr_working_set_quota);
1761     case ERROR_PAGEFILE_QUOTA: return (syserr_pagefile_quota);
1762     case ERROR_COMMITMENT_LIMIT: return (syserr_commitment_limit);
1763     case ERROR_MENU_ITEM_NOT_FOUND: return (syserr_menu_item_not_found);
1764     case ERROR_EVENTLOG_FILE_CORRUPT: return (syserr_eventlog_file_corrupt);
1765     case ERROR_EVENTLOG_CANT_START: return (syserr_eventlog_cant_start);
1766     case ERROR_LOG_FILE_FULL: return (syserr_log_file_full);
1767     case ERROR_EVENTLOG_FILE_CHANGED: return (syserr_eventlog_file_changed);
1768     case RPC_S_INVALID_STRING_BINDING: return (syserr_rpc_s_invalid_string_binding);
1769     case RPC_S_WRONG_KIND_OF_BINDING: return (syserr_rpc_s_wrong_kind_of_binding);
1770     case RPC_S_INVALID_BINDING: return (syserr_rpc_s_invalid_binding);
1771     case RPC_S_PROTSEQ_NOT_SUPPORTED: return (syserr_rpc_s_protseq_not_supported);
1772     case RPC_S_INVALID_RPC_PROTSEQ: return (syserr_rpc_s_invalid_rpc_protseq);
1773     case RPC_S_INVALID_STRING_UUID: return (syserr_rpc_s_invalid_string_uuid);
1774     case RPC_S_INVALID_ENDPOINT_FORMAT: return (syserr_rpc_s_invalid_endpoint_format);
1775     case RPC_S_INVALID_NET_ADDR: return (syserr_rpc_s_invalid_net_addr);
1776     case RPC_S_NO_ENDPOINT_FOUND: return (syserr_rpc_s_no_endpoint_found);
1777     case RPC_S_INVALID_TIMEOUT: return (syserr_rpc_s_invalid_timeout);
1778     case RPC_S_OBJECT_NOT_FOUND: return (syserr_rpc_s_object_not_found);
1779     case RPC_S_ALREADY_REGISTERED: return (syserr_rpc_s_already_registered);
1780     case RPC_S_TYPE_ALREADY_REGISTERED: return (syserr_rpc_s_type_already_registered);
1781     case RPC_S_ALREADY_LISTENING: return (syserr_rpc_s_already_listening);
1782     case RPC_S_NO_PROTSEQS_REGISTERED: return (syserr_rpc_s_no_protseqs_registered);
1783     case RPC_S_NOT_LISTENING: return (syserr_rpc_s_not_listening);
1784     case RPC_S_UNKNOWN_MGR_TYPE: return (syserr_rpc_s_unknown_mgr_type);
1785     case RPC_S_UNKNOWN_IF: return (syserr_rpc_s_unknown_if);
1786     case RPC_S_NO_BINDINGS: return (syserr_rpc_s_no_bindings);
1787     case RPC_S_NO_PROTSEQS: return (syserr_rpc_s_no_protseqs);
1788     case RPC_S_CANT_CREATE_ENDPOINT: return (syserr_rpc_s_cant_create_endpoint);
1789     case RPC_S_OUT_OF_RESOURCES: return (syserr_rpc_s_out_of_resources);
1790     case RPC_S_SERVER_UNAVAILABLE: return (syserr_rpc_s_server_unavailable);
1791     case RPC_S_SERVER_TOO_BUSY: return (syserr_rpc_s_server_too_busy);
1792     case RPC_S_INVALID_NETWORK_OPTIONS: return (syserr_rpc_s_invalid_network_options);
1793     case RPC_S_NO_CALL_ACTIVE: return (syserr_rpc_s_no_call_active);
1794     case RPC_S_CALL_FAILED: return (syserr_rpc_s_call_failed);
1795     case RPC_S_CALL_FAILED_DNE: return (syserr_rpc_s_call_failed_dne);
1796     case RPC_S_PROTOCOL_ERROR: return (syserr_rpc_s_protocol_error);
1797     case RPC_S_UNSUPPORTED_TRANS_SYN: return (syserr_rpc_s_unsupported_trans_syn);
1798     case RPC_S_UNSUPPORTED_TYPE: return (syserr_rpc_s_unsupported_type);
1799     case RPC_S_INVALID_TAG: return (syserr_rpc_s_invalid_tag);
1800     case RPC_S_INVALID_BOUND: return (syserr_rpc_s_invalid_bound);
1801     case RPC_S_NO_ENTRY_NAME: return (syserr_rpc_s_no_entry_name);
1802     case RPC_S_INVALID_NAME_SYNTAX: return (syserr_rpc_s_invalid_name_syntax);
1803     case RPC_S_UNSUPPORTED_NAME_SYNTAX: return (syserr_rpc_s_unsupported_name_syntax);
1804     case RPC_S_UUID_NO_ADDRESS: return (syserr_rpc_s_uuid_no_address);
1805     case RPC_S_DUPLICATE_ENDPOINT: return (syserr_rpc_s_duplicate_endpoint);
1806     case RPC_S_UNKNOWN_AUTHN_TYPE: return (syserr_rpc_s_unknown_authn_type);
1807     case RPC_S_MAX_CALLS_TOO_SMALL: return (syserr_rpc_s_max_calls_too_small);
1808     case RPC_S_STRING_TOO_LONG: return (syserr_rpc_s_string_too_long);
1809     case RPC_S_PROTSEQ_NOT_FOUND: return (syserr_rpc_s_protseq_not_found);
1810     case RPC_S_PROCNUM_OUT_OF_RANGE: return (syserr_rpc_s_procnum_out_of_range);
1811     case RPC_S_BINDING_HAS_NO_AUTH: return (syserr_rpc_s_binding_has_no_auth);
1812     case RPC_S_UNKNOWN_AUTHN_SERVICE: return (syserr_rpc_s_unknown_authn_service);
1813     case RPC_S_UNKNOWN_AUTHN_LEVEL: return (syserr_rpc_s_unknown_authn_level);
1814     case RPC_S_INVALID_AUTH_IDENTITY: return (syserr_rpc_s_invalid_auth_identity);
1815     case RPC_S_UNKNOWN_AUTHZ_SERVICE: return (syserr_rpc_s_unknown_authz_service);
1816     case EPT_S_INVALID_ENTRY: return (syserr_ept_s_invalid_entry);
1817     case EPT_S_CANT_PERFORM_OP: return (syserr_ept_s_cant_perform_op);
1818     case EPT_S_NOT_REGISTERED: return (syserr_ept_s_not_registered);
1819     case RPC_S_NOTHING_TO_EXPORT: return (syserr_rpc_s_nothing_to_export);
1820     case RPC_S_INCOMPLETE_NAME: return (syserr_rpc_s_incomplete_name);
1821     case RPC_S_INVALID_VERS_OPTION: return (syserr_rpc_s_invalid_vers_option);
1822     case RPC_S_NO_MORE_MEMBERS: return (syserr_rpc_s_no_more_members);
1823     case RPC_S_NOT_ALL_OBJS_UNEXPORTED: return (syserr_rpc_s_not_all_objs_unexported);
1824     case RPC_S_INTERFACE_NOT_FOUND: return (syserr_rpc_s_interface_not_found);
1825     case RPC_S_ENTRY_ALREADY_EXISTS: return (syserr_rpc_s_entry_already_exists);
1826     case RPC_S_ENTRY_NOT_FOUND: return (syserr_rpc_s_entry_not_found);
1827     case RPC_S_NAME_SERVICE_UNAVAILABLE: return (syserr_rpc_s_name_service_unavailable);
1828     case RPC_S_INVALID_NAF_ID: return (syserr_rpc_s_invalid_naf_id);
1829     case RPC_S_CANNOT_SUPPORT: return (syserr_rpc_s_cannot_support);
1830     case RPC_S_NO_CONTEXT_AVAILABLE: return (syserr_rpc_s_no_context_available);
1831     case RPC_S_INTERNAL_ERROR: return (syserr_rpc_s_internal_error);
1832     case RPC_S_ZERO_DIVIDE: return (syserr_rpc_s_zero_divide);
1833     case RPC_S_ADDRESS_ERROR: return (syserr_rpc_s_address_error);
1834     case RPC_S_FP_DIV_ZERO: return (syserr_rpc_s_fp_div_zero);
1835     case RPC_S_FP_UNDERFLOW: return (syserr_rpc_s_fp_underflow);
1836     case RPC_S_FP_OVERFLOW: return (syserr_rpc_s_fp_overflow);
1837     case RPC_X_NO_MORE_ENTRIES: return (syserr_rpc_x_no_more_entries);
1838     case RPC_X_SS_CHAR_TRANS_OPEN_FAIL: return (syserr_rpc_x_ss_char_trans_open_fail);
1839     case RPC_X_SS_CHAR_TRANS_SHORT_FILE: return (syserr_rpc_x_ss_char_trans_short_file);
1840     case RPC_X_SS_IN_NULL_CONTEXT: return (syserr_rpc_x_ss_in_null_context);
1841     case RPC_X_SS_CONTEXT_DAMAGED: return (syserr_rpc_x_ss_context_damaged);
1842     case RPC_X_SS_HANDLES_MISMATCH: return (syserr_rpc_x_ss_handles_mismatch);
1843     case RPC_X_SS_CANNOT_GET_CALL_HANDLE: return (syserr_rpc_x_ss_cannot_get_call_handle);
1844     case RPC_X_NULL_REF_POINTER: return (syserr_rpc_x_null_ref_pointer);
1845     case RPC_X_ENUM_VALUE_OUT_OF_RANGE: return (syserr_rpc_x_enum_value_out_of_range);
1846     case RPC_X_BYTE_COUNT_TOO_SMALL: return (syserr_rpc_x_byte_count_too_small);
1847     case RPC_X_BAD_STUB_DATA: return (syserr_rpc_x_bad_stub_data);
1848     case ERROR_INVALID_USER_BUFFER: return (syserr_invalid_user_buffer);
1849     case ERROR_UNRECOGNIZED_MEDIA: return (syserr_unrecognized_media);
1850     case ERROR_NO_TRUST_LSA_SECRET: return (syserr_no_trust_lsa_secret);
1851     case ERROR_NO_TRUST_SAM_ACCOUNT: return (syserr_no_trust_sam_account);
1852     case ERROR_TRUSTED_DOMAIN_FAILURE: return (syserr_trusted_domain_failure);
1853     case ERROR_TRUSTED_RELATIONSHIP_FAILURE: return (syserr_trusted_relationship_failure);
1854     case ERROR_TRUST_FAILURE: return (syserr_trust_failure);
1855     case RPC_S_CALL_IN_PROGRESS: return (syserr_rpc_s_call_in_progress);
1856     case ERROR_NETLOGON_NOT_STARTED: return (syserr_netlogon_not_started);
1857     case ERROR_ACCOUNT_EXPIRED: return (syserr_account_expired);
1858     case ERROR_REDIRECTOR_HAS_OPEN_HANDLES: return (syserr_redirector_has_open_handles);
1859     case ERROR_PRINTER_DRIVER_ALREADY_INSTALLED: return (syserr_printer_driver_already_installed);
1860     case ERROR_UNKNOWN_PORT: return (syserr_unknown_port);
1861     case ERROR_UNKNOWN_PRINTER_DRIVER: return (syserr_unknown_printer_driver);
1862     case ERROR_UNKNOWN_PRINTPROCESSOR: return (syserr_unknown_printprocessor);
1863     case ERROR_INVALID_SEPARATOR_FILE: return (syserr_invalid_separator_file);
1864     case ERROR_INVALID_PRIORITY: return (syserr_invalid_priority);
1865     case ERROR_INVALID_PRINTER_NAME: return (syserr_invalid_printer_name);
1866     case ERROR_PRINTER_ALREADY_EXISTS: return (syserr_printer_already_exists);
1867     case ERROR_INVALID_PRINTER_COMMAND: return (syserr_invalid_printer_command);
1868     case ERROR_INVALID_DATATYPE: return (syserr_invalid_datatype);
1869     case ERROR_INVALID_ENVIRONMENT: return (syserr_invalid_environment);
1870     case RPC_S_NO_MORE_BINDINGS: return (syserr_rpc_s_no_more_bindings);
1871     case ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT: return (syserr_nologon_interdomain_trust_account);
1872     case ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT: return (syserr_nologon_workstation_trust_account);
1873     case ERROR_NOLOGON_SERVER_TRUST_ACCOUNT: return (syserr_nologon_server_trust_account);
1874     case ERROR_DOMAIN_TRUST_INCONSISTENT: return (syserr_domain_trust_inconsistent);
1875     case ERROR_SERVER_HAS_OPEN_HANDLES: return (syserr_server_has_open_handles);
1876     case ERROR_RESOURCE_DATA_NOT_FOUND: return (syserr_resource_data_not_found);
1877     case ERROR_RESOURCE_TYPE_NOT_FOUND: return (syserr_resource_type_not_found);
1878     case ERROR_RESOURCE_NAME_NOT_FOUND: return (syserr_resource_name_not_found);
1879     case ERROR_RESOURCE_LANG_NOT_FOUND: return (syserr_resource_lang_not_found);
1880     case ERROR_NOT_ENOUGH_QUOTA: return (syserr_not_enough_quota);
1881     case RPC_S_NO_INTERFACES: return (syserr_rpc_s_no_interfaces);
1882     case RPC_S_CALL_CANCELLED: return (syserr_rpc_s_call_cancelled);
1883     case RPC_S_BINDING_INCOMPLETE: return (syserr_rpc_s_binding_incomplete);
1884     case RPC_S_COMM_FAILURE: return (syserr_rpc_s_comm_failure);
1885     case RPC_S_UNSUPPORTED_AUTHN_LEVEL: return (syserr_rpc_s_unsupported_authn_level);
1886     case RPC_S_NO_PRINC_NAME: return (syserr_rpc_s_no_princ_name);
1887     case RPC_S_NOT_RPC_ERROR: return (syserr_rpc_s_not_rpc_error);
1888     case RPC_S_UUID_LOCAL_ONLY: return (syserr_rpc_s_uuid_local_only);
1889     case RPC_S_SEC_PKG_ERROR: return (syserr_rpc_s_sec_pkg_error);
1890     case RPC_S_NOT_CANCELLED: return (syserr_rpc_s_not_cancelled);
1891     case RPC_X_INVALID_ES_ACTION: return (syserr_rpc_x_invalid_es_action);
1892     case RPC_X_WRONG_ES_VERSION: return (syserr_rpc_x_wrong_es_version);
1893     case RPC_X_WRONG_STUB_VERSION: return (syserr_rpc_x_wrong_stub_version);
1894     case RPC_S_GROUP_MEMBER_NOT_FOUND: return (syserr_rpc_s_group_member_not_found);
1895     case EPT_S_CANT_CREATE: return (syserr_ept_s_cant_create);
1896     case RPC_S_INVALID_OBJECT: return (syserr_rpc_s_invalid_object);
1897     case ERROR_INVALID_TIME: return (syserr_invalid_time);
1898     case ERROR_INVALID_FORM_NAME: return (syserr_invalid_form_name);
1899     case ERROR_INVALID_FORM_SIZE: return (syserr_invalid_form_size);
1900     case ERROR_ALREADY_WAITING: return (syserr_already_waiting);
1901     case ERROR_PRINTER_DELETED: return (syserr_printer_deleted);
1902     case ERROR_INVALID_PRINTER_STATE: return (syserr_invalid_printer_state);
1903     case ERROR_PASSWORD_MUST_CHANGE: return (syserr_password_must_change);
1904     case ERROR_DOMAIN_CONTROLLER_NOT_FOUND: return (syserr_domain_controller_not_found);
1905     case ERROR_ACCOUNT_LOCKED_OUT: return (syserr_account_locked_out);
1906     case ERROR_NO_BROWSER_SERVERS_FOUND: return (syserr_no_browser_servers_found);
1907     case ERROR_INVALID_PIXEL_FORMAT: return (syserr_invalid_pixel_format);
1908     case ERROR_BAD_DRIVER: return (syserr_bad_driver);
1909     case ERROR_INVALID_WINDOW_STYLE: return (syserr_invalid_window_style);
1910     case ERROR_METAFILE_NOT_SUPPORTED: return (syserr_metafile_not_supported);
1911     case ERROR_TRANSFORM_NOT_SUPPORTED: return (syserr_transform_not_supported);
1912     case ERROR_CLIPPING_NOT_SUPPORTED: return (syserr_clipping_not_supported);
1913     case ERROR_UNKNOWN_PRINT_MONITOR: return (syserr_unknown_print_monitor);
1914     case ERROR_PRINTER_DRIVER_IN_USE: return (syserr_printer_driver_in_use);
1915     case ERROR_SPOOL_FILE_NOT_FOUND: return (syserr_spool_file_not_found);
1916     case ERROR_SPL_NO_STARTDOC: return (syserr_spl_no_startdoc);
1917     case ERROR_SPL_NO_ADDJOB: return (syserr_spl_no_addjob);
1918     case ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED: return (syserr_print_processor_already_installed);
1919     case ERROR_PRINT_MONITOR_ALREADY_INSTALLED: return (syserr_print_monitor_already_installed);
1920     case ERROR_WINS_INTERNAL: return (syserr_wins_internal);
1921     case ERROR_CAN_NOT_DEL_LOCAL_WINS: return (syserr_can_not_del_local_wins);
1922     case ERROR_STATIC_INIT: return (syserr_static_init);
1923     case ERROR_INC_BACKUP: return (syserr_inc_backup);
1924     case ERROR_FULL_BACKUP: return (syserr_full_backup);
1925     case ERROR_REC_NON_EXISTENT: return (syserr_rec_non_existent);
1926     case ERROR_RPL_NOT_ALLOWED: return (syserr_rpl_not_allowed);
1927 
1928       /* Winsock error codes: */
1929     case WSAEINTR: return (syserr_wsaeintr);
1930     case WSAEBADF: return (syserr_wsaebadf);
1931     case WSAEACCES: return (syserr_wsaeacces);
1932     case WSAEFAULT: return (syserr_wsaefault);
1933     case WSAEINVAL: return (syserr_wsaeinval);
1934     case WSAEMFILE: return (syserr_wsaemfile);
1935     case WSAEWOULDBLOCK: return (syserr_wsaewouldblock);
1936     case WSAEINPROGRESS: return (syserr_wsaeinprogress);
1937     case WSAEALREADY: return (syserr_wsaealready);
1938     case WSAENOTSOCK: return (syserr_wsaenotsock);
1939     case WSAEDESTADDRREQ: return (syserr_wsaedestaddrreq);
1940     case WSAEMSGSIZE: return (syserr_wsaemsgsize);
1941     case WSAEPROTOTYPE: return (syserr_wsaeprototype);
1942     case WSAENOPROTOOPT: return (syserr_wsaenoprotoopt);
1943     case WSAEPROTONOSUPPORT: return (syserr_wsaeprotonosupport);
1944     case WSAESOCKTNOSUPPORT: return (syserr_wsaesocktnosupport);
1945     case WSAEOPNOTSUPP: return (syserr_wsaeopnotsupp);
1946     case WSAEPFNOSUPPORT: return (syserr_wsaepfnosupport);
1947     case WSAEAFNOSUPPORT: return (syserr_wsaeafnosupport);
1948     case WSAEADDRINUSE: return (syserr_wsaeaddrinuse);
1949     case WSAEADDRNOTAVAIL: return (syserr_wsaeaddrnotavail);
1950     case WSAENETDOWN: return (syserr_wsaenetdown);
1951     case WSAENETUNREACH: return (syserr_wsaenetunreach);
1952     case WSAENETRESET: return (syserr_wsaenetreset);
1953     case WSAECONNABORTED: return (syserr_wsaeconnaborted);
1954     case WSAECONNRESET: return (syserr_wsaeconnreset);
1955     case WSAENOBUFS: return (syserr_wsaenobufs);
1956     case WSAEISCONN: return (syserr_wsaeisconn);
1957     case WSAENOTCONN: return (syserr_wsaenotconn);
1958     case WSAESHUTDOWN: return (syserr_wsaeshutdown);
1959     case WSAETOOMANYREFS: return (syserr_wsaetoomanyrefs);
1960     case WSAETIMEDOUT: return (syserr_wsaetimedout);
1961     case WSAECONNREFUSED: return (syserr_wsaeconnrefused);
1962     case WSAELOOP: return (syserr_wsaeloop);
1963     case WSAENAMETOOLONG: return (syserr_wsaenametoolong);
1964     case WSAEHOSTDOWN: return (syserr_wsaehostdown);
1965     case WSAEHOSTUNREACH: return (syserr_wsaehostunreach);
1966     case WSAENOTEMPTY: return (syserr_wsaenotempty);
1967     case WSAEPROCLIM: return (syserr_wsaeproclim);
1968     case WSAEUSERS: return (syserr_wsaeusers);
1969     case WSAEDQUOT: return (syserr_wsaedquot);
1970     case WSAESTALE: return (syserr_wsaestale);
1971     case WSAEREMOTE: return (syserr_wsaeremote);
1972     case WSAEDISCON: return (syserr_wsaediscon);
1973     case WSASYSNOTREADY: return (syserr_wsasysnotready);
1974     case WSAVERNOTSUPPORTED: return (syserr_wsavernotsupported);
1975     case WSANOTINITIALISED: return (syserr_wsanotinitialised);
1976     case WSAHOST_NOT_FOUND: return (syserr_wsahost_not_found);
1977     case WSATRY_AGAIN: return (syserr_wsatry_again);
1978     case WSANO_RECOVERY: return (syserr_wsano_recovery);
1979     case WSANO_DATA: return (syserr_wsano_data);
1980 
1981     default: return (syserr_unknown);
1982     }
1983 }
1984 
1985 void
OS_expect_sequential_access(void * start,void * end)1986 OS_expect_sequential_access (void *start, void *end)
1987 {
1988   (void) start;                 /* ignore */
1989   (void) end;                   /* ignore */
1990 }
1991 
1992 void
OS_expect_normal_access(void * start,void * end)1993 OS_expect_normal_access (void *start, void *end)
1994 {
1995   (void) start;                 /* ignore */
1996   (void) end;                   /* ignore */
1997 }
1998 
1999 void
OS_free_pages(void * start,void * end)2000 OS_free_pages (void *start, void *end)
2001 {
2002   (void) start;                 /* ignore */
2003   (void) end;                   /* ignore */
2004 }
2005