First version of DLL preloader.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Tue, 28 Sep 2010 03:36:24 +0000 (05:36 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Tue, 28 Sep 2010 03:36:24 +0000 (05:36 +0200)
20 files changed:
loader/CMakeLists.txt
loader/README
loader/compat.c
loader/debug.h [new file with mode: 0644]
loader/himemce-map-provider.c [new file with mode: 0644]
loader/himemce-map-provider.h [new file with mode: 0644]
loader/himemce-map.c [new file with mode: 0644]
loader/himemce-map.h [new file with mode: 0644]
loader/himemce-pre.c [new file with mode: 0644]
loader/himemce-pre.h [new file with mode: 0644]
loader/himemce-tool.c [new file with mode: 0644]
loader/himemce.h
loader/kernel32_kernel_private.h
loader/kernel32_module.c
loader/kernel32_process.c
loader/ntdll_error.c
loader/ntdll_loader.c
loader/ntdll_virtual.c
loader/server_mapping.c
loader/wine.h [new file with mode: 0644]

index d377a48..6e5f359 100644 (file)
@@ -1,28 +1,41 @@
-project(himemce)
-cmake_minimum_required(VERSION 2.6.0)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-add_executable(himemce himemce.c compat.c
-  my_winternl.h
-  kernel32_kernel_private.h kernel32_process.c kernel32_module.c
-  ntdll_error.c ntdll_loader.c ntdll_virtual.c
-  server_protocol.h server_mapping.c)
-install(TARGETS himemce DESTINATION bin)
-
-add_executable(himemce-real himemce-real.cpp)
-SET_TARGET_PROPERTIES(himemce-real PROPERTIES LINK_FLAGS " /FIXED:NO")
-# FIXME: For now...
-#SET_TARGET_PROPERTIES(himemce-real PROPERTIES LINK_FLAGS " /FILEALIGN:4096")
-install(TARGETS himemce-real DESTINATION bin)
-
-
-# Copyright 2010 g10 Code GmbH
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+project(himemce)\r
+cmake_minimum_required(VERSION 2.6.0)\r
+\r
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})\r
+\r
+add_executable(himemce himemce.c\r
+  wine.h my_winternl.h compat.c\r
+  kernel32_kernel_private.h kernel32_process.c kernel32_module.c\r
+  ntdll_error.c ntdll_loader.c ntdll_virtual.c\r
+  server_protocol.h server_mapping.c)\r
+install(TARGETS himemce DESTINATION bin)\r
+\r
+add_executable(himemce-real himemce-real.cpp)\r
+SET_TARGET_PROPERTIES(himemce-real PROPERTIES LINK_FLAGS " /FIXED:NO")\r
+# FIXME: For now...\r
+#SET_TARGET_PROPERTIES(himemce-real PROPERTIES LINK_FLAGS " /FILEALIGN:4096")\r
+install(TARGETS himemce-real DESTINATION bin)\r
+\r
+add_executable(himemce-tool himemce-tool.c\r
+  himemce-map.h himemce-map.c)\r
+install(TARGETS himemce-tool DESTINATION bin)\r
+\r
+add_executable(himemce-pre himemce-pre.c\r
+  himemce-map.h himemce-map.c\r
+  himemce-map-provider.c\r
+  wine.h my_winternl.h compat.c\r
+  kernel32_kernel_private.h kernel32_process.c kernel32_module.c\r
+  ntdll_error.c ntdll_loader.c ntdll_virtual.c\r
+  server_protocol.h server_mapping.c)\r
+install(TARGETS himemce-pre DESTINATION bin)\r
+\r
+\r
+# Copyright 2010 g10 Code GmbH\r
+#\r
+# This file is free software; as a special exception the author gives\r
+# unlimited permission to copy and/or distribute it, with or without\r
+# modifications, as long as this notice is preserved.\r
+#\r
+# This file is distributed in the hope that it will be useful, but\r
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the\r
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
index bc07ce1..847af0c 100644 (file)
-HiMemCE
-=======
-
-HiMemCE is a high memory loader for Windows CE.  It softens the 32 MB
-process limit by allowing the EXE to load in the large file area
-reserved for file mappings.  This way, the EXE can be as large as free
-unfragmented virtual memory in that region, or free physical memory
-(whatever is smaller).  By linking libraries statically to the
-program, problems with too large or too many DLLs can be avoided.
-
-The usage of the loader is very simple.
-
-1. First, the program to be loaded has to be linked with the option
-/FIXED:NO (in MSVS, this setting can be found under Properties,
-Configuration Properties, Linker, Advanced, Fixed Base Address, choose
-"Generate a relocation section").  Here is a CMake example:
-
-SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS " /FIXED:NO")
-
-2. Install the program "foo" under foo-real.exe, and copy the loader's
-himemce.exe side-by-side to it as foo.exe.  Then the loader (as
-foo.exe) transparently proxies all start ups of the foo program.  It
-will automatically look for foo-real.exe and load that into high
-memory, continueing execution there.
-
-Contained in this package is a himemce-real.exe, that serves as an
-example/test program.  In the special case of "himemce.exe", verbose
-output is on by default.
-
-How it works
-------------
-
-HiMemCE allocates a virtual memory region with VirtulAlloc
-(MEM_RESERVE, PAGE_NOACCESS) large enough to cover the whole image
-(SizeOfImage).  If that is larger than 2 MB, Windows CE automatically
-uses the large memory area for the allocation.  Then HiMemCE loads the
-sections into the designated place.  This immediately commits all
-pages[1].
-
-The image is then relocated (this is why /FIXED:NO is required).
-Although an attempt is made to honor the preferred base address, once
-all pages are copied, there is no big advantage to avoiding
-relocating, so setting a preferred base address (without a way to also
-use MapViewOfFile) is currently not recommended.
-
-The next step is to resolve imports.  For this, the import section is
-processed, and for each DLL listed there, we use LoadLibrary to pass
-off the load request to the system loader.  We don't do any DLL
-loading ourselves[1].  For every DLL loaded this way, we resolve
-references by GetProcAddress, which supports lookup by name as well as
-by ordinal.
-
-Finally, pass execution to the loaded program.  Because the entry
-point is a normal C function, we can reuse the current thread and all
-its state.  The first argument is the module handle of the started
-image.  As we constructed this ourselve, there is no valid module
-handle for it, so we reuse the module handle of the loader as well.[3]
-Because this affects argv[0], we give the loader the same name as the
-executable we want to load (and rename the loaded executable to
-foo-real.exe).
-
-
-Footnotes
-
-[1] This is a pessimization, but because only MapViewOfFile and
-not MapVieOfFileEx is available, mapping in the read only sections of
-the file directly is difficult, and when relocating the image, many
-pages end up being dirty anyway.  See Optimization options.
-
-[2] This avoids the complexity of sharing DLLs across applications as
-well as walking the dependency chain.  A more complex loader, that can
-also load DLLs and thus effectively extend the slot 61 and 60 by
-further slots is feasible, but quite a bit of work.  The only benefit
-over static linking this has is code sharing, but if we are only
-talking about a couple of MB, then code duplication across a small
-number of programs is not a big problem.  And the number of processes
-in Windows CE is necessarily small!
-
-[3] Note that this could confuse some programs that do deep
-introspection and want to manually load custom sections or do other
-magic.
-
-
-TODO
-----
-
-* Switch off verbose output for non-himemce.exe named copies of
-the loader (but allow a switch --himemce-log to switch it back on).
-
-* Show load errors in a diagnostic window for the user.
-
-
-Optimization options
---------------------
-
-* Physical memory pressure can be relieved by trying to use
-  MapViewOfFile opportunistically (create relocated image, save to
-  temporary file, map it).
-
-
- Copyright 2010 g10 Code GmbH
-
- This file is free software; as a special exception the author gives
- unlimited permission to copy and/or distribute it, with or without
- modifications, as long as this notice is preserved.
-
- This file is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+HiMemCE\r
+=======\r
+\r
+HiMemCE is a high memory loader for Windows CE.  It softens the 32 MB\r
+process limit by allowing the EXE to load in the large file area\r
+reserved for file mappings.  This way, the EXE can be as large as free\r
+unfragmented virtual memory in that region, or free physical memory\r
+(whatever is smaller).  By linking libraries statically to the\r
+program, problems with too large or too many DLLs can be avoided.\r
+\r
+The usage of the loader is very simple.\r
+\r
+1. First, the program to be loaded has to be linked with the option\r
+/FIXED:NO (in MSVS, this setting can be found under Properties,\r
+Configuration Properties, Linker, Advanced, Fixed Base Address, choose\r
+"Generate a relocation section").  Here is a CMake example:\r
+\r
+SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS " /FIXED:NO")\r
+\r
+2. Install the program "foo" under foo-real.exe, and copy the loader's\r
+himemce.exe side-by-side to it as foo.exe.  Then the loader (as\r
+foo.exe) transparently proxies all start ups of the foo program.  It\r
+will automatically look for foo-real.exe and load that into high\r
+memory, continueing execution there.\r
+\r
+Contained in this package is a himemce-real.exe, that serves as an\r
+example/test program.  In the special case of "himemce.exe", verbose\r
+output is on by default.\r
+\r
+How it works\r
+------------\r
+\r
+HiMemCE allocates a virtual memory region with VirtulAlloc\r
+(MEM_RESERVE, PAGE_NOACCESS) large enough to cover the whole image\r
+(SizeOfImage).  If that is larger than 2 MB, Windows CE automatically\r
+uses the large memory area for the allocation.  Then HiMemCE loads the\r
+sections into the designated place.  This immediately commits all\r
+pages[1].\r
+\r
+The image is then relocated (this is why /FIXED:NO is required).\r
+Although an attempt is made to honor the preferred base address, once\r
+all pages are copied, there is no big advantage to avoiding\r
+relocating, so setting a preferred base address (without a way to also\r
+use MapViewOfFile) is currently not recommended.\r
+\r
+The next step is to resolve imports.  For this, the import section is\r
+processed, and for each DLL listed there, we use LoadLibrary to pass\r
+off the load request to the system loader.  We don't do any DLL\r
+loading ourselves[1].  For every DLL loaded this way, we resolve\r
+references by GetProcAddress, which supports lookup by name as well as\r
+by ordinal.\r
+\r
+Finally, pass execution to the loaded program.  Because the entry\r
+point is a normal C function, we can reuse the current thread and all\r
+its state.  The first argument is the module handle of the started\r
+image.  As we constructed this ourselve, there is no valid module\r
+handle for it, so we reuse the module handle of the loader as well.[3]\r
+Because this affects argv[0], we give the loader the same name as the\r
+executable we want to load (and rename the loaded executable to\r
+foo-real.exe).\r
+\r
+\r
+Footnotes\r
+\r
+[1] This is a pessimization, but because only MapViewOfFile and\r
+not MapVieOfFileEx is available, mapping in the read only sections of\r
+the file directly is difficult, and when relocating the image, many\r
+pages end up being dirty anyway.  See Optimization options.\r
+\r
+[2] This avoids the complexity of sharing DLLs across applications as\r
+well as walking the dependency chain.  A more complex loader, that can\r
+also load DLLs and thus effectively extend the slot 61 and 60 by\r
+further slots is feasible, but quite a bit of work.  The only benefit\r
+over static linking this has is code sharing, but if we are only\r
+talking about a couple of MB, then code duplication across a small\r
+number of programs is not a big problem.  And the number of processes\r
+in Windows CE is necessarily small!\r
+\r
+[3] Note that this could confuse some programs that do deep\r
+introspection and want to manually load custom sections or do other\r
+magic.\r
+\r
+\r
+TODO\r
+----\r
+\r
+* Switch off verbose output for non-himemce.exe named copies of\r
+the loader (but allow a switch --himemce-log to switch it back on).\r
+\r
+* Show load errors in a diagnostic window for the user.\r
+\r
+* Handle DISCARDABLE flag?\r
+\r
+\r
+Optimization options\r
+--------------------\r
+\r
+* Physical memory pressure can be relieved by trying to use\r
+  MapViewOfFile opportunistically (create relocated image, save to\r
+  temporary file, map it).\r
+\r
+* Handle DISCARDABLE sections (if any).\r
+\r
+\r
+How it works (DLL version)\r
+--------------------------\r
+\r
+The preloader (himemce-pre) should be run when the device starts up,\r
+and must be run before any program is loaded high with himemce.  It\r
+preloads the DLLs that should be loaded high.\r
+\r
+Note that these DLLs are unknown to the system and can only be used by\r
+himemce.  This means that any program resp. DLL that depends on a high\r
+loaded DLL must be loaded by himemce resp. himemce-pre as well.\r
+Further note that himemce can not generate stub code for ARM, so ARM\r
+DLLs such as gpgme, gpg-error etc can not be preloaded and should be\r
+exempted.\r
+\r
+The himemce-pre program looks for all .dll files in its directory and\r
+preloads them, unless they are in the blacklist (FIXME: implement and\r
+document blacklist mechanism).\r
+\r
+The preloader performs the following steps:\r
+\r
+1. For all preloaded DLLs, map them to high memory without resolving\r
+their references.\r
+\r
+2. For all preloaded DLLs, identify sections that are writable and\r
+thus need to be allocated per process.  For these DLLs, reserve some\r
+memory in a continuous range at the bottom of the process address\r
+space (_HIMEMCE_MAP_LOW_BASE == 2 MB).  Also rewrite all base\r
+relocations that point into these sections to point to the low memory\r
+instead.\r
+\r
+3. For all preloaded DLLs, import their dependencies.  For DLLs\r
+managed by himemce-pre, this will resolve to the entry points in the\r
+high loaded DLLs (adjusting entry points into writable section to\r
+their low memory variant).  For system managed DLLs, use the normal\r
+LoadLibrary/GetProcAddressA mechanism.\r
+\r
+4. Map the data structures describing all this to a shared memory\r
+region named HIMEMCE_MAP_NAME == L"himemcemap".  This can be accessed\r
+by himemce.\r
+\r
+5. Sleep forever.  It is important that this process does not exit,\r
+because if this was the last user of HIMEMCE_MAP_NAME, the preloaded\r
+libraries will be deallocated.\r
+\r
+These steps must be executed for programs that run with preloaded\r
+DLLs (done by himemce):\r
+\r
+1. At startup, reserve the low memory sections.\r
+\r
+2. For each preloaded DLL, copy its writable sections to the process\r
+memory reserved in step 1.\r
+\r
+3. For each system DLL that is used by preloaded DLLs, call\r
+LoadLibrary to copy their writable sections into the process memory.\r
+\r
+4. For each preloaded DLL, call DllMain (their entry point).\r
+\r
+[5. TODO: Load a himemce.dll library that calls these DllMain's for\r
+each Thread in its DllMain.]\r
+\r
+\r
+ Copyright 2010 g10 Code GmbH\r
+\r
+ This file is free software; as a special exception the author gives\r
+ unlimited permission to copy and/or distribute it, with or without\r
+ modifications, as long as this notice is preserved.\r
+\r
+ This file is distributed in the hope that it will be useful, but\r
+ WITHOUT ANY WARRANTY, to the extent permitted by law; without even the\r
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
index e01161e..209059d 100644 (file)
@@ -1,74 +1,74 @@
-/* compat.c - High Memory for Windows CE
-   Copyright (C) 2010 g10 Code GmbH
-   Written by Marcus Brinkmann <marcus@g10code.com>
-
-   This file is part of HiMemCE.
-   HiMemCE is free software; you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of
-   the License, or (at your option) any later version.
-   
-   HiMemCE is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-   
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
-
-#include "himemce.h"
-
-struct _PEB _peb;
-
-size_t
-pread (HANDLE handle, char *buffer, size_t len, off_t offset)
-{
-  DWORD out = -1;
-  if (SetFilePointer (handle, offset, NULL, SEEK_SET) == -1)
-    return -1;
-  if (!ReadFile (handle, buffer, len, &out, NULL))
-    return -1;
-  return out;
-}
-
-
-int get_prot_flags (int vprot)
-{
-  int rwx = vprot & (VPROT_READ | VPROT_WRITE | VPROT_WRITECOPY | VPROT_EXEC);
-  int res = 0;
-
-  switch(rwx)
-    {
-    case VPROT_READ:
-      res = PAGE_READONLY;
-      break;
-    case VPROT_READ | VPROT_WRITE:
-      res = PAGE_READWRITE;
-      break;
-    case VPROT_READ | VPROT_WRITECOPY:
-      // res = PAGE_WRITECOPY;
-      res = PAGE_READWRITE;
-      break;
-    case VPROT_EXEC:
-      res = PAGE_EXECUTE;
-      break;
-    case VPROT_EXEC | VPROT_READ:
-      res = PAGE_EXECUTE_READ;
-      break;
-    case VPROT_EXEC | VPROT_READ | VPROT_WRITE:
-      res = PAGE_EXECUTE_READWRITE;
-      break;
-    case VPROT_EXEC | VPROT_READ | VPROT_WRITECOPY:
-      // res = PAGE_EXECUTE_WRITECOPY;
-      res = PAGE_EXECUTE_READWRITE;
-      break;
-    default:
-      res = PAGE_NOACCESS;
-    }
-  if (vprot & VPROT_GUARD) res |= PAGE_GUARD;
-  if (vprot & VPROT_NOCACHE) res |= PAGE_NOCACHE;
-  return res;
-}
+/* compat.c - High Memory for Windows CE\r
+   Copyright (C) 2010 g10 Code GmbH\r
+   Written by Marcus Brinkmann <marcus@g10code.com>\r
+\r
+   This file is part of HiMemCE.\r
\r
+   HiMemCE is free software; you can redistribute it and/or modify it\r
+   under the terms of the GNU Lesser General Public License as\r
+   published by the Free Software Foundation; either version 2.1 of\r
+   the License, or (at your option) any later version.\r
+   \r
+   HiMemCE is distributed in the hope that it will be useful, but\r
+   WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+   Lesser General Public License for more details.\r
+   \r
+   You should have received a copy of the GNU Lesser General Public\r
+   License along with this program; if not, write to the Free Software\r
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\r
+   02111-1307, USA.  */\r
+\r
+#include "wine.h"\r
+\r
+struct _PEB _peb;\r
+\r
+size_t\r
+pread (HANDLE handle, char *buffer, size_t len, off_t offset)\r
+{\r
+  DWORD out = -1;\r
+  if (SetFilePointer (handle, offset, NULL, SEEK_SET) == -1)\r
+    return -1;\r
+  if (!ReadFile (handle, buffer, len, &out, NULL))\r
+    return -1;\r
+  return out;\r
+}\r
+\r
+\r
+int get_prot_flags (int vprot)\r
+{\r
+  int rwx = vprot & (VPROT_READ | VPROT_WRITE | VPROT_WRITECOPY | VPROT_EXEC);\r
+  int res = 0;\r
+\r
+  switch(rwx)\r
+    {\r
+    case VPROT_READ:\r
+      res = PAGE_READONLY;\r
+      break;\r
+    case VPROT_READ | VPROT_WRITE:\r
+      res = PAGE_READWRITE;\r
+      break;\r
+    case VPROT_READ | VPROT_WRITECOPY:\r
+      // res = PAGE_WRITECOPY;\r
+      res = PAGE_READWRITE;\r
+      break;\r
+    case VPROT_EXEC:\r
+      res = PAGE_EXECUTE;\r
+      break;\r
+    case VPROT_EXEC | VPROT_READ:\r
+      res = PAGE_EXECUTE_READ;\r
+      break;\r
+    case VPROT_EXEC | VPROT_READ | VPROT_WRITE:\r
+      res = PAGE_EXECUTE_READWRITE;\r
+      break;\r
+    case VPROT_EXEC | VPROT_READ | VPROT_WRITECOPY:\r
+      // res = PAGE_EXECUTE_WRITECOPY;\r
+      res = PAGE_EXECUTE_READWRITE;\r
+      break;\r
+    default:\r
+      res = PAGE_NOACCESS;\r
+    }\r
+  if (vprot & VPROT_GUARD) res |= PAGE_GUARD;\r
+  if (vprot & VPROT_NOCACHE) res |= PAGE_NOCACHE;\r
+  return res;\r
+}\r
diff --git a/loader/debug.h b/loader/debug.h
new file mode 100644 (file)
index 0000000..6b963b7
--- /dev/null
@@ -0,0 +1,3 @@
+/* Debugging output.  FIXME: For now... */
+#define TRACE printf
+#define ERR printf
diff --git a/loader/himemce-map-provider.c b/loader/himemce-map-provider.c
new file mode 100644 (file)
index 0000000..513872b
--- /dev/null
@@ -0,0 +1,141 @@
+/* himemce-map-provider.c - High Memory for Windows CE
+   Copyright (C) 2010 g10 Code GmbH
+   Written by Marcus Brinkmann <marcus@g10code.com>
+
+   This file is part of HiMemCE.
+   HiMemCE is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of
+   the License, or (at your option) any later version.
+   
+   HiMemCE is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+#include <windows.h>
+
+#include "debug.h"
+#include "himemce-map-provider.h"
+
+#define ALIGN(x,a) ((x + ((a) - 1)) & ~(a - 1))
+
+struct himemce_map *
+map_create (void)
+{
+  HANDLE *hnd;
+  struct himemce_map *map;
+
+  hnd = CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0,
+                          HIMEMCE_MAP_SIZE, HIMEMCE_MAP_NAME);
+  if (! hnd)
+    {
+      ERR ("creating himemce map file failed: %i\n", GetLastError ());
+      return NULL;
+    }
+  map = MapViewOfFile (hnd, FILE_MAP_READ, 0, 0, 0);
+  CloseHandle (hnd);
+  if (! map)
+    {
+      ERR ("mapping himemce map file failed: %i\n", GetLastError ());
+      return NULL;
+    }
+
+  if (map->magic == HIMEMCE_MAP_MAGIC)
+    {
+      /* Already running.  */
+      ERR ("himemce map already present\n");
+      UnmapViewOfFile (map);
+      return NULL;
+    }
+
+  /* Set the defaults.  */
+  map->magic = HIMEMCE_MAP_MAGIC;
+  map->size = sizeof (struct himemce_map);
+  map->low_start = _HIMEMCE_MAP_LOW_BASE;
+  return map;
+}
+
+
+void *
+map_alloc (struct himemce_map *map, int size)
+{
+  void *ptr = ((char *) map) + map->size;
+
+  /* Word-align.  */
+  map->size += ALIGN (size, 4);
+  if (size >= HIMEMCE_MAP_SIZE)
+    {
+      ERR ("out of map memory allocating %i bytes\n", size);
+      return NULL;
+    }
+  return ptr;
+}
+
+
+void *
+map_reserve_low (struct himemce_map *map, int size)
+{
+  void *ptr = ((char *) map->low_start) + map->low_size;
+
+  /* Alignment for module sections.  */
+  map->low_size += ALIGN (size, 1024);
+  return ptr;
+}
+
+
+struct himemce_module *
+map_add_module (struct himemce_map *map, wchar_t *filename, void *base)
+{
+  struct himemce_module *mod;
+  int len;
+  int idx;
+
+  if (map->nr_modules == HIMEMCE_MAP_MAX_MODULES)
+    {
+      ERR ("too many modules\n");
+      return NULL;
+    }
+
+  mod = &map->module[map->nr_modules];
+
+  len = wcslen (filename);
+  mod->filename = map_alloc (map, (len + 1) * sizeof (wchar_t));
+  if (! mod->filename)
+    return NULL;
+  wcscpy (mod->filename, filename);
+  idx = len;
+  while (idx > 0 && mod->filename[idx - 1] != '\\'
+        && mod->filename[idx - 1] != '/')
+    idx--;
+  mod->dllname = &mod->filename[idx];
+  mod->base = base;
+
+  len = WideCharToMultiByte (CP_UTF8, 0, mod->dllname, -1, NULL, 0, NULL, NULL);
+  if (len == 0)
+    {
+      ERR ("conversion failure: %i\n", GetLastError ());
+      return NULL;
+    }
+  mod->name = map_alloc (map, len);
+  if (! mod->name)
+    return NULL;
+
+  if (WideCharToMultiByte (CP_UTF8, 0, mod->dllname, -1, mod->name, len,
+                          NULL, NULL) != len)
+    {
+      ERR ("conversion inconsistency: %i\n", GetLastError ());
+      return NULL;
+    }
+
+  map->nr_modules++;
+  return mod;
+}
+
+
diff --git a/loader/himemce-map-provider.h b/loader/himemce-map-provider.h
new file mode 100644 (file)
index 0000000..42978cc
--- /dev/null
@@ -0,0 +1,38 @@
+/* himemce-map-provider.h - High Memory for Windows CE
+   Copyright (C) 2010 g10 Code GmbH
+   Written by Marcus Brinkmann <marcus@g10code.com>
+
+   This file is part of HiMemCE.
+   HiMemCE is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of
+   the License, or (at your option) any later version.
+   
+   HiMemCE is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+#ifndef HIMEMCE_MAP_PROVIDER_H
+#define HIMEMCE_MAP_PROVIDER_H 1
+
+#include "himemce-map.h"
+
+
+struct himemce_map *map_create (void);
+
+void *map_alloc (struct himemce_map *map, int size);
+
+void *map_reserve_low (struct himemce_map *map, int size);
+
+struct himemce_module *map_add_module (struct himemce_map *map,
+                                      wchar_t *filename, void *base);
+
+
+#endif /* HIMEMCE_MAP_PROVIDER_H */
diff --git a/loader/himemce-map.c b/loader/himemce-map.c
new file mode 100644 (file)
index 0000000..c8ef663
--- /dev/null
@@ -0,0 +1,70 @@
+/* himemce-map.c - High Memory for Windows CE
+   Copyright (C) 2010 g10 Code GmbH
+   Written by Marcus Brinkmann <marcus@g10code.com>
+
+   This file is part of HiMemCE.
+   HiMemCE is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of
+   the License, or (at your option) any later version.
+   
+   HiMemCE is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+#include <windows.h>
+
+#include "himemce-map.h"
+
+/* Open the map data (which must exist).  */
+struct himemce_map *
+himemce_map_open (void)
+{
+  HANDLE *hnd;
+  struct himemce_map *map;
+
+  hnd = CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0,
+                          HIMEMCE_MAP_SIZE, HIMEMCE_MAP_NAME);
+  if (! hnd)
+    return NULL;
+  map = MapViewOfFile (hnd, FILE_MAP_READ, 0, 0, 0);
+  CloseHandle (hnd);
+  if (! map)
+    return NULL;
+  if (map->magic != HIMEMCE_MAP_MAGIC)
+    return NULL;
+
+  return map;
+}
+
+
+/* Release the map data.  */
+void
+himemce_map_close (struct himemce_map *map)
+{
+  UnmapViewOfFile (map);
+}
+
+
+/* Find the DLL with the name DLLNAME in the map.  */
+struct himemce_module *
+himemce_map_find_dll (struct himemce_map *map, char *name)
+{
+  int i;
+
+  for (i = 0; i < map->nr_modules; map++)
+    if (! strcmp (map->module[i].name, name))
+      break;
+
+  if (i < map->nr_modules)
+    return &map->module[i];
+
+  return NULL;
+}
diff --git a/loader/himemce-map.h b/loader/himemce-map.h
new file mode 100644 (file)
index 0000000..99dd45f
--- /dev/null
@@ -0,0 +1,92 @@
+/* himemce-map.h - High Memory for Windows CE
+   Copyright (C) 2010 g10 Code GmbH
+   Written by Marcus Brinkmann <marcus@g10code.com>
+
+   This file is part of HiMemCE.
+   HiMemCE is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of
+   the License, or (at your option) any later version.
+   
+   HiMemCE is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+#ifndef HIMEMCE_MAP_H
+#define HIMEMCE_MAP_H 1
+
+#include <stddef.h>
+
+/* The preloader makes its information available at a shared memory
+   object of this name and size.  */
+#define HIMEMCE_MAP_NAME L"himemcemap"
+#define HIMEMCE_MAP_SIZE (128 * 1024)
+#define HIMEMCE_MAP_MAGIC 0x400b1337
+
+/* The default base address.  Users should take the actual value from
+   the LOW_START member of struct himemce_map.  */
+#define _HIMEMCE_MAP_LOW_BASE ((void *) (2 * 1024 * 1024))
+
+/* Maximum number of DLLs that can be mapped.  */
+#define HIMEMCE_MAP_MAX_MODULES 64
+
+
+/* Each module provides this.  */
+struct himemce_module
+{
+  wchar_t *filename;
+
+  /* Points into filename.  */
+  wchar_t *dllname;
+
+  /* Export DLL name (same as DLLNAME, but in ASCII).  */
+  char *name;
+
+  /* The base address of the module image.  */
+  void *base;
+
+  /* The low (in-process) address of read-write sections is available
+     in the PointerToLinenumbers in the section header, which is
+     recycled for that purpose.  */
+};
+
+
+struct himemce_map
+{
+  /* Must be HIMEMCE_MAP_MAGIC.  */
+  unsigned int magic;
+
+  /* Actual size of the map.  */
+  unsigned int size;
+
+  /* The low addresses of sections are within this range, which must
+     be reserved by the program that wants to use mapped modules as
+     soon as possible.  */
+  void *low_start;
+  int low_size;
+
+  /* Number of mapped modules.  */
+  int nr_modules;
+
+  struct himemce_module module[HIMEMCE_MAP_MAX_MODULES];
+};
+
+
+/* Open the map data (which must exist).  */
+struct himemce_map *himemce_map_open (void);
+
+/* Release the map data.  */
+void himemce_map_close (struct himemce_map *map);
+
+/* Find the DLL with the name DLLNAME in the map.  */
+struct himemce_module *himemce_map_find_dll (struct himemce_map *map,
+                                            char *name);
+
+#endif /* HIMEMCE_MAP_H */
diff --git a/loader/himemce-pre.c b/loader/himemce-pre.c
new file mode 100644 (file)
index 0000000..bf93c25
--- /dev/null
@@ -0,0 +1,691 @@
+ /* himemce-pre.c - High Memory for Windows CE (preloader)\r
+   Copyright (C) 2010 g10 Code GmbH\r
+   Written by Marcus Brinkmann <marcus@g10code.com>\r
+\r
+   This file is part of HiMemCE.\r
\r
+   HiMemCE is free software; you can redistribute it and/or modify it\r
+   under the terms of the GNU Lesser General Public License as\r
+   published by the Free Software Foundation; either version 2.1 of\r
+   the License, or (at your option) any later version.\r
+   \r
+   HiMemCE is distributed in the hope that it will be useful, but\r
+   WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+   Lesser General Public License for more details.\r
+   \r
+   You should have received a copy of the GNU Lesser General Public\r
+   License along with this program; if not, write to the Free Software\r
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\r
+   02111-1307, USA.  */\r
+\r
+#include <windows.h>\r
+#include <assert.h>\r
+\r
+#include "debug.h"\r
+\r
+#include "kernel32_kernel_private.h"\r
+#include "wine.h"\r
+#include "himemce-map-provider.h"\r
+\r
+\r
+# define page_mask  0xfff\r
+# define page_shift 12\r
+# define page_size  0x1000\r
+\r
+#define ROUND_SIZE(size) \\r
+  (((SIZE_T)(size) + page_mask) & ~page_mask)\r
+\r
+#define SECTION_IS_LOW(sec) \\r
+      (((sec)->Characteristics & IMAGE_SCN_MEM_WRITE) &&       \\r
+       ! ((sec)->Characteristics & IMAGE_SCN_MEM_SHARED))\r
+\r
+\r
+/* Find all modules to preload and add them to the map.  */\r
+static int\r
+find_modules (struct himemce_map *map)\r
+{\r
+  /* Five for "*.dll" and one for good luck.  */\r
+  wchar_t dirname[MAX_PATH + 6];\r
+  wchar_t filename[2 * MAX_PATH + 1];\r
+  int res;\r
+  wchar_t *end;\r
+  int idx;\r
+  HANDLE hSearch;\r
+  WIN32_FIND_DATA FileData;\r
+  BOOL bFinished = FALSE;\r
+\r
+  res = GetModuleFileName (GetModuleHandle (NULL), dirname, MAX_PATH);\r
+  if (! res)\r
+    {\r
+      ERR ("can not determine module filename: %i\n",\r
+            GetLastError ());\r
+      return 0;\r
+    }\r
+\r
+  idx = wcslen (dirname);\r
+  while (idx > 0 && dirname[idx - 1] != '\\' && dirname[idx - 1] != '/')\r
+    idx--;\r
+  dirname[idx] = '\0';\r
+\r
+  wcscpy (filename, dirname);\r
+  wcscpy (&dirname[idx], L"*.dll");\r
+  end = &filename[idx];\r
+\r
+  hSearch = FindFirstFile (dirname, &FileData);\r
+  if (hSearch == INVALID_HANDLE_VALUE)\r
+    {\r
+      ERR ("no .dll files found\n");\r
+      return 0;\r
+    }\r
+\r
+  while (!bFinished)\r
+    {\r
+      struct himemce_module *mod;\r
+      struct binary_info info;\r
+      HANDLE hnd;\r
+\r
+      TRACE ("considering %S: ", FileData.cFileName);\r
+\r
+      wcscpy (end, FileData.cFileName);\r
+\r
+      if (FileData.cFileName[0] != L'Q')\r
+       {\r
+         TRACE ("skip non-Qt library for testing\n");\r
+         goto skipit;\r
+       }\r
+\r
+      hnd = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL,\r
+                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);\r
+      if (hnd == INVALID_HANDLE_VALUE)\r
+       {\r
+         TRACE ("skip (probe failure: %i)\n", GetLastError ());\r
+         goto skipit;\r
+       }\r
+\r
+      MODULE_get_binary_info (hnd, &info);\r
+      CloseHandle (hnd);\r
+      if (info.machine != IMAGE_FILE_MACHINE_THUMB)\r
+       {\r
+         TRACE ("skip (machine type: %04x)\n", info.machine);\r
+         goto skipit;\r
+       }\r
+\r
+      /* FIXME: Keep a blacklist.  Maybe exclude ARM (not THUMB)\r
+        binaries automatically (gpgme and friends).  */\r
+\r
+      TRACE ("accept [%2i]\n", map->nr_modules);\r
+      mod = map_add_module (map, filename, 0);\r
+      if (! mod)\r
+       return 0;\r
+      \r
+    skipit:\r
+      if (!FindNextFile (hSearch, &FileData))\r
+       {\r
+         bFinished = TRUE;\r
+         \r
+         if (GetLastError () != ERROR_NO_MORE_FILES)\r
+           {\r
+             ERR ("unable to find next .dll file\n");\r
+             return 0;\r
+           }\r
+       }\r
+    }\r
+  if (!FindClose (hSearch))\r
+    {\r
+      ERR ("unable to close search handle: %i\n", GetLastError ());\r
+      return 0;\r
+    }\r
+  return 1;\r
+}\r
+\r
+\r
+static SIZE_T\r
+section_size (IMAGE_SECTION_HEADER *sec)\r
+{\r
+  static const SIZE_T sector_align = 0x1ff;\r
+  SIZE_T map_size, file_size, end;\r
+  \r
+  if (!sec->Misc.VirtualSize)\r
+    map_size = ROUND_SIZE( sec->SizeOfRawData );\r
+  else\r
+    map_size = ROUND_SIZE( sec->Misc.VirtualSize );\r
+  \r
+  file_size = (sec->SizeOfRawData + (sec->PointerToRawData & sector_align) + sector_align) & ~sector_align;\r
+  if (file_size > map_size) file_size = map_size;\r
+  end = ROUND_SIZE( file_size );\r
+  if (end > map_size) end = map_size;\r
+  return end;\r
+}\r
+\r
+\r
+static void *\r
+get_rva_low (char *module, size_t rva)\r
+{\r
+  IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)module;\r
+  IMAGE_NT_HEADERS *nt = (IMAGE_NT_HEADERS *)(module + dos->e_lfanew);\r
+  IMAGE_SECTION_HEADER *sec;\r
+  int sec_cnt;\r
+  int idx;\r
+\r
+  sec = (IMAGE_SECTION_HEADER*)((char*)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader);\r
+  sec_cnt = nt->FileHeader.NumberOfSections;\r
+\r
+  for (idx = 0; idx < sec_cnt; idx++)\r
+    {\r
+      if (! sec[idx].PointerToLinenumbers)\r
+       continue;\r
+      if (rva >= sec[idx].VirtualAddress\r
+         && rva < sec[idx].VirtualAddress + section_size (&sec[idx]))\r
+               break;\r
+    }\r
+  if (idx == sec_cnt)\r
+    return (void *)((char *)module + rva);\r
+  \r
+  return (void *)((char *)sec[idx].PointerToLinenumbers\r
+                 + (rva - sec[idx].VirtualAddress));\r
+}\r
+\r
+  \r
+static IMAGE_BASE_RELOCATION *\r
+LowLdrProcessRelocationBlock (void *base, void *page, UINT count,\r
+                             USHORT *relocs)\r
+{\r
+  char *ptr;\r
+  IMAGE_DOS_HEADER *dos;\r
+  IMAGE_NT_HEADERS *nt;\r
+  IMAGE_SECTION_HEADER *sec;\r
+  int sec_cnt;\r
+  int idx;\r
+\r
+  ptr = base;\r
+  dos = (IMAGE_DOS_HEADER *) ptr;\r
+  nt = (IMAGE_NT_HEADERS *) (ptr + dos->e_lfanew);\r
+  sec = (IMAGE_SECTION_HEADER *) ((char*) &nt->OptionalHeader\r
+                                 + nt->FileHeader.SizeOfOptionalHeader);\r
+  sec_cnt = nt->FileHeader.NumberOfSections;\r
+  idx = sec_cnt;\r
+\r
+  /* Small optimization: Exclude read-only sections at the start and\r
+     end of the list.  */\r
+  while (sec_cnt > 0 && SECTION_IS_LOW (sec))\r
+    {\r
+      sec++;\r
+      sec_cnt--;\r
+    }\r
+  while (sec_cnt > 0 && SECTION_IS_LOW (&sec[sec_cnt - 1]))\r
+    sec_cnt--;\r
+  \r
+  while (count--)\r
+    {\r
+      USHORT offset = *relocs & 0xfff;\r
+      int type = *relocs >> 12;\r
+      size_t addr;\r
+      size_t old_addr;\r
+      size_t off;\r
+\r
+      switch(type)\r
+        {\r
+        case IMAGE_REL_BASED_ABSOLUTE:\r
+         goto nextreloc;\r
+        case IMAGE_REL_BASED_HIGH:\r
+         addr = HIWORD (*(short *)((char *)page + offset));\r
+         break;\r
+        case IMAGE_REL_BASED_LOW:\r
+         addr = LOWORD (*(short *)((char *)page + offset));\r
+         break;\r
+        case IMAGE_REL_BASED_HIGHLOW:\r
+         addr = *(int *)((char *)page + offset);\r
+         break;\r
+        default:\r
+         TRACE("Unknown/unsupported fixup type %x.\n", type);\r
+         goto nextreloc;\r
+        }\r
+\r
+      if ((void *) addr < base)\r
+       {\r
+         ERR ("ignoring relocation that points below image");\r
+         goto nextreloc;\r
+       }\r
+      off = ((char *) addr) - ((char *) base);\r
+\r
+      /* Check if ADDR points into a rw segment.  First check the\r
+        cached index.  */\r
+      if (idx < sec_cnt)\r
+       {\r
+         if (off >= sec[idx].VirtualAddress\r
+             && off < sec[idx].VirtualAddress + section_size (&sec[idx]))\r
+           ; /* Found it.  */\r
+         else\r
+           idx = sec_cnt;\r
+       }\r
+      if (idx == sec_cnt)\r
+       {\r
+         for (idx = 0; idx < sec_cnt; idx++)\r
+           {\r
+             if (! sec[idx].PointerToLinenumbers)\r
+               continue;\r
+             if (off >= sec[idx].VirtualAddress\r
+                 && off < sec[idx].VirtualAddress + section_size (&sec[idx]))\r
+               break;\r
+           }\r
+         if (idx == sec_cnt)\r
+           goto nextreloc;\r
+       }\r
+      old_addr = addr;\r
+      addr = sec[idx].PointerToLinenumbers + (off - sec[idx].VirtualAddress);\r
+\r
+#if 0\r
+      TRACE ("rewriting relocation at %p to rw section from %p to %p\n",\r
+            ((char *)page + offset), old_addr, addr);\r
+#endif\r
+\r
+      switch(type)\r
+        {\r
+        case IMAGE_REL_BASED_HIGH:\r
+         *(short *)((char *)page + offset) = HIWORD(addr);\r
+         break;\r
+        case IMAGE_REL_BASED_LOW:\r
+         *(short *)((char *)page + offset) = LOWORD(addr);\r
+         break;\r
+        case IMAGE_REL_BASED_HIGHLOW:\r
+         *(int *)((char *)page + offset) = addr;\r
+         break;\r
+        }\r
+    nextreloc:\r
+      relocs++;\r
+    }\r
+  return (IMAGE_BASE_RELOCATION *)relocs;  /* return address of next block */\r
+}\r
+\r
+\r
+static void\r
+relocate_rw_sections (struct himemce_map *map, void *base)\r
+{\r
+  char *ptr;\r
+  IMAGE_DOS_HEADER *dos;\r
+  IMAGE_NT_HEADERS *nt;\r
+  IMAGE_SECTION_HEADER *sec;\r
+  int i;\r
+  IMAGE_BASE_RELOCATION *rel, *end;\r
+  const IMAGE_DATA_DIRECTORY *relocs;\r
+\r
+  TRACE ("adjusting rw sections at %p\n", base);\r
+\r
+  ptr = base;\r
+  dos = (IMAGE_DOS_HEADER *) ptr;\r
+  nt = (IMAGE_NT_HEADERS *) (ptr + dos->e_lfanew);\r
+  sec = (IMAGE_SECTION_HEADER *) ((char*) &nt->OptionalHeader\r
+                                 + nt->FileHeader.SizeOfOptionalHeader);\r
+\r
+  /* Go through all the sections, reserve low memory for the writable\r
+     sections.  */\r
+  for (i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++)\r
+    {\r
+      if (SECTION_IS_LOW (sec))\r
+       {\r
+         SIZE_T map_size;\r
+\r
+         if (! sec->Misc.VirtualSize)\r
+           map_size = ROUND_SIZE (sec->SizeOfRawData);\r
+         else\r
+           map_size = ROUND_SIZE (sec->Misc.VirtualSize);\r
+\r
+         sec->PointerToLinenumbers = (DWORD) map_reserve_low (map, map_size);\r
+\r
+         TRACE ("mapping r/w section %.8s at %p off %x (%lx) flags "\r
+                "%x to low mem %p\n",\r
+                sec->Name, ptr + sec->VirtualAddress,\r
+                sec->PointerToRawData, map_size,\r
+                sec->Characteristics, sec->PointerToLinenumbers);\r
+       }\r
+      else\r
+       sec->PointerToLinenumbers = 0;\r
+    }\r
+\r
+  /* Perform base relocations pointing into low sections.  Before\r
+     that, these relocations point into the high mem address.  */\r
+\r
+  relocs = &nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];\r
+  rel = (IMAGE_BASE_RELOCATION *)(ptr + relocs->VirtualAddress);\r
+  end = (IMAGE_BASE_RELOCATION *)(ptr + relocs->VirtualAddress + relocs->Size);\r
+  \r
+  while (rel < end - 1 && rel->SizeOfBlock)\r
+    {\r
+      rel = LowLdrProcessRelocationBlock\r
+       (base, ptr + rel->VirtualAddress,\r
+        (rel->SizeOfBlock - sizeof (*rel)) / sizeof (USHORT),\r
+        (USHORT *)(rel + 1));\r
+    }\r
+}\r
+\r
+\r
+/* convert PE image VirtualAddress to Real Address */\r
+static void *\r
+get_rva (HMODULE module, DWORD va)\r
+{\r
+  return (void *) ((char *) module + va);\r
+}\r
+\r
+\r
+/* convert from straight ASCII to Unicode without depending on the\r
+   current codepage */\r
+static void\r
+ascii_to_unicode (WCHAR *dst, const char *src, size_t len)\r
+{\r
+  while (len--)\r
+    *dst++ = (unsigned char) *src++;\r
+}\r
+\r
+\r
+#define allocate_stub(x,y) ((void *)0xdeadbeef)\r
+\r
+\r
+static FARPROC\r
+find_ordinal_export (void *module, const IMAGE_EXPORT_DIRECTORY *exports,\r
+                    DWORD exp_size, DWORD ordinal)\r
+{\r
+  FARPROC proc;\r
+  const DWORD *functions = get_rva (module, exports->AddressOfFunctions);\r
+  \r
+  if (ordinal >= exports->NumberOfFunctions)\r
+    {\r
+      TRACE(" ordinal %d out of range!\n", ordinal + exports->Base );\r
+      return NULL;\r
+    }\r
+  if (!functions[ordinal]) return NULL;\r
+  \r
+#if 0\r
+  /* if the address falls into the export dir, it's a forward */\r
+  if (((const char *)proc >= (const char *)exports) && \r
+      ((const char *)proc < (const char *)exports + exp_size))\r
+    return find_forwarded_export( module, (const char *)proc, load_path );\r
+#endif\r
+\r
+  proc = get_rva_low (module, functions[ordinal]);\r
+  return proc;\r
+}\r
+\r
+\r
+static FARPROC\r
+find_named_export (void *module, const IMAGE_EXPORT_DIRECTORY *exports,\r
+                  DWORD exp_size, const char *name, int hint)\r
+{\r
+  const WORD *ordinals = get_rva (module, exports->AddressOfNameOrdinals);\r
+  const DWORD *names = get_rva (module, exports->AddressOfNames);\r
+  int min = 0, max = exports->NumberOfNames - 1;\r
+\r
+  /* first check the hint */\r
+  if (hint >= 0 && hint <= max)\r
+    {\r
+      char *ename = get_rva( module, names[hint] );\r
+      if (!strcmp( ename, name ))\r
+       return find_ordinal_export( module, exports, exp_size, ordinals[hint]);\r
+    }\r
+\r
+  /* then do a binary search */\r
+  while (min <= max)\r
+    {\r
+      int res, pos = (min + max) / 2;\r
+      char *ename = get_rva( module, names[pos] );\r
+      if (!(res = strcmp( ename, name )))\r
+       return find_ordinal_export( module, exports, exp_size, ordinals[pos]);\r
+      if (res > 0) max = pos - 1;\r
+      else min = pos + 1;\r
+    }\r
+  return NULL;\r
+}\r
+\r
+\r
+/*************************************************************************\r
+ *              import_dll\r
+ *\r
+ * Import the dll specified by the given import descriptor.\r
+ * The loader_section must be locked while calling this function.\r
+ */\r
+static void *\r
+import_dll (struct himemce_map *map, HMODULE module,\r
+           const IMAGE_IMPORT_DESCRIPTOR *descr)\r
+{\r
+  int status = 0;\r
+  const char *name = get_rva (module, descr->Name);\r
+  DWORD len = strlen(name);\r
+  const IMAGE_THUNK_DATA *import_list;\r
+  IMAGE_THUNK_DATA *thunk_list;\r
+  void *imp_base = 0;\r
+  HMODULE imp_mod = 0;\r
+  const IMAGE_EXPORT_DIRECTORY *exports;\r
+  DWORD exp_size;\r
+  WCHAR buffer[32];\r
+  int i;\r
+\r
+  thunk_list = get_rva (module, (DWORD)descr->FirstThunk);\r
+  if (descr->OriginalFirstThunk)\r
+    import_list = get_rva (module, (DWORD)descr->OriginalFirstThunk);\r
+  else\r
+    import_list = thunk_list;\r
+\r
+  while (len && name[len-1] == ' ') len--;  /* remove trailing spaces */\r
+\r
+  /* First check for the modules in the map.  */\r
+  for (i = 0; i < map->nr_modules; i++)\r
+    {\r
+      if (! strncmp (name, map->module[i].name, len))\r
+       break;\r
+    }\r
+  if (i < map->nr_modules)\r
+    {\r
+      imp_base = map->module[i].base;\r
+      TRACE("Loading library %s internal\n", name);\r
+    }\r
+  else if (len * sizeof(WCHAR) < sizeof(buffer))\r
+    {\r
+      ascii_to_unicode( buffer, name, len );\r
+      buffer[len] = 0;\r
+      imp_mod = LoadLibrary (buffer);\r
+      if (imp_mod == INVALID_HANDLE_VALUE)\r
+       status = GetLastError ();\r
+    }\r
+  else\r
+    {\r
+      WCHAR *ptr = malloc ((len + 1) * sizeof(WCHAR) );\r
+      if (!ptr) return NULL;\r
+      ascii_to_unicode( ptr, name, len );\r
+      ptr[len] = 0;\r
+      imp_mod = LoadLibrary (ptr);\r
+      if (imp_mod == INVALID_HANDLE_VALUE)\r
+       status = GetLastError ();\r
+      free (ptr);\r
+    }\r
+  if (status)\r
+    {\r
+      if (status == ERROR_DLL_NOT_FOUND)\r
+       TRACE("Library %s not found\n", name);\r
+      else\r
+       TRACE("Loading library %s failed (error %x).\n",  name, status);\r
+      return NULL;\r
+    }\r
+\r
+  if (imp_base)\r
+    {\r
+      exports = MyRtlImageDirectoryEntryToData (imp_base, TRUE,\r
+                                               IMAGE_DIRECTORY_ENTRY_EXPORT,\r
+                                               &exp_size);\r
+      if (!exports)\r
+       {\r
+         /* set all imported function to deadbeef */\r
+         while (import_list->u1.Ordinal)\r
+           {\r
+             if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal))\r
+               {\r
+                 int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);\r
+                 TRACE ("No implementation for %s.%d", name, ordinal);\r
+                 thunk_list->u1.Function\r
+                   = (PDWORD) allocate_stub (name, IntToPtr (ordinal));\r
+               }\r
+             else\r
+               {\r
+                 IMAGE_IMPORT_BY_NAME *pe_name\r
+                   = get_rva (module, (DWORD) import_list->u1.AddressOfData);\r
+                 TRACE ("No implementation for %s.%s", name, pe_name->Name);\r
+                 thunk_list->u1.Function\r
+                   = (PDWORD) allocate_stub (name, (const char*) pe_name->Name);\r
+               }\r
+             import_list++;\r
+             thunk_list++;\r
+           }\r
+         goto done;\r
+       }\r
+    }\r
+  \r
+  while (import_list->u1.Ordinal)\r
+    {\r
+      if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal))\r
+        {\r
+         int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);\r
+\r
+         if (imp_base)\r
+           thunk_list->u1.Function = (PDWORD)(ULONG_PTR)\r
+             find_ordinal_export (imp_base, exports, exp_size,\r
+                                  ordinal - exports->Base);\r
+         else\r
+           thunk_list->u1.Function = (PDWORD)(ULONG_PTR)\r
+             GetProcAddress (imp_mod, (void *) (ordinal & 0xffff));\r
+         if (!thunk_list->u1.Function)\r
+            {\r
+             thunk_list->u1.Function = (PDWORD) allocate_stub( name, IntToPtr(ordinal) );\r
+             TRACE("No implementation for %s.%d imported, setting to %p\n",\r
+                   name, ordinal,\r
+                   (void *)thunk_list->u1.Function );\r
+            }\r
+         TRACE("--- Ordinal %s.%d = %p\n", name, ordinal, (void *)thunk_list->u1.Function );\r
+        }\r
+      else  /* import by name */\r
+        {\r
+         IMAGE_IMPORT_BY_NAME *pe_name;\r
+         pe_name = get_rva( module, (DWORD)import_list->u1.AddressOfData );\r
+         if (imp_base)\r
+           thunk_list->u1.Function = (PDWORD)(ULONG_PTR)\r
+             find_named_export (imp_base, exports, exp_size,\r
+                                (const char*)pe_name->Name, pe_name->Hint);\r
+         else\r
+           thunk_list->u1.Function = (PDWORD)(ULONG_PTR)\r
+             GetProcAddressA (imp_mod, (const char*)pe_name->Name);\r
+         if (!thunk_list->u1.Function)\r
+            {\r
+             thunk_list->u1.Function\r
+               = (PDWORD) allocate_stub (name, (const char*)pe_name->Name);\r
+             TRACE ("No implementation for %s.%s imported, setting to %p\n",\r
+                    name, pe_name->Name, (void *)thunk_list->u1.Function);\r
+            }\r
+         TRACE("--- %s %s.%d = %p\n",\r
+               pe_name->Name, name, pe_name->Hint,\r
+               (void *)thunk_list->u1.Function);\r
+        }\r
+      import_list++;\r
+      thunk_list++;\r
+    }\r
+\r
+ done:\r
+  return (void*)1;\r
+}\r
+\r
+\r
+static void\r
+fixup_imports (struct himemce_map *map, void *base)\r
+{\r
+  int i, nb_imports;\r
+  const IMAGE_IMPORT_DESCRIPTOR *imports;\r
+  DWORD size;\r
+\r
+  imports = MyRtlImageDirectoryEntryToData (base, TRUE,\r
+                                           IMAGE_DIRECTORY_ENTRY_IMPORT,\r
+                                           &size);\r
+  if (!imports)\r
+    return;\r
+\r
+  nb_imports = 0;\r
+  while (imports[nb_imports].Name && imports[nb_imports].FirstThunk)\r
+    nb_imports++;\r
+  if (!nb_imports)\r
+    return;\r
+\r
+  for (i = 0; i < nb_imports; i++)\r
+    {\r
+      if (! import_dll (map, base, &imports[i]))\r
+       {\r
+         SetLastError (ERROR_DLL_NOT_FOUND);\r
+         break;\r
+       }\r
+    }\r
+}\r
+\r
+\r
+int\r
+main (int argc, char *argv[])\r
+{\r
+  struct himemce_map *map;\r
+  int result = 0;\r
+  int i;\r
+\r
+  TRACE ("creating map file...\n");\r
+\r
+  map = map_create ();\r
+  if (! map)\r
+    return 1;\r
+\r
+  TRACE ("finding modules...\n");\r
+\r
+  result = find_modules (map);\r
+  if (! result)\r
+    exit (1);\r
+\r
+  TRACE ("loading modules...\n");\r
+\r
+  /* For each module: load it high without resolving references.  */\r
+  for (i = 0; i < map->nr_modules; i++)\r
+    {\r
+      struct himemce_module *mod = &map->module[i];\r
+      void *base = MyLoadLibraryExW (mod->filename, 0,\r
+                                    DONT_RESOLVE_DLL_REFERENCES);\r
+\r
+      if (! base)\r
+       {\r
+         ERR ("could not load %S: %i\n", mod->filename, GetLastError());\r
+         exit (1);\r
+       }\r
+      mod->base = base;\r
+    }\r
+\r
+  TRACE ("relocationg writable sections...\n");\r
+\r
+  for (i = 0; i < map->nr_modules; i++)\r
+    {\r
+      struct himemce_module *mod = &map->module[i];\r
+\r
+      /* Allocate low mem for read-write sections and adjust\r
+        relocations pointing into them.  */\r
+      relocate_rw_sections (map, mod->base);\r
+    }\r
+\r
+  /* Export entries are handled at time of import on the other side,\r
+     when we check for low memory mapped sections and adjust the\r
+     imported address accordingly.  */\r
+\r
+  TRACE ("resolve module dependencies...\n");\r
+\r
+  for (i = 0; i < map->nr_modules; i++)\r
+    {\r
+      struct himemce_module *mod = &map->module[i];\r
+\r
+      /* Fixup imports (this loads all dependencies as well!).  */\r
+      fixup_imports (map, mod->base);\r
+    }\r
+\r
+  TRACE ("sleeping...");\r
+\r
+  while (1)\r
+    Sleep (3600 * 1000);\r
+\r
+  return 0;\r
+}\r
diff --git a/loader/himemce-pre.h b/loader/himemce-pre.h
new file mode 100644 (file)
index 0000000..376b051
--- /dev/null
@@ -0,0 +1,38 @@
+/* himemce-pre.h - High Memory for Windows CE
+   Copyright (C) 2010 g10 Code GmbH
+   Written by Marcus Brinkmann <marcus@g10code.com>
+
+   This file is part of HiMemCE.
+   HiMemCE is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of
+   the License, or (at your option) any later version.
+   
+   HiMemCE is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+#ifndef HIMEMCE_PRE_H
+#define HIMEMCE_PRE_H 1
+
+#include "himemce-map.h"
+
+
+struct himemce_map *map_create (void);
+
+void *map_alloc (struct himemce_map *map, int size);
+
+struct himemce_module *map_add_module (struct himemce_map *map,
+                                      wchar_t filename, void *base);
+
+void *map_reserve_low (struct himemce_map *map, int size);
+
+
+#endif /* HIMEMCE_PRE_H */
diff --git a/loader/himemce-tool.c b/loader/himemce-tool.c
new file mode 100644 (file)
index 0000000..18a78ed
--- /dev/null
@@ -0,0 +1,54 @@
+/* himemce-tool.c - High Memory for Windows CE
+   Copyright (C) 2010 g10 Code GmbH
+   Written by Marcus Brinkmann <marcus@g10code.com>
+
+   This file is part of HiMemCE.
+   HiMemCE is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of
+   the License, or (at your option) any later version.
+   
+   HiMemCE is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+#include <windows.h>
+#include <stdio.h>
+
+#include "himemce-map.h"
+
+int
+main (int argc, char *argv[])
+{
+  struct himemce_map *map;
+  int i;
+
+  /* Open the map data (which must exist).  */
+  map = himemce_map_open ();
+  if (! map)
+    {
+      fprintf (stderr, "could not open himem map: %i\n", GetLastError ());
+      exit (1);
+    }
+
+  printf ("Found map at %p (size 0x%x)\n", map, map->size);
+  printf ("Low memory reserve at %p (size 0x%x)\n",
+         map->low_start, map->low_size);
+  printf ("Listing %i modules:\n", map->nr_modules);
+  for (i = 0; i < map->nr_modules; i++)
+    {
+      struct himemce_module *mod = &map->module[i];
+      printf ("module[%2i] = %s %p\n", mod->name, mod->base);
+      /* TODO: Loop through sections, show some more info.  */
+    }
+
+  himemce_map_close (map);
+  return 0;
+}
index 5b4fe23..639f4ee 100644 (file)
@@ -1,94 +1,40 @@
-/* himemce.h - High Memory for Windows CE interfaces
-   Copyright (C) 2010 g10 Code GmbH
-   Written by Marcus Brinkmann <marcus@g10code.com>
-
-   This file is part of HiMemCE.
-   HiMemCE is free software; you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of
-   the License, or (at your option) any later version.
-   
-   HiMemCE is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-   
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
-
-#ifndef HIMEMCE_H
-#define HIMEMCE_H
-
-#include <windows.h>
-
-#include "my_winternl.h"
-#include "server_protocol.h"
-
-
-/* Global options.  */
-
-extern int verbose;
-
-
-/* Debugging output.  FIXME: For now... */
-#define TRACE printf
-
-#define ERR printf
-
-
-/* Support for the wine code.  */
-extern struct _PEB _peb;
-#define current_peb() (&_peb)
-
-#define OBJECT_ATTRIBUTES void
-
-typedef int off_t;
-
-/* compat.c */
-size_t pread(HANDLE handle, char *buffer, size_t len, off_t offset);
-
-int get_prot_flags (int vprot);
-
-
-/* Exports from the wine code.  */
-
-/* ntdll_error.c */
-ULONG MyRtlNtStatusToDosError (NTSTATUS status);
-
-/* ntdll_loader.c */
-PIMAGE_NT_HEADERS MyRtlImageNtHeader (HMODULE hModule);
-NTSTATUS MyLdrLoadDll (LPCWSTR path_name, DWORD flags,
-                      LPCWSTR libname, HMODULE* hModule);
-void MyLdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
-                          ULONG_PTR unknown3, ULONG_PTR unknown4 );
-IMAGE_BASE_RELOCATION *MyLdrProcessRelocationBlock (void *page, UINT count,
-                                                   USHORT *relocs,
-                                                   INT_PTR delta);
-PVOID MyRtlImageDirectoryEntryToData( HMODULE module, BOOL image,
-                                     WORD dir, ULONG *size );
-
-/* ntdll_virtual.c */
-NTSTATUS MyNtCreateSection (HANDLE *handle, ACCESS_MASK access,
-                           const OBJECT_ATTRIBUTES *attr,
-                           const LARGE_INTEGER *size, ULONG protect,
-                           ULONG sec_flags, HANDLE file);
-NTSTATUS MyNtMapViewOfSection (HANDLE handle, HANDLE process,
-                              PVOID *addr_ptr, ULONG zero_bits,
-                              SIZE_T commit_size,
-                              const LARGE_INTEGER *offset_ptr,
-                              SIZE_T *size_ptr,
-                              SECTION_INHERIT inherit, ULONG alloc_type,
-                              ULONG protect);
-
-/* kernel32_module.c */
-void MODULE_get_binary_info (HANDLE hfile, struct binary_info *info);
-HMODULE MyLoadLibraryExW (LPCWSTR libnameW, HANDLE hfile, DWORD flags);
-
-/* kernel32_process.c */
-BOOL MyCreateProcessW (LPCWSTR app_name, LPWSTR cmd_line, int *exit_code);
-
-
-#endif /* HIMEMCE_H */
+/* himemce.h - High Memory for Windows CE interfaces\r
+   Copyright (C) 2010 g10 Code GmbH\r
+   Written by Marcus Brinkmann <marcus@g10code.com>\r
+\r
+   This file is part of HiMemCE.\r
\r
+   HiMemCE is free software; you can redistribute it and/or modify it\r
+   under the terms of the GNU Lesser General Public License as\r
+   published by the Free Software Foundation; either version 2.1 of\r
+   the License, or (at your option) any later version.\r
+   \r
+   HiMemCE is distributed in the hope that it will be useful, but\r
+   WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+   Lesser General Public License for more details.\r
+   \r
+   You should have received a copy of the GNU Lesser General Public\r
+   License along with this program; if not, write to the Free Software\r
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\r
+   02111-1307, USA.  */\r
+\r
+#ifndef HIMEMCE_H\r
+#define HIMEMCE_H\r
+\r
+#include <windows.h>\r
+\r
+#include "debug.h"\r
+\r
+\r
+/* Global options.  */\r
+\r
+extern int verbose;\r
+\r
+\r
+/* Exports from the wine code.  */\r
+\r
+#include "wine.h"\r
+\r
+\r
+#endif /* HIMEMCE_H */\r
index 379992d..73bb981 100644 (file)
@@ -1,52 +1,53 @@
-/* From wine1.2-1.1.42/dlls/kernel32/kernel_private.h  */
-
-/*
- * Kernel32 undocumented and private functions definition
- *
- * Copyright 2003 Eric Pouech
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef __WINE_KERNEL_PRIVATE_H
-#define __WINE_KERNEL_PRIVATE_H
-
-
-enum binary_type
-{
-    BINARY_UNKNOWN = 0,
-    BINARY_PE,
-    BINARY_WIN16,
-    BINARY_OS216,
-    BINARY_DOS,
-    BINARY_UNIX_EXE,
-    BINARY_UNIX_LIB
-};
-
-#define BINARY_FLAG_DLL   0x01
-#define BINARY_FLAG_64BIT 0x02
-
-struct binary_info
-{
-    enum binary_type type;
-    DWORD            flags;
-    void            *res_start;
-    void            *res_end;
-};
-
-/* module.c */
-extern void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info );
-
-#endif
+/* From wine1.2-1.1.42/dlls/kernel32/kernel_private.h  */\r
+\r
+/*\r
+ * Kernel32 undocumented and private functions definition\r
+ *\r
+ * Copyright 2003 Eric Pouech\r
+ *\r
+ * This library is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU Lesser General Public\r
+ * License as published by the Free Software Foundation; either\r
+ * version 2.1 of the License, or (at your option) any later version.\r
+ *\r
+ * This library is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * Lesser General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
+\r
+#ifndef __WINE_KERNEL_PRIVATE_H\r
+#define __WINE_KERNEL_PRIVATE_H\r
+\r
+\r
+enum binary_type\r
+{\r
+    BINARY_UNKNOWN = 0,\r
+    BINARY_PE,\r
+    BINARY_WIN16,\r
+    BINARY_OS216,\r
+    BINARY_DOS,\r
+    BINARY_UNIX_EXE,\r
+    BINARY_UNIX_LIB\r
+};\r
+\r
+#define BINARY_FLAG_DLL   0x01\r
+#define BINARY_FLAG_64BIT 0x02\r
+\r
+struct binary_info\r
+{\r
+    enum binary_type type;\r
+    DWORD            flags;\r
+    void            *res_start;\r
+    void            *res_end;\r
+    WORD             machine;\r
+};\r
+\r
+/* module.c */\r
+extern void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info );\r
+\r
+#endif\r
index fcc096d..7390f27 100644 (file)
-/* From wine1.2-1.1.42/dlls/kernel32/module.c  */
-
-/*
- * Modules
- *
- * Copyright 1995 Alexandre Julliard
- * Copyright 2010 g10 Code GmbH
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-
-#include "himemce.h"
-#include "kernel32_kernel_private.h"
-
-
-void MODULE_get_binary_info (HANDLE hfile, struct binary_info *info)
-{
-  union
-  {
-    IMAGE_DOS_HEADER mz;
-  } header;
-  
-  DWORD len;
-
-  memset( info, 0, sizeof(*info) );
-  /* Seek to the start of the file and read the header information. */
-  if (SetFilePointer( hfile, 0, NULL, SEEK_SET ) == -1) return;
-  if (!ReadFile( hfile, &header, sizeof(header), &len, NULL ) || len != sizeof(header)) return;
-  
-  if (header.mz.e_magic == IMAGE_DOS_SIGNATURE)
-    {
-      union
-      {
-       IMAGE_OS2_HEADER os2;
-       IMAGE_NT_HEADERS32 nt;
-      } ext_header;
-      
-      /* We do have a DOS image so we will now try to seek into
-       * the file by the amount indicated by the field
-       * "Offset to extended header" and read in the
-       * "magic" field information at that location.
-       * This will tell us if there is more header information
-       * to read or not.
-       */
-      info->type = BINARY_DOS;
-      if (SetFilePointer( hfile, header.mz.e_lfanew, NULL, SEEK_SET ) == -1) return;
-      if (!ReadFile( hfile, &ext_header, sizeof(ext_header), &len, NULL ) || len < 4) return;
-      
-      /* Reading the magic field succeeded so
-       * we will try to determine what type it is.
-       */
-      if (!memcmp( &ext_header.nt.Signature, "PE\0\0", 4 ))
-        {
-         if (len >= sizeof(ext_header.nt.FileHeader))
-            {
-             info->type = BINARY_PE;
-             if (ext_header.nt.FileHeader.Characteristics & IMAGE_FILE_DLL)
-               info->flags |= BINARY_FLAG_DLL;
-             if (len < sizeof(ext_header.nt))  /* clear remaining part of header if missing */
-               memset( (char *)&ext_header.nt + len, 0, sizeof(ext_header.nt) - len );
-             switch (ext_header.nt.OptionalHeader.Magic)
-                {
-                case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
-                 info->res_start = (void *)(ULONG_PTR)ext_header.nt.OptionalHeader.ImageBase;
-                 info->res_end = (void *)((ULONG_PTR)ext_header.nt.OptionalHeader.ImageBase +
-                                          ext_header.nt.OptionalHeader.SizeOfImage);
-                 break;
-                case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
-                 info->flags |= BINARY_FLAG_64BIT;
-                 break;
-                }
-            }
-        }
-    }
-}
-
-\f
-static HMODULE load_library( LPCWSTR libname, DWORD flags )
-{
-  NTSTATUS nts;
-  HMODULE hModule;
-
-  /* We don't use any special DLL load path.  */
-
-  if (flags & LOAD_LIBRARY_AS_DATAFILE)
-    {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return NULL;
-    }
-
-  nts = MyLdrLoadDll( NULL, flags, libname, &hModule );
-  if (nts != STATUS_SUCCESS)
-    {
-      hModule = 0;
-      SetLastError( MyRtlNtStatusToDosError( nts ) );
-    }
-  return hModule;
-}
-
-
-HMODULE MyLoadLibraryExW(LPCWSTR libnameW, HANDLE hfile, DWORD flags)
-{
-/* We would like to use the native LoadLibraryEx, but on Windows CE
-   that is only implemented for DLLs.  Also, base addresses are
-   restricted to the process slot, but we want to load at high
-   addresses.  */
-  TRACE ("MyLoadLibraryExW (\"%S\", 0x%p, 0x%x)\n", libnameW, hfile, flags);
-  if (!libnameW)
-    {
-      SetLastError(ERROR_INVALID_PARAMETER);
-      return 0;
-    }
-  return load_library( libnameW, flags );
-}
+/* From wine1.2-1.1.42/dlls/kernel32/module.c  */\r
+\r
+/*\r
+ * Modules\r
+ *\r
+ * Copyright 1995 Alexandre Julliard\r
+ * Copyright 2010 g10 Code GmbH\r
+ *\r
+ * This library is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU Lesser General Public\r
+ * License as published by the Free Software Foundation; either\r
+ * version 2.1 of the License, or (at your option) any later version.\r
+ *\r
+ * This library is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * Lesser General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
+\r
+\r
+#include "wine.h"\r
+#include "kernel32_kernel_private.h"\r
+\r
+\r
+void MODULE_get_binary_info (HANDLE hfile, struct binary_info *info)\r
+{\r
+  union\r
+  {\r
+    IMAGE_DOS_HEADER mz;\r
+  } header;\r
+  \r
+  DWORD len;\r
+\r
+  memset( info, 0, sizeof(*info) );\r
+  /* Seek to the start of the file and read the header information. */\r
+  if (SetFilePointer( hfile, 0, NULL, SEEK_SET ) == -1) return;\r
+  if (!ReadFile( hfile, &header, sizeof(header), &len, NULL ) || len != sizeof(header)) return;\r
+  \r
+  if (header.mz.e_magic == IMAGE_DOS_SIGNATURE)\r
+    {\r
+      union\r
+      {\r
+       IMAGE_OS2_HEADER os2;\r
+       IMAGE_NT_HEADERS32 nt;\r
+      } ext_header;\r
+      \r
+      /* We do have a DOS image so we will now try to seek into\r
+       * the file by the amount indicated by the field\r
+       * "Offset to extended header" and read in the\r
+       * "magic" field information at that location.\r
+       * This will tell us if there is more header information\r
+       * to read or not.\r
+       */\r
+      info->type = BINARY_DOS;\r
+      if (SetFilePointer( hfile, header.mz.e_lfanew, NULL, SEEK_SET ) == -1) return;\r
+      if (!ReadFile( hfile, &ext_header, sizeof(ext_header), &len, NULL ) || len < 4) return;\r
+      \r
+      /* Reading the magic field succeeded so\r
+       * we will try to determine what type it is.\r
+       */\r
+      if (!memcmp( &ext_header.nt.Signature, "PE\0\0", 4 ))\r
+        {\r
+         if (len >= sizeof(ext_header.nt.FileHeader))\r
+            {\r
+             info->type = BINARY_PE;\r
+             if (ext_header.nt.FileHeader.Characteristics & IMAGE_FILE_DLL)\r
+               info->flags |= BINARY_FLAG_DLL;\r
+             if (len < sizeof(ext_header.nt))  /* clear remaining part of header if missing */\r
+               memset( (char *)&ext_header.nt + len, 0, sizeof(ext_header.nt) - len );\r
+             switch (ext_header.nt.OptionalHeader.Magic)\r
+                {\r
+                case IMAGE_NT_OPTIONAL_HDR32_MAGIC:\r
+                 info->res_start = (void *)(ULONG_PTR)ext_header.nt.OptionalHeader.ImageBase;\r
+                 info->res_end = (void *)((ULONG_PTR)ext_header.nt.OptionalHeader.ImageBase +\r
+                                          ext_header.nt.OptionalHeader.SizeOfImage);\r
+                 break;\r
+                case IMAGE_NT_OPTIONAL_HDR64_MAGIC:\r
+                 info->flags |= BINARY_FLAG_64BIT;\r
+                 break;\r
+                } \r
+\r
+             info->machine = ext_header.nt.FileHeader.Machine;\r
+           }\r
+        }\r
+    }\r
+}\r
+\r
+\f\r
+static HMODULE load_library( LPCWSTR libname, DWORD flags )\r
+{\r
+  NTSTATUS nts;\r
+  HMODULE hModule;\r
+\r
+  /* We don't use any special DLL load path.  */\r
+\r
+  if (flags & LOAD_LIBRARY_AS_DATAFILE)\r
+    {\r
+      SetLastError(ERROR_INVALID_PARAMETER);\r
+      return NULL;\r
+    }\r
+\r
+  nts = MyLdrLoadDll( NULL, flags, libname, &hModule );\r
+  if (nts != STATUS_SUCCESS)\r
+    {\r
+      hModule = 0;\r
+      SetLastError( MyRtlNtStatusToDosError( nts ) );\r
+    }\r
+  return hModule;\r
+}\r
+\r
+\r
+HMODULE MyLoadLibraryExW(LPCWSTR libnameW, HANDLE hfile, DWORD flags)\r
+{\r
+/* We would like to use the native LoadLibraryEx, but on Windows CE\r
+   that is only implemented for DLLs.  Also, base addresses are\r
+   restricted to the process slot, but we want to load at high\r
+   addresses.  */\r
+  TRACE ("MyLoadLibraryExW (\"%S\", 0x%p, 0x%x)\n", libnameW, hfile, flags);\r
+  if (!libnameW)\r
+    {\r
+      SetLastError(ERROR_INVALID_PARAMETER);\r
+      return 0;\r
+    }\r
+  return load_library( libnameW, flags );\r
+}\r
index 2cf601c..d5ea8b2 100644 (file)
-/* From wine1.2-1.1.42/dlls/kernel32/process.c  */
-
-/*
- * Win32 processes
- *
- * Copyright 1996, 1998 Alexandre Julliard
- * Copyright 2010 g10 Code GmbH
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include <windef.h>
-#include "himemce.h"
-#include "kernel32_kernel_private.h"
-
-\f
-typedef int (APIENTRY *ENTRY_POINT) (HINSTANCE hInstance,
-                                    HINSTANCE hPrevInstance,
-                                    LPWSTR lpCmdLine, int nCmdShow);
-
-static BOOL start_process( PEB *peb )
-{
-  IMAGE_NT_HEADERS *nt;
-  ENTRY_POINT entry;
-  
-  nt = MyRtlImageNtHeader( peb->ImageBaseAddress );
-  entry = (ENTRY_POINT)((char *)peb->ImageBaseAddress +
-                       nt->OptionalHeader.AddressOfEntryPoint);
-  
-  if (!nt->OptionalHeader.AddressOfEntryPoint)
-    {
-      ERR( "%S doesn't have an entry point, it cannot be executed\n",
-            peb->ImagePathName );
-      SetLastError (ERROR_BAD_EXE_FORMAT);
-      return FALSE;
-    }
-
-  TRACE( "Starting process %S (entryproc=%p)\n",
-        peb->ImagePathName, entry );
-
-  SetLastError( 0 );  /* clear error code */
-  peb->ExitStatus = entry (GetModuleHandle (NULL), NULL, peb->CommandLine, 0);
-
-  return 0;
-}
-
-
-static BOOL __wine_kernel_init (HANDLE hFile, LPCWSTR main_exe_name,
-                               LPWSTR cmd_line, int *exit_code)
-{
-  PEB *peb = current_peb();
-
-  peb->CommandLine = cmd_line;
-  peb->ImageBaseAddress = MyLoadLibraryExW( main_exe_name, 0,
-                                           DONT_RESOLVE_DLL_REFERENCES );
-
-  if (! peb->ImageBaseAddress)
-    {
-      ERR ("can not load %S: %i\n", main_exe_name, GetLastError());
-      return FALSE;
-    }
-
-  /* FIXME: Error checking?  */
-  MyLdrInitializeThunk( start_process, 0, 0, 0 );
-
-  *exit_code = peb->ExitStatus;
-  return TRUE;
-}
-
-
-static HANDLE open_exe_file (LPCWSTR name, struct binary_info *binary_info)
-{
-  HANDLE handle;
-  
-  handle = CreateFileForMappingW( name, GENERIC_READ, FILE_SHARE_READ,
-                                 NULL, OPEN_EXISTING, 0, 0 );
-  if (handle != INVALID_HANDLE_VALUE)
-    MODULE_get_binary_info( handle, binary_info );
-  
-  return handle;
-}
-
-
-BOOL MyCreateProcessW (LPCWSTR app_name, LPWSTR cmd_line,
-                      int *exit_code)
-{
-  BOOL retv = FALSE;
-  HANDLE hFile = 0;
-  struct binary_info binary_info;
-  
-  hFile = open_exe_file (app_name, &binary_info);
-  if (hFile == INVALID_HANDLE_VALUE)
-    {
-      ERR ("could not open file %S: %i\n", app_name, GetLastError());
-      goto err;
-    }
-  
-  TRACE ("MyCreateProcessW: 0x%p type=0x%x flags=0x%x "
-        "res_start=0x%p res_end=0x%p\n",
-        hFile, binary_info.type, binary_info.flags,
-        binary_info.res_start, binary_info.res_end);
-
-  /* Some sanity checks.  */
-  if (binary_info.flags & BINARY_FLAG_DLL)
-    {
-      ERR ("not starting %S since it is a DLL\n", app_name);
-      SetLastError( ERROR_BAD_EXE_FORMAT );
-      goto err;
-    }
-
-  if (binary_info.flags & BINARY_FLAG_64BIT)
-    {
-      ERR( "starting 64-bit process %S not supported on this platform\n",
-          app_name);
-      SetLastError( ERROR_BAD_EXE_FORMAT );
-      return FALSE;
-    }
-
-  if (binary_info.type != BINARY_PE)
-    {
-      ERR ("not starting %S of type %i (expected %i)\n", app_name,
-          binary_info.type, BINARY_PE);
-      SetLastError( ERROR_BAD_EXE_FORMAT );
-      return FALSE;
-    }
-
-  retv = __wine_kernel_init (hFile, app_name, cmd_line, exit_code);
-
- err:
-  if (hFile)
-    CloseHandle( hFile );
-  
-  return retv;
-}
-
+/* From wine1.2-1.1.42/dlls/kernel32/process.c  */\r
+\r
+/*\r
+ * Win32 processes\r
+ *\r
+ * Copyright 1996, 1998 Alexandre Julliard\r
+ * Copyright 2010 g10 Code GmbH\r
+ *\r
+ * This library is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU Lesser General Public\r
+ * License as published by the Free Software Foundation; either\r
+ * version 2.1 of the License, or (at your option) any later version.\r
+ *\r
+ * This library is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * Lesser General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
+\r
+#include <windef.h>\r
+#include "wine.h"\r
+#include "kernel32_kernel_private.h"\r
+\r
+\f\r
+typedef int (APIENTRY *ENTRY_POINT) (HINSTANCE hInstance,\r
+                                    HINSTANCE hPrevInstance,\r
+                                    LPWSTR lpCmdLine, int nCmdShow);\r
+\r
+static BOOL start_process( PEB *peb )\r
+{\r
+  IMAGE_NT_HEADERS *nt;\r
+  ENTRY_POINT entry;\r
+  \r
+  nt = MyRtlImageNtHeader( peb->ImageBaseAddress );\r
+  entry = (ENTRY_POINT)((char *)peb->ImageBaseAddress +\r
+                       nt->OptionalHeader.AddressOfEntryPoint);\r
+  \r
+  if (!nt->OptionalHeader.AddressOfEntryPoint)\r
+    {\r
+      ERR( "%S doesn't have an entry point, it cannot be executed\n",\r
+            peb->ImagePathName );\r
+      SetLastError (ERROR_BAD_EXE_FORMAT);\r
+      return FALSE;\r
+    }\r
+\r
+  TRACE( "Starting process %S (entryproc=%p)\n",\r
+        peb->ImagePathName, entry );\r
+\r
+  SetLastError( 0 );  /* clear error code */\r
+  peb->ExitStatus = entry (GetModuleHandle (NULL), NULL, peb->CommandLine, 0);\r
+\r
+  return 0;\r
+}\r
+\r
+\r
+static BOOL __wine_kernel_init (HANDLE hFile, LPCWSTR main_exe_name,\r
+                               LPWSTR cmd_line, int *exit_code)\r
+{\r
+  PEB *peb = current_peb();\r
+\r
+  peb->CommandLine = cmd_line;\r
+  peb->ImageBaseAddress = MyLoadLibraryExW( main_exe_name, 0,\r
+                                           DONT_RESOLVE_DLL_REFERENCES );\r
+\r
+  if (! peb->ImageBaseAddress)\r
+    {\r
+      ERR ("can not load %S: %i\n", main_exe_name, GetLastError());\r
+      return FALSE;\r
+    }\r
+\r
+  /* FIXME: Error checking?  */\r
+  MyLdrInitializeThunk( start_process, 0, 0, 0 );\r
+\r
+  *exit_code = peb->ExitStatus;\r
+  return TRUE;\r
+}\r
+\r
+\r
+static HANDLE open_exe_file (LPCWSTR name, struct binary_info *binary_info)\r
+{\r
+  HANDLE handle;\r
+  \r
+  handle = CreateFileForMappingW( name, GENERIC_READ, FILE_SHARE_READ,\r
+                                 NULL, OPEN_EXISTING, 0, 0 );\r
+  if (handle != INVALID_HANDLE_VALUE)\r
+    MODULE_get_binary_info( handle, binary_info );\r
+  \r
+  return handle;\r
+}\r
+\r
+\r
+BOOL MyCreateProcessW (LPCWSTR app_name, LPWSTR cmd_line,\r
+                      int *exit_code)\r
+{\r
+  BOOL retv = FALSE;\r
+  HANDLE hFile = 0;\r
+  struct binary_info binary_info;\r
+  \r
+  hFile = open_exe_file (app_name, &binary_info);\r
+  if (hFile == INVALID_HANDLE_VALUE)\r
+    {\r
+      ERR ("could not open file %S: %i\n", app_name, GetLastError());\r
+      goto err;\r
+    }\r
+  \r
+  TRACE ("MyCreateProcessW: 0x%p type=0x%x flags=0x%x "\r
+        "res_start=0x%p res_end=0x%p\n",\r
+        hFile, binary_info.type, binary_info.flags,\r
+        binary_info.res_start, binary_info.res_end);\r
+\r
+  /* Some sanity checks.  */\r
+  if (binary_info.flags & BINARY_FLAG_DLL)\r
+    {\r
+      ERR ("not starting %S since it is a DLL\n", app_name);\r
+      SetLastError( ERROR_BAD_EXE_FORMAT );\r
+      goto err;\r
+    }\r
+\r
+  if (binary_info.flags & BINARY_FLAG_64BIT)\r
+    {\r
+      ERR( "starting 64-bit process %S not supported on this platform\n",\r
+          app_name);\r
+      SetLastError( ERROR_BAD_EXE_FORMAT );\r
+      return FALSE;\r
+    }\r
+\r
+  if (binary_info.type != BINARY_PE)\r
+    {\r
+      ERR ("not starting %S of type %i (expected %i)\n", app_name,\r
+          binary_info.type, BINARY_PE);\r
+      SetLastError( ERROR_BAD_EXE_FORMAT );\r
+      return FALSE;\r
+    }\r
+\r
+  retv = __wine_kernel_init (hFile, app_name, cmd_line, exit_code);\r
+\r
+ err:\r
+  if (hFile)\r
+    CloseHandle( hFile );\r
+  \r
+  return retv;\r
+}\r
+\r
index f4794ae..8fc5beb 100644 (file)
-/* From wine1.2-1.1.42/dlls/ntdll/error.c  */
-
-/*
- * NTDLL error handling
- *
- * Copyright 2000 Alexandre Julliard
- * Copyright 2002 Andriy Palamarchuk
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-
-#include "himemce.h"
-
-
-struct error_table
-{
-    DWORD       start;
-    DWORD       end;
-    const DWORD *table;
-};
-
-static const struct error_table error_table[20];
-
-/**************************************************************************
- *           RtlNtStatusToDosErrorNoTeb (NTDLL.@)
- *
- * Convert an NTSTATUS code to a Win32 error code.
- *
- * PARAMS
- *  status [I] Nt error code to map.
- *
- * RETURNS
- *  The mapped Win32 error code, or ERROR_MR_MID_NOT_FOUND if there is no
- *  mapping defined.
- */
-static ULONG WINAPI MyRtlNtStatusToDosErrorNoTeb( NTSTATUS status )
-{
-    const struct error_table *table = error_table;
-
-    if (!status || (status & 0x20000000)) return status;
-
-    /* 0xd... is equivalent to 0xc... */
-    if ((status & 0xf0000000) == 0xd0000000) status &= ~0x10000000;
-
-    while (table->start)
-    {
-        if ((DWORD)status < table->start) break;
-        if ((DWORD)status < table->end)
-        {
-            DWORD ret = table->table[status - table->start];
-            /* unknown entries are 0 */
-            if (!ret) goto no_mapping;
-            return ret;
-        }
-        table++;
-    }
-
-    /* now some special cases */
-    if (HIWORD(status) == 0xc001) return LOWORD(status);
-    if (HIWORD(status) == 0x8007) return LOWORD(status);
-
-no_mapping:
-    TRACE( "no mapping for %08x\n", status );
-    return ERROR_MR_MID_NOT_FOUND;
-}
-
-/**************************************************************************
- *           RtlNtStatusToDosError (NTDLL.@)
- *
- * Convert an NTSTATUS code to a Win32 error code.
- *
- * PARAMS
- *  status [I] Nt error code to map.
- *
- * RETURNS
- *  The mapped Win32 error code, or ERROR_MR_MID_NOT_FOUND if there is no
- *  mapping defined.
- */
-ULONG WINAPI MyRtlNtStatusToDosError( NTSTATUS status )
-{
-    return MyRtlNtStatusToDosErrorNoTeb( status );
-}
-
-/* conversion tables */
-
-static const DWORD table_00000102[32] =
-{
-   ERROR_TIMEOUT,                          /* 00000102 (STATUS_TIMEOUT) */
-   ERROR_IO_PENDING,                       /* 00000103 (STATUS_PENDING) */
-   0,                                      /* 00000104 (STATUS_REPARSE) */
-   ERROR_MORE_DATA,                        /* 00000105 (STATUS_MORE_ENTRIES) */
-   ERROR_NOT_ALL_ASSIGNED,                 /* 00000106 (STATUS_NOT_ALL_ASSIGNED) */
-   ERROR_SOME_NOT_MAPPED,                  /* 00000107 (STATUS_SOME_NOT_MAPPED) */
-   0,                                      /* 00000108 (STATUS_OPLOCK_BREAK_IN_PROGRESS) */
-   0,                                      /* 00000109 (STATUS_VOLUME_MOUNTED) */
-   0,                                      /* 0000010a (STATUS_RXACT_COMMITTED) */
-   0,                                      /* 0000010b (STATUS_NOTIFY_CLEANUP) */
-   ERROR_NOTIFY_ENUM_DIR,                  /* 0000010c (STATUS_NOTIFY_ENUM_DIR) */
-   ERROR_NO_QUOTAS_FOR_ACCOUNT,            /* 0000010d (STATUS_NO_QUOTAS_FOR_ACCOUNT) */
-   0,                                      /* 0000010e (STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED) */
-   0,                                      /* 0000010f */
-   0,                                      /* 00000110 (STATUS_PAGE_FAULT_TRANSITION) */
-   0,                                      /* 00000111 (STATUS_PAGE_FAULT_DEMAND_ZERO) */
-   0,                                      /* 00000112 (STATUS_PAGE_FAULT_COPY_ON_WRITE) */
-   0,                                      /* 00000113 (STATUS_PAGE_FAULT_GUARD_PAGE) */
-   0,                                      /* 00000114 (STATUS_PAGE_FAULT_PAGING_FILE) */
-   0,                                      /* 00000115 (STATUS_CACHE_PAGE_LOCKED) */
-   0,                                      /* 00000116 (STATUS_CRASH_DUMP) */
-   0,                                      /* 00000117 (STATUS_BUFFER_ALL_ZEROS) */
-   0,                                      /* 00000118 (STATUS_REPARSE_OBJECT) */
-   0,                                      /* 00000119 (STATUS_RESOURCE_REQUIREMENTS_CHANGED) */
-   0,                                      /* 0000011a */
-   0,                                      /* 0000011b */
-   0,                                      /* 0000011c */
-   0,                                      /* 0000011d */
-   0,                                      /* 0000011e */
-   0,                                      /* 0000011f */
-   0,                                      /* 00000120 (STATUS_TRANSLATION_COMPLETE) */
-   ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY   /* 00000121 (STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY) */
-};
-
-static const DWORD table_40000002[12] =
-{
-   ERROR_INVALID_PARAMETER,                /* 40000002 (STATUS_WORKING_SET_LIMIT_RANGE) */
-   0,                                      /* 40000003 (STATUS_IMAGE_NOT_AT_BASE) */
-   0,                                      /* 40000004 (STATUS_RXACT_STATE_CREATED) */
-   0,                                      /* 40000005 (STATUS_SEGMENT_NOTIFICATION) */
-   ERROR_LOCAL_USER_SESSION_KEY,           /* 40000006 (STATUS_LOCAL_USER_SESSION_KEY) */
-   0,                                      /* 40000007 (STATUS_BAD_CURRENT_DIRECTORY) */
-   ERROR_MORE_WRITES,                      /* 40000008 (STATUS_SERIAL_MORE_WRITES) */
-   ERROR_REGISTRY_RECOVERED,               /* 40000009 (STATUS_REGISTRY_RECOVERED) */
-   0,                                      /* 4000000a (STATUS_FT_READ_RECOVERY_FROM_BACKUP) */
-   0,                                      /* 4000000b (STATUS_FT_WRITE_RECOVERY) */
-   ERROR_COUNTER_TIMEOUT,                  /* 4000000c (STATUS_SERIAL_COUNTER_TIMEOUT) */
-   ERROR_NULL_LM_PASSWORD                  /* 4000000d (STATUS_NULL_LM_PASSWORD) */
-};
-
-static const DWORD table_40000370[1] =
-{
-   ERROR_DS_SHUTTING_DOWN                  /* 40000370 (STATUS_DS_SHUTTING_DOWN) */
-};
-
-static const DWORD table_40020056[1] =
-{
-   RPC_S_UUID_LOCAL_ONLY                   /* 40020056 (RPC_NT_UUID_LOCAL_ONLY) */
-};
-
-static const DWORD table_400200af[1] =
-{
-   RPC_S_SEND_INCOMPLETE                   /* 400200af (RPC_NT_SEND_INCOMPLETE) */
-};
-static const DWORD table_80000001[39] =
-{
-   STATUS_GUARD_PAGE_VIOLATION,            /* 80000001 (STATUS_GUARD_PAGE_VIOLATION) */
-   ERROR_NOACCESS,                         /* 80000002 (STATUS_DATATYPE_MISALIGNMENT) */
-   STATUS_BREAKPOINT,                      /* 80000003 (STATUS_BREAKPOINT) */
-   STATUS_SINGLE_STEP,                     /* 80000004 (STATUS_SINGLE_STEP) */
-   ERROR_MORE_DATA,                        /* 80000005 (STATUS_BUFFER_OVERFLOW) */
-   ERROR_NO_MORE_FILES,                    /* 80000006 (STATUS_NO_MORE_FILES) */
-   0,                                      /* 80000007 (STATUS_WAKE_SYSTEM_DEBUGGER) */
-   0,                                      /* 80000008 */
-   0,                                      /* 80000009 */
-   0, //ERROR_HANDLES_CLOSED,                   /* 8000000a (STATUS_HANDLES_CLOSED) */
-   ERROR_NO_INHERITANCE,                   /* 8000000b (STATUS_NO_INHERITANCE) */
-   0,                                      /* 8000000c (STATUS_GUID_SUBSTITUTION_MADE) */
-   ERROR_PARTIAL_COPY,                     /* 8000000d (STATUS_PARTIAL_COPY) */
-   ERROR_OUT_OF_PAPER,                     /* 8000000e (STATUS_DEVICE_PAPER_EMPTY) */
-   ERROR_NOT_READY,                        /* 8000000f (STATUS_DEVICE_POWERED_OFF) */
-   ERROR_NOT_READY,                        /* 80000010 (STATUS_DEVICE_OFF_LINE) */
-   ERROR_BUSY,                             /* 80000011 (STATUS_DEVICE_BUSY) */
-   ERROR_NO_MORE_ITEMS,                    /* 80000012 (STATUS_NO_MORE_EAS) */
-   ERROR_INVALID_EA_NAME,                  /* 80000013 (STATUS_INVALID_EA_NAME) */
-   ERROR_EA_LIST_INCONSISTENT,             /* 80000014 (STATUS_EA_LIST_INCONSISTENT) */
-   ERROR_EA_LIST_INCONSISTENT,             /* 80000015 (STATUS_INVALID_EA_FLAG) */
-   ERROR_MEDIA_CHANGED,                    /* 80000016 (STATUS_VERIFY_REQUIRED) */
-   0,                                      /* 80000017 (STATUS_EXTRANEOUS_INFORMATION) */
-   0,                                      /* 80000018 (STATUS_RXACT_COMMIT_NECESSARY) */
-   0,                                      /* 80000019 */
-   ERROR_NO_MORE_ITEMS,                    /* 8000001a (STATUS_NO_MORE_ENTRIES) */
-   ERROR_FILEMARK_DETECTED,                /* 8000001b (STATUS_FILEMARK_DETECTED) */
-   ERROR_MEDIA_CHANGED,                    /* 8000001c (STATUS_MEDIA_CHANGED) */
-   ERROR_BUS_RESET,                        /* 8000001d (STATUS_BUS_RESET) */
-   ERROR_END_OF_MEDIA,                     /* 8000001e (STATUS_END_OF_MEDIA) */
-   ERROR_BEGINNING_OF_MEDIA,               /* 8000001f (STATUS_BEGINNING_OF_MEDIA) */
-   0,                                      /* 80000020 (STATUS_MEDIA_CHECK) */
-   ERROR_SETMARK_DETECTED,                 /* 80000021 (STATUS_SETMARK_DETECTED) */
-   ERROR_NO_DATA_DETECTED,                 /* 80000022 (STATUS_NO_DATA_DETECTED) */
-   0,                                      /* 80000023 (STATUS_REDIRECTOR_HAS_OPEN_HANDLES) */
-   0,                                      /* 80000024 (STATUS_SERVER_HAS_OPEN_HANDLES) */
-   ERROR_ACTIVE_CONNECTIONS,               /* 80000025 (STATUS_ALREADY_DISCONNECTED) */
-   0,                                      /* 80000026 (STATUS_LONGJUMP) */
-   ERROR_CLEANER_CARTRIDGE_INSTALLED       /* 80000027 (STATUS_CLEANER_CARTRIDGE_INSTALLED) */
-};
-
-static const DWORD table_80000288[2] =
-{
-   ERROR_DEVICE_REQUIRES_CLEANING,         /* 80000288 (STATUS_DEVICE_REQUIRES_CLEANING) */
-   ERROR_DEVICE_DOOR_OPEN                  /* 80000289 (STATUS_DEVICE_DOOR_OPEN) */
-};
-
-static const DWORD table_80090300[72] =
-{
-   ERROR_NO_SYSTEM_RESOURCES,              /* 80090300 (SEC_E_INSUFFICIENT_MEMORY) */
-   ERROR_INVALID_HANDLE,                   /* 80090301 (SEC_E_INVALID_HANDLE) */
-   ERROR_INVALID_FUNCTION,                 /* 80090302 (SEC_E_UNSUPPORTED_FUNCTION) */
-   ERROR_BAD_NETPATH,                      /* 80090303 (SEC_E_TARGET_UNKNOWN) */
-   ERROR_INTERNAL_ERROR,                   /* 80090304 (SEC_E_INTERNAL_ERROR) */
-   ERROR_NO_SUCH_PACKAGE,                  /* 80090305 (SEC_E_SECPKG_NOT_FOUND) */
-   ERROR_NOT_OWNER,                        /* 80090306 (SEC_E_NOT_OWNER) */
-   ERROR_NO_SUCH_PACKAGE,                  /* 80090307 (SEC_E_CANNOT_INSTALL) */
-   ERROR_INVALID_PARAMETER,                /* 80090308 (SEC_E_INVALID_TOKEN) */
-   ERROR_INVALID_PARAMETER,                /* 80090309 (SEC_E_CANNOT_PACK) */
-   ERROR_NOT_SUPPORTED,                    /* 8009030a (SEC_E_QOP_NOT_SUPPORTED) */
-   ERROR_CANNOT_IMPERSONATE,               /* 8009030b (SEC_E_NO_IMPERSONATION) */
-   ERROR_LOGON_FAILURE,                    /* 8009030c (SEC_E_LOGON_DENIED) */
-   ERROR_INVALID_PARAMETER,                /* 8009030d (SEC_E_UNKNOWN_CREDENTIALS) */
-   ERROR_NO_SUCH_LOGON_SESSION,            /* 8009030e (SEC_E_NO_CREDENTIALS) */
-   ERROR_ACCESS_DENIED,                    /* 8009030f (SEC_E_MESSAGE_ALTERED) */
-   ERROR_ACCESS_DENIED,                    /* 80090310 (SEC_E_OUT_OF_SEQUENCE) */
-   ERROR_NO_LOGON_SERVERS,                 /* 80090311 (SEC_E_NO_AUTHENTICATING_AUTHORITY) */
-   0,                                      /* 80090312 */
-   0,                                      /* 80090313 */
-   0,                                      /* 80090314 */
-   0,                                      /* 80090315 */
-   ERROR_NO_SUCH_PACKAGE,                  /* 80090316 (SEC_E_BAD_PKGID) */
-   ERROR_CONTEXT_EXPIRED,                  /* 80090317 (SEC_E_CONTEXT_EXPIRED) */
-   ERROR_INVALID_USER_BUFFER,              /* 80090318 (SEC_E_INCOMPLETE_MESSAGE) */
-   0,                                      /* 80090319 */
-   0,                                      /* 8009031a */
-   0,                                      /* 8009031b */
-   0,                                      /* 8009031c */
-   0,                                      /* 8009031d */
-   0,                                      /* 8009031e */
-   0,                                      /* 8009031f */
-   ERROR_INVALID_PARAMETER,                /* 80090320 (SEC_E_INCOMPLETE_CREDENTIALS) */
-   ERROR_INSUFFICIENT_BUFFER,              /* 80090321 (SEC_E_BUFFER_TOO_SMALL) */
-   ERROR_WRONG_TARGET_NAME,                /* 80090322 (SEC_E_WRONG_PRINCIPAL) */
-   0,                                      /* 80090323 */
-   0,                                      /* 80090324 (SEC_E_TIME_SKEW) */
-   ERROR_TRUST_FAILURE,                    /* 80090325 (SEC_E_UNTRUSTED_ROOT) */
-   ERROR_INVALID_PARAMETER,                /* 80090326 (SEC_E_ILLEGAL_MESSAGE) */
-   ERROR_INVALID_PARAMETER,                /* 80090327 (SEC_E_CERT_UNKNOWN) */
-   ERROR_PASSWORD_EXPIRED,                 /* 80090328 (SEC_E_CERT_EXPIRED) */
-   ERROR_ENCRYPTION_FAILED,                /* 80090329 (SEC_E_ENCRYPT_FAILURE) */
-   0,                                      /* 8009032a */
-   0,                                      /* 8009032b */
-   0,                                      /* 8009032c */
-   0,                                      /* 8009032d */
-   0,                                      /* 8009032e */
-   0,                                      /* 8009032f */
-   ERROR_DECRYPTION_FAILED,                /* 80090330 (SEC_E_DECRYPT_FAILURE) */
-   ERROR_INVALID_FUNCTION,                 /* 80090331 (SEC_E_ALGORITHM_MISMATCH) */
-   0,                                      /* 80090332 (SEC_E_SECURITY_QOS_FAILED) */
-   0,                                      /* 80090333 (SEC_E_UNFINISHED_CONTEXT_DELETED) */
-   0,                                      /* 80090334 (SEC_E_NO_TGT_REPLY) */
-   0,                                      /* 80090335 (SEC_E_NO_IP_ADDRESSES) */
-   0,                                      /* 80090336 (SEC_E_WRONG_CREDENTIAL_HANDLE) */
-   0,                                      /* 80090337 (SEC_E_CRYPTO_SYSTEM_INVALID) */
-   0,                                      /* 80090338 (SEC_E_MAX_REFERRALS_EXCEEDED) */
-   0,                                      /* 80090339 (SEC_E_MUST_BE_KDC) */
-   0,                                      /* 8009033a (SEC_E_STRONG_CRYPTO_NOT_SUPPORTED) */
-   0,                                      /* 8009033b (SEC_E_TOO_MANY_PRINCIPALS) */
-   0,                                      /* 8009033c (SEC_E_NO_PA_DATA) */
-   0,                                      /* 8009033d (SEC_E_PKINIT_NAME_MISMATCH) */
-   0,                                      /* 8009033e (SEC_E_SMARTCARD_LOGON_REQUIRED) */
-   0,                                      /* 8009033f (SEC_E_SHUTDOWN_IN_PROGRESS) */
-   0,                                      /* 80090340 (SEC_E_KDC_INVALID_REQUEST) */
-   0,                                      /* 80090341 (SEC_E_KDC_UNABLE_TO_REFER) */
-   0,                                      /* 80090342 (SEC_E_KDC_UNKNOWN_ETYPE) */
-   0,                                      /* 80090343 (SEC_E_UNSUPPORTED_PREAUTH) */
-   0,                                      /* 80090344 */
-   0,                                      /* 80090345 (SEC_E_DELEGATION_REQUIRED) */
-   0,                                      /* 80090346 (SEC_E_BAD_BINDINGS) */
-   ERROR_CANNOT_IMPERSONATE                /* 80090347 (SEC_E_MULTIPLE_ACCOUNTS) */
-};
-
-static const DWORD table_80092010[4] =
-{
-    ERROR_MUTUAL_AUTH_FAILED,              /* 80092010 (CRYPT_E_REVOKED) */
-    0,                                     /* 80092011 (CRYPT_E_NO_REVOCATION_DLL) */
-    ERROR_MUTUAL_AUTH_FAILED,              /* 80092012 (CRYPT_E_NO_REVOCATION_CHECK) */
-    ERROR_MUTUAL_AUTH_FAILED               /* 80092013 (CRYPT_E_REVOCATION_OFFLINE) */
-};
-
-static const DWORD table_80096004[1] =
-{
-   ERROR_MUTUAL_AUTH_FAILED                /* 80096004 (TRUST_E_CERT_SIGNATURE) */
-};
-
-static const DWORD table_80130001[5] =
-{
-    ERROR_CLUSTER_NODE_ALREADY_UP,         /* 80130001 (STATUS_CLUSTER_NODE_ALREADY_UP) */
-    ERROR_CLUSTER_NODE_ALREADY_DOWN,       /* 80130002 (STATUS_CLUSTER_NODE_ALREADY_DOWN) */
-    ERROR_CLUSTER_NETWORK_ALREADY_ONLINE,  /* 80130003 (STATUS_CLUSTER_NETWORK_ALREADY_ONLINE) */
-    ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE, /* 80130004 (STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE) */
-    ERROR_CLUSTER_NODE_ALREADY_MEMBER      /* 80130005 (STATUS_CLUSTER_NODE_ALREADY_MEMBER) */
-};
-
-static const DWORD table_c0000001[411] =
-{
-   ERROR_GEN_FAILURE,                      /* c0000001 (STATUS_UNSUCCESSFUL) */
-   ERROR_INVALID_FUNCTION,                 /* c0000002 (STATUS_NOT_IMPLEMENTED) */
-   ERROR_INVALID_PARAMETER,                /* c0000003 (STATUS_INVALID_INFO_CLASS) */
-   ERROR_BAD_LENGTH,                       /* c0000004 (STATUS_INFO_LENGTH_MISMATCH) */
-   ERROR_NOACCESS,                         /* c0000005 (STATUS_ACCESS_VIOLATION) */
-   ERROR_SWAPERROR,                        /* c0000006 (STATUS_IN_PAGE_ERROR) */
-   ERROR_PAGEFILE_QUOTA,                   /* c0000007 (STATUS_PAGEFILE_QUOTA) */
-   ERROR_INVALID_HANDLE,                   /* c0000008 (STATUS_INVALID_HANDLE) */
-   ERROR_STACK_OVERFLOW,                   /* c0000009 (STATUS_BAD_INITIAL_STACK) */
-   ERROR_BAD_EXE_FORMAT,                   /* c000000a (STATUS_BAD_INITIAL_PC) */
-   ERROR_INVALID_PARAMETER,                /* c000000b (STATUS_INVALID_CID) */
-   0,                                      /* c000000c (STATUS_TIMER_NOT_CANCELED) */
-   ERROR_INVALID_PARAMETER,                /* c000000d (STATUS_INVALID_PARAMETER) */
-   ERROR_FILE_NOT_FOUND,                   /* c000000e (STATUS_NO_SUCH_DEVICE) */
-   ERROR_FILE_NOT_FOUND,                   /* c000000f (STATUS_NO_SUCH_FILE) */
-   ERROR_INVALID_FUNCTION,                 /* c0000010 (STATUS_INVALID_DEVICE_REQUEST) */
-   ERROR_HANDLE_EOF,                       /* c0000011 (STATUS_END_OF_FILE) */
-   ERROR_WRONG_DISK,                       /* c0000012 (STATUS_WRONG_VOLUME) */
-   ERROR_NOT_READY,                        /* c0000013 (STATUS_NO_MEDIA_IN_DEVICE) */
-   ERROR_UNRECOGNIZED_MEDIA,               /* c0000014 (STATUS_UNRECOGNIZED_MEDIA) */
-   ERROR_SECTOR_NOT_FOUND,                 /* c0000015 (STATUS_NONEXISTENT_SECTOR) */
-   ERROR_MORE_DATA,                        /* c0000016 (STATUS_MORE_PROCESSING_REQUIRED) */
-   ERROR_NOT_ENOUGH_MEMORY,                /* c0000017 (STATUS_NO_MEMORY) */
-   ERROR_INVALID_ADDRESS,                  /* c0000018 (STATUS_CONFLICTING_ADDRESSES) */
-   ERROR_INVALID_ADDRESS,                  /* c0000019 (STATUS_NOT_MAPPED_VIEW) */
-   ERROR_INVALID_PARAMETER,                /* c000001a (STATUS_UNABLE_TO_FREE_VM) */
-   ERROR_INVALID_PARAMETER,                /* c000001b (STATUS_UNABLE_TO_DELETE_SECTION) */
-   ERROR_INVALID_FUNCTION,                 /* c000001c (STATUS_INVALID_SYSTEM_SERVICE) */
-   ERROR_INVALID_FUNCTION,                 /* c000001d (STATUS_ILLEGAL_INSTRUCTION) */
-   ERROR_ACCESS_DENIED,                    /* c000001e (STATUS_INVALID_LOCK_SEQUENCE) */
-   ERROR_ACCESS_DENIED,                    /* c000001f (STATUS_INVALID_VIEW_SIZE) */
-   ERROR_BAD_EXE_FORMAT,                   /* c0000020 (STATUS_INVALID_FILE_FOR_SECTION) */
-   ERROR_ACCESS_DENIED,                    /* c0000021 (STATUS_ALREADY_COMMITTED) */
-   ERROR_ACCESS_DENIED,                    /* c0000022 (STATUS_ACCESS_DENIED) */
-   ERROR_INSUFFICIENT_BUFFER,              /* c0000023 (STATUS_BUFFER_TOO_SMALL) */
-   ERROR_INVALID_HANDLE,                   /* c0000024 (STATUS_OBJECT_TYPE_MISMATCH) */
-   STATUS_NONCONTINUABLE_EXCEPTION,        /* c0000025 (STATUS_NONCONTINUABLE_EXCEPTION) */
-   STATUS_INVALID_DISPOSITION,             /* c0000026 (STATUS_INVALID_DISPOSITION) */
-   0,                                      /* c0000027 (STATUS_UNWIND) */
-   0,                                      /* c0000028 (STATUS_BAD_STACK) */
-   0,                                      /* c0000029 (STATUS_INVALID_UNWIND_TARGET) */
-   ERROR_NOT_LOCKED,                       /* c000002a (STATUS_NOT_LOCKED) */
-   STATUS_PARITY_ERROR,                    /* c000002b (STATUS_PARITY_ERROR) */
-   ERROR_INVALID_ADDRESS,                  /* c000002c (STATUS_UNABLE_TO_DECOMMIT_VM) */
-   ERROR_INVALID_ADDRESS,                  /* c000002d (STATUS_NOT_COMMITTED) */
-   0,                                      /* c000002e (STATUS_INVALID_PORT_ATTRIBUTES) */
-   0,                                      /* c000002f (STATUS_PORT_MESSAGE_TOO_LONG) */
-   ERROR_INVALID_PARAMETER,                /* c0000030 (STATUS_INVALID_PARAMETER_MIX) */
-   0,                                      /* c0000031 (STATUS_INVALID_QUOTA_LOWER) */
-   ERROR_DISK_CORRUPT,                     /* c0000032 (STATUS_DISK_CORRUPT_ERROR) */
-   ERROR_INVALID_NAME,                     /* c0000033 (STATUS_OBJECT_NAME_INVALID) */
-   ERROR_FILE_NOT_FOUND,                   /* c0000034 (STATUS_OBJECT_NAME_NOT_FOUND) */
-   ERROR_ALREADY_EXISTS,                   /* c0000035 (STATUS_OBJECT_NAME_COLLISION) */
-   0,                                      /* c0000036 */
-   ERROR_INVALID_HANDLE,                   /* c0000037 (STATUS_PORT_DISCONNECTED) */
-   0,                                      /* c0000038 (STATUS_DEVICE_ALREADY_ATTACHED) */
-   ERROR_BAD_PATHNAME,                     /* c0000039 (STATUS_OBJECT_PATH_INVALID) */
-   ERROR_PATH_NOT_FOUND,                   /* c000003a (STATUS_OBJECT_PATH_NOT_FOUND) */
-   ERROR_BAD_PATHNAME,                     /* c000003b (STATUS_OBJECT_PATH_SYNTAX_BAD) */
-   ERROR_IO_DEVICE,                        /* c000003c (STATUS_DATA_OVERRUN) */
-   ERROR_IO_DEVICE,                        /* c000003d (STATUS_DATA_LATE_ERROR) */
-   ERROR_CRC,                              /* c000003e (STATUS_DATA_ERROR) */
-   ERROR_CRC,                              /* c000003f (STATUS_CRC_ERROR) */
-   ERROR_NOT_ENOUGH_MEMORY,                /* c0000040 (STATUS_SECTION_TOO_BIG) */
-   ERROR_ACCESS_DENIED,                    /* c0000041 (STATUS_PORT_CONNECTION_REFUSED) */
-   ERROR_INVALID_HANDLE,                   /* c0000042 (STATUS_INVALID_PORT_HANDLE) */
-   ERROR_SHARING_VIOLATION,                /* c0000043 (STATUS_SHARING_VIOLATION) */
-   ERROR_NOT_ENOUGH_QUOTA,                 /* c0000044 (STATUS_QUOTA_EXCEEDED) */
-   ERROR_INVALID_PARAMETER,                /* c0000045 (STATUS_INVALID_PAGE_PROTECTION) */
-   ERROR_NOT_OWNER,                        /* c0000046 (STATUS_MUTANT_NOT_OWNED) */
-   ERROR_TOO_MANY_POSTS,                   /* c0000047 (STATUS_SEMAPHORE_LIMIT_EXCEEDED) */
-   ERROR_INVALID_PARAMETER,                /* c0000048 (STATUS_PORT_ALREADY_SET) */
-   ERROR_INVALID_PARAMETER,                /* c0000049 (STATUS_SECTION_NOT_IMAGE) */
-   ERROR_SIGNAL_REFUSED,                   /* c000004a (STATUS_SUSPEND_COUNT_EXCEEDED) */
-   ERROR_ACCESS_DENIED,                    /* c000004b (STATUS_THREAD_IS_TERMINATING) */
-   ERROR_INVALID_PARAMETER,                /* c000004c (STATUS_BAD_WORKING_SET_LIMIT) */
-   ERROR_INVALID_PARAMETER,                /* c000004d (STATUS_INCOMPATIBLE_FILE_MAP) */
-   ERROR_INVALID_PARAMETER,                /* c000004e (STATUS_SECTION_PROTECTION) */
-   ERROR_EAS_NOT_SUPPORTED,                /* c000004f (STATUS_EAS_NOT_SUPPORTED) */
-   ERROR_EA_LIST_INCONSISTENT,             /* c0000050 (STATUS_EA_TOO_LARGE) */
-   ERROR_FILE_CORRUPT,                     /* c0000051 (STATUS_NONEXISTENT_EA_ENTRY) */
-   ERROR_FILE_CORRUPT,                     /* c0000052 (STATUS_NO_EAS_ON_FILE) */
-   ERROR_FILE_CORRUPT,                     /* c0000053 (STATUS_EA_CORRUPT_ERROR) */
-   ERROR_LOCK_VIOLATION,                   /* c0000054 (STATUS_FILE_LOCK_CONFLICT) */
-   ERROR_LOCK_VIOLATION,                   /* c0000055 (STATUS_LOCK_NOT_GRANTED) */
-   ERROR_ACCESS_DENIED,                    /* c0000056 (STATUS_DELETE_PENDING) */
-   ERROR_NOT_SUPPORTED,                    /* c0000057 (STATUS_CTL_FILE_NOT_SUPPORTED) */
-   ERROR_UNKNOWN_REVISION,                 /* c0000058 (STATUS_UNKNOWN_REVISION) */
-   ERROR_REVISION_MISMATCH,                /* c0000059 (STATUS_REVISION_MISMATCH) */
-   ERROR_INVALID_OWNER,                    /* c000005a (STATUS_INVALID_OWNER) */
-   ERROR_INVALID_PRIMARY_GROUP,            /* c000005b (STATUS_INVALID_PRIMARY_GROUP) */
-   ERROR_NO_IMPERSONATION_TOKEN,           /* c000005c (STATUS_NO_IMPERSONATION_TOKEN) */
-   ERROR_CANT_DISABLE_MANDATORY,           /* c000005d (STATUS_CANT_DISABLE_MANDATORY) */
-   ERROR_NO_LOGON_SERVERS,                 /* c000005e (STATUS_NO_LOGON_SERVERS) */
-   ERROR_NO_SUCH_LOGON_SESSION,            /* c000005f (STATUS_NO_SUCH_LOGON_SESSION) */
-   ERROR_NO_SUCH_PRIVILEGE,                /* c0000060 (STATUS_NO_SUCH_PRIVILEGE) */
-   ERROR_PRIVILEGE_NOT_HELD,               /* c0000061 (STATUS_PRIVILEGE_NOT_HELD) */
-   ERROR_INVALID_ACCOUNT_NAME,             /* c0000062 (STATUS_INVALID_ACCOUNT_NAME) */
-   ERROR_USER_EXISTS,                      /* c0000063 (STATUS_USER_EXISTS) */
-   ERROR_NO_SUCH_USER,                     /* c0000064 (STATUS_NO_SUCH_USER) */
-   ERROR_GROUP_EXISTS,                     /* c0000065 (STATUS_GROUP_EXISTS) */
-   ERROR_NO_SUCH_GROUP,                    /* c0000066 (STATUS_NO_SUCH_GROUP) */
-   ERROR_MEMBER_IN_GROUP,                  /* c0000067 (STATUS_MEMBER_IN_GROUP) */
-   ERROR_MEMBER_NOT_IN_GROUP,              /* c0000068 (STATUS_MEMBER_NOT_IN_GROUP) */
-   ERROR_LAST_ADMIN,                       /* c0000069 (STATUS_LAST_ADMIN) */
-   ERROR_INVALID_PASSWORD,                 /* c000006a (STATUS_WRONG_PASSWORD) */
-   ERROR_ILL_FORMED_PASSWORD,              /* c000006b (STATUS_ILL_FORMED_PASSWORD) */
-   ERROR_PASSWORD_RESTRICTION,             /* c000006c (STATUS_PASSWORD_RESTRICTION) */
-   ERROR_LOGON_FAILURE,                    /* c000006d (STATUS_LOGON_FAILURE) */
-   ERROR_ACCOUNT_RESTRICTION,              /* c000006e (STATUS_ACCOUNT_RESTRICTION) */
-   ERROR_INVALID_LOGON_HOURS,              /* c000006f (STATUS_INVALID_LOGON_HOURS) */
-   ERROR_INVALID_WORKSTATION,              /* c0000070 (STATUS_INVALID_WORKSTATION) */
-   ERROR_PASSWORD_EXPIRED,                 /* c0000071 (STATUS_PASSWORD_EXPIRED) */
-   ERROR_ACCOUNT_DISABLED,                 /* c0000072 (STATUS_ACCOUNT_DISABLED) */
-   ERROR_NONE_MAPPED,                      /* c0000073 (STATUS_NONE_MAPPED) */
-   ERROR_TOO_MANY_LUIDS_REQUESTED,         /* c0000074 (STATUS_TOO_MANY_LUIDS_REQUESTED) */
-   ERROR_LUIDS_EXHAUSTED,                  /* c0000075 (STATUS_LUIDS_EXHAUSTED) */
-   ERROR_INVALID_SUB_AUTHORITY,            /* c0000076 (STATUS_INVALID_SUB_AUTHORITY) */
-   ERROR_INVALID_ACL,                      /* c0000077 (STATUS_INVALID_ACL) */
-   ERROR_INVALID_SID,                      /* c0000078 (STATUS_INVALID_SID) */
-   ERROR_INVALID_SECURITY_DESCR,           /* c0000079 (STATUS_INVALID_SECURITY_DESCR) */
-   ERROR_PROC_NOT_FOUND,                   /* c000007a (STATUS_PROCEDURE_NOT_FOUND) */
-   ERROR_BAD_EXE_FORMAT,                   /* c000007b (STATUS_INVALID_IMAGE_FORMAT) */
-   ERROR_NO_TOKEN,                         /* c000007c (STATUS_NO_TOKEN) */
-   ERROR_BAD_INHERITANCE_ACL,              /* c000007d (STATUS_BAD_INHERITANCE_ACL) */
-   ERROR_NOT_LOCKED,                       /* c000007e (STATUS_RANGE_NOT_LOCKED) */
-   ERROR_DISK_FULL,                        /* c000007f (STATUS_DISK_FULL) */
-   ERROR_SERVER_DISABLED,                  /* c0000080 (STATUS_SERVER_DISABLED) */
-   ERROR_SERVER_NOT_DISABLED,              /* c0000081 (STATUS_SERVER_NOT_DISABLED) */
-   ERROR_TOO_MANY_NAMES,                   /* c0000082 (STATUS_TOO_MANY_GUIDS_REQUESTED) */
-   ERROR_NO_MORE_ITEMS,                    /* c0000083 (STATUS_GUIDS_EXHAUSTED) */
-   ERROR_INVALID_ID_AUTHORITY,             /* c0000084 (STATUS_INVALID_ID_AUTHORITY) */
-   ERROR_NO_MORE_ITEMS,                    /* c0000085 (STATUS_AGENTS_EXHAUSTED) */
-   ERROR_LABEL_TOO_LONG,                   /* c0000086 (STATUS_INVALID_VOLUME_LABEL) */
-   ERROR_OUTOFMEMORY,                      /* c0000087 (STATUS_SECTION_NOT_EXTENDED) */
-   ERROR_INVALID_ADDRESS,                  /* c0000088 (STATUS_NOT_MAPPED_DATA) */
-   ERROR_RESOURCE_DATA_NOT_FOUND,          /* c0000089 (STATUS_RESOURCE_DATA_NOT_FOUND) */
-   ERROR_RESOURCE_TYPE_NOT_FOUND,          /* c000008a (STATUS_RESOURCE_TYPE_NOT_FOUND) */
-   ERROR_RESOURCE_NAME_NOT_FOUND,          /* c000008b (STATUS_RESOURCE_NAME_NOT_FOUND) */
-   STATUS_ARRAY_BOUNDS_EXCEEDED,           /* c000008c (STATUS_ARRAY_BOUNDS_EXCEEDED) */
-   STATUS_FLOAT_DENORMAL_OPERAND,          /* c000008d (STATUS_FLOAT_DENORMAL_OPERAND) */
-   STATUS_FLOAT_DIVIDE_BY_ZERO,            /* c000008e (STATUS_FLOAT_DIVIDE_BY_ZERO) */
-   STATUS_FLOAT_INEXACT_RESULT,            /* c000008f (STATUS_FLOAT_INEXACT_RESULT) */
-   STATUS_FLOAT_INVALID_OPERATION,         /* c0000090 (STATUS_FLOAT_INVALID_OPERATION) */
-   STATUS_FLOAT_OVERFLOW,                  /* c0000091 (STATUS_FLOAT_OVERFLOW) */
-   STATUS_FLOAT_STACK_CHECK,               /* c0000092 (STATUS_FLOAT_STACK_CHECK) */
-   STATUS_FLOAT_UNDERFLOW,                 /* c0000093 (STATUS_FLOAT_UNDERFLOW) */
-   STATUS_INTEGER_DIVIDE_BY_ZERO,          /* c0000094 (STATUS_INTEGER_DIVIDE_BY_ZERO) */
-   ERROR_ARITHMETIC_OVERFLOW,              /* c0000095 (STATUS_INTEGER_OVERFLOW) */
-   STATUS_PRIVILEGED_INSTRUCTION,          /* c0000096 (STATUS_PRIVILEGED_INSTRUCTION) */
-   ERROR_NOT_ENOUGH_MEMORY,                /* c0000097 (STATUS_TOO_MANY_PAGING_FILES) */
-   ERROR_FILE_INVALID,                     /* c0000098 (STATUS_FILE_INVALID) */
-   ERROR_ALLOTTED_SPACE_EXCEEDED,          /* c0000099 (STATUS_ALLOTTED_SPACE_EXCEEDED) */
-   ERROR_NO_SYSTEM_RESOURCES,              /* c000009a (STATUS_INSUFFICIENT_RESOURCES) */
-   ERROR_PATH_NOT_FOUND,                   /* c000009b (STATUS_DFS_EXIT_PATH_FOUND) */
-   ERROR_CRC,                              /* c000009c (STATUS_DEVICE_DATA_ERROR) */
-   ERROR_DEVICE_NOT_CONNECTED,             /* c000009d (STATUS_DEVICE_NOT_CONNECTED) */
-   ERROR_NOT_READY,                        /* c000009e (STATUS_DEVICE_POWER_FAILURE) */
-   ERROR_INVALID_ADDRESS,                  /* c000009f (STATUS_FREE_VM_NOT_AT_BASE) */
-   ERROR_INVALID_ADDRESS,                  /* c00000a0 (STATUS_MEMORY_NOT_ALLOCATED) */
-   ERROR_WORKING_SET_QUOTA,                /* c00000a1 (STATUS_WORKING_SET_QUOTA) */
-   ERROR_WRITE_PROTECT,                    /* c00000a2 (STATUS_MEDIA_WRITE_PROTECTED) */
-   ERROR_NOT_READY,                        /* c00000a3 (STATUS_DEVICE_NOT_READY) */
-   ERROR_INVALID_GROUP_ATTRIBUTES,         /* c00000a4 (STATUS_INVALID_GROUP_ATTRIBUTES) */
-   ERROR_BAD_IMPERSONATION_LEVEL,          /* c00000a5 (STATUS_BAD_IMPERSONATION_LEVEL) */
-   ERROR_CANT_OPEN_ANONYMOUS,              /* c00000a6 (STATUS_CANT_OPEN_ANONYMOUS) */
-   ERROR_BAD_VALIDATION_CLASS,             /* c00000a7 (STATUS_BAD_VALIDATION_CLASS) */
-   ERROR_BAD_TOKEN_TYPE,                   /* c00000a8 (STATUS_BAD_TOKEN_TYPE) */
-   ERROR_INVALID_PARAMETER,                /* c00000a9 (STATUS_BAD_MASTER_BOOT_RECORD) */
-   0,                                      /* c00000aa (STATUS_INSTRUCTION_MISALIGNMENT) */
-   ERROR_PIPE_BUSY,                        /* c00000ab (STATUS_INSTANCE_NOT_AVAILABLE) */
-   ERROR_PIPE_BUSY,                        /* c00000ac (STATUS_PIPE_NOT_AVAILABLE) */
-   ERROR_BAD_PIPE,                         /* c00000ad (STATUS_INVALID_PIPE_STATE) */
-   ERROR_PIPE_BUSY,                        /* c00000ae (STATUS_PIPE_BUSY) */
-   ERROR_INVALID_FUNCTION,                 /* c00000af (STATUS_ILLEGAL_FUNCTION) */
-   ERROR_PIPE_NOT_CONNECTED,               /* c00000b0 (STATUS_PIPE_DISCONNECTED) */
-   ERROR_NO_DATA,                          /* c00000b1 (STATUS_PIPE_CLOSING) */
-   ERROR_PIPE_CONNECTED,                   /* c00000b2 (STATUS_PIPE_CONNECTED) */
-   ERROR_PIPE_LISTENING,                   /* c00000b3 (STATUS_PIPE_LISTENING) */
-   ERROR_BAD_PIPE,                         /* c00000b4 (STATUS_INVALID_READ_MODE) */
-   ERROR_SEM_TIMEOUT,                      /* c00000b5 (STATUS_IO_TIMEOUT) */
-   ERROR_HANDLE_EOF,                       /* c00000b6 (STATUS_FILE_FORCED_CLOSED) */
-   0,                                      /* c00000b7 (STATUS_PROFILING_NOT_STARTED) */
-   0,                                      /* c00000b8 (STATUS_PROFILING_NOT_STOPPED) */
-   0,                                      /* c00000b9 (STATUS_COULD_NOT_INTERPRET) */
-   ERROR_ACCESS_DENIED,                    /* c00000ba (STATUS_FILE_IS_A_DIRECTORY) */
-   ERROR_NOT_SUPPORTED,                    /* c00000bb (STATUS_NOT_SUPPORTED) */
-   ERROR_REM_NOT_LIST,                     /* c00000bc (STATUS_REMOTE_NOT_LISTENING) */
-   ERROR_DUP_NAME,                         /* c00000bd (STATUS_DUPLICATE_NAME) */
-   ERROR_BAD_NETPATH,                      /* c00000be (STATUS_BAD_NETWORK_PATH) */
-   ERROR_NETWORK_BUSY,                     /* c00000bf (STATUS_NETWORK_BUSY) */
-   ERROR_DEV_NOT_EXIST,                    /* c00000c0 (STATUS_DEVICE_DOES_NOT_EXIST) */
-   ERROR_TOO_MANY_CMDS,                    /* c00000c1 (STATUS_TOO_MANY_COMMANDS) */
-   ERROR_ADAP_HDW_ERR,                     /* c00000c2 (STATUS_ADAPTER_HARDWARE_ERROR) */
-   ERROR_BAD_NET_RESP,                     /* c00000c3 (STATUS_INVALID_NETWORK_RESPONSE) */
-   ERROR_UNEXP_NET_ERR,                    /* c00000c4 (STATUS_UNEXPECTED_NETWORK_ERROR) */
-   ERROR_BAD_REM_ADAP,                     /* c00000c5 (STATUS_BAD_REMOTE_ADAPTER) */
-   ERROR_PRINTQ_FULL,                      /* c00000c6 (STATUS_PRINT_QUEUE_FULL) */
-   ERROR_NO_SPOOL_SPACE,                   /* c00000c7 (STATUS_NO_SPOOL_SPACE) */
-   ERROR_PRINT_CANCELLED,                  /* c00000c8 (STATUS_PRINT_CANCELLED) */
-   ERROR_NETNAME_DELETED,                  /* c00000c9 (STATUS_NETWORK_NAME_DELETED) */
-   ERROR_NETWORK_ACCESS_DENIED,            /* c00000ca (STATUS_NETWORK_ACCESS_DENIED) */
-   ERROR_BAD_DEV_TYPE,                     /* c00000cb (STATUS_BAD_DEVICE_TYPE) */
-   ERROR_BAD_NET_NAME,                     /* c00000cc (STATUS_BAD_NETWORK_NAME) */
-   ERROR_TOO_MANY_NAMES,                   /* c00000cd (STATUS_TOO_MANY_NAMES) */
-   ERROR_TOO_MANY_SESS,                    /* c00000ce (STATUS_TOO_MANY_SESSIONS) */
-   ERROR_SHARING_PAUSED,                   /* c00000cf (STATUS_SHARING_PAUSED) */
-   ERROR_REQ_NOT_ACCEP,                    /* c00000d0 (STATUS_REQUEST_NOT_ACCEPTED) */
-   ERROR_REDIR_PAUSED,                     /* c00000d1 (STATUS_REDIRECTOR_PAUSED) */
-   ERROR_NET_WRITE_FAULT,                  /* c00000d2 (STATUS_NET_WRITE_FAULT) */
-   0,                                      /* c00000d3 (STATUS_PROFILING_AT_LIMIT) */
-   ERROR_NOT_SAME_DEVICE,                  /* c00000d4 (STATUS_NOT_SAME_DEVICE) */
-   ERROR_ACCESS_DENIED,                    /* c00000d5 (STATUS_FILE_RENAMED) */
-   ERROR_VC_DISCONNECTED,                  /* c00000d6 (STATUS_VIRTUAL_CIRCUIT_CLOSED) */
-   ERROR_NO_SECURITY_ON_OBJECT,            /* c00000d7 (STATUS_NO_SECURITY_ON_OBJECT) */
-   0,                                      /* c00000d8 (STATUS_CANT_WAIT) */
-   ERROR_NO_DATA,                          /* c00000d9 (STATUS_PIPE_EMPTY) */
-   ERROR_CANT_ACCESS_DOMAIN_INFO,          /* c00000da (STATUS_CANT_ACCESS_DOMAIN_INFO) */
-   0,                                      /* c00000db (STATUS_CANT_TERMINATE_SELF) */
-   ERROR_INVALID_SERVER_STATE,             /* c00000dc (STATUS_INVALID_SERVER_STATE) */
-   ERROR_INVALID_DOMAIN_STATE,             /* c00000dd (STATUS_INVALID_DOMAIN_STATE) */
-   ERROR_INVALID_DOMAIN_ROLE,              /* c00000de (STATUS_INVALID_DOMAIN_ROLE) */
-   ERROR_NO_SUCH_DOMAIN,                   /* c00000df (STATUS_NO_SUCH_DOMAIN) */
-   ERROR_DOMAIN_EXISTS,                    /* c00000e0 (STATUS_DOMAIN_EXISTS) */
-   ERROR_DOMAIN_LIMIT_EXCEEDED,            /* c00000e1 (STATUS_DOMAIN_LIMIT_EXCEEDED) */
-   ERROR_OPLOCK_NOT_GRANTED,               /* c00000e2 (STATUS_OPLOCK_NOT_GRANTED) */
-   ERROR_INVALID_OPLOCK_PROTOCOL,          /* c00000e3 (STATUS_INVALID_OPLOCK_PROTOCOL) */
-   ERROR_INTERNAL_DB_CORRUPTION,           /* c00000e4 (STATUS_INTERNAL_DB_CORRUPTION) */
-   ERROR_INTERNAL_ERROR,                   /* c00000e5 (STATUS_INTERNAL_ERROR) */
-   ERROR_GENERIC_NOT_MAPPED,               /* c00000e6 (STATUS_GENERIC_NOT_MAPPED) */
-   ERROR_BAD_DESCRIPTOR_FORMAT,            /* c00000e7 (STATUS_BAD_DESCRIPTOR_FORMAT) */
-   ERROR_INVALID_USER_BUFFER,              /* c00000e8 (STATUS_INVALID_USER_BUFFER) */
-   0,                                      /* c00000e9 (STATUS_UNEXPECTED_IO_ERROR) */
-   0,                                      /* c00000ea (STATUS_UNEXPECTED_MM_CREATE_ERR) */
-   0,                                      /* c00000eb (STATUS_UNEXPECTED_MM_MAP_ERROR) */
-   0,                                      /* c00000ec (STATUS_UNEXPECTED_MM_EXTEND_ERR) */
-   ERROR_NOT_LOGON_PROCESS,                /* c00000ed (STATUS_NOT_LOGON_PROCESS) */
-   ERROR_LOGON_SESSION_EXISTS,             /* c00000ee (STATUS_LOGON_SESSION_EXISTS) */
-   ERROR_INVALID_PARAMETER,                /* c00000ef (STATUS_INVALID_PARAMETER_1) */
-   ERROR_INVALID_PARAMETER,                /* c00000f0 (STATUS_INVALID_PARAMETER_2) */
-   ERROR_INVALID_PARAMETER,                /* c00000f1 (STATUS_INVALID_PARAMETER_3) */
-   ERROR_INVALID_PARAMETER,                /* c00000f2 (STATUS_INVALID_PARAMETER_4) */
-   ERROR_INVALID_PARAMETER,                /* c00000f3 (STATUS_INVALID_PARAMETER_5) */
-   ERROR_INVALID_PARAMETER,                /* c00000f4 (STATUS_INVALID_PARAMETER_6) */
-   ERROR_INVALID_PARAMETER,                /* c00000f5 (STATUS_INVALID_PARAMETER_7) */
-   ERROR_INVALID_PARAMETER,                /* c00000f6 (STATUS_INVALID_PARAMETER_8) */
-   ERROR_INVALID_PARAMETER,                /* c00000f7 (STATUS_INVALID_PARAMETER_9) */
-   ERROR_INVALID_PARAMETER,                /* c00000f8 (STATUS_INVALID_PARAMETER_10) */
-   ERROR_INVALID_PARAMETER,                /* c00000f9 (STATUS_INVALID_PARAMETER_11) */
-   ERROR_INVALID_PARAMETER,                /* c00000fa (STATUS_INVALID_PARAMETER_12) */
-   ERROR_PATH_NOT_FOUND,                   /* c00000fb (STATUS_REDIRECTOR_NOT_STARTED) */
-   ERROR_SERVICE_ALREADY_RUNNING,          /* c00000fc (STATUS_REDIRECTOR_STARTED) */
-   ERROR_STACK_OVERFLOW,                   /* c00000fd (STATUS_STACK_OVERFLOW) */
-   ERROR_NO_SUCH_PACKAGE,                  /* c00000fe (STATUS_NO_SUCH_PACKAGE) */
-   0,                                      /* c00000ff (STATUS_BAD_FUNCTION_TABLE) */
-   ERROR_ENVVAR_NOT_FOUND,                 /* c0000100 (STATUS_VARIABLE_NOT_FOUND) */
-   ERROR_DIR_NOT_EMPTY,                    /* c0000101 (STATUS_DIRECTORY_NOT_EMPTY) */
-   ERROR_FILE_CORRUPT,                     /* c0000102 (STATUS_FILE_CORRUPT_ERROR) */
-   ERROR_DIRECTORY,                        /* c0000103 (STATUS_NOT_A_DIRECTORY) */
-   ERROR_BAD_LOGON_SESSION_STATE,          /* c0000104 (STATUS_BAD_LOGON_SESSION_STATE) */
-   ERROR_LOGON_SESSION_COLLISION,          /* c0000105 (STATUS_LOGON_SESSION_COLLISION) */
-   ERROR_FILENAME_EXCED_RANGE,             /* c0000106 (STATUS_NAME_TOO_LONG) */
-   ERROR_OPEN_FILES,                       /* c0000107 (STATUS_FILES_OPEN) */
-   ERROR_DEVICE_IN_USE,                    /* c0000108 (STATUS_CONNECTION_IN_USE) */
-   ERROR_MR_MID_NOT_FOUND,                 /* c0000109 (STATUS_MESSAGE_NOT_FOUND) */
-   ERROR_ACCESS_DENIED,                    /* c000010a (STATUS_PROCESS_IS_TERMINATING) */
-   ERROR_INVALID_LOGON_TYPE,               /* c000010b (STATUS_INVALID_LOGON_TYPE) */
-   0,                                      /* c000010c (STATUS_NO_GUID_TRANSLATION) */
-   ERROR_CANNOT_IMPERSONATE,               /* c000010d (STATUS_CANNOT_IMPERSONATE) */
-   ERROR_SERVICE_ALREADY_RUNNING,          /* c000010e (STATUS_IMAGE_ALREADY_LOADED) */
-   0,                                      /* c000010f (STATUS_ABIOS_NOT_PRESENT) */
-   0,                                      /* c0000110 (STATUS_ABIOS_LID_NOT_EXIST) */
-   0,                                      /* c0000111 (STATUS_ABIOS_LID_ALREADY_OWNED) */
-   0,                                      /* c0000112 (STATUS_ABIOS_NOT_LID_OWNER) */
-   0,                                      /* c0000113 (STATUS_ABIOS_INVALID_COMMAND) */
-   0,                                      /* c0000114 (STATUS_ABIOS_INVALID_LID) */
-   0,                                      /* c0000115 (STATUS_ABIOS_SELECTOR_NOT_AVAILABLE) */
-   0,                                      /* c0000116 (STATUS_ABIOS_INVALID_SELECTOR) */
-   ERROR_INVALID_THREAD_ID,                /* c0000117 (STATUS_NO_LDT) */
-   0,                                      /* c0000118 (STATUS_INVALID_LDT_SIZE) */
-   0,                                      /* c0000119 (STATUS_INVALID_LDT_OFFSET) */
-   0,                                      /* c000011a (STATUS_INVALID_LDT_DESCRIPTOR) */
-   ERROR_BAD_EXE_FORMAT,                   /* c000011b (STATUS_INVALID_IMAGE_NE_FORMAT) */
-   ERROR_RXACT_INVALID_STATE,              /* c000011c (STATUS_RXACT_INVALID_STATE) */
-   ERROR_RXACT_COMMIT_FAILURE,             /* c000011d (STATUS_RXACT_COMMIT_FAILURE) */
-   ERROR_FILE_INVALID,                     /* c000011e (STATUS_MAPPED_FILE_SIZE_ZERO) */
-   ERROR_TOO_MANY_OPEN_FILES,              /* c000011f (STATUS_TOO_MANY_OPENED_FILES) */
-   ERROR_OPERATION_ABORTED,                /* c0000120 (STATUS_CANCELLED) */
-   ERROR_ACCESS_DENIED,                    /* c0000121 (STATUS_CANNOT_DELETE) */
-   ERROR_INVALID_COMPUTERNAME,             /* c0000122 (STATUS_INVALID_COMPUTER_NAME) */
-   ERROR_ACCESS_DENIED,                    /* c0000123 (STATUS_FILE_DELETED) */
-   ERROR_SPECIAL_ACCOUNT,                  /* c0000124 (STATUS_SPECIAL_ACCOUNT) */
-   ERROR_SPECIAL_GROUP,                    /* c0000125 (STATUS_SPECIAL_GROUP) */
-   ERROR_SPECIAL_USER,                     /* c0000126 (STATUS_SPECIAL_USER) */
-   ERROR_MEMBERS_PRIMARY_GROUP,            /* c0000127 (STATUS_MEMBERS_PRIMARY_GROUP) */
-   ERROR_INVALID_HANDLE,                   /* c0000128 (STATUS_FILE_CLOSED) */
-   0,                                      /* c0000129 (STATUS_TOO_MANY_THREADS) */
-   0,                                      /* c000012a (STATUS_THREAD_NOT_IN_PROCESS) */
-   ERROR_TOKEN_ALREADY_IN_USE,             /* c000012b (STATUS_TOKEN_ALREADY_IN_USE) */
-   0,                                      /* c000012c (STATUS_PAGEFILE_QUOTA_EXCEEDED) */
-   ERROR_COMMITMENT_LIMIT,                 /* c000012d (STATUS_COMMITMENT_LIMIT) */
-   ERROR_BAD_EXE_FORMAT,                   /* c000012e (STATUS_INVALID_IMAGE_LE_FORMAT) */
-   ERROR_BAD_EXE_FORMAT,                   /* c000012f (STATUS_INVALID_IMAGE_NOT_MZ) */
-   ERROR_BAD_EXE_FORMAT,                   /* c0000130 (STATUS_INVALID_IMAGE_PROTECT) */
-   ERROR_BAD_EXE_FORMAT,                   /* c0000131 (STATUS_INVALID_IMAGE_WIN_16) */
-   0,                                      /* c0000132 (STATUS_LOGON_SERVER_CONFLICT) */
-   ERROR_TIME_SKEW,                        /* c0000133 (STATUS_TIME_DIFFERENCE_AT_DC) */
-   0,                                      /* c0000134 (STATUS_SYNCHRONIZATION_REQUIRED) */
-   ERROR_MOD_NOT_FOUND,                    /* c0000135 (STATUS_DLL_NOT_FOUND) */
-   0,                                      /* c0000136 (STATUS_OPEN_FAILED) */
-   0,                                      /* c0000137 (STATUS_IO_PRIVILEGE_FAILED) */
-   ERROR_INVALID_ORDINAL,                  /* c0000138 (STATUS_ORDINAL_NOT_FOUND) */
-   ERROR_PROC_NOT_FOUND,                   /* c0000139 (STATUS_ENTRYPOINT_NOT_FOUND) */
-   0,                                      /* c000013a (STATUS_CONTROL_C_EXIT) */
-   ERROR_NETNAME_DELETED,                  /* c000013b (STATUS_LOCAL_DISCONNECT) */
-   ERROR_NETNAME_DELETED,                  /* c000013c (STATUS_REMOTE_DISCONNECT) */
-   ERROR_REM_NOT_LIST,                     /* c000013d (STATUS_REMOTE_RESOURCES) */
-   ERROR_UNEXP_NET_ERR,                    /* c000013e (STATUS_LINK_FAILED) */
-   ERROR_UNEXP_NET_ERR,                    /* c000013f (STATUS_LINK_TIMEOUT) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000140 (STATUS_INVALID_CONNECTION) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000141 (STATUS_INVALID_ADDRESS) */
-   ERROR_DLL_INIT_FAILED,                  /* c0000142 (STATUS_DLL_INIT_FAILED) */
-   0,                                      /* c0000143 (STATUS_MISSING_SYSTEMFILE) */
-   0,                                      /* c0000144 (STATUS_UNHANDLED_EXCEPTION) */
-   0,                                      /* c0000145 (STATUS_APP_INIT_FAILURE) */
-   0,                                      /* c0000146 (STATUS_PAGEFILE_CREATE_FAILED) */
-   0,                                      /* c0000147 (STATUS_NO_PAGEFILE) */
-   ERROR_INVALID_LEVEL,                    /* c0000148 (STATUS_INVALID_LEVEL) */
-   ERROR_INVALID_PASSWORD,                 /* c0000149 (STATUS_WRONG_PASSWORD_CORE) */
-   0,                                      /* c000014a (STATUS_ILLEGAL_FLOAT_CONTEXT) */
-   ERROR_BROKEN_PIPE,                      /* c000014b (STATUS_PIPE_BROKEN) */
-   ERROR_BADDB,                            /* c000014c (STATUS_REGISTRY_CORRUPT) */
-   ERROR_REGISTRY_IO_FAILED,               /* c000014d (STATUS_REGISTRY_IO_FAILED) */
-   0,                                      /* c000014e (STATUS_NO_EVENT_PAIR) */
-   ERROR_UNRECOGNIZED_VOLUME,              /* c000014f (STATUS_UNRECOGNIZED_VOLUME) */
-   ERROR_SERIAL_NO_DEVICE,                 /* c0000150 (STATUS_SERIAL_NO_DEVICE_INITED) */
-   ERROR_NO_SUCH_ALIAS,                    /* c0000151 (STATUS_NO_SUCH_ALIAS) */
-   ERROR_MEMBER_NOT_IN_ALIAS,              /* c0000152 (STATUS_MEMBER_NOT_IN_ALIAS) */
-   ERROR_MEMBER_IN_ALIAS,                  /* c0000153 (STATUS_MEMBER_IN_ALIAS) */
-   ERROR_ALIAS_EXISTS,                     /* c0000154 (STATUS_ALIAS_EXISTS) */
-   ERROR_LOGON_NOT_GRANTED,                /* c0000155 (STATUS_LOGON_NOT_GRANTED) */
-   ERROR_TOO_MANY_SECRETS,                 /* c0000156 (STATUS_TOO_MANY_SECRETS) */
-   ERROR_SECRET_TOO_LONG,                  /* c0000157 (STATUS_SECRET_TOO_LONG) */
-   ERROR_INTERNAL_DB_ERROR,                /* c0000158 (STATUS_INTERNAL_DB_ERROR) */
-   ERROR_FULLSCREEN_MODE,                  /* c0000159 (STATUS_FULLSCREEN_MODE) */
-   ERROR_TOO_MANY_CONTEXT_IDS,             /* c000015a (STATUS_TOO_MANY_CONTEXT_IDS) */
-   ERROR_LOGON_TYPE_NOT_GRANTED,           /* c000015b (STATUS_LOGON_TYPE_NOT_GRANTED) */
-   ERROR_NOT_REGISTRY_FILE,                /* c000015c (STATUS_NOT_REGISTRY_FILE) */
-   ERROR_NT_CROSS_ENCRYPTION_REQUIRED,     /* c000015d (STATUS_NT_CROSS_ENCRYPTION_REQUIRED) */
-   0,                                      /* c000015e (STATUS_DOMAIN_CTRLR_CONFIG_ERROR) */
-   ERROR_IO_DEVICE,                        /* c000015f (STATUS_FT_MISSING_MEMBER) */
-   0,                                      /* c0000160 (STATUS_ILL_FORMED_SERVICE_ENTRY) */
-   0,                                      /* c0000161 (STATUS_ILLEGAL_CHARACTER) */
-   ERROR_NO_UNICODE_TRANSLATION,           /* c0000162 (STATUS_UNMAPPABLE_CHARACTER) */
-   0,                                      /* c0000163 (STATUS_UNDEFINED_CHARACTER) */
-   0,                                      /* c0000164 (STATUS_FLOPPY_VOLUME) */
-   ERROR_FLOPPY_ID_MARK_NOT_FOUND,         /* c0000165 (STATUS_FLOPPY_ID_MARK_NOT_FOUND) */
-   ERROR_FLOPPY_WRONG_CYLINDER,            /* c0000166 (STATUS_FLOPPY_WRONG_CYLINDER) */
-   ERROR_FLOPPY_UNKNOWN_ERROR,             /* c0000167 (STATUS_FLOPPY_UNKNOWN_ERROR) */
-   ERROR_FLOPPY_BAD_REGISTERS,             /* c0000168 (STATUS_FLOPPY_BAD_REGISTERS) */
-   ERROR_DISK_RECALIBRATE_FAILED,          /* c0000169 (STATUS_DISK_RECALIBRATE_FAILED) */
-   ERROR_DISK_OPERATION_FAILED,            /* c000016a (STATUS_DISK_OPERATION_FAILED) */
-   ERROR_DISK_RESET_FAILED,                /* c000016b (STATUS_DISK_RESET_FAILED) */
-   ERROR_IRQ_BUSY,                         /* c000016c (STATUS_SHARED_IRQ_BUSY) */
-   ERROR_IO_DEVICE,                        /* c000016d (STATUS_FT_ORPHANING) */
-   0,                                      /* c000016e (STATUS_BIOS_FAILED_TO_CONNECT_INTER
-RUPT) */
-   0,                                      /* c000016f */
-   0,                                      /* c0000170 */
-   0,                                      /* c0000171 */
-   ERROR_PARTITION_FAILURE,                /* c0000172 (STATUS_PARTITION_FAILURE) */
-   ERROR_INVALID_BLOCK_LENGTH,             /* c0000173 (STATUS_INVALID_BLOCK_LENGTH) */
-   ERROR_DEVICE_NOT_PARTITIONED,           /* c0000174 (STATUS_DEVICE_NOT_PARTITIONED) */
-   ERROR_UNABLE_TO_LOCK_MEDIA,             /* c0000175 (STATUS_UNABLE_TO_LOCK_MEDIA) */
-   ERROR_UNABLE_TO_UNLOAD_MEDIA,           /* c0000176 (STATUS_UNABLE_TO_UNLOAD_MEDIA) */
-   ERROR_EOM_OVERFLOW,                     /* c0000177 (STATUS_EOM_OVERFLOW) */
-   ERROR_NO_MEDIA_IN_DRIVE,                /* c0000178 (STATUS_NO_MEDIA) */
-   0,                                      /* c0000179 */
-   ERROR_NO_SUCH_MEMBER,                   /* c000017a (STATUS_NO_SUCH_MEMBER) */
-   ERROR_INVALID_MEMBER,                   /* c000017b (STATUS_INVALID_MEMBER) */
-   ERROR_KEY_DELETED,                      /* c000017c (STATUS_KEY_DELETED) */
-   ERROR_NO_LOG_SPACE,                     /* c000017d (STATUS_NO_LOG_SPACE) */
-   ERROR_TOO_MANY_SIDS,                    /* c000017e (STATUS_TOO_MANY_SIDS) */
-   ERROR_LM_CROSS_ENCRYPTION_REQUIRED,     /* c000017f (STATUS_LM_CROSS_ENCRYPTION_REQUIRED) */
-   ERROR_KEY_HAS_CHILDREN,                 /* c0000180 (STATUS_KEY_HAS_CHILDREN) */
-   ERROR_CHILD_MUST_BE_VOLATILE,           /* c0000181 (STATUS_CHILD_MUST_BE_VOLATILE) */
-   ERROR_INVALID_PARAMETER,                /* c0000182 (STATUS_DEVICE_CONFIGURATION_ERROR) */
-   ERROR_IO_DEVICE,                        /* c0000183 (STATUS_DRIVER_INTERNAL_ERROR) */
-   ERROR_BAD_COMMAND,                      /* c0000184 (STATUS_INVALID_DEVICE_STATE) */
-   ERROR_IO_DEVICE,                        /* c0000185 (STATUS_IO_DEVICE_ERROR) */
-   ERROR_IO_DEVICE,                        /* c0000186 (STATUS_DEVICE_PROTOCOL_ERROR) */
-   0,                                      /* c0000187 (STATUS_BACKUP_CONTROLLER) */
-   ERROR_LOG_FILE_FULL,                    /* c0000188 (STATUS_LOG_FILE_FULL) */
-   ERROR_WRITE_PROTECT,                    /* c0000189 (STATUS_TOO_LATE) */
-   ERROR_NO_TRUST_LSA_SECRET,              /* c000018a (STATUS_NO_TRUST_LSA_SECRET) */
-   ERROR_NO_TRUST_SAM_ACCOUNT,             /* c000018b (STATUS_NO_TRUST_SAM_ACCOUNT) */
-   ERROR_TRUSTED_DOMAIN_FAILURE,           /* c000018c (STATUS_TRUSTED_DOMAIN_FAILURE) */
-   ERROR_TRUSTED_RELATIONSHIP_FAILURE,     /* c000018d (STATUS_TRUSTED_RELATIONSHIP_FAILURE) */
-   ERROR_EVENTLOG_FILE_CORRUPT,            /* c000018e (STATUS_EVENTLOG_FILE_CORRUPT) */
-   ERROR_EVENTLOG_CANT_START,              /* c000018f (STATUS_EVENTLOG_CANT_START) */
-   ERROR_TRUST_FAILURE,                    /* c0000190 (STATUS_TRUST_FAILURE) */
-   0,                                      /* c0000191 (STATUS_MUTANT_LIMIT_EXCEEDED) */
-   ERROR_NETLOGON_NOT_STARTED,             /* c0000192 (STATUS_NETLOGON_NOT_STARTED) */
-   ERROR_ACCOUNT_EXPIRED,                  /* c0000193 (STATUS_ACCOUNT_EXPIRED) */
-   ERROR_POSSIBLE_DEADLOCK,                /* c0000194 (STATUS_POSSIBLE_DEADLOCK) */
-   ERROR_SESSION_CREDENTIAL_CONFLICT,      /* c0000195 (STATUS_NETWORK_CREDENTIAL_CONFLICT) */
-   ERROR_REMOTE_SESSION_LIMIT_EXCEEDED,    /* c0000196 (STATUS_REMOTE_SESSION_LIMIT) */
-   ERROR_EVENTLOG_FILE_CHANGED,            /* c0000197 (STATUS_EVENTLOG_FILE_CHANGED) */
-   ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT,/* c0000198 (STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT) */
-   ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT,/* c0000199 (STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT) */
-   ERROR_NOLOGON_SERVER_TRUST_ACCOUNT,     /* c000019a (STATUS_NOLOGON_SERVER_TRUST_ACCOUNT) */
-   ERROR_DOMAIN_TRUST_INCONSISTENT         /* c000019b (STATUS_DOMAIN_TRUST_INCONSISTENT) */
-};
-
-static const DWORD table_c0000202[396] =
-{
-   ERROR_NO_USER_SESSION_KEY,              /* c0000202 (STATUS_NO_USER_SESSION_KEY) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000203 (STATUS_USER_SESSION_DELETED) */
-   ERROR_RESOURCE_LANG_NOT_FOUND,          /* c0000204 (STATUS_RESOURCE_LANG_NOT_FOUND) */
-   ERROR_NOT_ENOUGH_SERVER_MEMORY,         /* c0000205 (STATUS_INSUFF_SERVER_RESOURCES) */
-   ERROR_INVALID_USER_BUFFER,              /* c0000206 (STATUS_INVALID_BUFFER_SIZE) */
-   ERROR_INVALID_NETNAME,                  /* c0000207 (STATUS_INVALID_ADDRESS_COMPONENT) */
-   ERROR_INVALID_NETNAME,                  /* c0000208 (STATUS_INVALID_ADDRESS_WILDCARD) */
-   ERROR_TOO_MANY_NAMES,                   /* c0000209 (STATUS_TOO_MANY_ADDRESSES) */
-   ERROR_DUP_NAME,                         /* c000020a (STATUS_ADDRESS_ALREADY_EXISTS) */
-   ERROR_NETNAME_DELETED,                  /* c000020b (STATUS_ADDRESS_CLOSED) */
-   ERROR_NETNAME_DELETED,                  /* c000020c (STATUS_CONNECTION_DISCONNECTED) */
-   ERROR_NETNAME_DELETED,                  /* c000020d (STATUS_CONNECTION_RESET) */
-   ERROR_TOO_MANY_NAMES,                   /* c000020e (STATUS_TOO_MANY_NODES) */
-   ERROR_UNEXP_NET_ERR,                    /* c000020f (STATUS_TRANSACTION_ABORTED) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000210 (STATUS_TRANSACTION_TIMED_OUT) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000211 (STATUS_TRANSACTION_NO_RELEASE) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000212 (STATUS_TRANSACTION_NO_MATCH) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000213 (STATUS_TRANSACTION_RESPONDED) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000214 (STATUS_TRANSACTION_INVALID_ID) */
-   ERROR_UNEXP_NET_ERR,                    /* c0000215 (STATUS_TRANSACTION_INVALID_TYPE) */
-   ERROR_NOT_SUPPORTED,                    /* c0000216 (STATUS_NOT_SERVER_SESSION) */
-   ERROR_NOT_SUPPORTED,                    /* c0000217 (STATUS_NOT_CLIENT_SESSION) */
-   0,                                      /* c0000218 (STATUS_CANNOT_LOAD_REGISTRY_FILE) */
-   0,                                      /* c0000219 (STATUS_DEBUG_ATTACH_FAILED) */
-   0,                                      /* c000021a (STATUS_SYSTEM_PROCESS_TERMINATED) */
-   0,                                      /* c000021b (STATUS_DATA_NOT_ACCEPTED) */
-   ERROR_NO_BROWSER_SERVERS_FOUND,         /* c000021c (STATUS_NO_BROWSER_SERVERS_FOUND) */
-   0,                                      /* c000021d (STATUS_VDM_HARD_ERROR) */
-   0,                                      /* c000021e (STATUS_DRIVER_CANCEL_TIMEOUT) */
-   0,                                      /* c000021f (STATUS_REPLY_MESSAGE_MISMATCH) */
-   ERROR_MAPPED_ALIGNMENT,                 /* c0000220 (STATUS_MAPPED_ALIGNMENT) */
-   ERROR_BAD_EXE_FORMAT,                   /* c0000221 (STATUS_IMAGE_CHECKSUM_MISMATCH) */
-   0,                                      /* c0000222 (STATUS_LOST_WRITEBEHIND_DATA) */
-   0,                                      /* c0000223 (STATUS_CLIENT_SERVER_PARAMETERS_INVALID) */
-   ERROR_PASSWORD_MUST_CHANGE,             /* c0000224 (STATUS_PASSWORD_MUST_CHANGE) */
-   ERROR_NOT_FOUND,                        /* c0000225 (STATUS_NOT_FOUND) */
-   0,                                      /* c0000226 (STATUS_NOT_TINY_STREAM) */
-   0,                                      /* c0000227 (STATUS_RECOVERY_FAILURE) */
-   0,                                      /* c0000228 (STATUS_STACK_OVERFLOW_READ) */
-   ERROR_INVALID_PARAMETER,                /* c0000229 (STATUS_FAIL_CHECK) */
-   ERROR_OBJECT_ALREADY_EXISTS,            /* c000022a (STATUS_DUPLICATE_OBJECTID) */
-   ERROR_OBJECT_ALREADY_EXISTS,            /* c000022b (STATUS_OBJECTID_EXISTS) */
-   0,                                      /* c000022c (STATUS_CONVERT_TO_LARGE) */
-   ERROR_RETRY,                            /* c000022d (STATUS_RETRY) */
-   0,                                      /* c000022e (STATUS_FOUND_OUT_OF_SCOPE) */
-   0,                                      /* c000022f (STATUS_ALLOCATE_BUCKET) */
-   ERROR_SET_NOT_FOUND,                    /* c0000230 (STATUS_PROPSET_NOT_FOUND) */
-   0,                                      /* c0000231 (STATUS_MARSHALL_OVERFLOW) */
-   0,                                      /* c0000232 (STATUS_INVALID_VARIANT) */
-   ERROR_DOMAIN_CONTROLLER_NOT_FOUND,      /* c0000233 (STATUS_DOMAIN_CONTROLLER_NOT_FOUND) */
-   ERROR_ACCOUNT_LOCKED_OUT,               /* c0000234 (STATUS_ACCOUNT_LOCKED_OUT) */
-   ERROR_INVALID_HANDLE,                   /* c0000235 (STATUS_HANDLE_NOT_CLOSABLE) */
-   ERROR_CONNECTION_REFUSED,               /* c0000236 (STATUS_CONNECTION_REFUSED) */
-   ERROR_GRACEFUL_DISCONNECT,              /* c0000237 (STATUS_GRACEFUL_DISCONNECT) */
-   ERROR_ADDRESS_ALREADY_ASSOCIATED,       /* c0000238 (STATUS_ADDRESS_ALREADY_ASSOCIATED) */
-   ERROR_ADDRESS_NOT_ASSOCIATED,           /* c0000239 (STATUS_ADDRESS_NOT_ASSOCIATED) */
-   ERROR_CONNECTION_INVALID,               /* c000023a (STATUS_CONNECTION_INVALID) */
-   ERROR_CONNECTION_ACTIVE,                /* c000023b (STATUS_CONNECTION_ACTIVE) */
-   ERROR_NETWORK_UNREACHABLE,              /* c000023c (STATUS_NETWORK_UNREACHABLE) */
-   ERROR_HOST_UNREACHABLE,                 /* c000023d (STATUS_HOST_UNREACHABLE) */
-   ERROR_PROTOCOL_UNREACHABLE,             /* c000023e (STATUS_PROTOCOL_UNREACHABLE) */
-   ERROR_PORT_UNREACHABLE,                 /* c000023f (STATUS_PORT_UNREACHABLE) */
-   ERROR_REQUEST_ABORTED,                  /* c0000240 (STATUS_REQUEST_ABORTED) */
-   ERROR_CONNECTION_ABORTED,               /* c0000241 (STATUS_CONNECTION_ABORTED) */
-   0,                                      /* c0000242 (STATUS_BAD_COMPRESSION_BUFFER) */
-   ERROR_USER_MAPPED_FILE,                 /* c0000243 (STATUS_USER_MAPPED_FILE) */
-   0,                                      /* c0000244 (STATUS_AUDIT_FAILED) */
-   0,                                      /* c0000245 (STATUS_TIMER_RESOLUTION_NOT_SET) */
-   ERROR_CONNECTION_COUNT_LIMIT,           /* c0000246 (STATUS_CONNECTION_COUNT_LIMIT) */
-   ERROR_LOGIN_TIME_RESTRICTION,           /* c0000247 (STATUS_LOGIN_TIME_RESTRICTION) */
-   ERROR_LOGIN_WKSTA_RESTRICTION,          /* c0000248 (STATUS_LOGIN_WKSTA_RESTRICTION) */
-   ERROR_BAD_EXE_FORMAT,                   /* c0000249 (STATUS_IMAGE_MP_UP_MISMATCH) */
-   0,                                      /* c000024a */
-   0,                                      /* c000024b */
-   0,                                      /* c000024c */
-   0,                                      /* c000024d */
-   0,                                      /* c000024e */
-   0,                                      /* c000024f */
-   0,                                      /* c0000250 (STATUS_INSUFFICIENT_LOGON_INFO) */
-   0,                                      /* c0000251 (STATUS_BAD_DLL_ENTRYPOINT) */
-   0,                                      /* c0000252 (STATUS_BAD_SERVICE_ENTRYPOINT) */
-   ERROR_CONNECTION_ABORTED,               /* c0000253 (STATUS_LPC_REPLY_LOST) */
-   0,                                      /* c0000254 (STATUS_IP_ADDRESS_CONFLICT1) */
-   0,                                      /* c0000255 (STATUS_IP_ADDRESS_CONFLICT2) */
-   0,                                      /* c0000256 (STATUS_REGISTRY_QUOTA_LIMIT) */
-   ERROR_HOST_UNREACHABLE,                 /* c0000257 (STATUS_PATH_NOT_COVERED) */
-   0,                                      /* c0000258 (STATUS_NO_CALLBACK_ACTIVE) */
-   ERROR_LICENSE_QUOTA_EXCEEDED,           /* c0000259 (STATUS_LICENSE_QUOTA_EXCEEDED) */
-   0,                                      /* c000025a (STATUS_PWD_TOO_SHORT) */
-   0,                                      /* c000025b (STATUS_PWD_TOO_RECENT) */
-   0,                                      /* c000025c (STATUS_PWD_HISTORY_CONFLICT) */
-   0,                                      /* c000025d */
-   ERROR_SERVICE_DISABLED,                 /* c000025e (STATUS_PLUGPLAY_NO_DEVICE) */
-   0,                                      /* c000025f (STATUS_UNSUPPORTED_COMPRESSION) */
-   0,                                      /* c0000260 (STATUS_INVALID_HW_PROFILE) */
-   0,                                      /* c0000261 (STATUS_INVALID_PLUGPLAY_DEVICE_PATH) */
-   ERROR_INVALID_ORDINAL,                  /* c0000262 (STATUS_DRIVER_ORDINAL_NOT_FOUND) */
-   ERROR_PROC_NOT_FOUND,                   /* c0000263 (STATUS_DRIVER_ENTRYPOINT_NOT_FOUND) */
-   ERROR_NOT_OWNER,                        /* c0000264 (STATUS_RESOURCE_NOT_OWNED) */
-   ERROR_TOO_MANY_LINKS,                   /* c0000265 (STATUS_TOO_MANY_LINKS) */
-   0,                                      /* c0000266 (STATUS_QUOTA_LIST_INCONSISTENT) */
-   ERROR_FILE_OFFLINE,                     /* c0000267 (STATUS_FILE_IS_OFFLINE) */
-   0,                                      /* c0000268 (STATUS_EVALUATION_EXPIRATION) */
-   0,                                      /* c0000269 (STATUS_ILLEGAL_DLL_RELOCATION) */
-   ERROR_CTX_LICENSE_NOT_AVAILABLE,        /* c000026a (STATUS_LICENSE_VIOLATION) */
-   0,                                      /* c000026b (STATUS_DLL_INIT_FAILED_LOGOFF) */
-   ERROR_BAD_DRIVER,                       /* c000026c (STATUS_DRIVER_UNABLE_TO_LOAD) */
-   ERROR_CONNECTION_UNAVAIL,               /* c000026d (STATUS_DFS_UNAVAILABLE) */
-   ERROR_NOT_READY,                        /* c000026e (STATUS_VOLUME_DISMOUNTED) */
-   0,                                      /* c000026f (STATUS_WX86_INTERNAL_ERROR) */
-   0,                                      /* c0000270 (STATUS_WX86_FLOAT_STACK_CHECK) */
-   0,                                      /* c0000271 (STATUS_VALIDATE_CONTINUE) */
-   ERROR_NO_MATCH,                         /* c0000272 (STATUS_NO_MATCH) */
-   0,                                      /* c0000273 (STATUS_NO_MORE_MATCHES) */
-   0,                                      /* c0000274 */
-   ERROR_NOT_A_REPARSE_POINT,              /* c0000275 (STATUS_NOT_A_REPARSE_POINT) */
-   ERROR_REPARSE_TAG_INVALID,              /* c0000276 (STATUS_IO_REPARSE_TAG_INVALID) */
-   ERROR_REPARSE_TAG_MISMATCH,             /* c0000277 (STATUS_IO_REPARSE_TAG_MISMATCH) */
-   ERROR_INVALID_REPARSE_DATA,             /* c0000278 (STATUS_IO_REPARSE_DATA_INVALID) */
-   ERROR_CANT_ACCESS_FILE,                 /* c0000279 (STATUS_IO_REPARSE_TAG_NOT_HANDLED) */
-   0,                                      /* c000027a */
-   0,                                      /* c000027b */
-   0,                                      /* c000027c */
-   0,                                      /* c000027d */
-   0,                                      /* c000027e */
-   0,                                      /* c000027f */
-   ERROR_CANT_RESOLVE_FILENAME,            /* c0000280 (STATUS_REPARSE_POINT_NOT_RESOLVED) */
-   ERROR_BAD_PATHNAME,                     /* c0000281 (STATUS_DIRECTORY_IS_A_REPARSE_POINT) */
-   0,                                      /* c0000282 (STATUS_RANGE_LIST_CONFLICT) */
-   ERROR_SOURCE_ELEMENT_EMPTY,             /* c0000283 (STATUS_SOURCE_ELEMENT_EMPTY) */
-   ERROR_DESTINATION_ELEMENT_FULL,         /* c0000284 (STATUS_DESTINATION_ELEMENT_FULL) */
-   ERROR_ILLEGAL_ELEMENT_ADDRESS,          /* c0000285 (STATUS_ILLEGAL_ELEMENT_ADDRESS) */
-   ERROR_MAGAZINE_NOT_PRESENT,             /* c0000286 (STATUS_MAGAZINE_NOT_PRESENT) */
-   ERROR_DEVICE_REINITIALIZATION_NEEDED,   /* c0000287 (STATUS_REINITIALIZATION_NEEDED) */
-   0,                                      /* c0000288 */
-   0,                                      /* c0000289 */
-   ERROR_ACCESS_DENIED,                    /* c000028a (STATUS_ENCRYPTION_FAILED) */
-   ERROR_ACCESS_DENIED,                    /* c000028b (STATUS_DECRYPTION_FAILED) */
-   0,                                      /* c000028c (STATUS_RANGE_NOT_FOUND) */
-   ERROR_ACCESS_DENIED,                    /* c000028d (STATUS_NO_RECOVERY_POLICY) */
-   ERROR_ACCESS_DENIED,                    /* c000028e (STATUS_NO_EFS) */
-   ERROR_ACCESS_DENIED,                    /* c000028f (STATUS_WRONG_EFS) */
-   ERROR_ACCESS_DENIED,                    /* c0000290 (STATUS_NO_USER_KEYS) */
-   ERROR_FILE_NOT_ENCRYPTED,               /* c0000291 (STATUS_FILE_NOT_ENCRYPTED) */
-   ERROR_NOT_EXPORT_FORMAT,                /* c0000292 (STATUS_NOT_EXPORT_FORMAT) */
-   ERROR_FILE_ENCRYPTED,                   /* c0000293 (STATUS_FILE_ENCRYPTED) */
-   0,                                      /* c0000294 */
-   ERROR_WMI_GUID_NOT_FOUND,               /* c0000295 (STATUS_WMI_GUID_NOT_FOUND) */
-   ERROR_WMI_INSTANCE_NOT_FOUND,           /* c0000296 (STATUS_WMI_INSTANCE_NOT_FOUND) */
-   ERROR_WMI_ITEMID_NOT_FOUND,             /* c0000297 (STATUS_WMI_ITEMID_NOT_FOUND) */
-   ERROR_WMI_TRY_AGAIN,                    /* c0000298 (STATUS_WMI_TRY_AGAIN) */
-   ERROR_SHARED_POLICY,                    /* c0000299 (STATUS_SHARED_POLICY) */
-   ERROR_POLICY_OBJECT_NOT_FOUND,          /* c000029a (STATUS_POLICY_OBJECT_NOT_FOUND) */
-   ERROR_POLICY_ONLY_IN_DS,                /* c000029b (STATUS_POLICY_ONLY_IN_DS) */
-   ERROR_INVALID_FUNCTION,                 /* c000029c (STATUS_VOLUME_NOT_UPGRADED) */
-   ERROR_REMOTE_STORAGE_NOT_ACTIVE,        /* c000029d (STATUS_REMOTE_STORAGE_NOT_ACTIVE) */
-   ERROR_REMOTE_STORAGE_MEDIA_ERROR,       /* c000029e (STATUS_REMOTE_STORAGE_MEDIA_ERROR) */
-   ERROR_NO_TRACKING_SERVICE,              /* c000029f (STATUS_NO_TRACKING_SERVICE) */
-   0,                                      /* c00002a0 (STATUS_SERVER_SID_MISMATCH) */
-   ERROR_DS_NO_ATTRIBUTE_OR_VALUE,         /* c00002a1 (STATUS_DS_NO_ATTRIBUTE_OR_VALUE) */
-   ERROR_DS_INVALID_ATTRIBUTE_SYNTAX,      /* c00002a2 (STATUS_DS_INVALID_ATTRIBUTE_SYNTAX) */
-   ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED,      /* c00002a3 (STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED) */
-   ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS,     /* c00002a4 (STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS) */
-   ERROR_DS_BUSY,                          /* c00002a5 (STATUS_DS_BUSY) */
-   ERROR_DS_UNAVAILABLE,                   /* c00002a6 (STATUS_DS_UNAVAILABLE) */
-   ERROR_DS_NO_RIDS_ALLOCATED,             /* c00002a7 (STATUS_DS_NO_RIDS_ALLOCATED) */
-   ERROR_DS_NO_MORE_RIDS,                  /* c00002a8 (STATUS_DS_NO_MORE_RIDS) */
-   ERROR_DS_INCORRECT_ROLE_OWNER,          /* c00002a9 (STATUS_DS_INCORRECT_ROLE_OWNER) */
-   ERROR_DS_RIDMGR_INIT_ERROR,             /* c00002aa (STATUS_DS_RIDMGR_INIT_ERROR) */
-   ERROR_DS_OBJ_CLASS_VIOLATION,           /* c00002ab (STATUS_DS_OBJ_CLASS_VIOLATION) */
-   ERROR_DS_CANT_ON_NON_LEAF,              /* c00002ac (STATUS_DS_CANT_ON_NON_LEAF) */
-   ERROR_DS_CANT_ON_RDN,                   /* c00002ad (STATUS_DS_CANT_ON_RDN) */
-   ERROR_DS_CANT_MOD_OBJ_CLASS,            /* c00002ae (STATUS_DS_CANT_MOD_OBJ_CLASS) */
-   ERROR_DS_CROSS_DOM_MOVE_ERROR,          /* c00002af (STATUS_DS_CROSS_DOM_MOVE_FAILED) */
-   ERROR_DS_GC_NOT_AVAILABLE,              /* c00002b0 (STATUS_DS_GC_NOT_AVAILABLE) */
-   ERROR_DS_DS_REQUIRED,                   /* c00002b1 (STATUS_DIRECTORY_SERVICE_REQUIRED) */
-   ERROR_REPARSE_ATTRIBUTE_CONFLICT,       /* c00002b2 (STATUS_REPARSE_ATTRIBUTE_CONFLICT) */
-   0,                                      /* c00002b3 (STATUS_CANT_ENABLE_DENY_ONLY) */
-   0,                                      /* c00002b4 (STATUS_FLOAT_MULTIPLE_FAULTS) */
-   0,                                      /* c00002b5 (STATUS_FLOAT_MULTIPLE_TRAPS) */
-   ERROR_DEVICE_REMOVED,                   /* c00002b6 (STATUS_DEVICE_REMOVED) */
-   ERROR_JOURNAL_DELETE_IN_PROGRESS,       /* c00002b7 (STATUS_JOURNAL_DELETE_IN_PROGRESS) */
-   ERROR_JOURNAL_NOT_ACTIVE,               /* c00002b8 (STATUS_JOURNAL_NOT_ACTIVE) */
-   0,                                      /* c00002b9 (STATUS_NOINTERFACE) */
-   0,                                      /* c00002ba */
-   0,                                      /* c00002bb */
-   0,                                      /* c00002bc */
-   0,                                      /* c00002bd */
-   0,                                      /* c00002be */
-   0,                                      /* c00002bf */
-   0,                                      /* c00002c0 */
-   ERROR_DS_ADMIN_LIMIT_EXCEEDED,          /* c00002c1 (STATUS_DS_ADMIN_LIMIT_EXCEEDED) */
-   0,                                      /* c00002c2 (STATUS_DRIVER_FAILED_SLEEP) */
-   ERROR_MUTUAL_AUTH_FAILED,               /* c00002c3 (STATUS_MUTUAL_AUTHENTICATION_FAILED) */
-   0,                                      /* c00002c4 (STATUS_CORRUPT_SYSTEM_FILE) */
-   ERROR_NOACCESS,                         /* c00002c5 (STATUS_DATATYPE_MISALIGNMENT_ERROR) */
-   ERROR_WMI_READ_ONLY,                    /* c00002c6 (STATUS_WMI_READ_ONLY) */
-   ERROR_WMI_SET_FAILURE,                  /* c00002c7 (STATUS_WMI_SET_FAILURE) */
-   0,                                      /* c00002c8 (STATUS_COMMITMENT_MINIMUM) */
-   ERROR_REG_NAT_CONSUMPTION,              /* c00002c9 (STATUS_REG_NAT_CONSUMPTION) */
-   ERROR_TRANSPORT_FULL,                   /* c00002ca (STATUS_TRANSPORT_FULL) */
-   ERROR_DS_SAM_INIT_FAILURE,              /* c00002cb (STATUS_DS_SAM_INIT_FAILURE) */
-   ERROR_ONLY_IF_CONNECTED,                /* c00002cc (STATUS_ONLY_IF_CONNECTED) */
-   ERROR_DS_SENSITIVE_GROUP_VIOLATION,     /* c00002cd (STATUS_DS_SENSITIVE_GROUP_VIOLATION) */
-   0,                                      /* c00002ce (STATUS_PNP_RESTART_ENUMERATION) */
-   ERROR_JOURNAL_ENTRY_DELETED,            /* c00002cf (STATUS_JOURNAL_ENTRY_DELETED) */
-   ERROR_DS_CANT_MOD_PRIMARYGROUPID,       /* c00002d0 (STATUS_DS_CANT_MOD_PRIMARYGROUPID) */
-   0,                                      /* c00002d1 (STATUS_SYSTEM_IMAGE_BAD_SIGNATURE) */
-   0,                                      /* c00002d2 (STATUS_PNP_REBOOT_REQUIRED) */
-   0,                                      /* c00002d3 (STATUS_POWER_STATE_INVALID) */
-   ERROR_DS_INVALID_GROUP_TYPE,            /* c00002d4 (STATUS_DS_INVALID_GROUP_TYPE) */
-   ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN, /* c00002d5 (STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN) */
-   ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN,  /* c00002d6 (STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN) */
-   ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER,      /* c00002d7 (STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER) */
-   ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER,  /* c00002d8 (STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER) */
-   ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER,   /* c00002d9 (STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER) */
-   ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER,/* c00002da (STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER) */
-   ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER,   /* c00002db (STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER) */
-   ERROR_DS_HAVE_PRIMARY_MEMBERS,               /* c00002dc (STATUS_DS_HAVE_PRIMARY_MEMBERS) */
-   ERROR_NOT_SUPPORTED,                    /* c00002dd (STATUS_WMI_NOT_SUPPORTED) */
-   0,                                      /* c00002de (STATUS_INSUFFICIENT_POWER) */
-   ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD,     /* c00002df (STATUS_SAM_NEED_BOOTKEY_PASSWORD) */
-   ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY,       /* c00002e0 (STATUS_SAM_NEED_BOOTKEY_FLOPPY) */
-   ERROR_DS_CANT_START,                    /* c00002e1 (STATUS_DS_CANT_START) */
-   ERROR_DS_INIT_FAILURE,                  /* c00002e2 (STATUS_DS_INIT_FAILURE) */
-   ERROR_SAM_INIT_FAILURE,                 /* c00002e3 (STATUS_SAM_INIT_FAILURE) */
-   ERROR_DS_GC_REQUIRED,                   /* c00002e4 (STATUS_DS_GC_REQUIRED) */
-   ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY,    /* c00002e5 (STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY) */
-   ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS,    /* c00002e6 (STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS) */
-   ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED,     /* c00002e7 (STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED) */
-   0,                                      /* c00002e8 (STATUS_MULTIPLE_FAULT_VIOLATION) */
-   ERROR_CURRENT_DOMAIN_NOT_ALLOWED,       /* c00002e9 (STATUS_CURRENT_DOMAIN_NOT_ALLOWED) */
-   ERROR_CANNOT_MAKE,                      /* c00002ea (STATUS_CANNOT_MAKE) */
-   0,                                      /* c00002eb (STATUS_SYSTEM_SHUTDOWN) */
-   ERROR_DS_INIT_FAILURE_CONSOLE,          /* c00002ec (STATUS_DS_INIT_FAILURE_CONSOLE) */
-   ERROR_DS_SAM_INIT_FAILURE_CONSOLE,      /* c00002ed (STATUS_DS_SAM_INIT_FAILURE_CONSOLE) */
-   SEC_E_UNFINISHED_CONTEXT_DELETED,       /* c00002ee (STATUS_UNFINISHED_CONTEXT_DELETED) */
-   SEC_E_NO_TGT_REPLY,                     /* c00002ef (STATUS_NO_TGT_REPLY) */
-   ERROR_FILE_NOT_FOUND,                   /* c00002f0 (STATUS_OBJECTID_NOT_FOUND) */
-   SEC_E_NO_IP_ADDRESSES,                  /* c00002f1 (STATUS_NO_IP_ADDRESSES) */
-   SEC_E_WRONG_CREDENTIAL_HANDLE,          /* c00002f2 (STATUS_WRONG_CREDENTIAL_HANDLE) */
-   SEC_E_CRYPTO_SYSTEM_INVALID,            /* c00002f3 (STATUS_CRYPTO_SYSTEM_INVALID) */
-   SEC_E_MAX_REFERRALS_EXCEEDED,           /* c00002f4 (STATUS_MAX_REFERRALS_EXCEEDED) */
-   SEC_E_MUST_BE_KDC,                      /* c00002f5 (STATUS_MUST_BE_KDC) */
-   SEC_E_STRONG_CRYPTO_NOT_SUPPORTED,      /* c00002f6 (STATUS_STRONG_CRYPTO_NOT_SUPPORTED) */
-   SEC_E_TOO_MANY_PRINCIPALS,              /* c00002f7 (STATUS_TOO_MANY_PRINCIPALS) */
-   SEC_E_NO_PA_DATA,                       /* c00002f8 (STATUS_NO_PA_DATA) */
-   SEC_E_PKINIT_NAME_MISMATCH,             /* c00002f9 (STATUS_PKINIT_NAME_MISMATCH) */
-   SEC_E_SMARTCARD_LOGON_REQUIRED,         /* c00002fa (STATUS_SMARTCARD_LOGON_REQUIRED) */
-   SEC_E_KDC_INVALID_REQUEST,              /* c00002fb (STATUS_KDC_INVALID_REQUEST) */
-   SEC_E_KDC_UNABLE_TO_REFER,              /* c00002fc (STATUS_KDC_UNABLE_TO_REFER) */
-   SEC_E_KDC_UNKNOWN_ETYPE,                /* c00002fd (STATUS_KDC_UNKNOWN_ETYPE) */
-   ERROR_SHUTDOWN_IN_PROGRESS,             /* c00002fe (STATUS_SHUTDOWN_IN_PROGRESS) */
-   ERROR_SERVER_SHUTDOWN_IN_PROGRESS,      /* c00002ff (STATUS_SERVER_SHUTDOWN_IN_PROGRESS) */
-   ERROR_NOT_SUPPORTED_ON_SBS,             /* c0000300 (STATUS_NOT_SUPPORTED_ON_SBS) */
-   ERROR_WMI_GUID_DISCONNECTED,            /* c0000301 (STATUS_WMI_GUID_DISCONNECTED) */
-   ERROR_WMI_ALREADY_DISABLED,             /* c0000302 (STATUS_WMI_ALREADY_DISABLED) */
-   ERROR_WMI_ALREADY_ENABLED,              /* c0000303 (STATUS_WMI_ALREADY_ENABLED) */
-   ERROR_DISK_TOO_FRAGMENTED,              /* c0000304 (STATUS_MFT_TOO_FRAGMENTED) */
-   STG_E_STATUS_COPY_PROTECTION_FAILURE,   /* c0000305 (STATUS_COPY_PROTECTION_FAILURE) */
-   STG_E_CSS_AUTHENTICATION_FAILURE,       /* c0000306 (STATUS_CSS_AUTHENTICATION_FAILURE) */
-   STG_E_CSS_KEY_NOT_PRESENT,              /* c0000307 (STATUS_CSS_KEY_NOT_PRESENT) */
-   STG_E_CSS_KEY_NOT_ESTABLISHED,          /* c0000308 (STATUS_CSS_KEY_NOT_ESTABLISHED) */
-   STG_E_CSS_SCRAMBLED_SECTOR,             /* c0000309 (STATUS_CSS_SCRAMBLED_SECTOR) */
-   STG_E_CSS_REGION_MISMATCH,              /* c000030a (STATUS_CSS_REGION_MISMATCH) */
-   STG_E_RESETS_EXHAUSTED,                 /* c000030b (STATUS_CSS_RESETS_EXHAUSTED) */
-   0,                                      /* c000030c */
-   0,                                      /* c000030d */
-   0,                                      /* c000030e */
-   0,                                      /* c000030f */
-   0,                                      /* c0000310 */
-   0,                                      /* c0000311 */
-   0,                                      /* c0000312 */
-   0,                                      /* c0000313 */
-   0,                                      /* c0000314 */
-   0,                                      /* c0000315 */
-   0,                                      /* c0000316 */
-   0,                                      /* c0000317 */
-   0,                                      /* c0000318 */
-   0,                                      /* c0000319 */
-   0,                                      /* c000031a */
-   0,                                      /* c000031b */
-   0,                                      /* c000031c */
-   0,                                      /* c000031d */
-   0,                                      /* c000031e */
-   0,                                      /* c000031f */
-   ERROR_PKINIT_FAILURE,                   /* c0000320 (STATUS_PKINIT_FAILURE) */
-   ERROR_SMARTCARD_SUBSYSTEM_FAILURE,      /* c0000321 (STATUS_SMARTCARD_SUBSYSTEM_FAILURE) */
-   SEC_E_NO_KERB_KEY,                      /* c0000322 (STATUS_NO_KERB_KEY) */
-   0,                                      /* c0000323 */
-   0,                                      /* c0000324 */
-   0,                                      /* c0000325 */
-   0,                                      /* c0000326 */
-   0,                                      /* c0000327 */
-   0,                                      /* c0000328 */
-   0,                                      /* c0000329 */
-   0,                                      /* c000032a */
-   0,                                      /* c000032b */
-   0,                                      /* c000032c */
-   0,                                      /* c000032d */
-   0,                                      /* c000032e */
-   0,                                      /* c000032f */
-   0,                                      /* c0000330 */
-   0,                                      /* c0000331 */
-   0,                                      /* c0000332 */
-   0,                                      /* c0000333 */
-   0,                                      /* c0000334 */
-   0,                                      /* c0000335 */
-   0,                                      /* c0000336 */
-   0,                                      /* c0000337 */
-   0,                                      /* c0000338 */
-   0,                                      /* c0000339 */
-   0,                                      /* c000033a */
-   0,                                      /* c000033b */
-   0,                                      /* c000033c */
-   0,                                      /* c000033d */
-   0,                                      /* c000033e */
-   0,                                      /* c000033f */
-   0,                                      /* c0000340 */
-   0,                                      /* c0000341 */
-   0,                                      /* c0000342 */
-   0,                                      /* c0000343 */
-   0,                                      /* c0000344 */
-   0,                                      /* c0000345 */
-   0,                                      /* c0000346 */
-   0,                                      /* c0000347 */
-   0,                                      /* c0000348 */
-   0,                                      /* c0000349 */
-   0,                                      /* c000034a */
-   0,                                      /* c000034b */
-   0,                                      /* c000034c */
-   0,                                      /* c000034d */
-   0,                                      /* c000034e */
-   0,                                      /* c000034f */
-   ERROR_HOST_DOWN,                        /* c0000350 (STATUS_HOST_DOWN) */
-   SEC_E_UNSUPPORTED_PREAUTH,              /* c0000351 (STATUS_UNSUPPORTED_PREAUTH) */
-   ERROR_EFS_ALG_BLOB_TOO_BIG,             /* c0000352 (STATUS_EFS_ALG_BLOB_TOO_BIG) */
-   0,                                      /* c0000353 (STATUS_PORT_NOT_SET) */
-   0,                                      /* c0000354 (STATUS_DEBUGGER_INACTIVE) */
-   0,                                      /* c0000355 (STATUS_DS_VERSION_CHECK_FAILURE) */
-   ERROR_AUDITING_DISABLED,                /* c0000356 (STATUS_AUDITING_DISABLED) */
-   ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4,/* c0000357 (STATUS_PRENT4_MACHINE_ACCOUNT) */
-   ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER, /* c0000358 (STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER) */
-   ERROR_BAD_EXE_FORMAT,                   /* c0000359 (STATUS_INVALID_IMAGE_WIN_32) */
-   ERROR_BAD_EXE_FORMAT,                   /* c000035a (STATUS_INVALID_IMAGE_WIN_64) */
-   SEC_E_BAD_BINDINGS,                     /* c000035b (STATUS_BAD_BINDINGS) */
-   ERROR_NO_USER_SESSION_KEY,              /* c000035c (STATUS_NETWORK_SESSION_EXPIRED) */
-   0,                                      /* c000035d (STATUS_APPHELP_BLOCK) */
-   0,                                      /* c000035e (STATUS_ALL_SIDS_FILTERED) */
-   0,                                      /* c000035f (STATUS_NOT_SAFE_MODE_DRIVER) */
-   0,                                      /* c0000360 */
-   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000361 (STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT) */
-   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000362 (STATUS_ACCESS_DISABLED_BY_POLICY_PATH) */
-   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000363 (STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER) */
-   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000364 (STATUS_ACCESS_DISABLED_BY_POLICY_OTHER) */
-   0,                                      /* c0000365 (STATUS_FAILED_DRIVER_ENTRY) */
-   0,                                      /* c0000366 (STATUS_DEVICE_ENUMERATION_ERROR) */
-   0,                                      /* c0000367 */
-   0,                                      /* c0000368 (STATUS_MOUNT_POINT_NOT_RESOLVED) */
-   0,                                      /* c0000369 (STATUS_INVALID_DEVICE_OBJECT_PARAMETER) */
-   0,                                      /* c000036a (STATUS_MCA_OCCURED) */
-   ERROR_DRIVER_BLOCKED,                   /* c000036b (STATUS_DRIVER_BLOCKED_CRITICAL) */
-   ERROR_DRIVER_BLOCKED,                   /* c000036c (STATUS_DRIVER_BLOCKED) */
-   0,                                      /* c000036d (STATUS_DRIVER_DATABASE_ERROR) */
-   0,                                      /* c000036e (STATUS_SYSTEM_HIVE_TOO_LARGE) */
-   ERROR_INVALID_IMPORT_OF_NON_DLL,        /* c000036f (STATUS_INVALID_IMPORT_OF_NON_DLL) */
-   0,                                      /* c0000370 */
-   0,                                      /* c0000371 */
-   0,                                      /* c0000372 */
-   0,                                      /* c0000373 */
-   0,                                      /* c0000374 */
-   0,                                      /* c0000375 */
-   0,                                      /* c0000376 */
-   0,                                      /* c0000377 */
-   0,                                      /* c0000378 */
-   0,                                      /* c0000379 */
-   0,                                      /* c000037a */
-   0,                                      /* c000037b */
-   0,                                      /* c000037c */
-   0,                                      /* c000037d */
-   0,                                      /* c000037e */
-   0,                                      /* c000037f */
-   SCARD_W_WRONG_CHV,                      /* c0000380 (STATUS_SMARTCARD_WRONG_PIN) */
-   SCARD_W_CHV_BLOCKED,                    /* c0000381 (STATUS_SMARTCARD_CARD_BLOCKED) */
-   SCARD_W_CARD_NOT_AUTHENTICATED,         /* c0000382 (STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED) */
-   SCARD_E_NO_SMARTCARD,                   /* c0000383 (STATUS_SMARTCARD_NO_CARD) */
-   NTE_NO_KEY,                             /* c0000384 (STATUS_SMARTCARD_NO_KEY_CONTAINER) */
-   SCARD_E_NO_SUCH_CERTIFICATE,            /* c0000385 (STATUS_SMARTCARD_NO_CERTIFICATE) */
-   NTE_BAD_KEYSET,                         /* c0000386 (STATUS_SMARTCARD_NO_KEYSET) */
-   SCARD_E_COMM_DATA_LOST,                 /* c0000387 (STATUS_SMARTCARD_IO_ERROR) */
-   ERROR_DOWNGRADE_DETECTED,               /* c0000388 (STATUS_DOWNGRADE_DETECTED) */
-   SEC_E_SMARTCARD_CERT_REVOKED,           /* c0000389 (STATUS_SMARTCARD_CERT_REVOKED) */
-   SEC_E_ISSUING_CA_UNTRUSTED,             /* c000038a (STATUS_ISSUING_CA_UNTRUSTED) */
-   SEC_E_REVOCATION_OFFLINE_C,             /* c000038b (STATUS_REVOCATION_OFFLINE_C) */
-   SEC_E_PKINIT_CLIENT_FAILURE,            /* c000038c (STATUS_PKINIT_CLIENT_FAILURE) */
-   SEC_E_SMARTCARD_CERT_EXPIRED            /* c000038d (STATUS_SMARTCARD_CERT_EXPIRED) */
-};
-
-static const DWORD table_c0020001[99] =
-{
-   RPC_S_INVALID_STRING_BINDING,           /* c0020001 (RPC_NT_INVALID_STRING_BINDING) */
-   RPC_S_WRONG_KIND_OF_BINDING,            /* c0020002 (RPC_NT_WRONG_KIND_OF_BINDING) */
-   ERROR_INVALID_HANDLE,                   /* c0020003 (RPC_NT_INVALID_BINDING) */
-   RPC_S_PROTSEQ_NOT_SUPPORTED,            /* c0020004 (RPC_NT_PROTSEQ_NOT_SUPPORTED) */
-   RPC_S_INVALID_RPC_PROTSEQ,              /* c0020005 (RPC_NT_INVALID_RPC_PROTSEQ) */
-   RPC_S_INVALID_STRING_UUID,              /* c0020006 (RPC_NT_INVALID_STRING_UUID) */
-   RPC_S_INVALID_ENDPOINT_FORMAT,          /* c0020007 (RPC_NT_INVALID_ENDPOINT_FORMAT) */
-   RPC_S_INVALID_NET_ADDR,                 /* c0020008 (RPC_NT_INVALID_NET_ADDR) */
-   RPC_S_NO_ENDPOINT_FOUND,                /* c0020009 (RPC_NT_NO_ENDPOINT_FOUND) */
-   RPC_S_INVALID_TIMEOUT,                  /* c002000a (RPC_NT_INVALID_TIMEOUT) */
-   RPC_S_OBJECT_NOT_FOUND,                 /* c002000b (RPC_NT_OBJECT_NOT_FOUND) */
-   RPC_S_ALREADY_REGISTERED,               /* c002000c (RPC_NT_ALREADY_REGISTERED) */
-   RPC_S_TYPE_ALREADY_REGISTERED,          /* c002000d (RPC_NT_TYPE_ALREADY_REGISTERED) */
-   RPC_S_ALREADY_LISTENING,                /* c002000e (RPC_NT_ALREADY_LISTENING) */
-   RPC_S_NO_PROTSEQS_REGISTERED,           /* c002000f (RPC_NT_NO_PROTSEQS_REGISTERED) */
-   RPC_S_NOT_LISTENING,                    /* c0020010 (RPC_NT_NOT_LISTENING) */
-   RPC_S_UNKNOWN_MGR_TYPE,                 /* c0020011 (RPC_NT_UNKNOWN_MGR_TYPE) */
-   RPC_S_UNKNOWN_IF,                       /* c0020012 (RPC_NT_UNKNOWN_IF) */
-   RPC_S_NO_BINDINGS,                      /* c0020013 (RPC_NT_NO_BINDINGS) */
-   RPC_S_NO_PROTSEQS,                      /* c0020014 (RPC_NT_NO_PROTSEQS) */
-   RPC_S_CANT_CREATE_ENDPOINT,             /* c0020015 (RPC_NT_CANT_CREATE_ENDPOINT) */
-   RPC_S_OUT_OF_RESOURCES,                 /* c0020016 (RPC_NT_OUT_OF_RESOURCES) */
-   RPC_S_SERVER_UNAVAILABLE,               /* c0020017 (RPC_NT_SERVER_UNAVAILABLE) */
-   RPC_S_SERVER_TOO_BUSY,                  /* c0020018 (RPC_NT_SERVER_TOO_BUSY) */
-   RPC_S_INVALID_NETWORK_OPTIONS,          /* c0020019 (RPC_NT_INVALID_NETWORK_OPTIONS) */
-   RPC_S_NO_CALL_ACTIVE,                   /* c002001a (RPC_NT_NO_CALL_ACTIVE) */
-   RPC_S_CALL_FAILED,                      /* c002001b (RPC_NT_CALL_FAILED) */
-   RPC_S_CALL_FAILED_DNE,                  /* c002001c (RPC_NT_CALL_FAILED_DNE) */
-   RPC_S_PROTOCOL_ERROR,                   /* c002001d (RPC_NT_PROTOCOL_ERROR) */
-   0,                                      /* c002001e */
-   RPC_S_UNSUPPORTED_TRANS_SYN,            /* c002001f (RPC_NT_UNSUPPORTED_TRANS_SYN) */
-   0,                                      /* c0020020 */
-   RPC_S_UNSUPPORTED_TYPE,                 /* c0020021 (RPC_NT_UNSUPPORTED_TYPE) */
-   RPC_S_INVALID_TAG,                      /* c0020022 (RPC_NT_INVALID_TAG) */
-   RPC_S_INVALID_BOUND,                    /* c0020023 (RPC_NT_INVALID_BOUND) */
-   RPC_S_NO_ENTRY_NAME,                    /* c0020024 (RPC_NT_NO_ENTRY_NAME) */
-   RPC_S_INVALID_NAME_SYNTAX,              /* c0020025 (RPC_NT_INVALID_NAME_SYNTAX) */
-   RPC_S_UNSUPPORTED_NAME_SYNTAX,          /* c0020026 (RPC_NT_UNSUPPORTED_NAME_SYNTAX) */
-   0,                                      /* c0020027 */
-   RPC_S_UUID_NO_ADDRESS,                  /* c0020028 (RPC_NT_UUID_NO_ADDRESS) */
-   RPC_S_DUPLICATE_ENDPOINT,               /* c0020029 (RPC_NT_DUPLICATE_ENDPOINT) */
-   RPC_S_UNKNOWN_AUTHN_TYPE,               /* c002002a (RPC_NT_UNKNOWN_AUTHN_TYPE) */
-   RPC_S_MAX_CALLS_TOO_SMALL,              /* c002002b (RPC_NT_MAX_CALLS_TOO_SMALL) */
-   RPC_S_STRING_TOO_LONG,                  /* c002002c (RPC_NT_STRING_TOO_LONG) */
-   RPC_S_PROTSEQ_NOT_FOUND,                /* c002002d (RPC_NT_PROTSEQ_NOT_FOUND) */
-   RPC_S_PROCNUM_OUT_OF_RANGE,             /* c002002e (RPC_NT_PROCNUM_OUT_OF_RANGE) */
-   RPC_S_BINDING_HAS_NO_AUTH,              /* c002002f (RPC_NT_BINDING_HAS_NO_AUTH) */
-   RPC_S_UNKNOWN_AUTHN_SERVICE,            /* c0020030 (RPC_NT_UNKNOWN_AUTHN_SERVICE) */
-   RPC_S_UNKNOWN_AUTHN_LEVEL,              /* c0020031 (RPC_NT_UNKNOWN_AUTHN_LEVEL) */
-   RPC_S_INVALID_AUTH_IDENTITY,            /* c0020032 (RPC_NT_INVALID_AUTH_IDENTITY) */
-   RPC_S_UNKNOWN_AUTHZ_SERVICE,            /* c0020033 (RPC_NT_UNKNOWN_AUTHZ_SERVICE) */
-   EPT_S_INVALID_ENTRY,                    /* c0020034 (EPT_NT_INVALID_ENTRY) */
-   EPT_S_CANT_PERFORM_OP,                  /* c0020035 (EPT_NT_CANT_PERFORM_OP) */
-   EPT_S_NOT_REGISTERED,                   /* c0020036 (EPT_NT_NOT_REGISTERED) */
-   RPC_S_NOTHING_TO_EXPORT,                /* c0020037 (RPC_NT_NOTHING_TO_EXPORT) */
-   RPC_S_INCOMPLETE_NAME,                  /* c0020038 (RPC_NT_INCOMPLETE_NAME) */
-   RPC_S_INVALID_VERS_OPTION,              /* c0020039 (RPC_NT_INVALID_VERS_OPTION) */
-   RPC_S_NO_MORE_MEMBERS,                  /* c002003a (RPC_NT_NO_MORE_MEMBERS) */
-   RPC_S_NOT_ALL_OBJS_UNEXPORTED,          /* c002003b (RPC_NT_NOT_ALL_OBJS_UNEXPORTED) */
-   RPC_S_INTERFACE_NOT_FOUND,              /* c002003c (RPC_NT_INTERFACE_NOT_FOUND) */
-   RPC_S_ENTRY_ALREADY_EXISTS,             /* c002003d (RPC_NT_ENTRY_ALREADY_EXISTS) */
-   RPC_S_ENTRY_NOT_FOUND,                  /* c002003e (RPC_NT_ENTRY_NOT_FOUND) */
-   RPC_S_NAME_SERVICE_UNAVAILABLE,         /* c002003f (RPC_NT_NAME_SERVICE_UNAVAILABLE) */
-   RPC_S_INVALID_NAF_ID,                   /* c0020040 (RPC_NT_INVALID_NAF_ID) */
-   RPC_S_CANNOT_SUPPORT,                   /* c0020041 (RPC_NT_CANNOT_SUPPORT) */
-   RPC_S_NO_CONTEXT_AVAILABLE,             /* c0020042 (RPC_NT_NO_CONTEXT_AVAILABLE) */
-   RPC_S_INTERNAL_ERROR,                   /* c0020043 (RPC_NT_INTERNAL_ERROR) */
-   RPC_S_ZERO_DIVIDE,                      /* c0020044 (RPC_NT_ZERO_DIVIDE) */
-   RPC_S_ADDRESS_ERROR,                    /* c0020045 (RPC_NT_ADDRESS_ERROR) */
-   RPC_S_FP_DIV_ZERO,                      /* c0020046 (RPC_NT_FP_DIV_ZERO) */
-   RPC_S_FP_UNDERFLOW,                     /* c0020047 (RPC_NT_FP_UNDERFLOW) */
-   RPC_S_FP_OVERFLOW,                      /* c0020048 (RPC_NT_FP_OVERFLOW) */
-   RPC_S_CALL_IN_PROGRESS,                 /* c0020049 (RPC_NT_CALL_IN_PROGRESS) */
-   RPC_S_NO_MORE_BINDINGS,                 /* c002004a (RPC_NT_NO_MORE_BINDINGS) */
-   RPC_S_GROUP_MEMBER_NOT_FOUND,           /* c002004b (RPC_NT_GROUP_MEMBER_NOT_FOUND) */
-   EPT_S_CANT_CREATE,                      /* c002004c (EPT_NT_CANT_CREATE) */
-   RPC_S_INVALID_OBJECT,                   /* c002004d (RPC_NT_INVALID_OBJECT) */
-   0,                                      /* c002004e */
-   RPC_S_NO_INTERFACES,                    /* c002004f (RPC_NT_NO_INTERFACES) */
-   RPC_S_CALL_CANCELLED,                   /* c0020050 (RPC_NT_CALL_CANCELLED) */
-   RPC_S_BINDING_INCOMPLETE,               /* c0020051 (RPC_NT_BINDING_INCOMPLETE) */
-   RPC_S_COMM_FAILURE,                     /* c0020052 (RPC_NT_COMM_FAILURE) */
-   RPC_S_UNSUPPORTED_AUTHN_LEVEL,          /* c0020053 (RPC_NT_UNSUPPORTED_AUTHN_LEVEL) */
-   RPC_S_NO_PRINC_NAME,                    /* c0020054 (RPC_NT_NO_PRINC_NAME) */
-   RPC_S_NOT_RPC_ERROR,                    /* c0020055 (RPC_NT_NOT_RPC_ERROR) */
-   0,                                      /* c0020056 */
-   RPC_S_SEC_PKG_ERROR,                    /* c0020057 (RPC_NT_SEC_PKG_ERROR) */
-   RPC_S_NOT_CANCELLED,                    /* c0020058 (RPC_NT_NOT_CANCELLED) */
-   0,                                      /* c0020059 */
-   0,                                      /* c002005a */
-   0,                                      /* c002005b */
-   0,                                      /* c002005c */
-   0,                                      /* c002005d */
-   0,                                      /* c002005e */
-   0,                                      /* c002005f */
-   0,                                      /* c0020060 */
-   0,                                      /* c0020061 */
-   RPC_S_INVALID_ASYNC_HANDLE,             /* c0020062 (RPC_NT_INVALID_ASYNC_HANDLE) */
-   RPC_S_INVALID_ASYNC_CALL                /* c0020063 (RPC_NT_INVALID_ASYNC_CALL) */
-};
-
-static const DWORD table_c0030001[12] =
-{
-   RPC_X_NO_MORE_ENTRIES,                  /* c0030001 (RPC_NT_NO_MORE_ENTRIES) */
-   RPC_X_SS_CHAR_TRANS_OPEN_FAIL,          /* c0030002 (RPC_NT_SS_CHAR_TRANS_OPEN_FAIL) */
-   RPC_X_SS_CHAR_TRANS_SHORT_FILE,         /* c0030003 (RPC_NT_SS_CHAR_TRANS_SHORT_FILE) */
-   ERROR_INVALID_HANDLE,                   /* c0030004 (RPC_NT_SS_IN_NULL_CONTEXT) */
-   ERROR_INVALID_HANDLE,                   /* c0030005 (RPC_NT_SS_CONTEXT_MISMATCH) */
-   RPC_X_SS_CONTEXT_DAMAGED,               /* c0030006 (RPC_NT_SS_CONTEXT_DAMAGED) */
-   RPC_X_SS_HANDLES_MISMATCH,              /* c0030007 (RPC_NT_SS_HANDLES_MISMATCH) */
-   RPC_X_SS_CANNOT_GET_CALL_HANDLE,        /* c0030008 (RPC_NT_SS_CANNOT_GET_CALL_HANDLE) */
-   RPC_X_NULL_REF_POINTER,                 /* c0030009 (RPC_NT_NULL_REF_POINTER) */
-   RPC_X_ENUM_VALUE_OUT_OF_RANGE,          /* c003000a (RPC_NT_ENUM_VALUE_OUT_OF_RANGE) */
-   RPC_X_BYTE_COUNT_TOO_SMALL,             /* c003000b (RPC_NT_BYTE_COUNT_TOO_SMALL) */
-   RPC_X_BAD_STUB_DATA                     /* c003000c (RPC_NT_BAD_STUB_DATA) */
-};
-
-static const DWORD table_c0030059[9] =
-{
-   RPC_X_INVALID_ES_ACTION,                /* c0030059 (RPC_NT_INVALID_ES_ACTION) */
-   RPC_X_WRONG_ES_VERSION,                 /* c003005a (RPC_NT_WRONG_ES_VERSION) */
-   RPC_X_WRONG_STUB_VERSION,               /* c003005b (RPC_NT_WRONG_STUB_VERSION) */
-   RPC_X_INVALID_PIPE_OBJECT,              /* c003005c (RPC_NT_INVALID_PIPE_OBJECT) */
-   RPC_X_WRONG_PIPE_ORDER,                 /* c003005d (RPC_NT_INVALID_PIPE_OPERATION) */
-   RPC_X_WRONG_PIPE_VERSION,               /* c003005e (RPC_NT_WRONG_PIPE_VERSION) */
-   RPC_X_PIPE_CLOSED,                      /* c003005f (RPC_NT_PIPE_CLOSED) */
-   RPC_X_PIPE_DISCIPLINE_ERROR,            /* c0030060 (RPC_NT_PIPE_DISCIPLINE_ERROR) */
-   RPC_X_PIPE_EMPTY                        /* c0030061 (RPC_NT_PIPE_EMPTY) */
-};
-
-static const DWORD table_c00a0001[54] =
-{
-   ERROR_CTX_WINSTATION_NAME_INVALID,      /* c00a0001 (STATUS_CTX_WINSTATION_NAME_INVALID) */
-   ERROR_CTX_INVALID_PD,                   /* c00a0002 (STATUS_CTX_INVALID_PD) */
-   ERROR_CTX_PD_NOT_FOUND,                 /* c00a0003 (STATUS_CTX_PD_NOT_FOUND) */
-   0,                                      /* c00a0004 */
-   0,                                      /* c00a0005 */
-   ERROR_CTX_CLOSE_PENDING,                /* c00a0006 (STATUS_CTX_CLOSE_PENDING) */
-   ERROR_CTX_NO_OUTBUF,                    /* c00a0007 (STATUS_CTX_NO_OUTBUF) */
-   ERROR_CTX_MODEM_INF_NOT_FOUND,          /* c00a0008 (STATUS_CTX_MODEM_INF_NOT_FOUND) */
-   ERROR_CTX_INVALID_MODEMNAME,            /* c00a0009 (STATUS_CTX_INVALID_MODEMNAME) */
-   ERROR_CTX_MODEM_RESPONSE_ERROR,         /* c00a000a (STATUS_CTX_RESPONSE_ERROR) */
-   ERROR_CTX_MODEM_RESPONSE_TIMEOUT,       /* c00a000b (STATUS_CTX_MODEM_RESPONSE_TIMEOUT) */
-   ERROR_CTX_MODEM_RESPONSE_NO_CARRIER,    /* c00a000c (STATUS_CTX_MODEM_RESPONSE_NO_CARRIER) */
-   ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE,   /* c00a000d (STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE) */
-   ERROR_CTX_MODEM_RESPONSE_BUSY,          /* c00a000e (STATUS_CTX_MODEM_RESPONSE_BUSY) */
-   ERROR_CTX_MODEM_RESPONSE_VOICE,         /* c00a000f (STATUS_CTX_MODEM_RESPONSE_VOICE) */
-   ERROR_CTX_TD_ERROR,                     /* c00a0010 (STATUS_CTX_TD_ERROR) */
-   0,                                      /* c00a0011 */
-   ERROR_CTX_LICENSE_CLIENT_INVALID,       /* c00a0012 (STATUS_CTX_LICENSE_CLIENT_INVALID) */
-   ERROR_CTX_LICENSE_NOT_AVAILABLE,        /* c00a0013 (STATUS_CTX_LICENSE_NOT_AVAILABLE) */
-   ERROR_CTX_LICENSE_EXPIRED,              /* c00a0014 (STATUS_CTX_LICENSE_EXPIRED) */
-   ERROR_CTX_WINSTATION_NOT_FOUND,         /* c00a0015 (STATUS_CTX_WINSTATION_NOT_FOUND) */
-   ERROR_CTX_WINSTATION_ALREADY_EXISTS,    /* c00a0016 (STATUS_CTX_WINSTATION_NAME_COLLISION) */
-   ERROR_CTX_WINSTATION_BUSY,              /* c00a0017 (STATUS_CTX_WINSTATION_BUSY) */
-   ERROR_CTX_BAD_VIDEO_MODE,               /* c00a0018 (STATUS_CTX_BAD_VIDEO_MODE) */
-   0,                                      /* c00a0019 */
-   0,                                      /* c00a001a */
-   0,                                      /* c00a001b */
-   0,                                      /* c00a001c */
-   0,                                      /* c00a001d */
-   0,                                      /* c00a001e */
-   0,                                      /* c00a001f */
-   0,                                      /* c00a0020 */
-   0,                                      /* c00a0021 */
-   ERROR_CTX_GRAPHICS_INVALID,             /* c00a0022 (STATUS_CTX_GRAPHICS_INVALID) */
-   0,                                      /* c00a0023 */
-   ERROR_CTX_NOT_CONSOLE,                  /* c00a0024 (STATUS_CTX_NOT_CONSOLE) */
-   0,                                      /* c00a0025 */
-   ERROR_CTX_CLIENT_QUERY_TIMEOUT,         /* c00a0026 (STATUS_CTX_CLIENT_QUERY_TIMEOUT) */
-   ERROR_CTX_CONSOLE_DISCONNECT,           /* c00a0027 (STATUS_CTX_CONSOLE_DISCONNECT) */
-   ERROR_CTX_CONSOLE_CONNECT,              /* c00a0028 (STATUS_CTX_CONSOLE_CONNECT) */
-   0,                                      /* c00a0029 */
-   ERROR_CTX_SHADOW_DENIED,                /* c00a002a (STATUS_CTX_SHADOW_DENIED) */
-   ERROR_CTX_WINSTATION_ACCESS_DENIED,     /* c00a002b (STATUS_CTX_WINSTATION_ACCESS_DENIED) */
-   0,                                      /* c00a002c */
-   0,                                      /* c00a002d */
-   ERROR_CTX_INVALID_WD,                   /* c00a002e (STATUS_CTX_INVALID_WD) */
-   ERROR_CTX_WD_NOT_FOUND,                 /* c00a002f (STATUS_CTX_WD_NOT_FOUND) */
-   ERROR_CTX_SHADOW_INVALID,               /* c00a0030 (STATUS_CTX_SHADOW_INVALID) */
-   ERROR_CTX_SHADOW_DISABLED,              /* c00a0031 (STATUS_CTX_SHADOW_DISABLED) */
-   0,                                      /* c00a0032 (STATUS_RDP_PROTOCOL_ERROR) */
-   ERROR_CTX_CLIENT_LICENSE_NOT_SET,       /* c00a0033 (STATUS_CTX_CLIENT_LICENSE_NOT_SET) */
-   ERROR_CTX_CLIENT_LICENSE_IN_USE,        /* c00a0034 (STATUS_CTX_CLIENT_LICENSE_IN_USE) */
-   ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE,  /* c00a0035 (STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE) */
-   ERROR_CTX_SHADOW_NOT_RUNNING            /* c00a0036 (STATUS_CTX_SHADOW_NOT_RUNNING) */
-};
-
-static const DWORD table_c0130001[22] =
-{
-   ERROR_CLUSTER_INVALID_NODE,             /* c0130001 (STATUS_CLUSTER_INVALID_NODE) */
-   ERROR_CLUSTER_NODE_EXISTS,              /* c0130002 (STATUS_CLUSTER_NODE_EXISTS) */
-   ERROR_CLUSTER_JOIN_IN_PROGRESS,         /* c0130003 (STATUS_CLUSTER_JOIN_IN_PROGRESS) */
-   ERROR_CLUSTER_NODE_NOT_FOUND,           /* c0130004 (STATUS_CLUSTER_NODE_NOT_FOUND) */
-   ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND,     /* c0130005 (STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND) */
-   ERROR_CLUSTER_NETWORK_EXISTS,           /* c0130006 (STATUS_CLUSTER_NETWORK_EXISTS) */
-   ERROR_CLUSTER_NETWORK_NOT_FOUND,        /* c0130007 (STATUS_CLUSTER_NETWORK_NOT_FOUND) */
-   ERROR_CLUSTER_NETINTERFACE_EXISTS,      /* c0130008 (STATUS_CLUSTER_NETINTERFACE_EXISTS) */
-   ERROR_CLUSTER_NETINTERFACE_NOT_FOUND,   /* c0130009 (STATUS_CLUSTER_NETINTERFACE_NOT_FOUND) */
-   ERROR_CLUSTER_INVALID_REQUEST,          /* c013000a (STATUS_CLUSTER_INVALID_REQUEST) */
-   ERROR_CLUSTER_INVALID_NETWORK_PROVIDER, /* c013000b (STATUS_CLUSTER_INVALID_NETWORK_PROVIDER) */
-   ERROR_CLUSTER_NODE_DOWN,                /* c013000c (STATUS_CLUSTER_NODE_DOWN) */
-   ERROR_CLUSTER_NODE_UNREACHABLE,         /* c013000d (STATUS_CLUSTER_NODE_UNREACHABLE) */
-   ERROR_CLUSTER_NODE_NOT_MEMBER,          /* c013000e (STATUS_CLUSTER_NODE_NOT_MEMBER) */
-   ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS,     /* c013000f (STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS) */
-   ERROR_CLUSTER_INVALID_NETWORK,          /* c0130010 (STATUS_CLUSTER_INVALID_NETWORK) */
-   0,                                      /* c0130011 (STATUS_CLUSTER_NO_NET_ADAPTERS) */
-   ERROR_CLUSTER_NODE_UP,                  /* c0130012 (STATUS_CLUSTER_NODE_UP) */
-   ERROR_CLUSTER_NODE_PAUSED,              /* c0130013 (STATUS_CLUSTER_NODE_PAUSED) */
-   ERROR_CLUSTER_NODE_NOT_PAUSED,          /* c0130014 (STATUS_CLUSTER_NODE_NOT_PAUSED) */
-   ERROR_CLUSTER_NO_SECURITY_CONTEXT,      /* c0130015 (STATUS_CLUSTER_NO_SECURITY_CONTEXT) */
-   ERROR_CLUSTER_NETWORK_NOT_INTERNAL      /* c0130016 (STATUS_CLUSTER_NETWORK_NOT_INTERNAL) */
-};
-
-static const DWORD table_c0150001[14] =
-{
-   ERROR_SXS_SECTION_NOT_FOUND,            /* c0150001 (STATUS_SXS_SECTION_NOT_FOUND) */
-   ERROR_SXS_CANT_GEN_ACTCTX,              /* c0150002 (STATUS_SXS_CANT_GEN_ACTCTX) */
-   ERROR_SXS_INVALID_ACTCTXDATA_FORMAT,    /* c0150003 (STATUS_SXS_INVALID_ACTCTXDATA_FORMAT) */
-   ERROR_SXS_ASSEMBLY_NOT_FOUND,           /* c0150004 (STATUS_SXS_ASSEMBLY_NOT_FOUND) */
-   ERROR_SXS_MANIFEST_FORMAT_ERROR,        /* c0150005 (STATUS_SXS_MANIFEST_FORMAT_ERROR) */
-   ERROR_SXS_MANIFEST_PARSE_ERROR,         /* c0150006 (STATUS_SXS_MANIFEST_PARSE_ERROR) */
-   ERROR_SXS_ACTIVATION_CONTEXT_DISABLED,  /* c0150007 (STATUS_SXS_ACTIVATION_CONTEXT_DISABLED) */
-   ERROR_SXS_KEY_NOT_FOUND,                /* c0150008 (STATUS_SXS_KEY_NOT_FOUND) */
-   0,                                      /* c0150009 (STATUS_SXS_VERSION_CONFLICT) */
-   ERROR_SXS_WRONG_SECTION_TYPE,           /* c015000a (STATUS_SXS_WRONG_SECTION_TYPE) */
-   ERROR_SXS_THREAD_QUERIES_DISABLED,      /* c015000b (STATUS_SXS_THREAD_QUERIES_DISABLED) */
-   0,                                      /* c015000c (STATUS_SXS_ASSEMBLY_MISSING) */
-   0,                                      /* c015000d */
-   ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET   /* c015000e (STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET) */
-};
-
-static const struct error_table error_table[] =
-{
-    { 0x00000102, 0x00000122, table_00000102 },
-    { 0x40000002, 0x4000000e, table_40000002 },
-    { 0x40000370, 0x40000371, table_40000370 },
-    { 0x40020056, 0x40020057, table_40020056 },
-    { 0x400200af, 0x400200b0, table_400200af },
-    { 0x80000001, 0x80000028, table_80000001 },
-    { 0x80000288, 0x8000028a, table_80000288 },
-    { 0x80090300, 0x80090348, table_80090300 },
-    { 0x80092010, 0x80092014, table_80092010 },
-    { 0x80096004, 0x80096005, table_80096004 },
-    { 0x80130001, 0x80130006, table_80130001 },
-    { 0xc0000001, 0xc000019c, table_c0000001 },
-    { 0xc0000202, 0xc000038e, table_c0000202 },
-    { 0xc0020001, 0xc0020064, table_c0020001 },
-    { 0xc0030001, 0xc003000d, table_c0030001 },
-    { 0xc0030059, 0xc0030062, table_c0030059 },
-    { 0xc00a0001, 0xc00a0037, table_c00a0001 },
-    { 0xc0130001, 0xc0130017, table_c0130001 },
-    { 0xc0150001, 0xc015000f, table_c0150001 },
-    { 0, 0, 0 }  /* last entry */
-};
+/* From wine1.2-1.1.42/dlls/ntdll/error.c  */\r
+\r
+/*\r
+ * NTDLL error handling\r
+ *\r
+ * Copyright 2000 Alexandre Julliard\r
+ * Copyright 2002 Andriy Palamarchuk\r
+ *\r
+ * This library is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU Lesser General Public\r
+ * License as published by the Free Software Foundation; either\r
+ * version 2.1 of the License, or (at your option) any later version.\r
+ *\r
+ * This library is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * Lesser General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
+\r
+\r
+#include "wine.h"\r
+\r
+\r
+struct error_table\r
+{\r
+    DWORD       start;\r
+    DWORD       end;\r
+    const DWORD *table;\r
+};\r
+\r
+static const struct error_table error_table[20];\r
+\r
+/**************************************************************************\r
+ *           RtlNtStatusToDosErrorNoTeb (NTDLL.@)\r
+ *\r
+ * Convert an NTSTATUS code to a Win32 error code.\r
+ *\r
+ * PARAMS\r
+ *  status [I] Nt error code to map.\r
+ *\r
+ * RETURNS\r
+ *  The mapped Win32 error code, or ERROR_MR_MID_NOT_FOUND if there is no\r
+ *  mapping defined.\r
+ */\r
+static ULONG WINAPI MyRtlNtStatusToDosErrorNoTeb( NTSTATUS status )\r
+{\r
+    const struct error_table *table = error_table;\r
+\r
+    if (!status || (status & 0x20000000)) return status;\r
+\r
+    /* 0xd... is equivalent to 0xc... */\r
+    if ((status & 0xf0000000) == 0xd0000000) status &= ~0x10000000;\r
+\r
+    while (table->start)\r
+    {\r
+        if ((DWORD)status < table->start) break;\r
+        if ((DWORD)status < table->end)\r
+        {\r
+            DWORD ret = table->table[status - table->start];\r
+            /* unknown entries are 0 */\r
+            if (!ret) goto no_mapping;\r
+            return ret;\r
+        }\r
+        table++;\r
+    }\r
+\r
+    /* now some special cases */\r
+    if (HIWORD(status) == 0xc001) return LOWORD(status);\r
+    if (HIWORD(status) == 0x8007) return LOWORD(status);\r
+\r
+no_mapping:\r
+    TRACE( "no mapping for %08x\n", status );\r
+    return ERROR_MR_MID_NOT_FOUND;\r
+}\r
+\r
+/**************************************************************************\r
+ *           RtlNtStatusToDosError (NTDLL.@)\r
+ *\r
+ * Convert an NTSTATUS code to a Win32 error code.\r
+ *\r
+ * PARAMS\r
+ *  status [I] Nt error code to map.\r
+ *\r
+ * RETURNS\r
+ *  The mapped Win32 error code, or ERROR_MR_MID_NOT_FOUND if there is no\r
+ *  mapping defined.\r
+ */\r
+ULONG WINAPI MyRtlNtStatusToDosError( NTSTATUS status )\r
+{\r
+    return MyRtlNtStatusToDosErrorNoTeb( status );\r
+}\r
+\r
+/* conversion tables */\r
+\r
+static const DWORD table_00000102[32] =\r
+{\r
+   ERROR_TIMEOUT,                          /* 00000102 (STATUS_TIMEOUT) */\r
+   ERROR_IO_PENDING,                       /* 00000103 (STATUS_PENDING) */\r
+   0,                                      /* 00000104 (STATUS_REPARSE) */\r
+   ERROR_MORE_DATA,                        /* 00000105 (STATUS_MORE_ENTRIES) */\r
+   ERROR_NOT_ALL_ASSIGNED,                 /* 00000106 (STATUS_NOT_ALL_ASSIGNED) */\r
+   ERROR_SOME_NOT_MAPPED,                  /* 00000107 (STATUS_SOME_NOT_MAPPED) */\r
+   0,                                      /* 00000108 (STATUS_OPLOCK_BREAK_IN_PROGRESS) */\r
+   0,                                      /* 00000109 (STATUS_VOLUME_MOUNTED) */\r
+   0,                                      /* 0000010a (STATUS_RXACT_COMMITTED) */\r
+   0,                                      /* 0000010b (STATUS_NOTIFY_CLEANUP) */\r
+   ERROR_NOTIFY_ENUM_DIR,                  /* 0000010c (STATUS_NOTIFY_ENUM_DIR) */\r
+   ERROR_NO_QUOTAS_FOR_ACCOUNT,            /* 0000010d (STATUS_NO_QUOTAS_FOR_ACCOUNT) */\r
+   0,                                      /* 0000010e (STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED) */\r
+   0,                                      /* 0000010f */\r
+   0,                                      /* 00000110 (STATUS_PAGE_FAULT_TRANSITION) */\r
+   0,                                      /* 00000111 (STATUS_PAGE_FAULT_DEMAND_ZERO) */\r
+   0,                                      /* 00000112 (STATUS_PAGE_FAULT_COPY_ON_WRITE) */\r
+   0,                                      /* 00000113 (STATUS_PAGE_FAULT_GUARD_PAGE) */\r
+   0,                                      /* 00000114 (STATUS_PAGE_FAULT_PAGING_FILE) */\r
+   0,                                      /* 00000115 (STATUS_CACHE_PAGE_LOCKED) */\r
+   0,                                      /* 00000116 (STATUS_CRASH_DUMP) */\r
+   0,                                      /* 00000117 (STATUS_BUFFER_ALL_ZEROS) */\r
+   0,                                      /* 00000118 (STATUS_REPARSE_OBJECT) */\r
+   0,                                      /* 00000119 (STATUS_RESOURCE_REQUIREMENTS_CHANGED) */\r
+   0,                                      /* 0000011a */\r
+   0,                                      /* 0000011b */\r
+   0,                                      /* 0000011c */\r
+   0,                                      /* 0000011d */\r
+   0,                                      /* 0000011e */\r
+   0,                                      /* 0000011f */\r
+   0,                                      /* 00000120 (STATUS_TRANSLATION_COMPLETE) */\r
+   ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY   /* 00000121 (STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY) */\r
+};\r
+\r
+static const DWORD table_40000002[12] =\r
+{\r
+   ERROR_INVALID_PARAMETER,                /* 40000002 (STATUS_WORKING_SET_LIMIT_RANGE) */\r
+   0,                                      /* 40000003 (STATUS_IMAGE_NOT_AT_BASE) */\r
+   0,                                      /* 40000004 (STATUS_RXACT_STATE_CREATED) */\r
+   0,                                      /* 40000005 (STATUS_SEGMENT_NOTIFICATION) */\r
+   ERROR_LOCAL_USER_SESSION_KEY,           /* 40000006 (STATUS_LOCAL_USER_SESSION_KEY) */\r
+   0,                                      /* 40000007 (STATUS_BAD_CURRENT_DIRECTORY) */\r
+   ERROR_MORE_WRITES,                      /* 40000008 (STATUS_SERIAL_MORE_WRITES) */\r
+   ERROR_REGISTRY_RECOVERED,               /* 40000009 (STATUS_REGISTRY_RECOVERED) */\r
+   0,                                      /* 4000000a (STATUS_FT_READ_RECOVERY_FROM_BACKUP) */\r
+   0,                                      /* 4000000b (STATUS_FT_WRITE_RECOVERY) */\r
+   ERROR_COUNTER_TIMEOUT,                  /* 4000000c (STATUS_SERIAL_COUNTER_TIMEOUT) */\r
+   ERROR_NULL_LM_PASSWORD                  /* 4000000d (STATUS_NULL_LM_PASSWORD) */\r
+};\r
+\r
+static const DWORD table_40000370[1] =\r
+{\r
+   ERROR_DS_SHUTTING_DOWN                  /* 40000370 (STATUS_DS_SHUTTING_DOWN) */\r
+};\r
+\r
+static const DWORD table_40020056[1] =\r
+{\r
+   RPC_S_UUID_LOCAL_ONLY                   /* 40020056 (RPC_NT_UUID_LOCAL_ONLY) */\r
+};\r
+\r
+static const DWORD table_400200af[1] =\r
+{\r
+   RPC_S_SEND_INCOMPLETE                   /* 400200af (RPC_NT_SEND_INCOMPLETE) */\r
+};\r
+static const DWORD table_80000001[39] =\r
+{\r
+   STATUS_GUARD_PAGE_VIOLATION,            /* 80000001 (STATUS_GUARD_PAGE_VIOLATION) */\r
+   ERROR_NOACCESS,                         /* 80000002 (STATUS_DATATYPE_MISALIGNMENT) */\r
+   STATUS_BREAKPOINT,                      /* 80000003 (STATUS_BREAKPOINT) */\r
+   STATUS_SINGLE_STEP,                     /* 80000004 (STATUS_SINGLE_STEP) */\r
+   ERROR_MORE_DATA,                        /* 80000005 (STATUS_BUFFER_OVERFLOW) */\r
+   ERROR_NO_MORE_FILES,                    /* 80000006 (STATUS_NO_MORE_FILES) */\r
+   0,                                      /* 80000007 (STATUS_WAKE_SYSTEM_DEBUGGER) */\r
+   0,                                      /* 80000008 */\r
+   0,                                      /* 80000009 */\r
+   0, //ERROR_HANDLES_CLOSED,                   /* 8000000a (STATUS_HANDLES_CLOSED) */\r
+   ERROR_NO_INHERITANCE,                   /* 8000000b (STATUS_NO_INHERITANCE) */\r
+   0,                                      /* 8000000c (STATUS_GUID_SUBSTITUTION_MADE) */\r
+   ERROR_PARTIAL_COPY,                     /* 8000000d (STATUS_PARTIAL_COPY) */\r
+   ERROR_OUT_OF_PAPER,                     /* 8000000e (STATUS_DEVICE_PAPER_EMPTY) */\r
+   ERROR_NOT_READY,                        /* 8000000f (STATUS_DEVICE_POWERED_OFF) */\r
+   ERROR_NOT_READY,                        /* 80000010 (STATUS_DEVICE_OFF_LINE) */\r
+   ERROR_BUSY,                             /* 80000011 (STATUS_DEVICE_BUSY) */\r
+   ERROR_NO_MORE_ITEMS,                    /* 80000012 (STATUS_NO_MORE_EAS) */\r
+   ERROR_INVALID_EA_NAME,                  /* 80000013 (STATUS_INVALID_EA_NAME) */\r
+   ERROR_EA_LIST_INCONSISTENT,             /* 80000014 (STATUS_EA_LIST_INCONSISTENT) */\r
+   ERROR_EA_LIST_INCONSISTENT,             /* 80000015 (STATUS_INVALID_EA_FLAG) */\r
+   ERROR_MEDIA_CHANGED,                    /* 80000016 (STATUS_VERIFY_REQUIRED) */\r
+   0,                                      /* 80000017 (STATUS_EXTRANEOUS_INFORMATION) */\r
+   0,                                      /* 80000018 (STATUS_RXACT_COMMIT_NECESSARY) */\r
+   0,                                      /* 80000019 */\r
+   ERROR_NO_MORE_ITEMS,                    /* 8000001a (STATUS_NO_MORE_ENTRIES) */\r
+   ERROR_FILEMARK_DETECTED,                /* 8000001b (STATUS_FILEMARK_DETECTED) */\r
+   ERROR_MEDIA_CHANGED,                    /* 8000001c (STATUS_MEDIA_CHANGED) */\r
+   ERROR_BUS_RESET,                        /* 8000001d (STATUS_BUS_RESET) */\r
+   ERROR_END_OF_MEDIA,                     /* 8000001e (STATUS_END_OF_MEDIA) */\r
+   ERROR_BEGINNING_OF_MEDIA,               /* 8000001f (STATUS_BEGINNING_OF_MEDIA) */\r
+   0,                                      /* 80000020 (STATUS_MEDIA_CHECK) */\r
+   ERROR_SETMARK_DETECTED,                 /* 80000021 (STATUS_SETMARK_DETECTED) */\r
+   ERROR_NO_DATA_DETECTED,                 /* 80000022 (STATUS_NO_DATA_DETECTED) */\r
+   0,                                      /* 80000023 (STATUS_REDIRECTOR_HAS_OPEN_HANDLES) */\r
+   0,                                      /* 80000024 (STATUS_SERVER_HAS_OPEN_HANDLES) */\r
+   ERROR_ACTIVE_CONNECTIONS,               /* 80000025 (STATUS_ALREADY_DISCONNECTED) */\r
+   0,                                      /* 80000026 (STATUS_LONGJUMP) */\r
+   ERROR_CLEANER_CARTRIDGE_INSTALLED       /* 80000027 (STATUS_CLEANER_CARTRIDGE_INSTALLED) */\r
+};\r
+\r
+static const DWORD table_80000288[2] =\r
+{\r
+   ERROR_DEVICE_REQUIRES_CLEANING,         /* 80000288 (STATUS_DEVICE_REQUIRES_CLEANING) */\r
+   ERROR_DEVICE_DOOR_OPEN                  /* 80000289 (STATUS_DEVICE_DOOR_OPEN) */\r
+};\r
+\r
+static const DWORD table_80090300[72] =\r
+{\r
+   ERROR_NO_SYSTEM_RESOURCES,              /* 80090300 (SEC_E_INSUFFICIENT_MEMORY) */\r
+   ERROR_INVALID_HANDLE,                   /* 80090301 (SEC_E_INVALID_HANDLE) */\r
+   ERROR_INVALID_FUNCTION,                 /* 80090302 (SEC_E_UNSUPPORTED_FUNCTION) */\r
+   ERROR_BAD_NETPATH,                      /* 80090303 (SEC_E_TARGET_UNKNOWN) */\r
+   ERROR_INTERNAL_ERROR,                   /* 80090304 (SEC_E_INTERNAL_ERROR) */\r
+   ERROR_NO_SUCH_PACKAGE,                  /* 80090305 (SEC_E_SECPKG_NOT_FOUND) */\r
+   ERROR_NOT_OWNER,                        /* 80090306 (SEC_E_NOT_OWNER) */\r
+   ERROR_NO_SUCH_PACKAGE,                  /* 80090307 (SEC_E_CANNOT_INSTALL) */\r
+   ERROR_INVALID_PARAMETER,                /* 80090308 (SEC_E_INVALID_TOKEN) */\r
+   ERROR_INVALID_PARAMETER,                /* 80090309 (SEC_E_CANNOT_PACK) */\r
+   ERROR_NOT_SUPPORTED,                    /* 8009030a (SEC_E_QOP_NOT_SUPPORTED) */\r
+   ERROR_CANNOT_IMPERSONATE,               /* 8009030b (SEC_E_NO_IMPERSONATION) */\r
+   ERROR_LOGON_FAILURE,                    /* 8009030c (SEC_E_LOGON_DENIED) */\r
+   ERROR_INVALID_PARAMETER,                /* 8009030d (SEC_E_UNKNOWN_CREDENTIALS) */\r
+   ERROR_NO_SUCH_LOGON_SESSION,            /* 8009030e (SEC_E_NO_CREDENTIALS) */\r
+   ERROR_ACCESS_DENIED,                    /* 8009030f (SEC_E_MESSAGE_ALTERED) */\r
+   ERROR_ACCESS_DENIED,                    /* 80090310 (SEC_E_OUT_OF_SEQUENCE) */\r
+   ERROR_NO_LOGON_SERVERS,                 /* 80090311 (SEC_E_NO_AUTHENTICATING_AUTHORITY) */\r
+   0,                                      /* 80090312 */\r
+   0,                                      /* 80090313 */\r
+   0,                                      /* 80090314 */\r
+   0,                                      /* 80090315 */\r
+   ERROR_NO_SUCH_PACKAGE,                  /* 80090316 (SEC_E_BAD_PKGID) */\r
+   ERROR_CONTEXT_EXPIRED,                  /* 80090317 (SEC_E_CONTEXT_EXPIRED) */\r
+   ERROR_INVALID_USER_BUFFER,              /* 80090318 (SEC_E_INCOMPLETE_MESSAGE) */\r
+   0,                                      /* 80090319 */\r
+   0,                                      /* 8009031a */\r
+   0,                                      /* 8009031b */\r
+   0,                                      /* 8009031c */\r
+   0,                                      /* 8009031d */\r
+   0,                                      /* 8009031e */\r
+   0,                                      /* 8009031f */\r
+   ERROR_INVALID_PARAMETER,                /* 80090320 (SEC_E_INCOMPLETE_CREDENTIALS) */\r
+   ERROR_INSUFFICIENT_BUFFER,              /* 80090321 (SEC_E_BUFFER_TOO_SMALL) */\r
+   ERROR_WRONG_TARGET_NAME,                /* 80090322 (SEC_E_WRONG_PRINCIPAL) */\r
+   0,                                      /* 80090323 */\r
+   0,                                      /* 80090324 (SEC_E_TIME_SKEW) */\r
+   ERROR_TRUST_FAILURE,                    /* 80090325 (SEC_E_UNTRUSTED_ROOT) */\r
+   ERROR_INVALID_PARAMETER,                /* 80090326 (SEC_E_ILLEGAL_MESSAGE) */\r
+   ERROR_INVALID_PARAMETER,                /* 80090327 (SEC_E_CERT_UNKNOWN) */\r
+   ERROR_PASSWORD_EXPIRED,                 /* 80090328 (SEC_E_CERT_EXPIRED) */\r
+   ERROR_ENCRYPTION_FAILED,                /* 80090329 (SEC_E_ENCRYPT_FAILURE) */\r
+   0,                                      /* 8009032a */\r
+   0,                                      /* 8009032b */\r
+   0,                                      /* 8009032c */\r
+   0,                                      /* 8009032d */\r
+   0,                                      /* 8009032e */\r
+   0,                                      /* 8009032f */\r
+   ERROR_DECRYPTION_FAILED,                /* 80090330 (SEC_E_DECRYPT_FAILURE) */\r
+   ERROR_INVALID_FUNCTION,                 /* 80090331 (SEC_E_ALGORITHM_MISMATCH) */\r
+   0,                                      /* 80090332 (SEC_E_SECURITY_QOS_FAILED) */\r
+   0,                                      /* 80090333 (SEC_E_UNFINISHED_CONTEXT_DELETED) */\r
+   0,                                      /* 80090334 (SEC_E_NO_TGT_REPLY) */\r
+   0,                                      /* 80090335 (SEC_E_NO_IP_ADDRESSES) */\r
+   0,                                      /* 80090336 (SEC_E_WRONG_CREDENTIAL_HANDLE) */\r
+   0,                                      /* 80090337 (SEC_E_CRYPTO_SYSTEM_INVALID) */\r
+   0,                                      /* 80090338 (SEC_E_MAX_REFERRALS_EXCEEDED) */\r
+   0,                                      /* 80090339 (SEC_E_MUST_BE_KDC) */\r
+   0,                                      /* 8009033a (SEC_E_STRONG_CRYPTO_NOT_SUPPORTED) */\r
+   0,                                      /* 8009033b (SEC_E_TOO_MANY_PRINCIPALS) */\r
+   0,                                      /* 8009033c (SEC_E_NO_PA_DATA) */\r
+   0,                                      /* 8009033d (SEC_E_PKINIT_NAME_MISMATCH) */\r
+   0,                                      /* 8009033e (SEC_E_SMARTCARD_LOGON_REQUIRED) */\r
+   0,                                      /* 8009033f (SEC_E_SHUTDOWN_IN_PROGRESS) */\r
+   0,                                      /* 80090340 (SEC_E_KDC_INVALID_REQUEST) */\r
+   0,                                      /* 80090341 (SEC_E_KDC_UNABLE_TO_REFER) */\r
+   0,                                      /* 80090342 (SEC_E_KDC_UNKNOWN_ETYPE) */\r
+   0,                                      /* 80090343 (SEC_E_UNSUPPORTED_PREAUTH) */\r
+   0,                                      /* 80090344 */\r
+   0,                                      /* 80090345 (SEC_E_DELEGATION_REQUIRED) */\r
+   0,                                      /* 80090346 (SEC_E_BAD_BINDINGS) */\r
+   ERROR_CANNOT_IMPERSONATE                /* 80090347 (SEC_E_MULTIPLE_ACCOUNTS) */\r
+};\r
+\r
+static const DWORD table_80092010[4] =\r
+{\r
+    ERROR_MUTUAL_AUTH_FAILED,              /* 80092010 (CRYPT_E_REVOKED) */\r
+    0,                                     /* 80092011 (CRYPT_E_NO_REVOCATION_DLL) */\r
+    ERROR_MUTUAL_AUTH_FAILED,              /* 80092012 (CRYPT_E_NO_REVOCATION_CHECK) */\r
+    ERROR_MUTUAL_AUTH_FAILED               /* 80092013 (CRYPT_E_REVOCATION_OFFLINE) */\r
+};\r
+\r
+static const DWORD table_80096004[1] =\r
+{\r
+   ERROR_MUTUAL_AUTH_FAILED                /* 80096004 (TRUST_E_CERT_SIGNATURE) */\r
+};\r
+\r
+static const DWORD table_80130001[5] =\r
+{\r
+    ERROR_CLUSTER_NODE_ALREADY_UP,         /* 80130001 (STATUS_CLUSTER_NODE_ALREADY_UP) */\r
+    ERROR_CLUSTER_NODE_ALREADY_DOWN,       /* 80130002 (STATUS_CLUSTER_NODE_ALREADY_DOWN) */\r
+    ERROR_CLUSTER_NETWORK_ALREADY_ONLINE,  /* 80130003 (STATUS_CLUSTER_NETWORK_ALREADY_ONLINE) */\r
+    ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE, /* 80130004 (STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE) */\r
+    ERROR_CLUSTER_NODE_ALREADY_MEMBER      /* 80130005 (STATUS_CLUSTER_NODE_ALREADY_MEMBER) */\r
+};\r
+\r
+static const DWORD table_c0000001[411] =\r
+{\r
+   ERROR_GEN_FAILURE,                      /* c0000001 (STATUS_UNSUCCESSFUL) */\r
+   ERROR_INVALID_FUNCTION,                 /* c0000002 (STATUS_NOT_IMPLEMENTED) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000003 (STATUS_INVALID_INFO_CLASS) */\r
+   ERROR_BAD_LENGTH,                       /* c0000004 (STATUS_INFO_LENGTH_MISMATCH) */\r
+   ERROR_NOACCESS,                         /* c0000005 (STATUS_ACCESS_VIOLATION) */\r
+   ERROR_SWAPERROR,                        /* c0000006 (STATUS_IN_PAGE_ERROR) */\r
+   ERROR_PAGEFILE_QUOTA,                   /* c0000007 (STATUS_PAGEFILE_QUOTA) */\r
+   ERROR_INVALID_HANDLE,                   /* c0000008 (STATUS_INVALID_HANDLE) */\r
+   ERROR_STACK_OVERFLOW,                   /* c0000009 (STATUS_BAD_INITIAL_STACK) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c000000a (STATUS_BAD_INITIAL_PC) */\r
+   ERROR_INVALID_PARAMETER,                /* c000000b (STATUS_INVALID_CID) */\r
+   0,                                      /* c000000c (STATUS_TIMER_NOT_CANCELED) */\r
+   ERROR_INVALID_PARAMETER,                /* c000000d (STATUS_INVALID_PARAMETER) */\r
+   ERROR_FILE_NOT_FOUND,                   /* c000000e (STATUS_NO_SUCH_DEVICE) */\r
+   ERROR_FILE_NOT_FOUND,                   /* c000000f (STATUS_NO_SUCH_FILE) */\r
+   ERROR_INVALID_FUNCTION,                 /* c0000010 (STATUS_INVALID_DEVICE_REQUEST) */\r
+   ERROR_HANDLE_EOF,                       /* c0000011 (STATUS_END_OF_FILE) */\r
+   ERROR_WRONG_DISK,                       /* c0000012 (STATUS_WRONG_VOLUME) */\r
+   ERROR_NOT_READY,                        /* c0000013 (STATUS_NO_MEDIA_IN_DEVICE) */\r
+   ERROR_UNRECOGNIZED_MEDIA,               /* c0000014 (STATUS_UNRECOGNIZED_MEDIA) */\r
+   ERROR_SECTOR_NOT_FOUND,                 /* c0000015 (STATUS_NONEXISTENT_SECTOR) */\r
+   ERROR_MORE_DATA,                        /* c0000016 (STATUS_MORE_PROCESSING_REQUIRED) */\r
+   ERROR_NOT_ENOUGH_MEMORY,                /* c0000017 (STATUS_NO_MEMORY) */\r
+   ERROR_INVALID_ADDRESS,                  /* c0000018 (STATUS_CONFLICTING_ADDRESSES) */\r
+   ERROR_INVALID_ADDRESS,                  /* c0000019 (STATUS_NOT_MAPPED_VIEW) */\r
+   ERROR_INVALID_PARAMETER,                /* c000001a (STATUS_UNABLE_TO_FREE_VM) */\r
+   ERROR_INVALID_PARAMETER,                /* c000001b (STATUS_UNABLE_TO_DELETE_SECTION) */\r
+   ERROR_INVALID_FUNCTION,                 /* c000001c (STATUS_INVALID_SYSTEM_SERVICE) */\r
+   ERROR_INVALID_FUNCTION,                 /* c000001d (STATUS_ILLEGAL_INSTRUCTION) */\r
+   ERROR_ACCESS_DENIED,                    /* c000001e (STATUS_INVALID_LOCK_SEQUENCE) */\r
+   ERROR_ACCESS_DENIED,                    /* c000001f (STATUS_INVALID_VIEW_SIZE) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c0000020 (STATUS_INVALID_FILE_FOR_SECTION) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000021 (STATUS_ALREADY_COMMITTED) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000022 (STATUS_ACCESS_DENIED) */\r
+   ERROR_INSUFFICIENT_BUFFER,              /* c0000023 (STATUS_BUFFER_TOO_SMALL) */\r
+   ERROR_INVALID_HANDLE,                   /* c0000024 (STATUS_OBJECT_TYPE_MISMATCH) */\r
+   STATUS_NONCONTINUABLE_EXCEPTION,        /* c0000025 (STATUS_NONCONTINUABLE_EXCEPTION) */\r
+   STATUS_INVALID_DISPOSITION,             /* c0000026 (STATUS_INVALID_DISPOSITION) */\r
+   0,                                      /* c0000027 (STATUS_UNWIND) */\r
+   0,                                      /* c0000028 (STATUS_BAD_STACK) */\r
+   0,                                      /* c0000029 (STATUS_INVALID_UNWIND_TARGET) */\r
+   ERROR_NOT_LOCKED,                       /* c000002a (STATUS_NOT_LOCKED) */\r
+   STATUS_PARITY_ERROR,                    /* c000002b (STATUS_PARITY_ERROR) */\r
+   ERROR_INVALID_ADDRESS,                  /* c000002c (STATUS_UNABLE_TO_DECOMMIT_VM) */\r
+   ERROR_INVALID_ADDRESS,                  /* c000002d (STATUS_NOT_COMMITTED) */\r
+   0,                                      /* c000002e (STATUS_INVALID_PORT_ATTRIBUTES) */\r
+   0,                                      /* c000002f (STATUS_PORT_MESSAGE_TOO_LONG) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000030 (STATUS_INVALID_PARAMETER_MIX) */\r
+   0,                                      /* c0000031 (STATUS_INVALID_QUOTA_LOWER) */\r
+   ERROR_DISK_CORRUPT,                     /* c0000032 (STATUS_DISK_CORRUPT_ERROR) */\r
+   ERROR_INVALID_NAME,                     /* c0000033 (STATUS_OBJECT_NAME_INVALID) */\r
+   ERROR_FILE_NOT_FOUND,                   /* c0000034 (STATUS_OBJECT_NAME_NOT_FOUND) */\r
+   ERROR_ALREADY_EXISTS,                   /* c0000035 (STATUS_OBJECT_NAME_COLLISION) */\r
+   0,                                      /* c0000036 */\r
+   ERROR_INVALID_HANDLE,                   /* c0000037 (STATUS_PORT_DISCONNECTED) */\r
+   0,                                      /* c0000038 (STATUS_DEVICE_ALREADY_ATTACHED) */\r
+   ERROR_BAD_PATHNAME,                     /* c0000039 (STATUS_OBJECT_PATH_INVALID) */\r
+   ERROR_PATH_NOT_FOUND,                   /* c000003a (STATUS_OBJECT_PATH_NOT_FOUND) */\r
+   ERROR_BAD_PATHNAME,                     /* c000003b (STATUS_OBJECT_PATH_SYNTAX_BAD) */\r
+   ERROR_IO_DEVICE,                        /* c000003c (STATUS_DATA_OVERRUN) */\r
+   ERROR_IO_DEVICE,                        /* c000003d (STATUS_DATA_LATE_ERROR) */\r
+   ERROR_CRC,                              /* c000003e (STATUS_DATA_ERROR) */\r
+   ERROR_CRC,                              /* c000003f (STATUS_CRC_ERROR) */\r
+   ERROR_NOT_ENOUGH_MEMORY,                /* c0000040 (STATUS_SECTION_TOO_BIG) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000041 (STATUS_PORT_CONNECTION_REFUSED) */\r
+   ERROR_INVALID_HANDLE,                   /* c0000042 (STATUS_INVALID_PORT_HANDLE) */\r
+   ERROR_SHARING_VIOLATION,                /* c0000043 (STATUS_SHARING_VIOLATION) */\r
+   ERROR_NOT_ENOUGH_QUOTA,                 /* c0000044 (STATUS_QUOTA_EXCEEDED) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000045 (STATUS_INVALID_PAGE_PROTECTION) */\r
+   ERROR_NOT_OWNER,                        /* c0000046 (STATUS_MUTANT_NOT_OWNED) */\r
+   ERROR_TOO_MANY_POSTS,                   /* c0000047 (STATUS_SEMAPHORE_LIMIT_EXCEEDED) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000048 (STATUS_PORT_ALREADY_SET) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000049 (STATUS_SECTION_NOT_IMAGE) */\r
+   ERROR_SIGNAL_REFUSED,                   /* c000004a (STATUS_SUSPEND_COUNT_EXCEEDED) */\r
+   ERROR_ACCESS_DENIED,                    /* c000004b (STATUS_THREAD_IS_TERMINATING) */\r
+   ERROR_INVALID_PARAMETER,                /* c000004c (STATUS_BAD_WORKING_SET_LIMIT) */\r
+   ERROR_INVALID_PARAMETER,                /* c000004d (STATUS_INCOMPATIBLE_FILE_MAP) */\r
+   ERROR_INVALID_PARAMETER,                /* c000004e (STATUS_SECTION_PROTECTION) */\r
+   ERROR_EAS_NOT_SUPPORTED,                /* c000004f (STATUS_EAS_NOT_SUPPORTED) */\r
+   ERROR_EA_LIST_INCONSISTENT,             /* c0000050 (STATUS_EA_TOO_LARGE) */\r
+   ERROR_FILE_CORRUPT,                     /* c0000051 (STATUS_NONEXISTENT_EA_ENTRY) */\r
+   ERROR_FILE_CORRUPT,                     /* c0000052 (STATUS_NO_EAS_ON_FILE) */\r
+   ERROR_FILE_CORRUPT,                     /* c0000053 (STATUS_EA_CORRUPT_ERROR) */\r
+   ERROR_LOCK_VIOLATION,                   /* c0000054 (STATUS_FILE_LOCK_CONFLICT) */\r
+   ERROR_LOCK_VIOLATION,                   /* c0000055 (STATUS_LOCK_NOT_GRANTED) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000056 (STATUS_DELETE_PENDING) */\r
+   ERROR_NOT_SUPPORTED,                    /* c0000057 (STATUS_CTL_FILE_NOT_SUPPORTED) */\r
+   ERROR_UNKNOWN_REVISION,                 /* c0000058 (STATUS_UNKNOWN_REVISION) */\r
+   ERROR_REVISION_MISMATCH,                /* c0000059 (STATUS_REVISION_MISMATCH) */\r
+   ERROR_INVALID_OWNER,                    /* c000005a (STATUS_INVALID_OWNER) */\r
+   ERROR_INVALID_PRIMARY_GROUP,            /* c000005b (STATUS_INVALID_PRIMARY_GROUP) */\r
+   ERROR_NO_IMPERSONATION_TOKEN,           /* c000005c (STATUS_NO_IMPERSONATION_TOKEN) */\r
+   ERROR_CANT_DISABLE_MANDATORY,           /* c000005d (STATUS_CANT_DISABLE_MANDATORY) */\r
+   ERROR_NO_LOGON_SERVERS,                 /* c000005e (STATUS_NO_LOGON_SERVERS) */\r
+   ERROR_NO_SUCH_LOGON_SESSION,            /* c000005f (STATUS_NO_SUCH_LOGON_SESSION) */\r
+   ERROR_NO_SUCH_PRIVILEGE,                /* c0000060 (STATUS_NO_SUCH_PRIVILEGE) */\r
+   ERROR_PRIVILEGE_NOT_HELD,               /* c0000061 (STATUS_PRIVILEGE_NOT_HELD) */\r
+   ERROR_INVALID_ACCOUNT_NAME,             /* c0000062 (STATUS_INVALID_ACCOUNT_NAME) */\r
+   ERROR_USER_EXISTS,                      /* c0000063 (STATUS_USER_EXISTS) */\r
+   ERROR_NO_SUCH_USER,                     /* c0000064 (STATUS_NO_SUCH_USER) */\r
+   ERROR_GROUP_EXISTS,                     /* c0000065 (STATUS_GROUP_EXISTS) */\r
+   ERROR_NO_SUCH_GROUP,                    /* c0000066 (STATUS_NO_SUCH_GROUP) */\r
+   ERROR_MEMBER_IN_GROUP,                  /* c0000067 (STATUS_MEMBER_IN_GROUP) */\r
+   ERROR_MEMBER_NOT_IN_GROUP,              /* c0000068 (STATUS_MEMBER_NOT_IN_GROUP) */\r
+   ERROR_LAST_ADMIN,                       /* c0000069 (STATUS_LAST_ADMIN) */\r
+   ERROR_INVALID_PASSWORD,                 /* c000006a (STATUS_WRONG_PASSWORD) */\r
+   ERROR_ILL_FORMED_PASSWORD,              /* c000006b (STATUS_ILL_FORMED_PASSWORD) */\r
+   ERROR_PASSWORD_RESTRICTION,             /* c000006c (STATUS_PASSWORD_RESTRICTION) */\r
+   ERROR_LOGON_FAILURE,                    /* c000006d (STATUS_LOGON_FAILURE) */\r
+   ERROR_ACCOUNT_RESTRICTION,              /* c000006e (STATUS_ACCOUNT_RESTRICTION) */\r
+   ERROR_INVALID_LOGON_HOURS,              /* c000006f (STATUS_INVALID_LOGON_HOURS) */\r
+   ERROR_INVALID_WORKSTATION,              /* c0000070 (STATUS_INVALID_WORKSTATION) */\r
+   ERROR_PASSWORD_EXPIRED,                 /* c0000071 (STATUS_PASSWORD_EXPIRED) */\r
+   ERROR_ACCOUNT_DISABLED,                 /* c0000072 (STATUS_ACCOUNT_DISABLED) */\r
+   ERROR_NONE_MAPPED,                      /* c0000073 (STATUS_NONE_MAPPED) */\r
+   ERROR_TOO_MANY_LUIDS_REQUESTED,         /* c0000074 (STATUS_TOO_MANY_LUIDS_REQUESTED) */\r
+   ERROR_LUIDS_EXHAUSTED,                  /* c0000075 (STATUS_LUIDS_EXHAUSTED) */\r
+   ERROR_INVALID_SUB_AUTHORITY,            /* c0000076 (STATUS_INVALID_SUB_AUTHORITY) */\r
+   ERROR_INVALID_ACL,                      /* c0000077 (STATUS_INVALID_ACL) */\r
+   ERROR_INVALID_SID,                      /* c0000078 (STATUS_INVALID_SID) */\r
+   ERROR_INVALID_SECURITY_DESCR,           /* c0000079 (STATUS_INVALID_SECURITY_DESCR) */\r
+   ERROR_PROC_NOT_FOUND,                   /* c000007a (STATUS_PROCEDURE_NOT_FOUND) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c000007b (STATUS_INVALID_IMAGE_FORMAT) */\r
+   ERROR_NO_TOKEN,                         /* c000007c (STATUS_NO_TOKEN) */\r
+   ERROR_BAD_INHERITANCE_ACL,              /* c000007d (STATUS_BAD_INHERITANCE_ACL) */\r
+   ERROR_NOT_LOCKED,                       /* c000007e (STATUS_RANGE_NOT_LOCKED) */\r
+   ERROR_DISK_FULL,                        /* c000007f (STATUS_DISK_FULL) */\r
+   ERROR_SERVER_DISABLED,                  /* c0000080 (STATUS_SERVER_DISABLED) */\r
+   ERROR_SERVER_NOT_DISABLED,              /* c0000081 (STATUS_SERVER_NOT_DISABLED) */\r
+   ERROR_TOO_MANY_NAMES,                   /* c0000082 (STATUS_TOO_MANY_GUIDS_REQUESTED) */\r
+   ERROR_NO_MORE_ITEMS,                    /* c0000083 (STATUS_GUIDS_EXHAUSTED) */\r
+   ERROR_INVALID_ID_AUTHORITY,             /* c0000084 (STATUS_INVALID_ID_AUTHORITY) */\r
+   ERROR_NO_MORE_ITEMS,                    /* c0000085 (STATUS_AGENTS_EXHAUSTED) */\r
+   ERROR_LABEL_TOO_LONG,                   /* c0000086 (STATUS_INVALID_VOLUME_LABEL) */\r
+   ERROR_OUTOFMEMORY,                      /* c0000087 (STATUS_SECTION_NOT_EXTENDED) */\r
+   ERROR_INVALID_ADDRESS,                  /* c0000088 (STATUS_NOT_MAPPED_DATA) */\r
+   ERROR_RESOURCE_DATA_NOT_FOUND,          /* c0000089 (STATUS_RESOURCE_DATA_NOT_FOUND) */\r
+   ERROR_RESOURCE_TYPE_NOT_FOUND,          /* c000008a (STATUS_RESOURCE_TYPE_NOT_FOUND) */\r
+   ERROR_RESOURCE_NAME_NOT_FOUND,          /* c000008b (STATUS_RESOURCE_NAME_NOT_FOUND) */\r
+   STATUS_ARRAY_BOUNDS_EXCEEDED,           /* c000008c (STATUS_ARRAY_BOUNDS_EXCEEDED) */\r
+   STATUS_FLOAT_DENORMAL_OPERAND,          /* c000008d (STATUS_FLOAT_DENORMAL_OPERAND) */\r
+   STATUS_FLOAT_DIVIDE_BY_ZERO,            /* c000008e (STATUS_FLOAT_DIVIDE_BY_ZERO) */\r
+   STATUS_FLOAT_INEXACT_RESULT,            /* c000008f (STATUS_FLOAT_INEXACT_RESULT) */\r
+   STATUS_FLOAT_INVALID_OPERATION,         /* c0000090 (STATUS_FLOAT_INVALID_OPERATION) */\r
+   STATUS_FLOAT_OVERFLOW,                  /* c0000091 (STATUS_FLOAT_OVERFLOW) */\r
+   STATUS_FLOAT_STACK_CHECK,               /* c0000092 (STATUS_FLOAT_STACK_CHECK) */\r
+   STATUS_FLOAT_UNDERFLOW,                 /* c0000093 (STATUS_FLOAT_UNDERFLOW) */\r
+   STATUS_INTEGER_DIVIDE_BY_ZERO,          /* c0000094 (STATUS_INTEGER_DIVIDE_BY_ZERO) */\r
+   ERROR_ARITHMETIC_OVERFLOW,              /* c0000095 (STATUS_INTEGER_OVERFLOW) */\r
+   STATUS_PRIVILEGED_INSTRUCTION,          /* c0000096 (STATUS_PRIVILEGED_INSTRUCTION) */\r
+   ERROR_NOT_ENOUGH_MEMORY,                /* c0000097 (STATUS_TOO_MANY_PAGING_FILES) */\r
+   ERROR_FILE_INVALID,                     /* c0000098 (STATUS_FILE_INVALID) */\r
+   ERROR_ALLOTTED_SPACE_EXCEEDED,          /* c0000099 (STATUS_ALLOTTED_SPACE_EXCEEDED) */\r
+   ERROR_NO_SYSTEM_RESOURCES,              /* c000009a (STATUS_INSUFFICIENT_RESOURCES) */\r
+   ERROR_PATH_NOT_FOUND,                   /* c000009b (STATUS_DFS_EXIT_PATH_FOUND) */\r
+   ERROR_CRC,                              /* c000009c (STATUS_DEVICE_DATA_ERROR) */\r
+   ERROR_DEVICE_NOT_CONNECTED,             /* c000009d (STATUS_DEVICE_NOT_CONNECTED) */\r
+   ERROR_NOT_READY,                        /* c000009e (STATUS_DEVICE_POWER_FAILURE) */\r
+   ERROR_INVALID_ADDRESS,                  /* c000009f (STATUS_FREE_VM_NOT_AT_BASE) */\r
+   ERROR_INVALID_ADDRESS,                  /* c00000a0 (STATUS_MEMORY_NOT_ALLOCATED) */\r
+   ERROR_WORKING_SET_QUOTA,                /* c00000a1 (STATUS_WORKING_SET_QUOTA) */\r
+   ERROR_WRITE_PROTECT,                    /* c00000a2 (STATUS_MEDIA_WRITE_PROTECTED) */\r
+   ERROR_NOT_READY,                        /* c00000a3 (STATUS_DEVICE_NOT_READY) */\r
+   ERROR_INVALID_GROUP_ATTRIBUTES,         /* c00000a4 (STATUS_INVALID_GROUP_ATTRIBUTES) */\r
+   ERROR_BAD_IMPERSONATION_LEVEL,          /* c00000a5 (STATUS_BAD_IMPERSONATION_LEVEL) */\r
+   ERROR_CANT_OPEN_ANONYMOUS,              /* c00000a6 (STATUS_CANT_OPEN_ANONYMOUS) */\r
+   ERROR_BAD_VALIDATION_CLASS,             /* c00000a7 (STATUS_BAD_VALIDATION_CLASS) */\r
+   ERROR_BAD_TOKEN_TYPE,                   /* c00000a8 (STATUS_BAD_TOKEN_TYPE) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000a9 (STATUS_BAD_MASTER_BOOT_RECORD) */\r
+   0,                                      /* c00000aa (STATUS_INSTRUCTION_MISALIGNMENT) */\r
+   ERROR_PIPE_BUSY,                        /* c00000ab (STATUS_INSTANCE_NOT_AVAILABLE) */\r
+   ERROR_PIPE_BUSY,                        /* c00000ac (STATUS_PIPE_NOT_AVAILABLE) */\r
+   ERROR_BAD_PIPE,                         /* c00000ad (STATUS_INVALID_PIPE_STATE) */\r
+   ERROR_PIPE_BUSY,                        /* c00000ae (STATUS_PIPE_BUSY) */\r
+   ERROR_INVALID_FUNCTION,                 /* c00000af (STATUS_ILLEGAL_FUNCTION) */\r
+   ERROR_PIPE_NOT_CONNECTED,               /* c00000b0 (STATUS_PIPE_DISCONNECTED) */\r
+   ERROR_NO_DATA,                          /* c00000b1 (STATUS_PIPE_CLOSING) */\r
+   ERROR_PIPE_CONNECTED,                   /* c00000b2 (STATUS_PIPE_CONNECTED) */\r
+   ERROR_PIPE_LISTENING,                   /* c00000b3 (STATUS_PIPE_LISTENING) */\r
+   ERROR_BAD_PIPE,                         /* c00000b4 (STATUS_INVALID_READ_MODE) */\r
+   ERROR_SEM_TIMEOUT,                      /* c00000b5 (STATUS_IO_TIMEOUT) */\r
+   ERROR_HANDLE_EOF,                       /* c00000b6 (STATUS_FILE_FORCED_CLOSED) */\r
+   0,                                      /* c00000b7 (STATUS_PROFILING_NOT_STARTED) */\r
+   0,                                      /* c00000b8 (STATUS_PROFILING_NOT_STOPPED) */\r
+   0,                                      /* c00000b9 (STATUS_COULD_NOT_INTERPRET) */\r
+   ERROR_ACCESS_DENIED,                    /* c00000ba (STATUS_FILE_IS_A_DIRECTORY) */\r
+   ERROR_NOT_SUPPORTED,                    /* c00000bb (STATUS_NOT_SUPPORTED) */\r
+   ERROR_REM_NOT_LIST,                     /* c00000bc (STATUS_REMOTE_NOT_LISTENING) */\r
+   ERROR_DUP_NAME,                         /* c00000bd (STATUS_DUPLICATE_NAME) */\r
+   ERROR_BAD_NETPATH,                      /* c00000be (STATUS_BAD_NETWORK_PATH) */\r
+   ERROR_NETWORK_BUSY,                     /* c00000bf (STATUS_NETWORK_BUSY) */\r
+   ERROR_DEV_NOT_EXIST,                    /* c00000c0 (STATUS_DEVICE_DOES_NOT_EXIST) */\r
+   ERROR_TOO_MANY_CMDS,                    /* c00000c1 (STATUS_TOO_MANY_COMMANDS) */\r
+   ERROR_ADAP_HDW_ERR,                     /* c00000c2 (STATUS_ADAPTER_HARDWARE_ERROR) */\r
+   ERROR_BAD_NET_RESP,                     /* c00000c3 (STATUS_INVALID_NETWORK_RESPONSE) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c00000c4 (STATUS_UNEXPECTED_NETWORK_ERROR) */\r
+   ERROR_BAD_REM_ADAP,                     /* c00000c5 (STATUS_BAD_REMOTE_ADAPTER) */\r
+   ERROR_PRINTQ_FULL,                      /* c00000c6 (STATUS_PRINT_QUEUE_FULL) */\r
+   ERROR_NO_SPOOL_SPACE,                   /* c00000c7 (STATUS_NO_SPOOL_SPACE) */\r
+   ERROR_PRINT_CANCELLED,                  /* c00000c8 (STATUS_PRINT_CANCELLED) */\r
+   ERROR_NETNAME_DELETED,                  /* c00000c9 (STATUS_NETWORK_NAME_DELETED) */\r
+   ERROR_NETWORK_ACCESS_DENIED,            /* c00000ca (STATUS_NETWORK_ACCESS_DENIED) */\r
+   ERROR_BAD_DEV_TYPE,                     /* c00000cb (STATUS_BAD_DEVICE_TYPE) */\r
+   ERROR_BAD_NET_NAME,                     /* c00000cc (STATUS_BAD_NETWORK_NAME) */\r
+   ERROR_TOO_MANY_NAMES,                   /* c00000cd (STATUS_TOO_MANY_NAMES) */\r
+   ERROR_TOO_MANY_SESS,                    /* c00000ce (STATUS_TOO_MANY_SESSIONS) */\r
+   ERROR_SHARING_PAUSED,                   /* c00000cf (STATUS_SHARING_PAUSED) */\r
+   ERROR_REQ_NOT_ACCEP,                    /* c00000d0 (STATUS_REQUEST_NOT_ACCEPTED) */\r
+   ERROR_REDIR_PAUSED,                     /* c00000d1 (STATUS_REDIRECTOR_PAUSED) */\r
+   ERROR_NET_WRITE_FAULT,                  /* c00000d2 (STATUS_NET_WRITE_FAULT) */\r
+   0,                                      /* c00000d3 (STATUS_PROFILING_AT_LIMIT) */\r
+   ERROR_NOT_SAME_DEVICE,                  /* c00000d4 (STATUS_NOT_SAME_DEVICE) */\r
+   ERROR_ACCESS_DENIED,                    /* c00000d5 (STATUS_FILE_RENAMED) */\r
+   ERROR_VC_DISCONNECTED,                  /* c00000d6 (STATUS_VIRTUAL_CIRCUIT_CLOSED) */\r
+   ERROR_NO_SECURITY_ON_OBJECT,            /* c00000d7 (STATUS_NO_SECURITY_ON_OBJECT) */\r
+   0,                                      /* c00000d8 (STATUS_CANT_WAIT) */\r
+   ERROR_NO_DATA,                          /* c00000d9 (STATUS_PIPE_EMPTY) */\r
+   ERROR_CANT_ACCESS_DOMAIN_INFO,          /* c00000da (STATUS_CANT_ACCESS_DOMAIN_INFO) */\r
+   0,                                      /* c00000db (STATUS_CANT_TERMINATE_SELF) */\r
+   ERROR_INVALID_SERVER_STATE,             /* c00000dc (STATUS_INVALID_SERVER_STATE) */\r
+   ERROR_INVALID_DOMAIN_STATE,             /* c00000dd (STATUS_INVALID_DOMAIN_STATE) */\r
+   ERROR_INVALID_DOMAIN_ROLE,              /* c00000de (STATUS_INVALID_DOMAIN_ROLE) */\r
+   ERROR_NO_SUCH_DOMAIN,                   /* c00000df (STATUS_NO_SUCH_DOMAIN) */\r
+   ERROR_DOMAIN_EXISTS,                    /* c00000e0 (STATUS_DOMAIN_EXISTS) */\r
+   ERROR_DOMAIN_LIMIT_EXCEEDED,            /* c00000e1 (STATUS_DOMAIN_LIMIT_EXCEEDED) */\r
+   ERROR_OPLOCK_NOT_GRANTED,               /* c00000e2 (STATUS_OPLOCK_NOT_GRANTED) */\r
+   ERROR_INVALID_OPLOCK_PROTOCOL,          /* c00000e3 (STATUS_INVALID_OPLOCK_PROTOCOL) */\r
+   ERROR_INTERNAL_DB_CORRUPTION,           /* c00000e4 (STATUS_INTERNAL_DB_CORRUPTION) */\r
+   ERROR_INTERNAL_ERROR,                   /* c00000e5 (STATUS_INTERNAL_ERROR) */\r
+   ERROR_GENERIC_NOT_MAPPED,               /* c00000e6 (STATUS_GENERIC_NOT_MAPPED) */\r
+   ERROR_BAD_DESCRIPTOR_FORMAT,            /* c00000e7 (STATUS_BAD_DESCRIPTOR_FORMAT) */\r
+   ERROR_INVALID_USER_BUFFER,              /* c00000e8 (STATUS_INVALID_USER_BUFFER) */\r
+   0,                                      /* c00000e9 (STATUS_UNEXPECTED_IO_ERROR) */\r
+   0,                                      /* c00000ea (STATUS_UNEXPECTED_MM_CREATE_ERR) */\r
+   0,                                      /* c00000eb (STATUS_UNEXPECTED_MM_MAP_ERROR) */\r
+   0,                                      /* c00000ec (STATUS_UNEXPECTED_MM_EXTEND_ERR) */\r
+   ERROR_NOT_LOGON_PROCESS,                /* c00000ed (STATUS_NOT_LOGON_PROCESS) */\r
+   ERROR_LOGON_SESSION_EXISTS,             /* c00000ee (STATUS_LOGON_SESSION_EXISTS) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000ef (STATUS_INVALID_PARAMETER_1) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f0 (STATUS_INVALID_PARAMETER_2) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f1 (STATUS_INVALID_PARAMETER_3) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f2 (STATUS_INVALID_PARAMETER_4) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f3 (STATUS_INVALID_PARAMETER_5) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f4 (STATUS_INVALID_PARAMETER_6) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f5 (STATUS_INVALID_PARAMETER_7) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f6 (STATUS_INVALID_PARAMETER_8) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f7 (STATUS_INVALID_PARAMETER_9) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f8 (STATUS_INVALID_PARAMETER_10) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000f9 (STATUS_INVALID_PARAMETER_11) */\r
+   ERROR_INVALID_PARAMETER,                /* c00000fa (STATUS_INVALID_PARAMETER_12) */\r
+   ERROR_PATH_NOT_FOUND,                   /* c00000fb (STATUS_REDIRECTOR_NOT_STARTED) */\r
+   ERROR_SERVICE_ALREADY_RUNNING,          /* c00000fc (STATUS_REDIRECTOR_STARTED) */\r
+   ERROR_STACK_OVERFLOW,                   /* c00000fd (STATUS_STACK_OVERFLOW) */\r
+   ERROR_NO_SUCH_PACKAGE,                  /* c00000fe (STATUS_NO_SUCH_PACKAGE) */\r
+   0,                                      /* c00000ff (STATUS_BAD_FUNCTION_TABLE) */\r
+   ERROR_ENVVAR_NOT_FOUND,                 /* c0000100 (STATUS_VARIABLE_NOT_FOUND) */\r
+   ERROR_DIR_NOT_EMPTY,                    /* c0000101 (STATUS_DIRECTORY_NOT_EMPTY) */\r
+   ERROR_FILE_CORRUPT,                     /* c0000102 (STATUS_FILE_CORRUPT_ERROR) */\r
+   ERROR_DIRECTORY,                        /* c0000103 (STATUS_NOT_A_DIRECTORY) */\r
+   ERROR_BAD_LOGON_SESSION_STATE,          /* c0000104 (STATUS_BAD_LOGON_SESSION_STATE) */\r
+   ERROR_LOGON_SESSION_COLLISION,          /* c0000105 (STATUS_LOGON_SESSION_COLLISION) */\r
+   ERROR_FILENAME_EXCED_RANGE,             /* c0000106 (STATUS_NAME_TOO_LONG) */\r
+   ERROR_OPEN_FILES,                       /* c0000107 (STATUS_FILES_OPEN) */\r
+   ERROR_DEVICE_IN_USE,                    /* c0000108 (STATUS_CONNECTION_IN_USE) */\r
+   ERROR_MR_MID_NOT_FOUND,                 /* c0000109 (STATUS_MESSAGE_NOT_FOUND) */\r
+   ERROR_ACCESS_DENIED,                    /* c000010a (STATUS_PROCESS_IS_TERMINATING) */\r
+   ERROR_INVALID_LOGON_TYPE,               /* c000010b (STATUS_INVALID_LOGON_TYPE) */\r
+   0,                                      /* c000010c (STATUS_NO_GUID_TRANSLATION) */\r
+   ERROR_CANNOT_IMPERSONATE,               /* c000010d (STATUS_CANNOT_IMPERSONATE) */\r
+   ERROR_SERVICE_ALREADY_RUNNING,          /* c000010e (STATUS_IMAGE_ALREADY_LOADED) */\r
+   0,                                      /* c000010f (STATUS_ABIOS_NOT_PRESENT) */\r
+   0,                                      /* c0000110 (STATUS_ABIOS_LID_NOT_EXIST) */\r
+   0,                                      /* c0000111 (STATUS_ABIOS_LID_ALREADY_OWNED) */\r
+   0,                                      /* c0000112 (STATUS_ABIOS_NOT_LID_OWNER) */\r
+   0,                                      /* c0000113 (STATUS_ABIOS_INVALID_COMMAND) */\r
+   0,                                      /* c0000114 (STATUS_ABIOS_INVALID_LID) */\r
+   0,                                      /* c0000115 (STATUS_ABIOS_SELECTOR_NOT_AVAILABLE) */\r
+   0,                                      /* c0000116 (STATUS_ABIOS_INVALID_SELECTOR) */\r
+   ERROR_INVALID_THREAD_ID,                /* c0000117 (STATUS_NO_LDT) */\r
+   0,                                      /* c0000118 (STATUS_INVALID_LDT_SIZE) */\r
+   0,                                      /* c0000119 (STATUS_INVALID_LDT_OFFSET) */\r
+   0,                                      /* c000011a (STATUS_INVALID_LDT_DESCRIPTOR) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c000011b (STATUS_INVALID_IMAGE_NE_FORMAT) */\r
+   ERROR_RXACT_INVALID_STATE,              /* c000011c (STATUS_RXACT_INVALID_STATE) */\r
+   ERROR_RXACT_COMMIT_FAILURE,             /* c000011d (STATUS_RXACT_COMMIT_FAILURE) */\r
+   ERROR_FILE_INVALID,                     /* c000011e (STATUS_MAPPED_FILE_SIZE_ZERO) */\r
+   ERROR_TOO_MANY_OPEN_FILES,              /* c000011f (STATUS_TOO_MANY_OPENED_FILES) */\r
+   ERROR_OPERATION_ABORTED,                /* c0000120 (STATUS_CANCELLED) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000121 (STATUS_CANNOT_DELETE) */\r
+   ERROR_INVALID_COMPUTERNAME,             /* c0000122 (STATUS_INVALID_COMPUTER_NAME) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000123 (STATUS_FILE_DELETED) */\r
+   ERROR_SPECIAL_ACCOUNT,                  /* c0000124 (STATUS_SPECIAL_ACCOUNT) */\r
+   ERROR_SPECIAL_GROUP,                    /* c0000125 (STATUS_SPECIAL_GROUP) */\r
+   ERROR_SPECIAL_USER,                     /* c0000126 (STATUS_SPECIAL_USER) */\r
+   ERROR_MEMBERS_PRIMARY_GROUP,            /* c0000127 (STATUS_MEMBERS_PRIMARY_GROUP) */\r
+   ERROR_INVALID_HANDLE,                   /* c0000128 (STATUS_FILE_CLOSED) */\r
+   0,                                      /* c0000129 (STATUS_TOO_MANY_THREADS) */\r
+   0,                                      /* c000012a (STATUS_THREAD_NOT_IN_PROCESS) */\r
+   ERROR_TOKEN_ALREADY_IN_USE,             /* c000012b (STATUS_TOKEN_ALREADY_IN_USE) */\r
+   0,                                      /* c000012c (STATUS_PAGEFILE_QUOTA_EXCEEDED) */\r
+   ERROR_COMMITMENT_LIMIT,                 /* c000012d (STATUS_COMMITMENT_LIMIT) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c000012e (STATUS_INVALID_IMAGE_LE_FORMAT) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c000012f (STATUS_INVALID_IMAGE_NOT_MZ) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c0000130 (STATUS_INVALID_IMAGE_PROTECT) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c0000131 (STATUS_INVALID_IMAGE_WIN_16) */\r
+   0,                                      /* c0000132 (STATUS_LOGON_SERVER_CONFLICT) */\r
+   ERROR_TIME_SKEW,                        /* c0000133 (STATUS_TIME_DIFFERENCE_AT_DC) */\r
+   0,                                      /* c0000134 (STATUS_SYNCHRONIZATION_REQUIRED) */\r
+   ERROR_MOD_NOT_FOUND,                    /* c0000135 (STATUS_DLL_NOT_FOUND) */\r
+   0,                                      /* c0000136 (STATUS_OPEN_FAILED) */\r
+   0,                                      /* c0000137 (STATUS_IO_PRIVILEGE_FAILED) */\r
+   ERROR_INVALID_ORDINAL,                  /* c0000138 (STATUS_ORDINAL_NOT_FOUND) */\r
+   ERROR_PROC_NOT_FOUND,                   /* c0000139 (STATUS_ENTRYPOINT_NOT_FOUND) */\r
+   0,                                      /* c000013a (STATUS_CONTROL_C_EXIT) */\r
+   ERROR_NETNAME_DELETED,                  /* c000013b (STATUS_LOCAL_DISCONNECT) */\r
+   ERROR_NETNAME_DELETED,                  /* c000013c (STATUS_REMOTE_DISCONNECT) */\r
+   ERROR_REM_NOT_LIST,                     /* c000013d (STATUS_REMOTE_RESOURCES) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c000013e (STATUS_LINK_FAILED) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c000013f (STATUS_LINK_TIMEOUT) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000140 (STATUS_INVALID_CONNECTION) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000141 (STATUS_INVALID_ADDRESS) */\r
+   ERROR_DLL_INIT_FAILED,                  /* c0000142 (STATUS_DLL_INIT_FAILED) */\r
+   0,                                      /* c0000143 (STATUS_MISSING_SYSTEMFILE) */\r
+   0,                                      /* c0000144 (STATUS_UNHANDLED_EXCEPTION) */\r
+   0,                                      /* c0000145 (STATUS_APP_INIT_FAILURE) */\r
+   0,                                      /* c0000146 (STATUS_PAGEFILE_CREATE_FAILED) */\r
+   0,                                      /* c0000147 (STATUS_NO_PAGEFILE) */\r
+   ERROR_INVALID_LEVEL,                    /* c0000148 (STATUS_INVALID_LEVEL) */\r
+   ERROR_INVALID_PASSWORD,                 /* c0000149 (STATUS_WRONG_PASSWORD_CORE) */\r
+   0,                                      /* c000014a (STATUS_ILLEGAL_FLOAT_CONTEXT) */\r
+   ERROR_BROKEN_PIPE,                      /* c000014b (STATUS_PIPE_BROKEN) */\r
+   ERROR_BADDB,                            /* c000014c (STATUS_REGISTRY_CORRUPT) */\r
+   ERROR_REGISTRY_IO_FAILED,               /* c000014d (STATUS_REGISTRY_IO_FAILED) */\r
+   0,                                      /* c000014e (STATUS_NO_EVENT_PAIR) */\r
+   ERROR_UNRECOGNIZED_VOLUME,              /* c000014f (STATUS_UNRECOGNIZED_VOLUME) */\r
+   ERROR_SERIAL_NO_DEVICE,                 /* c0000150 (STATUS_SERIAL_NO_DEVICE_INITED) */\r
+   ERROR_NO_SUCH_ALIAS,                    /* c0000151 (STATUS_NO_SUCH_ALIAS) */\r
+   ERROR_MEMBER_NOT_IN_ALIAS,              /* c0000152 (STATUS_MEMBER_NOT_IN_ALIAS) */\r
+   ERROR_MEMBER_IN_ALIAS,                  /* c0000153 (STATUS_MEMBER_IN_ALIAS) */\r
+   ERROR_ALIAS_EXISTS,                     /* c0000154 (STATUS_ALIAS_EXISTS) */\r
+   ERROR_LOGON_NOT_GRANTED,                /* c0000155 (STATUS_LOGON_NOT_GRANTED) */\r
+   ERROR_TOO_MANY_SECRETS,                 /* c0000156 (STATUS_TOO_MANY_SECRETS) */\r
+   ERROR_SECRET_TOO_LONG,                  /* c0000157 (STATUS_SECRET_TOO_LONG) */\r
+   ERROR_INTERNAL_DB_ERROR,                /* c0000158 (STATUS_INTERNAL_DB_ERROR) */\r
+   ERROR_FULLSCREEN_MODE,                  /* c0000159 (STATUS_FULLSCREEN_MODE) */\r
+   ERROR_TOO_MANY_CONTEXT_IDS,             /* c000015a (STATUS_TOO_MANY_CONTEXT_IDS) */\r
+   ERROR_LOGON_TYPE_NOT_GRANTED,           /* c000015b (STATUS_LOGON_TYPE_NOT_GRANTED) */\r
+   ERROR_NOT_REGISTRY_FILE,                /* c000015c (STATUS_NOT_REGISTRY_FILE) */\r
+   ERROR_NT_CROSS_ENCRYPTION_REQUIRED,     /* c000015d (STATUS_NT_CROSS_ENCRYPTION_REQUIRED) */\r
+   0,                                      /* c000015e (STATUS_DOMAIN_CTRLR_CONFIG_ERROR) */\r
+   ERROR_IO_DEVICE,                        /* c000015f (STATUS_FT_MISSING_MEMBER) */\r
+   0,                                      /* c0000160 (STATUS_ILL_FORMED_SERVICE_ENTRY) */\r
+   0,                                      /* c0000161 (STATUS_ILLEGAL_CHARACTER) */\r
+   ERROR_NO_UNICODE_TRANSLATION,           /* c0000162 (STATUS_UNMAPPABLE_CHARACTER) */\r
+   0,                                      /* c0000163 (STATUS_UNDEFINED_CHARACTER) */\r
+   0,                                      /* c0000164 (STATUS_FLOPPY_VOLUME) */\r
+   ERROR_FLOPPY_ID_MARK_NOT_FOUND,         /* c0000165 (STATUS_FLOPPY_ID_MARK_NOT_FOUND) */\r
+   ERROR_FLOPPY_WRONG_CYLINDER,            /* c0000166 (STATUS_FLOPPY_WRONG_CYLINDER) */\r
+   ERROR_FLOPPY_UNKNOWN_ERROR,             /* c0000167 (STATUS_FLOPPY_UNKNOWN_ERROR) */\r
+   ERROR_FLOPPY_BAD_REGISTERS,             /* c0000168 (STATUS_FLOPPY_BAD_REGISTERS) */\r
+   ERROR_DISK_RECALIBRATE_FAILED,          /* c0000169 (STATUS_DISK_RECALIBRATE_FAILED) */\r
+   ERROR_DISK_OPERATION_FAILED,            /* c000016a (STATUS_DISK_OPERATION_FAILED) */\r
+   ERROR_DISK_RESET_FAILED,                /* c000016b (STATUS_DISK_RESET_FAILED) */\r
+   ERROR_IRQ_BUSY,                         /* c000016c (STATUS_SHARED_IRQ_BUSY) */\r
+   ERROR_IO_DEVICE,                        /* c000016d (STATUS_FT_ORPHANING) */\r
+   0,                                      /* c000016e (STATUS_BIOS_FAILED_TO_CONNECT_INTER\r
+RUPT) */\r
+   0,                                      /* c000016f */\r
+   0,                                      /* c0000170 */\r
+   0,                                      /* c0000171 */\r
+   ERROR_PARTITION_FAILURE,                /* c0000172 (STATUS_PARTITION_FAILURE) */\r
+   ERROR_INVALID_BLOCK_LENGTH,             /* c0000173 (STATUS_INVALID_BLOCK_LENGTH) */\r
+   ERROR_DEVICE_NOT_PARTITIONED,           /* c0000174 (STATUS_DEVICE_NOT_PARTITIONED) */\r
+   ERROR_UNABLE_TO_LOCK_MEDIA,             /* c0000175 (STATUS_UNABLE_TO_LOCK_MEDIA) */\r
+   ERROR_UNABLE_TO_UNLOAD_MEDIA,           /* c0000176 (STATUS_UNABLE_TO_UNLOAD_MEDIA) */\r
+   ERROR_EOM_OVERFLOW,                     /* c0000177 (STATUS_EOM_OVERFLOW) */\r
+   ERROR_NO_MEDIA_IN_DRIVE,                /* c0000178 (STATUS_NO_MEDIA) */\r
+   0,                                      /* c0000179 */\r
+   ERROR_NO_SUCH_MEMBER,                   /* c000017a (STATUS_NO_SUCH_MEMBER) */\r
+   ERROR_INVALID_MEMBER,                   /* c000017b (STATUS_INVALID_MEMBER) */\r
+   ERROR_KEY_DELETED,                      /* c000017c (STATUS_KEY_DELETED) */\r
+   ERROR_NO_LOG_SPACE,                     /* c000017d (STATUS_NO_LOG_SPACE) */\r
+   ERROR_TOO_MANY_SIDS,                    /* c000017e (STATUS_TOO_MANY_SIDS) */\r
+   ERROR_LM_CROSS_ENCRYPTION_REQUIRED,     /* c000017f (STATUS_LM_CROSS_ENCRYPTION_REQUIRED) */\r
+   ERROR_KEY_HAS_CHILDREN,                 /* c0000180 (STATUS_KEY_HAS_CHILDREN) */\r
+   ERROR_CHILD_MUST_BE_VOLATILE,           /* c0000181 (STATUS_CHILD_MUST_BE_VOLATILE) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000182 (STATUS_DEVICE_CONFIGURATION_ERROR) */\r
+   ERROR_IO_DEVICE,                        /* c0000183 (STATUS_DRIVER_INTERNAL_ERROR) */\r
+   ERROR_BAD_COMMAND,                      /* c0000184 (STATUS_INVALID_DEVICE_STATE) */\r
+   ERROR_IO_DEVICE,                        /* c0000185 (STATUS_IO_DEVICE_ERROR) */\r
+   ERROR_IO_DEVICE,                        /* c0000186 (STATUS_DEVICE_PROTOCOL_ERROR) */\r
+   0,                                      /* c0000187 (STATUS_BACKUP_CONTROLLER) */\r
+   ERROR_LOG_FILE_FULL,                    /* c0000188 (STATUS_LOG_FILE_FULL) */\r
+   ERROR_WRITE_PROTECT,                    /* c0000189 (STATUS_TOO_LATE) */\r
+   ERROR_NO_TRUST_LSA_SECRET,              /* c000018a (STATUS_NO_TRUST_LSA_SECRET) */\r
+   ERROR_NO_TRUST_SAM_ACCOUNT,             /* c000018b (STATUS_NO_TRUST_SAM_ACCOUNT) */\r
+   ERROR_TRUSTED_DOMAIN_FAILURE,           /* c000018c (STATUS_TRUSTED_DOMAIN_FAILURE) */\r
+   ERROR_TRUSTED_RELATIONSHIP_FAILURE,     /* c000018d (STATUS_TRUSTED_RELATIONSHIP_FAILURE) */\r
+   ERROR_EVENTLOG_FILE_CORRUPT,            /* c000018e (STATUS_EVENTLOG_FILE_CORRUPT) */\r
+   ERROR_EVENTLOG_CANT_START,              /* c000018f (STATUS_EVENTLOG_CANT_START) */\r
+   ERROR_TRUST_FAILURE,                    /* c0000190 (STATUS_TRUST_FAILURE) */\r
+   0,                                      /* c0000191 (STATUS_MUTANT_LIMIT_EXCEEDED) */\r
+   ERROR_NETLOGON_NOT_STARTED,             /* c0000192 (STATUS_NETLOGON_NOT_STARTED) */\r
+   ERROR_ACCOUNT_EXPIRED,                  /* c0000193 (STATUS_ACCOUNT_EXPIRED) */\r
+   ERROR_POSSIBLE_DEADLOCK,                /* c0000194 (STATUS_POSSIBLE_DEADLOCK) */\r
+   ERROR_SESSION_CREDENTIAL_CONFLICT,      /* c0000195 (STATUS_NETWORK_CREDENTIAL_CONFLICT) */\r
+   ERROR_REMOTE_SESSION_LIMIT_EXCEEDED,    /* c0000196 (STATUS_REMOTE_SESSION_LIMIT) */\r
+   ERROR_EVENTLOG_FILE_CHANGED,            /* c0000197 (STATUS_EVENTLOG_FILE_CHANGED) */\r
+   ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT,/* c0000198 (STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT) */\r
+   ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT,/* c0000199 (STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT) */\r
+   ERROR_NOLOGON_SERVER_TRUST_ACCOUNT,     /* c000019a (STATUS_NOLOGON_SERVER_TRUST_ACCOUNT) */\r
+   ERROR_DOMAIN_TRUST_INCONSISTENT         /* c000019b (STATUS_DOMAIN_TRUST_INCONSISTENT) */\r
+};\r
+\r
+static const DWORD table_c0000202[396] =\r
+{\r
+   ERROR_NO_USER_SESSION_KEY,              /* c0000202 (STATUS_NO_USER_SESSION_KEY) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000203 (STATUS_USER_SESSION_DELETED) */\r
+   ERROR_RESOURCE_LANG_NOT_FOUND,          /* c0000204 (STATUS_RESOURCE_LANG_NOT_FOUND) */\r
+   ERROR_NOT_ENOUGH_SERVER_MEMORY,         /* c0000205 (STATUS_INSUFF_SERVER_RESOURCES) */\r
+   ERROR_INVALID_USER_BUFFER,              /* c0000206 (STATUS_INVALID_BUFFER_SIZE) */\r
+   ERROR_INVALID_NETNAME,                  /* c0000207 (STATUS_INVALID_ADDRESS_COMPONENT) */\r
+   ERROR_INVALID_NETNAME,                  /* c0000208 (STATUS_INVALID_ADDRESS_WILDCARD) */\r
+   ERROR_TOO_MANY_NAMES,                   /* c0000209 (STATUS_TOO_MANY_ADDRESSES) */\r
+   ERROR_DUP_NAME,                         /* c000020a (STATUS_ADDRESS_ALREADY_EXISTS) */\r
+   ERROR_NETNAME_DELETED,                  /* c000020b (STATUS_ADDRESS_CLOSED) */\r
+   ERROR_NETNAME_DELETED,                  /* c000020c (STATUS_CONNECTION_DISCONNECTED) */\r
+   ERROR_NETNAME_DELETED,                  /* c000020d (STATUS_CONNECTION_RESET) */\r
+   ERROR_TOO_MANY_NAMES,                   /* c000020e (STATUS_TOO_MANY_NODES) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c000020f (STATUS_TRANSACTION_ABORTED) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000210 (STATUS_TRANSACTION_TIMED_OUT) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000211 (STATUS_TRANSACTION_NO_RELEASE) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000212 (STATUS_TRANSACTION_NO_MATCH) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000213 (STATUS_TRANSACTION_RESPONDED) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000214 (STATUS_TRANSACTION_INVALID_ID) */\r
+   ERROR_UNEXP_NET_ERR,                    /* c0000215 (STATUS_TRANSACTION_INVALID_TYPE) */\r
+   ERROR_NOT_SUPPORTED,                    /* c0000216 (STATUS_NOT_SERVER_SESSION) */\r
+   ERROR_NOT_SUPPORTED,                    /* c0000217 (STATUS_NOT_CLIENT_SESSION) */\r
+   0,                                      /* c0000218 (STATUS_CANNOT_LOAD_REGISTRY_FILE) */\r
+   0,                                      /* c0000219 (STATUS_DEBUG_ATTACH_FAILED) */\r
+   0,                                      /* c000021a (STATUS_SYSTEM_PROCESS_TERMINATED) */\r
+   0,                                      /* c000021b (STATUS_DATA_NOT_ACCEPTED) */\r
+   ERROR_NO_BROWSER_SERVERS_FOUND,         /* c000021c (STATUS_NO_BROWSER_SERVERS_FOUND) */\r
+   0,                                      /* c000021d (STATUS_VDM_HARD_ERROR) */\r
+   0,                                      /* c000021e (STATUS_DRIVER_CANCEL_TIMEOUT) */\r
+   0,                                      /* c000021f (STATUS_REPLY_MESSAGE_MISMATCH) */\r
+   ERROR_MAPPED_ALIGNMENT,                 /* c0000220 (STATUS_MAPPED_ALIGNMENT) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c0000221 (STATUS_IMAGE_CHECKSUM_MISMATCH) */\r
+   0,                                      /* c0000222 (STATUS_LOST_WRITEBEHIND_DATA) */\r
+   0,                                      /* c0000223 (STATUS_CLIENT_SERVER_PARAMETERS_INVALID) */\r
+   ERROR_PASSWORD_MUST_CHANGE,             /* c0000224 (STATUS_PASSWORD_MUST_CHANGE) */\r
+   ERROR_NOT_FOUND,                        /* c0000225 (STATUS_NOT_FOUND) */\r
+   0,                                      /* c0000226 (STATUS_NOT_TINY_STREAM) */\r
+   0,                                      /* c0000227 (STATUS_RECOVERY_FAILURE) */\r
+   0,                                      /* c0000228 (STATUS_STACK_OVERFLOW_READ) */\r
+   ERROR_INVALID_PARAMETER,                /* c0000229 (STATUS_FAIL_CHECK) */\r
+   ERROR_OBJECT_ALREADY_EXISTS,            /* c000022a (STATUS_DUPLICATE_OBJECTID) */\r
+   ERROR_OBJECT_ALREADY_EXISTS,            /* c000022b (STATUS_OBJECTID_EXISTS) */\r
+   0,                                      /* c000022c (STATUS_CONVERT_TO_LARGE) */\r
+   ERROR_RETRY,                            /* c000022d (STATUS_RETRY) */\r
+   0,                                      /* c000022e (STATUS_FOUND_OUT_OF_SCOPE) */\r
+   0,                                      /* c000022f (STATUS_ALLOCATE_BUCKET) */\r
+   ERROR_SET_NOT_FOUND,                    /* c0000230 (STATUS_PROPSET_NOT_FOUND) */\r
+   0,                                      /* c0000231 (STATUS_MARSHALL_OVERFLOW) */\r
+   0,                                      /* c0000232 (STATUS_INVALID_VARIANT) */\r
+   ERROR_DOMAIN_CONTROLLER_NOT_FOUND,      /* c0000233 (STATUS_DOMAIN_CONTROLLER_NOT_FOUND) */\r
+   ERROR_ACCOUNT_LOCKED_OUT,               /* c0000234 (STATUS_ACCOUNT_LOCKED_OUT) */\r
+   ERROR_INVALID_HANDLE,                   /* c0000235 (STATUS_HANDLE_NOT_CLOSABLE) */\r
+   ERROR_CONNECTION_REFUSED,               /* c0000236 (STATUS_CONNECTION_REFUSED) */\r
+   ERROR_GRACEFUL_DISCONNECT,              /* c0000237 (STATUS_GRACEFUL_DISCONNECT) */\r
+   ERROR_ADDRESS_ALREADY_ASSOCIATED,       /* c0000238 (STATUS_ADDRESS_ALREADY_ASSOCIATED) */\r
+   ERROR_ADDRESS_NOT_ASSOCIATED,           /* c0000239 (STATUS_ADDRESS_NOT_ASSOCIATED) */\r
+   ERROR_CONNECTION_INVALID,               /* c000023a (STATUS_CONNECTION_INVALID) */\r
+   ERROR_CONNECTION_ACTIVE,                /* c000023b (STATUS_CONNECTION_ACTIVE) */\r
+   ERROR_NETWORK_UNREACHABLE,              /* c000023c (STATUS_NETWORK_UNREACHABLE) */\r
+   ERROR_HOST_UNREACHABLE,                 /* c000023d (STATUS_HOST_UNREACHABLE) */\r
+   ERROR_PROTOCOL_UNREACHABLE,             /* c000023e (STATUS_PROTOCOL_UNREACHABLE) */\r
+   ERROR_PORT_UNREACHABLE,                 /* c000023f (STATUS_PORT_UNREACHABLE) */\r
+   ERROR_REQUEST_ABORTED,                  /* c0000240 (STATUS_REQUEST_ABORTED) */\r
+   ERROR_CONNECTION_ABORTED,               /* c0000241 (STATUS_CONNECTION_ABORTED) */\r
+   0,                                      /* c0000242 (STATUS_BAD_COMPRESSION_BUFFER) */\r
+   ERROR_USER_MAPPED_FILE,                 /* c0000243 (STATUS_USER_MAPPED_FILE) */\r
+   0,                                      /* c0000244 (STATUS_AUDIT_FAILED) */\r
+   0,                                      /* c0000245 (STATUS_TIMER_RESOLUTION_NOT_SET) */\r
+   ERROR_CONNECTION_COUNT_LIMIT,           /* c0000246 (STATUS_CONNECTION_COUNT_LIMIT) */\r
+   ERROR_LOGIN_TIME_RESTRICTION,           /* c0000247 (STATUS_LOGIN_TIME_RESTRICTION) */\r
+   ERROR_LOGIN_WKSTA_RESTRICTION,          /* c0000248 (STATUS_LOGIN_WKSTA_RESTRICTION) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c0000249 (STATUS_IMAGE_MP_UP_MISMATCH) */\r
+   0,                                      /* c000024a */\r
+   0,                                      /* c000024b */\r
+   0,                                      /* c000024c */\r
+   0,                                      /* c000024d */\r
+   0,                                      /* c000024e */\r
+   0,                                      /* c000024f */\r
+   0,                                      /* c0000250 (STATUS_INSUFFICIENT_LOGON_INFO) */\r
+   0,                                      /* c0000251 (STATUS_BAD_DLL_ENTRYPOINT) */\r
+   0,                                      /* c0000252 (STATUS_BAD_SERVICE_ENTRYPOINT) */\r
+   ERROR_CONNECTION_ABORTED,               /* c0000253 (STATUS_LPC_REPLY_LOST) */\r
+   0,                                      /* c0000254 (STATUS_IP_ADDRESS_CONFLICT1) */\r
+   0,                                      /* c0000255 (STATUS_IP_ADDRESS_CONFLICT2) */\r
+   0,                                      /* c0000256 (STATUS_REGISTRY_QUOTA_LIMIT) */\r
+   ERROR_HOST_UNREACHABLE,                 /* c0000257 (STATUS_PATH_NOT_COVERED) */\r
+   0,                                      /* c0000258 (STATUS_NO_CALLBACK_ACTIVE) */\r
+   ERROR_LICENSE_QUOTA_EXCEEDED,           /* c0000259 (STATUS_LICENSE_QUOTA_EXCEEDED) */\r
+   0,                                      /* c000025a (STATUS_PWD_TOO_SHORT) */\r
+   0,                                      /* c000025b (STATUS_PWD_TOO_RECENT) */\r
+   0,                                      /* c000025c (STATUS_PWD_HISTORY_CONFLICT) */\r
+   0,                                      /* c000025d */\r
+   ERROR_SERVICE_DISABLED,                 /* c000025e (STATUS_PLUGPLAY_NO_DEVICE) */\r
+   0,                                      /* c000025f (STATUS_UNSUPPORTED_COMPRESSION) */\r
+   0,                                      /* c0000260 (STATUS_INVALID_HW_PROFILE) */\r
+   0,                                      /* c0000261 (STATUS_INVALID_PLUGPLAY_DEVICE_PATH) */\r
+   ERROR_INVALID_ORDINAL,                  /* c0000262 (STATUS_DRIVER_ORDINAL_NOT_FOUND) */\r
+   ERROR_PROC_NOT_FOUND,                   /* c0000263 (STATUS_DRIVER_ENTRYPOINT_NOT_FOUND) */\r
+   ERROR_NOT_OWNER,                        /* c0000264 (STATUS_RESOURCE_NOT_OWNED) */\r
+   ERROR_TOO_MANY_LINKS,                   /* c0000265 (STATUS_TOO_MANY_LINKS) */\r
+   0,                                      /* c0000266 (STATUS_QUOTA_LIST_INCONSISTENT) */\r
+   ERROR_FILE_OFFLINE,                     /* c0000267 (STATUS_FILE_IS_OFFLINE) */\r
+   0,                                      /* c0000268 (STATUS_EVALUATION_EXPIRATION) */\r
+   0,                                      /* c0000269 (STATUS_ILLEGAL_DLL_RELOCATION) */\r
+   ERROR_CTX_LICENSE_NOT_AVAILABLE,        /* c000026a (STATUS_LICENSE_VIOLATION) */\r
+   0,                                      /* c000026b (STATUS_DLL_INIT_FAILED_LOGOFF) */\r
+   ERROR_BAD_DRIVER,                       /* c000026c (STATUS_DRIVER_UNABLE_TO_LOAD) */\r
+   ERROR_CONNECTION_UNAVAIL,               /* c000026d (STATUS_DFS_UNAVAILABLE) */\r
+   ERROR_NOT_READY,                        /* c000026e (STATUS_VOLUME_DISMOUNTED) */\r
+   0,                                      /* c000026f (STATUS_WX86_INTERNAL_ERROR) */\r
+   0,                                      /* c0000270 (STATUS_WX86_FLOAT_STACK_CHECK) */\r
+   0,                                      /* c0000271 (STATUS_VALIDATE_CONTINUE) */\r
+   ERROR_NO_MATCH,                         /* c0000272 (STATUS_NO_MATCH) */\r
+   0,                                      /* c0000273 (STATUS_NO_MORE_MATCHES) */\r
+   0,                                      /* c0000274 */\r
+   ERROR_NOT_A_REPARSE_POINT,              /* c0000275 (STATUS_NOT_A_REPARSE_POINT) */\r
+   ERROR_REPARSE_TAG_INVALID,              /* c0000276 (STATUS_IO_REPARSE_TAG_INVALID) */\r
+   ERROR_REPARSE_TAG_MISMATCH,             /* c0000277 (STATUS_IO_REPARSE_TAG_MISMATCH) */\r
+   ERROR_INVALID_REPARSE_DATA,             /* c0000278 (STATUS_IO_REPARSE_DATA_INVALID) */\r
+   ERROR_CANT_ACCESS_FILE,                 /* c0000279 (STATUS_IO_REPARSE_TAG_NOT_HANDLED) */\r
+   0,                                      /* c000027a */\r
+   0,                                      /* c000027b */\r
+   0,                                      /* c000027c */\r
+   0,                                      /* c000027d */\r
+   0,                                      /* c000027e */\r
+   0,                                      /* c000027f */\r
+   ERROR_CANT_RESOLVE_FILENAME,            /* c0000280 (STATUS_REPARSE_POINT_NOT_RESOLVED) */\r
+   ERROR_BAD_PATHNAME,                     /* c0000281 (STATUS_DIRECTORY_IS_A_REPARSE_POINT) */\r
+   0,                                      /* c0000282 (STATUS_RANGE_LIST_CONFLICT) */\r
+   ERROR_SOURCE_ELEMENT_EMPTY,             /* c0000283 (STATUS_SOURCE_ELEMENT_EMPTY) */\r
+   ERROR_DESTINATION_ELEMENT_FULL,         /* c0000284 (STATUS_DESTINATION_ELEMENT_FULL) */\r
+   ERROR_ILLEGAL_ELEMENT_ADDRESS,          /* c0000285 (STATUS_ILLEGAL_ELEMENT_ADDRESS) */\r
+   ERROR_MAGAZINE_NOT_PRESENT,             /* c0000286 (STATUS_MAGAZINE_NOT_PRESENT) */\r
+   ERROR_DEVICE_REINITIALIZATION_NEEDED,   /* c0000287 (STATUS_REINITIALIZATION_NEEDED) */\r
+   0,                                      /* c0000288 */\r
+   0,                                      /* c0000289 */\r
+   ERROR_ACCESS_DENIED,                    /* c000028a (STATUS_ENCRYPTION_FAILED) */\r
+   ERROR_ACCESS_DENIED,                    /* c000028b (STATUS_DECRYPTION_FAILED) */\r
+   0,                                      /* c000028c (STATUS_RANGE_NOT_FOUND) */\r
+   ERROR_ACCESS_DENIED,                    /* c000028d (STATUS_NO_RECOVERY_POLICY) */\r
+   ERROR_ACCESS_DENIED,                    /* c000028e (STATUS_NO_EFS) */\r
+   ERROR_ACCESS_DENIED,                    /* c000028f (STATUS_WRONG_EFS) */\r
+   ERROR_ACCESS_DENIED,                    /* c0000290 (STATUS_NO_USER_KEYS) */\r
+   ERROR_FILE_NOT_ENCRYPTED,               /* c0000291 (STATUS_FILE_NOT_ENCRYPTED) */\r
+   ERROR_NOT_EXPORT_FORMAT,                /* c0000292 (STATUS_NOT_EXPORT_FORMAT) */\r
+   ERROR_FILE_ENCRYPTED,                   /* c0000293 (STATUS_FILE_ENCRYPTED) */\r
+   0,                                      /* c0000294 */\r
+   ERROR_WMI_GUID_NOT_FOUND,               /* c0000295 (STATUS_WMI_GUID_NOT_FOUND) */\r
+   ERROR_WMI_INSTANCE_NOT_FOUND,           /* c0000296 (STATUS_WMI_INSTANCE_NOT_FOUND) */\r
+   ERROR_WMI_ITEMID_NOT_FOUND,             /* c0000297 (STATUS_WMI_ITEMID_NOT_FOUND) */\r
+   ERROR_WMI_TRY_AGAIN,                    /* c0000298 (STATUS_WMI_TRY_AGAIN) */\r
+   ERROR_SHARED_POLICY,                    /* c0000299 (STATUS_SHARED_POLICY) */\r
+   ERROR_POLICY_OBJECT_NOT_FOUND,          /* c000029a (STATUS_POLICY_OBJECT_NOT_FOUND) */\r
+   ERROR_POLICY_ONLY_IN_DS,                /* c000029b (STATUS_POLICY_ONLY_IN_DS) */\r
+   ERROR_INVALID_FUNCTION,                 /* c000029c (STATUS_VOLUME_NOT_UPGRADED) */\r
+   ERROR_REMOTE_STORAGE_NOT_ACTIVE,        /* c000029d (STATUS_REMOTE_STORAGE_NOT_ACTIVE) */\r
+   ERROR_REMOTE_STORAGE_MEDIA_ERROR,       /* c000029e (STATUS_REMOTE_STORAGE_MEDIA_ERROR) */\r
+   ERROR_NO_TRACKING_SERVICE,              /* c000029f (STATUS_NO_TRACKING_SERVICE) */\r
+   0,                                      /* c00002a0 (STATUS_SERVER_SID_MISMATCH) */\r
+   ERROR_DS_NO_ATTRIBUTE_OR_VALUE,         /* c00002a1 (STATUS_DS_NO_ATTRIBUTE_OR_VALUE) */\r
+   ERROR_DS_INVALID_ATTRIBUTE_SYNTAX,      /* c00002a2 (STATUS_DS_INVALID_ATTRIBUTE_SYNTAX) */\r
+   ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED,      /* c00002a3 (STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED) */\r
+   ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS,     /* c00002a4 (STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS) */\r
+   ERROR_DS_BUSY,                          /* c00002a5 (STATUS_DS_BUSY) */\r
+   ERROR_DS_UNAVAILABLE,                   /* c00002a6 (STATUS_DS_UNAVAILABLE) */\r
+   ERROR_DS_NO_RIDS_ALLOCATED,             /* c00002a7 (STATUS_DS_NO_RIDS_ALLOCATED) */\r
+   ERROR_DS_NO_MORE_RIDS,                  /* c00002a8 (STATUS_DS_NO_MORE_RIDS) */\r
+   ERROR_DS_INCORRECT_ROLE_OWNER,          /* c00002a9 (STATUS_DS_INCORRECT_ROLE_OWNER) */\r
+   ERROR_DS_RIDMGR_INIT_ERROR,             /* c00002aa (STATUS_DS_RIDMGR_INIT_ERROR) */\r
+   ERROR_DS_OBJ_CLASS_VIOLATION,           /* c00002ab (STATUS_DS_OBJ_CLASS_VIOLATION) */\r
+   ERROR_DS_CANT_ON_NON_LEAF,              /* c00002ac (STATUS_DS_CANT_ON_NON_LEAF) */\r
+   ERROR_DS_CANT_ON_RDN,                   /* c00002ad (STATUS_DS_CANT_ON_RDN) */\r
+   ERROR_DS_CANT_MOD_OBJ_CLASS,            /* c00002ae (STATUS_DS_CANT_MOD_OBJ_CLASS) */\r
+   ERROR_DS_CROSS_DOM_MOVE_ERROR,          /* c00002af (STATUS_DS_CROSS_DOM_MOVE_FAILED) */\r
+   ERROR_DS_GC_NOT_AVAILABLE,              /* c00002b0 (STATUS_DS_GC_NOT_AVAILABLE) */\r
+   ERROR_DS_DS_REQUIRED,                   /* c00002b1 (STATUS_DIRECTORY_SERVICE_REQUIRED) */\r
+   ERROR_REPARSE_ATTRIBUTE_CONFLICT,       /* c00002b2 (STATUS_REPARSE_ATTRIBUTE_CONFLICT) */\r
+   0,                                      /* c00002b3 (STATUS_CANT_ENABLE_DENY_ONLY) */\r
+   0,                                      /* c00002b4 (STATUS_FLOAT_MULTIPLE_FAULTS) */\r
+   0,                                      /* c00002b5 (STATUS_FLOAT_MULTIPLE_TRAPS) */\r
+   ERROR_DEVICE_REMOVED,                   /* c00002b6 (STATUS_DEVICE_REMOVED) */\r
+   ERROR_JOURNAL_DELETE_IN_PROGRESS,       /* c00002b7 (STATUS_JOURNAL_DELETE_IN_PROGRESS) */\r
+   ERROR_JOURNAL_NOT_ACTIVE,               /* c00002b8 (STATUS_JOURNAL_NOT_ACTIVE) */\r
+   0,                                      /* c00002b9 (STATUS_NOINTERFACE) */\r
+   0,                                      /* c00002ba */\r
+   0,                                      /* c00002bb */\r
+   0,                                      /* c00002bc */\r
+   0,                                      /* c00002bd */\r
+   0,                                      /* c00002be */\r
+   0,                                      /* c00002bf */\r
+   0,                                      /* c00002c0 */\r
+   ERROR_DS_ADMIN_LIMIT_EXCEEDED,          /* c00002c1 (STATUS_DS_ADMIN_LIMIT_EXCEEDED) */\r
+   0,                                      /* c00002c2 (STATUS_DRIVER_FAILED_SLEEP) */\r
+   ERROR_MUTUAL_AUTH_FAILED,               /* c00002c3 (STATUS_MUTUAL_AUTHENTICATION_FAILED) */\r
+   0,                                      /* c00002c4 (STATUS_CORRUPT_SYSTEM_FILE) */\r
+   ERROR_NOACCESS,                         /* c00002c5 (STATUS_DATATYPE_MISALIGNMENT_ERROR) */\r
+   ERROR_WMI_READ_ONLY,                    /* c00002c6 (STATUS_WMI_READ_ONLY) */\r
+   ERROR_WMI_SET_FAILURE,                  /* c00002c7 (STATUS_WMI_SET_FAILURE) */\r
+   0,                                      /* c00002c8 (STATUS_COMMITMENT_MINIMUM) */\r
+   ERROR_REG_NAT_CONSUMPTION,              /* c00002c9 (STATUS_REG_NAT_CONSUMPTION) */\r
+   ERROR_TRANSPORT_FULL,                   /* c00002ca (STATUS_TRANSPORT_FULL) */\r
+   ERROR_DS_SAM_INIT_FAILURE,              /* c00002cb (STATUS_DS_SAM_INIT_FAILURE) */\r
+   ERROR_ONLY_IF_CONNECTED,                /* c00002cc (STATUS_ONLY_IF_CONNECTED) */\r
+   ERROR_DS_SENSITIVE_GROUP_VIOLATION,     /* c00002cd (STATUS_DS_SENSITIVE_GROUP_VIOLATION) */\r
+   0,                                      /* c00002ce (STATUS_PNP_RESTART_ENUMERATION) */\r
+   ERROR_JOURNAL_ENTRY_DELETED,            /* c00002cf (STATUS_JOURNAL_ENTRY_DELETED) */\r
+   ERROR_DS_CANT_MOD_PRIMARYGROUPID,       /* c00002d0 (STATUS_DS_CANT_MOD_PRIMARYGROUPID) */\r
+   0,                                      /* c00002d1 (STATUS_SYSTEM_IMAGE_BAD_SIGNATURE) */\r
+   0,                                      /* c00002d2 (STATUS_PNP_REBOOT_REQUIRED) */\r
+   0,                                      /* c00002d3 (STATUS_POWER_STATE_INVALID) */\r
+   ERROR_DS_INVALID_GROUP_TYPE,            /* c00002d4 (STATUS_DS_INVALID_GROUP_TYPE) */\r
+   ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN, /* c00002d5 (STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN) */\r
+   ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN,  /* c00002d6 (STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN) */\r
+   ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER,      /* c00002d7 (STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER) */\r
+   ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER,  /* c00002d8 (STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER) */\r
+   ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER,   /* c00002d9 (STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER) */\r
+   ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER,/* c00002da (STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER) */\r
+   ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER,   /* c00002db (STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER) */\r
+   ERROR_DS_HAVE_PRIMARY_MEMBERS,               /* c00002dc (STATUS_DS_HAVE_PRIMARY_MEMBERS) */\r
+   ERROR_NOT_SUPPORTED,                    /* c00002dd (STATUS_WMI_NOT_SUPPORTED) */\r
+   0,                                      /* c00002de (STATUS_INSUFFICIENT_POWER) */\r
+   ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD,     /* c00002df (STATUS_SAM_NEED_BOOTKEY_PASSWORD) */\r
+   ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY,       /* c00002e0 (STATUS_SAM_NEED_BOOTKEY_FLOPPY) */\r
+   ERROR_DS_CANT_START,                    /* c00002e1 (STATUS_DS_CANT_START) */\r
+   ERROR_DS_INIT_FAILURE,                  /* c00002e2 (STATUS_DS_INIT_FAILURE) */\r
+   ERROR_SAM_INIT_FAILURE,                 /* c00002e3 (STATUS_SAM_INIT_FAILURE) */\r
+   ERROR_DS_GC_REQUIRED,                   /* c00002e4 (STATUS_DS_GC_REQUIRED) */\r
+   ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY,    /* c00002e5 (STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY) */\r
+   ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS,    /* c00002e6 (STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS) */\r
+   ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED,     /* c00002e7 (STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED) */\r
+   0,                                      /* c00002e8 (STATUS_MULTIPLE_FAULT_VIOLATION) */\r
+   ERROR_CURRENT_DOMAIN_NOT_ALLOWED,       /* c00002e9 (STATUS_CURRENT_DOMAIN_NOT_ALLOWED) */\r
+   ERROR_CANNOT_MAKE,                      /* c00002ea (STATUS_CANNOT_MAKE) */\r
+   0,                                      /* c00002eb (STATUS_SYSTEM_SHUTDOWN) */\r
+   ERROR_DS_INIT_FAILURE_CONSOLE,          /* c00002ec (STATUS_DS_INIT_FAILURE_CONSOLE) */\r
+   ERROR_DS_SAM_INIT_FAILURE_CONSOLE,      /* c00002ed (STATUS_DS_SAM_INIT_FAILURE_CONSOLE) */\r
+   SEC_E_UNFINISHED_CONTEXT_DELETED,       /* c00002ee (STATUS_UNFINISHED_CONTEXT_DELETED) */\r
+   SEC_E_NO_TGT_REPLY,                     /* c00002ef (STATUS_NO_TGT_REPLY) */\r
+   ERROR_FILE_NOT_FOUND,                   /* c00002f0 (STATUS_OBJECTID_NOT_FOUND) */\r
+   SEC_E_NO_IP_ADDRESSES,                  /* c00002f1 (STATUS_NO_IP_ADDRESSES) */\r
+   SEC_E_WRONG_CREDENTIAL_HANDLE,          /* c00002f2 (STATUS_WRONG_CREDENTIAL_HANDLE) */\r
+   SEC_E_CRYPTO_SYSTEM_INVALID,            /* c00002f3 (STATUS_CRYPTO_SYSTEM_INVALID) */\r
+   SEC_E_MAX_REFERRALS_EXCEEDED,           /* c00002f4 (STATUS_MAX_REFERRALS_EXCEEDED) */\r
+   SEC_E_MUST_BE_KDC,                      /* c00002f5 (STATUS_MUST_BE_KDC) */\r
+   SEC_E_STRONG_CRYPTO_NOT_SUPPORTED,      /* c00002f6 (STATUS_STRONG_CRYPTO_NOT_SUPPORTED) */\r
+   SEC_E_TOO_MANY_PRINCIPALS,              /* c00002f7 (STATUS_TOO_MANY_PRINCIPALS) */\r
+   SEC_E_NO_PA_DATA,                       /* c00002f8 (STATUS_NO_PA_DATA) */\r
+   SEC_E_PKINIT_NAME_MISMATCH,             /* c00002f9 (STATUS_PKINIT_NAME_MISMATCH) */\r
+   SEC_E_SMARTCARD_LOGON_REQUIRED,         /* c00002fa (STATUS_SMARTCARD_LOGON_REQUIRED) */\r
+   SEC_E_KDC_INVALID_REQUEST,              /* c00002fb (STATUS_KDC_INVALID_REQUEST) */\r
+   SEC_E_KDC_UNABLE_TO_REFER,              /* c00002fc (STATUS_KDC_UNABLE_TO_REFER) */\r
+   SEC_E_KDC_UNKNOWN_ETYPE,                /* c00002fd (STATUS_KDC_UNKNOWN_ETYPE) */\r
+   ERROR_SHUTDOWN_IN_PROGRESS,             /* c00002fe (STATUS_SHUTDOWN_IN_PROGRESS) */\r
+   ERROR_SERVER_SHUTDOWN_IN_PROGRESS,      /* c00002ff (STATUS_SERVER_SHUTDOWN_IN_PROGRESS) */\r
+   ERROR_NOT_SUPPORTED_ON_SBS,             /* c0000300 (STATUS_NOT_SUPPORTED_ON_SBS) */\r
+   ERROR_WMI_GUID_DISCONNECTED,            /* c0000301 (STATUS_WMI_GUID_DISCONNECTED) */\r
+   ERROR_WMI_ALREADY_DISABLED,             /* c0000302 (STATUS_WMI_ALREADY_DISABLED) */\r
+   ERROR_WMI_ALREADY_ENABLED,              /* c0000303 (STATUS_WMI_ALREADY_ENABLED) */\r
+   ERROR_DISK_TOO_FRAGMENTED,              /* c0000304 (STATUS_MFT_TOO_FRAGMENTED) */\r
+   STG_E_STATUS_COPY_PROTECTION_FAILURE,   /* c0000305 (STATUS_COPY_PROTECTION_FAILURE) */\r
+   STG_E_CSS_AUTHENTICATION_FAILURE,       /* c0000306 (STATUS_CSS_AUTHENTICATION_FAILURE) */\r
+   STG_E_CSS_KEY_NOT_PRESENT,              /* c0000307 (STATUS_CSS_KEY_NOT_PRESENT) */\r
+   STG_E_CSS_KEY_NOT_ESTABLISHED,          /* c0000308 (STATUS_CSS_KEY_NOT_ESTABLISHED) */\r
+   STG_E_CSS_SCRAMBLED_SECTOR,             /* c0000309 (STATUS_CSS_SCRAMBLED_SECTOR) */\r
+   STG_E_CSS_REGION_MISMATCH,              /* c000030a (STATUS_CSS_REGION_MISMATCH) */\r
+   STG_E_RESETS_EXHAUSTED,                 /* c000030b (STATUS_CSS_RESETS_EXHAUSTED) */\r
+   0,                                      /* c000030c */\r
+   0,                                      /* c000030d */\r
+   0,                                      /* c000030e */\r
+   0,                                      /* c000030f */\r
+   0,                                      /* c0000310 */\r
+   0,                                      /* c0000311 */\r
+   0,                                      /* c0000312 */\r
+   0,                                      /* c0000313 */\r
+   0,                                      /* c0000314 */\r
+   0,                                      /* c0000315 */\r
+   0,                                      /* c0000316 */\r
+   0,                                      /* c0000317 */\r
+   0,                                      /* c0000318 */\r
+   0,                                      /* c0000319 */\r
+   0,                                      /* c000031a */\r
+   0,                                      /* c000031b */\r
+   0,                                      /* c000031c */\r
+   0,                                      /* c000031d */\r
+   0,                                      /* c000031e */\r
+   0,                                      /* c000031f */\r
+   ERROR_PKINIT_FAILURE,                   /* c0000320 (STATUS_PKINIT_FAILURE) */\r
+   ERROR_SMARTCARD_SUBSYSTEM_FAILURE,      /* c0000321 (STATUS_SMARTCARD_SUBSYSTEM_FAILURE) */\r
+   SEC_E_NO_KERB_KEY,                      /* c0000322 (STATUS_NO_KERB_KEY) */\r
+   0,                                      /* c0000323 */\r
+   0,                                      /* c0000324 */\r
+   0,                                      /* c0000325 */\r
+   0,                                      /* c0000326 */\r
+   0,                                      /* c0000327 */\r
+   0,                                      /* c0000328 */\r
+   0,                                      /* c0000329 */\r
+   0,                                      /* c000032a */\r
+   0,                                      /* c000032b */\r
+   0,                                      /* c000032c */\r
+   0,                                      /* c000032d */\r
+   0,                                      /* c000032e */\r
+   0,                                      /* c000032f */\r
+   0,                                      /* c0000330 */\r
+   0,                                      /* c0000331 */\r
+   0,                                      /* c0000332 */\r
+   0,                                      /* c0000333 */\r
+   0,                                      /* c0000334 */\r
+   0,                                      /* c0000335 */\r
+   0,                                      /* c0000336 */\r
+   0,                                      /* c0000337 */\r
+   0,                                      /* c0000338 */\r
+   0,                                      /* c0000339 */\r
+   0,                                      /* c000033a */\r
+   0,                                      /* c000033b */\r
+   0,                                      /* c000033c */\r
+   0,                                      /* c000033d */\r
+   0,                                      /* c000033e */\r
+   0,                                      /* c000033f */\r
+   0,                                      /* c0000340 */\r
+   0,                                      /* c0000341 */\r
+   0,                                      /* c0000342 */\r
+   0,                                      /* c0000343 */\r
+   0,                                      /* c0000344 */\r
+   0,                                      /* c0000345 */\r
+   0,                                      /* c0000346 */\r
+   0,                                      /* c0000347 */\r
+   0,                                      /* c0000348 */\r
+   0,                                      /* c0000349 */\r
+   0,                                      /* c000034a */\r
+   0,                                      /* c000034b */\r
+   0,                                      /* c000034c */\r
+   0,                                      /* c000034d */\r
+   0,                                      /* c000034e */\r
+   0,                                      /* c000034f */\r
+   ERROR_HOST_DOWN,                        /* c0000350 (STATUS_HOST_DOWN) */\r
+   SEC_E_UNSUPPORTED_PREAUTH,              /* c0000351 (STATUS_UNSUPPORTED_PREAUTH) */\r
+   ERROR_EFS_ALG_BLOB_TOO_BIG,             /* c0000352 (STATUS_EFS_ALG_BLOB_TOO_BIG) */\r
+   0,                                      /* c0000353 (STATUS_PORT_NOT_SET) */\r
+   0,                                      /* c0000354 (STATUS_DEBUGGER_INACTIVE) */\r
+   0,                                      /* c0000355 (STATUS_DS_VERSION_CHECK_FAILURE) */\r
+   ERROR_AUDITING_DISABLED,                /* c0000356 (STATUS_AUDITING_DISABLED) */\r
+   ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4,/* c0000357 (STATUS_PRENT4_MACHINE_ACCOUNT) */\r
+   ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER, /* c0000358 (STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c0000359 (STATUS_INVALID_IMAGE_WIN_32) */\r
+   ERROR_BAD_EXE_FORMAT,                   /* c000035a (STATUS_INVALID_IMAGE_WIN_64) */\r
+   SEC_E_BAD_BINDINGS,                     /* c000035b (STATUS_BAD_BINDINGS) */\r
+   ERROR_NO_USER_SESSION_KEY,              /* c000035c (STATUS_NETWORK_SESSION_EXPIRED) */\r
+   0,                                      /* c000035d (STATUS_APPHELP_BLOCK) */\r
+   0,                                      /* c000035e (STATUS_ALL_SIDS_FILTERED) */\r
+   0,                                      /* c000035f (STATUS_NOT_SAFE_MODE_DRIVER) */\r
+   0,                                      /* c0000360 */\r
+   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000361 (STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT) */\r
+   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000362 (STATUS_ACCESS_DISABLED_BY_POLICY_PATH) */\r
+   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000363 (STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER) */\r
+   ERROR_ACCESS_DISABLED_BY_POLICY,        /* c0000364 (STATUS_ACCESS_DISABLED_BY_POLICY_OTHER) */\r
+   0,                                      /* c0000365 (STATUS_FAILED_DRIVER_ENTRY) */\r
+   0,                                      /* c0000366 (STATUS_DEVICE_ENUMERATION_ERROR) */\r
+   0,                                      /* c0000367 */\r
+   0,                                      /* c0000368 (STATUS_MOUNT_POINT_NOT_RESOLVED) */\r
+   0,                                      /* c0000369 (STATUS_INVALID_DEVICE_OBJECT_PARAMETER) */\r
+   0,                                      /* c000036a (STATUS_MCA_OCCURED) */\r
+   ERROR_DRIVER_BLOCKED,                   /* c000036b (STATUS_DRIVER_BLOCKED_CRITICAL) */\r
+   ERROR_DRIVER_BLOCKED,                   /* c000036c (STATUS_DRIVER_BLOCKED) */\r
+   0,                                      /* c000036d (STATUS_DRIVER_DATABASE_ERROR) */\r
+   0,                                      /* c000036e (STATUS_SYSTEM_HIVE_TOO_LARGE) */\r
+   ERROR_INVALID_IMPORT_OF_NON_DLL,        /* c000036f (STATUS_INVALID_IMPORT_OF_NON_DLL) */\r
+   0,                                      /* c0000370 */\r
+   0,                                      /* c0000371 */\r
+   0,                                      /* c0000372 */\r
+   0,                                      /* c0000373 */\r
+   0,                                      /* c0000374 */\r
+   0,                                      /* c0000375 */\r
+   0,                                      /* c0000376 */\r
+   0,                                      /* c0000377 */\r
+   0,                                      /* c0000378 */\r
+   0,                                      /* c0000379 */\r
+   0,                                      /* c000037a */\r
+   0,                                      /* c000037b */\r
+   0,                                      /* c000037c */\r
+   0,                                      /* c000037d */\r
+   0,                                      /* c000037e */\r
+   0,                                      /* c000037f */\r
+   SCARD_W_WRONG_CHV,                      /* c0000380 (STATUS_SMARTCARD_WRONG_PIN) */\r
+   SCARD_W_CHV_BLOCKED,                    /* c0000381 (STATUS_SMARTCARD_CARD_BLOCKED) */\r
+   SCARD_W_CARD_NOT_AUTHENTICATED,         /* c0000382 (STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED) */\r
+   SCARD_E_NO_SMARTCARD,                   /* c0000383 (STATUS_SMARTCARD_NO_CARD) */\r
+   NTE_NO_KEY,                             /* c0000384 (STATUS_SMARTCARD_NO_KEY_CONTAINER) */\r
+   SCARD_E_NO_SUCH_CERTIFICATE,            /* c0000385 (STATUS_SMARTCARD_NO_CERTIFICATE) */\r
+   NTE_BAD_KEYSET,                         /* c0000386 (STATUS_SMARTCARD_NO_KEYSET) */\r
+   SCARD_E_COMM_DATA_LOST,                 /* c0000387 (STATUS_SMARTCARD_IO_ERROR) */\r
+   ERROR_DOWNGRADE_DETECTED,               /* c0000388 (STATUS_DOWNGRADE_DETECTED) */\r
+   SEC_E_SMARTCARD_CERT_REVOKED,           /* c0000389 (STATUS_SMARTCARD_CERT_REVOKED) */\r
+   SEC_E_ISSUING_CA_UNTRUSTED,             /* c000038a (STATUS_ISSUING_CA_UNTRUSTED) */\r
+   SEC_E_REVOCATION_OFFLINE_C,             /* c000038b (STATUS_REVOCATION_OFFLINE_C) */\r
+   SEC_E_PKINIT_CLIENT_FAILURE,            /* c000038c (STATUS_PKINIT_CLIENT_FAILURE) */\r
+   SEC_E_SMARTCARD_CERT_EXPIRED            /* c000038d (STATUS_SMARTCARD_CERT_EXPIRED) */\r
+};\r
+\r
+static const DWORD table_c0020001[99] =\r
+{\r
+   RPC_S_INVALID_STRING_BINDING,           /* c0020001 (RPC_NT_INVALID_STRING_BINDING) */\r
+   RPC_S_WRONG_KIND_OF_BINDING,            /* c0020002 (RPC_NT_WRONG_KIND_OF_BINDING) */\r
+   ERROR_INVALID_HANDLE,                   /* c0020003 (RPC_NT_INVALID_BINDING) */\r
+   RPC_S_PROTSEQ_NOT_SUPPORTED,            /* c0020004 (RPC_NT_PROTSEQ_NOT_SUPPORTED) */\r
+   RPC_S_INVALID_RPC_PROTSEQ,              /* c0020005 (RPC_NT_INVALID_RPC_PROTSEQ) */\r
+   RPC_S_INVALID_STRING_UUID,              /* c0020006 (RPC_NT_INVALID_STRING_UUID) */\r
+   RPC_S_INVALID_ENDPOINT_FORMAT,          /* c0020007 (RPC_NT_INVALID_ENDPOINT_FORMAT) */\r
+   RPC_S_INVALID_NET_ADDR,                 /* c0020008 (RPC_NT_INVALID_NET_ADDR) */\r
+   RPC_S_NO_ENDPOINT_FOUND,                /* c0020009 (RPC_NT_NO_ENDPOINT_FOUND) */\r
+   RPC_S_INVALID_TIMEOUT,                  /* c002000a (RPC_NT_INVALID_TIMEOUT) */\r
+   RPC_S_OBJECT_NOT_FOUND,                 /* c002000b (RPC_NT_OBJECT_NOT_FOUND) */\r
+   RPC_S_ALREADY_REGISTERED,               /* c002000c (RPC_NT_ALREADY_REGISTERED) */\r
+   RPC_S_TYPE_ALREADY_REGISTERED,          /* c002000d (RPC_NT_TYPE_ALREADY_REGISTERED) */\r
+   RPC_S_ALREADY_LISTENING,                /* c002000e (RPC_NT_ALREADY_LISTENING) */\r
+   RPC_S_NO_PROTSEQS_REGISTERED,           /* c002000f (RPC_NT_NO_PROTSEQS_REGISTERED) */\r
+   RPC_S_NOT_LISTENING,                    /* c0020010 (RPC_NT_NOT_LISTENING) */\r
+   RPC_S_UNKNOWN_MGR_TYPE,                 /* c0020011 (RPC_NT_UNKNOWN_MGR_TYPE) */\r
+   RPC_S_UNKNOWN_IF,                       /* c0020012 (RPC_NT_UNKNOWN_IF) */\r
+   RPC_S_NO_BINDINGS,                      /* c0020013 (RPC_NT_NO_BINDINGS) */\r
+   RPC_S_NO_PROTSEQS,                      /* c0020014 (RPC_NT_NO_PROTSEQS) */\r
+   RPC_S_CANT_CREATE_ENDPOINT,             /* c0020015 (RPC_NT_CANT_CREATE_ENDPOINT) */\r
+   RPC_S_OUT_OF_RESOURCES,                 /* c0020016 (RPC_NT_OUT_OF_RESOURCES) */\r
+   RPC_S_SERVER_UNAVAILABLE,               /* c0020017 (RPC_NT_SERVER_UNAVAILABLE) */\r
+   RPC_S_SERVER_TOO_BUSY,                  /* c0020018 (RPC_NT_SERVER_TOO_BUSY) */\r
+   RPC_S_INVALID_NETWORK_OPTIONS,          /* c0020019 (RPC_NT_INVALID_NETWORK_OPTIONS) */\r
+   RPC_S_NO_CALL_ACTIVE,                   /* c002001a (RPC_NT_NO_CALL_ACTIVE) */\r
+   RPC_S_CALL_FAILED,                      /* c002001b (RPC_NT_CALL_FAILED) */\r
+   RPC_S_CALL_FAILED_DNE,                  /* c002001c (RPC_NT_CALL_FAILED_DNE) */\r
+   RPC_S_PROTOCOL_ERROR,                   /* c002001d (RPC_NT_PROTOCOL_ERROR) */\r
+   0,                                      /* c002001e */\r
+   RPC_S_UNSUPPORTED_TRANS_SYN,            /* c002001f (RPC_NT_UNSUPPORTED_TRANS_SYN) */\r
+   0,                                      /* c0020020 */\r
+   RPC_S_UNSUPPORTED_TYPE,                 /* c0020021 (RPC_NT_UNSUPPORTED_TYPE) */\r
+   RPC_S_INVALID_TAG,                      /* c0020022 (RPC_NT_INVALID_TAG) */\r
+   RPC_S_INVALID_BOUND,                    /* c0020023 (RPC_NT_INVALID_BOUND) */\r
+   RPC_S_NO_ENTRY_NAME,                    /* c0020024 (RPC_NT_NO_ENTRY_NAME) */\r
+   RPC_S_INVALID_NAME_SYNTAX,              /* c0020025 (RPC_NT_INVALID_NAME_SYNTAX) */\r
+   RPC_S_UNSUPPORTED_NAME_SYNTAX,          /* c0020026 (RPC_NT_UNSUPPORTED_NAME_SYNTAX) */\r
+   0,                                      /* c0020027 */\r
+   RPC_S_UUID_NO_ADDRESS,                  /* c0020028 (RPC_NT_UUID_NO_ADDRESS) */\r
+   RPC_S_DUPLICATE_ENDPOINT,               /* c0020029 (RPC_NT_DUPLICATE_ENDPOINT) */\r
+   RPC_S_UNKNOWN_AUTHN_TYPE,               /* c002002a (RPC_NT_UNKNOWN_AUTHN_TYPE) */\r
+   RPC_S_MAX_CALLS_TOO_SMALL,              /* c002002b (RPC_NT_MAX_CALLS_TOO_SMALL) */\r
+   RPC_S_STRING_TOO_LONG,                  /* c002002c (RPC_NT_STRING_TOO_LONG) */\r
+   RPC_S_PROTSEQ_NOT_FOUND,                /* c002002d (RPC_NT_PROTSEQ_NOT_FOUND) */\r
+   RPC_S_PROCNUM_OUT_OF_RANGE,             /* c002002e (RPC_NT_PROCNUM_OUT_OF_RANGE) */\r
+   RPC_S_BINDING_HAS_NO_AUTH,              /* c002002f (RPC_NT_BINDING_HAS_NO_AUTH) */\r
+   RPC_S_UNKNOWN_AUTHN_SERVICE,            /* c0020030 (RPC_NT_UNKNOWN_AUTHN_SERVICE) */\r
+   RPC_S_UNKNOWN_AUTHN_LEVEL,              /* c0020031 (RPC_NT_UNKNOWN_AUTHN_LEVEL) */\r
+   RPC_S_INVALID_AUTH_IDENTITY,            /* c0020032 (RPC_NT_INVALID_AUTH_IDENTITY) */\r
+   RPC_S_UNKNOWN_AUTHZ_SERVICE,            /* c0020033 (RPC_NT_UNKNOWN_AUTHZ_SERVICE) */\r
+   EPT_S_INVALID_ENTRY,                    /* c0020034 (EPT_NT_INVALID_ENTRY) */\r
+   EPT_S_CANT_PERFORM_OP,                  /* c0020035 (EPT_NT_CANT_PERFORM_OP) */\r
+   EPT_S_NOT_REGISTERED,                   /* c0020036 (EPT_NT_NOT_REGISTERED) */\r
+   RPC_S_NOTHING_TO_EXPORT,                /* c0020037 (RPC_NT_NOTHING_TO_EXPORT) */\r
+   RPC_S_INCOMPLETE_NAME,                  /* c0020038 (RPC_NT_INCOMPLETE_NAME) */\r
+   RPC_S_INVALID_VERS_OPTION,              /* c0020039 (RPC_NT_INVALID_VERS_OPTION) */\r
+   RPC_S_NO_MORE_MEMBERS,                  /* c002003a (RPC_NT_NO_MORE_MEMBERS) */\r
+   RPC_S_NOT_ALL_OBJS_UNEXPORTED,          /* c002003b (RPC_NT_NOT_ALL_OBJS_UNEXPORTED) */\r
+   RPC_S_INTERFACE_NOT_FOUND,              /* c002003c (RPC_NT_INTERFACE_NOT_FOUND) */\r
+   RPC_S_ENTRY_ALREADY_EXISTS,             /* c002003d (RPC_NT_ENTRY_ALREADY_EXISTS) */\r
+   RPC_S_ENTRY_NOT_FOUND,                  /* c002003e (RPC_NT_ENTRY_NOT_FOUND) */\r
+   RPC_S_NAME_SERVICE_UNAVAILABLE,         /* c002003f (RPC_NT_NAME_SERVICE_UNAVAILABLE) */\r
+   RPC_S_INVALID_NAF_ID,                   /* c0020040 (RPC_NT_INVALID_NAF_ID) */\r
+   RPC_S_CANNOT_SUPPORT,                   /* c0020041 (RPC_NT_CANNOT_SUPPORT) */\r
+   RPC_S_NO_CONTEXT_AVAILABLE,             /* c0020042 (RPC_NT_NO_CONTEXT_AVAILABLE) */\r
+   RPC_S_INTERNAL_ERROR,                   /* c0020043 (RPC_NT_INTERNAL_ERROR) */\r
+   RPC_S_ZERO_DIVIDE,                      /* c0020044 (RPC_NT_ZERO_DIVIDE) */\r
+   RPC_S_ADDRESS_ERROR,                    /* c0020045 (RPC_NT_ADDRESS_ERROR) */\r
+   RPC_S_FP_DIV_ZERO,                      /* c0020046 (RPC_NT_FP_DIV_ZERO) */\r
+   RPC_S_FP_UNDERFLOW,                     /* c0020047 (RPC_NT_FP_UNDERFLOW) */\r
+   RPC_S_FP_OVERFLOW,                      /* c0020048 (RPC_NT_FP_OVERFLOW) */\r
+   RPC_S_CALL_IN_PROGRESS,                 /* c0020049 (RPC_NT_CALL_IN_PROGRESS) */\r
+   RPC_S_NO_MORE_BINDINGS,                 /* c002004a (RPC_NT_NO_MORE_BINDINGS) */\r
+   RPC_S_GROUP_MEMBER_NOT_FOUND,           /* c002004b (RPC_NT_GROUP_MEMBER_NOT_FOUND) */\r
+   EPT_S_CANT_CREATE,                      /* c002004c (EPT_NT_CANT_CREATE) */\r
+   RPC_S_INVALID_OBJECT,                   /* c002004d (RPC_NT_INVALID_OBJECT) */\r
+   0,                                      /* c002004e */\r
+   RPC_S_NO_INTERFACES,                    /* c002004f (RPC_NT_NO_INTERFACES) */\r
+   RPC_S_CALL_CANCELLED,                   /* c0020050 (RPC_NT_CALL_CANCELLED) */\r
+   RPC_S_BINDING_INCOMPLETE,               /* c0020051 (RPC_NT_BINDING_INCOMPLETE) */\r
+   RPC_S_COMM_FAILURE,                     /* c0020052 (RPC_NT_COMM_FAILURE) */\r
+   RPC_S_UNSUPPORTED_AUTHN_LEVEL,          /* c0020053 (RPC_NT_UNSUPPORTED_AUTHN_LEVEL) */\r
+   RPC_S_NO_PRINC_NAME,                    /* c0020054 (RPC_NT_NO_PRINC_NAME) */\r
+   RPC_S_NOT_RPC_ERROR,                    /* c0020055 (RPC_NT_NOT_RPC_ERROR) */\r
+   0,                                      /* c0020056 */\r
+   RPC_S_SEC_PKG_ERROR,                    /* c0020057 (RPC_NT_SEC_PKG_ERROR) */\r
+   RPC_S_NOT_CANCELLED,                    /* c0020058 (RPC_NT_NOT_CANCELLED) */\r
+   0,                                      /* c0020059 */\r
+   0,                                      /* c002005a */\r
+   0,                                      /* c002005b */\r
+   0,                                      /* c002005c */\r
+   0,                                      /* c002005d */\r
+   0,                                      /* c002005e */\r
+   0,                                      /* c002005f */\r
+   0,                                      /* c0020060 */\r
+   0,                                      /* c0020061 */\r
+   RPC_S_INVALID_ASYNC_HANDLE,             /* c0020062 (RPC_NT_INVALID_ASYNC_HANDLE) */\r
+   RPC_S_INVALID_ASYNC_CALL                /* c0020063 (RPC_NT_INVALID_ASYNC_CALL) */\r
+};\r
+\r
+static const DWORD table_c0030001[12] =\r
+{\r
+   RPC_X_NO_MORE_ENTRIES,                  /* c0030001 (RPC_NT_NO_MORE_ENTRIES) */\r
+   RPC_X_SS_CHAR_TRANS_OPEN_FAIL,          /* c0030002 (RPC_NT_SS_CHAR_TRANS_OPEN_FAIL) */\r
+   RPC_X_SS_CHAR_TRANS_SHORT_FILE,         /* c0030003 (RPC_NT_SS_CHAR_TRANS_SHORT_FILE) */\r
+   ERROR_INVALID_HANDLE,                   /* c0030004 (RPC_NT_SS_IN_NULL_CONTEXT) */\r
+   ERROR_INVALID_HANDLE,                   /* c0030005 (RPC_NT_SS_CONTEXT_MISMATCH) */\r
+   RPC_X_SS_CONTEXT_DAMAGED,               /* c0030006 (RPC_NT_SS_CONTEXT_DAMAGED) */\r
+   RPC_X_SS_HANDLES_MISMATCH,              /* c0030007 (RPC_NT_SS_HANDLES_MISMATCH) */\r
+   RPC_X_SS_CANNOT_GET_CALL_HANDLE,        /* c0030008 (RPC_NT_SS_CANNOT_GET_CALL_HANDLE) */\r
+   RPC_X_NULL_REF_POINTER,                 /* c0030009 (RPC_NT_NULL_REF_POINTER) */\r
+   RPC_X_ENUM_VALUE_OUT_OF_RANGE,          /* c003000a (RPC_NT_ENUM_VALUE_OUT_OF_RANGE) */\r
+   RPC_X_BYTE_COUNT_TOO_SMALL,             /* c003000b (RPC_NT_BYTE_COUNT_TOO_SMALL) */\r
+   RPC_X_BAD_STUB_DATA                     /* c003000c (RPC_NT_BAD_STUB_DATA) */\r
+};\r
+\r
+static const DWORD table_c0030059[9] =\r
+{\r
+   RPC_X_INVALID_ES_ACTION,                /* c0030059 (RPC_NT_INVALID_ES_ACTION) */\r
+   RPC_X_WRONG_ES_VERSION,                 /* c003005a (RPC_NT_WRONG_ES_VERSION) */\r
+   RPC_X_WRONG_STUB_VERSION,               /* c003005b (RPC_NT_WRONG_STUB_VERSION) */\r
+   RPC_X_INVALID_PIPE_OBJECT,              /* c003005c (RPC_NT_INVALID_PIPE_OBJECT) */\r
+   RPC_X_WRONG_PIPE_ORDER,                 /* c003005d (RPC_NT_INVALID_PIPE_OPERATION) */\r
+   RPC_X_WRONG_PIPE_VERSION,               /* c003005e (RPC_NT_WRONG_PIPE_VERSION) */\r
+   RPC_X_PIPE_CLOSED,                      /* c003005f (RPC_NT_PIPE_CLOSED) */\r
+   RPC_X_PIPE_DISCIPLINE_ERROR,            /* c0030060 (RPC_NT_PIPE_DISCIPLINE_ERROR) */\r
+   RPC_X_PIPE_EMPTY                        /* c0030061 (RPC_NT_PIPE_EMPTY) */\r
+};\r
+\r
+static const DWORD table_c00a0001[54] =\r
+{\r
+   ERROR_CTX_WINSTATION_NAME_INVALID,      /* c00a0001 (STATUS_CTX_WINSTATION_NAME_INVALID) */\r
+   ERROR_CTX_INVALID_PD,                   /* c00a0002 (STATUS_CTX_INVALID_PD) */\r
+   ERROR_CTX_PD_NOT_FOUND,                 /* c00a0003 (STATUS_CTX_PD_NOT_FOUND) */\r
+   0,                                      /* c00a0004 */\r
+   0,                                      /* c00a0005 */\r
+   ERROR_CTX_CLOSE_PENDING,                /* c00a0006 (STATUS_CTX_CLOSE_PENDING) */\r
+   ERROR_CTX_NO_OUTBUF,                    /* c00a0007 (STATUS_CTX_NO_OUTBUF) */\r
+   ERROR_CTX_MODEM_INF_NOT_FOUND,          /* c00a0008 (STATUS_CTX_MODEM_INF_NOT_FOUND) */\r
+   ERROR_CTX_INVALID_MODEMNAME,            /* c00a0009 (STATUS_CTX_INVALID_MODEMNAME) */\r
+   ERROR_CTX_MODEM_RESPONSE_ERROR,         /* c00a000a (STATUS_CTX_RESPONSE_ERROR) */\r
+   ERROR_CTX_MODEM_RESPONSE_TIMEOUT,       /* c00a000b (STATUS_CTX_MODEM_RESPONSE_TIMEOUT) */\r
+   ERROR_CTX_MODEM_RESPONSE_NO_CARRIER,    /* c00a000c (STATUS_CTX_MODEM_RESPONSE_NO_CARRIER) */\r
+   ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE,   /* c00a000d (STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE) */\r
+   ERROR_CTX_MODEM_RESPONSE_BUSY,          /* c00a000e (STATUS_CTX_MODEM_RESPONSE_BUSY) */\r
+   ERROR_CTX_MODEM_RESPONSE_VOICE,         /* c00a000f (STATUS_CTX_MODEM_RESPONSE_VOICE) */\r
+   ERROR_CTX_TD_ERROR,                     /* c00a0010 (STATUS_CTX_TD_ERROR) */\r
+   0,                                      /* c00a0011 */\r
+   ERROR_CTX_LICENSE_CLIENT_INVALID,       /* c00a0012 (STATUS_CTX_LICENSE_CLIENT_INVALID) */\r
+   ERROR_CTX_LICENSE_NOT_AVAILABLE,        /* c00a0013 (STATUS_CTX_LICENSE_NOT_AVAILABLE) */\r
+   ERROR_CTX_LICENSE_EXPIRED,              /* c00a0014 (STATUS_CTX_LICENSE_EXPIRED) */\r
+   ERROR_CTX_WINSTATION_NOT_FOUND,         /* c00a0015 (STATUS_CTX_WINSTATION_NOT_FOUND) */\r
+   ERROR_CTX_WINSTATION_ALREADY_EXISTS,    /* c00a0016 (STATUS_CTX_WINSTATION_NAME_COLLISION) */\r
+   ERROR_CTX_WINSTATION_BUSY,              /* c00a0017 (STATUS_CTX_WINSTATION_BUSY) */\r
+   ERROR_CTX_BAD_VIDEO_MODE,               /* c00a0018 (STATUS_CTX_BAD_VIDEO_MODE) */\r
+   0,                                      /* c00a0019 */\r
+   0,                                      /* c00a001a */\r
+   0,                                      /* c00a001b */\r
+   0,                                      /* c00a001c */\r
+   0,                                      /* c00a001d */\r
+   0,                                      /* c00a001e */\r
+   0,                                      /* c00a001f */\r
+   0,                                      /* c00a0020 */\r
+   0,                                      /* c00a0021 */\r
+   ERROR_CTX_GRAPHICS_INVALID,             /* c00a0022 (STATUS_CTX_GRAPHICS_INVALID) */\r
+   0,                                      /* c00a0023 */\r
+   ERROR_CTX_NOT_CONSOLE,                  /* c00a0024 (STATUS_CTX_NOT_CONSOLE) */\r
+   0,                                      /* c00a0025 */\r
+   ERROR_CTX_CLIENT_QUERY_TIMEOUT,         /* c00a0026 (STATUS_CTX_CLIENT_QUERY_TIMEOUT) */\r
+   ERROR_CTX_CONSOLE_DISCONNECT,           /* c00a0027 (STATUS_CTX_CONSOLE_DISCONNECT) */\r
+   ERROR_CTX_CONSOLE_CONNECT,              /* c00a0028 (STATUS_CTX_CONSOLE_CONNECT) */\r
+   0,                                      /* c00a0029 */\r
+   ERROR_CTX_SHADOW_DENIED,                /* c00a002a (STATUS_CTX_SHADOW_DENIED) */\r
+   ERROR_CTX_WINSTATION_ACCESS_DENIED,     /* c00a002b (STATUS_CTX_WINSTATION_ACCESS_DENIED) */\r
+   0,                                      /* c00a002c */\r
+   0,                                      /* c00a002d */\r
+   ERROR_CTX_INVALID_WD,                   /* c00a002e (STATUS_CTX_INVALID_WD) */\r
+   ERROR_CTX_WD_NOT_FOUND,                 /* c00a002f (STATUS_CTX_WD_NOT_FOUND) */\r
+   ERROR_CTX_SHADOW_INVALID,               /* c00a0030 (STATUS_CTX_SHADOW_INVALID) */\r
+   ERROR_CTX_SHADOW_DISABLED,              /* c00a0031 (STATUS_CTX_SHADOW_DISABLED) */\r
+   0,                                      /* c00a0032 (STATUS_RDP_PROTOCOL_ERROR) */\r
+   ERROR_CTX_CLIENT_LICENSE_NOT_SET,       /* c00a0033 (STATUS_CTX_CLIENT_LICENSE_NOT_SET) */\r
+   ERROR_CTX_CLIENT_LICENSE_IN_USE,        /* c00a0034 (STATUS_CTX_CLIENT_LICENSE_IN_USE) */\r
+   ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE,  /* c00a0035 (STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE) */\r
+   ERROR_CTX_SHADOW_NOT_RUNNING            /* c00a0036 (STATUS_CTX_SHADOW_NOT_RUNNING) */\r
+};\r
+\r
+static const DWORD table_c0130001[22] =\r
+{\r
+   ERROR_CLUSTER_INVALID_NODE,             /* c0130001 (STATUS_CLUSTER_INVALID_NODE) */\r
+   ERROR_CLUSTER_NODE_EXISTS,              /* c0130002 (STATUS_CLUSTER_NODE_EXISTS) */\r
+   ERROR_CLUSTER_JOIN_IN_PROGRESS,         /* c0130003 (STATUS_CLUSTER_JOIN_IN_PROGRESS) */\r
+   ERROR_CLUSTER_NODE_NOT_FOUND,           /* c0130004 (STATUS_CLUSTER_NODE_NOT_FOUND) */\r
+   ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND,     /* c0130005 (STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND) */\r
+   ERROR_CLUSTER_NETWORK_EXISTS,           /* c0130006 (STATUS_CLUSTER_NETWORK_EXISTS) */\r
+   ERROR_CLUSTER_NETWORK_NOT_FOUND,        /* c0130007 (STATUS_CLUSTER_NETWORK_NOT_FOUND) */\r
+   ERROR_CLUSTER_NETINTERFACE_EXISTS,      /* c0130008 (STATUS_CLUSTER_NETINTERFACE_EXISTS) */\r
+   ERROR_CLUSTER_NETINTERFACE_NOT_FOUND,   /* c0130009 (STATUS_CLUSTER_NETINTERFACE_NOT_FOUND) */\r
+   ERROR_CLUSTER_INVALID_REQUEST,          /* c013000a (STATUS_CLUSTER_INVALID_REQUEST) */\r
+   ERROR_CLUSTER_INVALID_NETWORK_PROVIDER, /* c013000b (STATUS_CLUSTER_INVALID_NETWORK_PROVIDER) */\r
+   ERROR_CLUSTER_NODE_DOWN,                /* c013000c (STATUS_CLUSTER_NODE_DOWN) */\r
+   ERROR_CLUSTER_NODE_UNREACHABLE,         /* c013000d (STATUS_CLUSTER_NODE_UNREACHABLE) */\r
+   ERROR_CLUSTER_NODE_NOT_MEMBER,          /* c013000e (STATUS_CLUSTER_NODE_NOT_MEMBER) */\r
+   ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS,     /* c013000f (STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS) */\r
+   ERROR_CLUSTER_INVALID_NETWORK,          /* c0130010 (STATUS_CLUSTER_INVALID_NETWORK) */\r
+   0,                                      /* c0130011 (STATUS_CLUSTER_NO_NET_ADAPTERS) */\r
+   ERROR_CLUSTER_NODE_UP,                  /* c0130012 (STATUS_CLUSTER_NODE_UP) */\r
+   ERROR_CLUSTER_NODE_PAUSED,              /* c0130013 (STATUS_CLUSTER_NODE_PAUSED) */\r
+   ERROR_CLUSTER_NODE_NOT_PAUSED,          /* c0130014 (STATUS_CLUSTER_NODE_NOT_PAUSED) */\r
+   ERROR_CLUSTER_NO_SECURITY_CONTEXT,      /* c0130015 (STATUS_CLUSTER_NO_SECURITY_CONTEXT) */\r
+   ERROR_CLUSTER_NETWORK_NOT_INTERNAL      /* c0130016 (STATUS_CLUSTER_NETWORK_NOT_INTERNAL) */\r
+};\r
+\r
+static const DWORD table_c0150001[14] =\r
+{\r
+   ERROR_SXS_SECTION_NOT_FOUND,            /* c0150001 (STATUS_SXS_SECTION_NOT_FOUND) */\r
+   ERROR_SXS_CANT_GEN_ACTCTX,              /* c0150002 (STATUS_SXS_CANT_GEN_ACTCTX) */\r
+   ERROR_SXS_INVALID_ACTCTXDATA_FORMAT,    /* c0150003 (STATUS_SXS_INVALID_ACTCTXDATA_FORMAT) */\r
+   ERROR_SXS_ASSEMBLY_NOT_FOUND,           /* c0150004 (STATUS_SXS_ASSEMBLY_NOT_FOUND) */\r
+   ERROR_SXS_MANIFEST_FORMAT_ERROR,        /* c0150005 (STATUS_SXS_MANIFEST_FORMAT_ERROR) */\r
+   ERROR_SXS_MANIFEST_PARSE_ERROR,         /* c0150006 (STATUS_SXS_MANIFEST_PARSE_ERROR) */\r
+   ERROR_SXS_ACTIVATION_CONTEXT_DISABLED,  /* c0150007 (STATUS_SXS_ACTIVATION_CONTEXT_DISABLED) */\r
+   ERROR_SXS_KEY_NOT_FOUND,                /* c0150008 (STATUS_SXS_KEY_NOT_FOUND) */\r
+   0,                                      /* c0150009 (STATUS_SXS_VERSION_CONFLICT) */\r
+   ERROR_SXS_WRONG_SECTION_TYPE,           /* c015000a (STATUS_SXS_WRONG_SECTION_TYPE) */\r
+   ERROR_SXS_THREAD_QUERIES_DISABLED,      /* c015000b (STATUS_SXS_THREAD_QUERIES_DISABLED) */\r
+   0,                                      /* c015000c (STATUS_SXS_ASSEMBLY_MISSING) */\r
+   0,                                      /* c015000d */\r
+   ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET   /* c015000e (STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET) */\r
+};\r
+\r
+static const struct error_table error_table[] =\r
+{\r
+    { 0x00000102, 0x00000122, table_00000102 },\r
+    { 0x40000002, 0x4000000e, table_40000002 },\r
+    { 0x40000370, 0x40000371, table_40000370 },\r
+    { 0x40020056, 0x40020057, table_40020056 },\r
+    { 0x400200af, 0x400200b0, table_400200af },\r
+    { 0x80000001, 0x80000028, table_80000001 },\r
+    { 0x80000288, 0x8000028a, table_80000288 },\r
+    { 0x80090300, 0x80090348, table_80090300 },\r
+    { 0x80092010, 0x80092014, table_80092010 },\r
+    { 0x80096004, 0x80096005, table_80096004 },\r
+    { 0x80130001, 0x80130006, table_80130001 },\r
+    { 0xc0000001, 0xc000019c, table_c0000001 },\r
+    { 0xc0000202, 0xc000038e, table_c0000202 },\r
+    { 0xc0020001, 0xc0020064, table_c0020001 },\r
+    { 0xc0030001, 0xc003000d, table_c0030001 },\r
+    { 0xc0030059, 0xc0030062, table_c0030059 },\r
+    { 0xc00a0001, 0xc00a0037, table_c00a0001 },\r
+    { 0xc0130001, 0xc0130017, table_c0130001 },\r
+    { 0xc0150001, 0xc015000f, table_c0150001 },\r
+    { 0, 0, 0 }  /* last entry */\r
+};\r
index c15a5d5..3acf297 100644 (file)
-/* From wine1.2-1.1.42/dlls/ntdll/loader.c  */
-
-/*
- * Loader functions
- *
- * Copyright 1995, 2003 Alexandre Julliard
- * Copyright 2002 Dmitry Timoshkov for CodeWeavers
- * Copyright 2010 g10 Code GmbH
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-
-
-#include <assert.h>
-
-#include "himemce.h"
-
-PIMAGE_NT_HEADERS MyRtlImageNtHeader(HMODULE hModule)
-{
-    IMAGE_NT_HEADERS *ret;
-    IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)hModule;
-
-    ret = NULL;
-    if (dos->e_magic == IMAGE_DOS_SIGNATURE)
-    {
-        ret = (IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew);
-        if (ret->Signature != IMAGE_NT_SIGNATURE) ret = NULL;
-    }
-    return ret;
-}
-
-\f
-/* internal representation of 32bit modules. per process. */
-typedef struct _wine_modref
-{
-    LDR_MODULE            ldr;
-    int                   nDeps;
-    struct _wine_modref **deps;
-} WINE_MODREF;
-
-#define MAX_MODREFS 4
-WINE_MODREF *modrefs[MAX_MODREFS];
-int nr_modrefs;
-
-
-static WINE_MODREF *current_modref;
-
-
-/* convert from straight ASCII to Unicode without depending on the current codepage */
-static void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
-{
-  while (len--) *dst++ = (unsigned char)*src++;
-}
-
-
-/***********************************************************************
- *           RtlImageDirectoryEntryToData   (NTDLL.@)
- */
-PVOID MyRtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir, ULONG *size )
-{
-  const IMAGE_NT_HEADERS *nt;
-  DWORD addr;
-
-  if ((ULONG_PTR)module & 1)  /* mapped as data file */
-    {
-      module = (HMODULE)((ULONG_PTR)module & ~1);
-      image = FALSE;
-    }
-  if (!(nt = MyRtlImageNtHeader( module ))) return NULL;
-  if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
-    {
-      const IMAGE_NT_HEADERS64 *nt64 = (const IMAGE_NT_HEADERS64 *)nt;
-
-      if (dir >= nt64->OptionalHeader.NumberOfRvaAndSizes) return NULL;
-      if (!(addr = nt64->OptionalHeader.DataDirectory[dir].VirtualAddress)) return NULL;
-      *size = nt64->OptionalHeader.DataDirectory[dir].Size;
-      if (image || addr < nt64->OptionalHeader.SizeOfHeaders) return (char *)module + addr;
-    }
-  else if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
-    {
-      const IMAGE_NT_HEADERS32 *nt32 = (const IMAGE_NT_HEADERS32 *)nt;
-
-      if (dir >= nt32->OptionalHeader.NumberOfRvaAndSizes) return NULL;
-      if (!(addr = nt32->OptionalHeader.DataDirectory[dir].VirtualAddress)) return NULL;
-      *size = nt32->OptionalHeader.DataDirectory[dir].Size;
-      if (image || addr < nt32->OptionalHeader.SizeOfHeaders) return (char *)module + addr;
-    }
-  else return NULL;
-
-#if 0
-  /* not mapped as image, need to find the section containing the virtual address */
-  return RtlImageRvaToVa( nt, module, addr, NULL );
-#else
-  return NULL;
-#endif
-}
-
-
-/* convert PE image VirtualAddress to Real Address */
-static void *get_rva( HMODULE module, DWORD va )
-{
-  return (void *)((char *)module + va);
-}
-
-
-#define allocate_stub(x,y) (0xdeadbeef)
-
-/*************************************************************************
- *              import_dll
- *
- * Import the dll specified by the given import descriptor.
- * The loader_section must be locked while calling this function.
- */
-static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LPCWSTR load_path )
-{
-  NTSTATUS status = STATUS_SUCCESS;
-  //  WINE_MODREF *wmImp;
-  HMODULE imp_mod;
-  //  const IMAGE_EXPORT_DIRECTORY *exports;
-  //  DWORD exp_size;
-  const IMAGE_THUNK_DATA *import_list;
-  IMAGE_THUNK_DATA *thunk_list;
-  WCHAR buffer[32];
-  const char *name = get_rva( module, descr->Name );
-  DWORD len = strlen(name);
-#if 0
-  PVOID protect_base;
-  SIZE_T protect_size = 0;
-  DWORD protect_old;
-#endif
-
-  thunk_list = get_rva( module, (DWORD)descr->FirstThunk );
-  if (descr->OriginalFirstThunk)
-    import_list = get_rva( module, (DWORD)descr->OriginalFirstThunk );
-  else
-    import_list = thunk_list;
-
-  while (len && name[len-1] == ' ') len--;  /* remove trailing spaces */
-
-  if (len * sizeof(WCHAR) < sizeof(buffer))
-    {
-      ascii_to_unicode( buffer, name, len );
-      buffer[len] = 0;
-      //      status = load_dll( load_path, buffer, 0, &wmImp );
-      imp_mod = LoadLibrary (buffer);
-      if (imp_mod == INVALID_HANDLE_VALUE)
-       status = GetLastError ();
-    }
-  else  /* need to allocate a larger buffer */
-    {
-      WCHAR *ptr = malloc ((len + 1) * sizeof(WCHAR) );
-      if (!ptr) return NULL;
-      ascii_to_unicode( ptr, name, len );
-      ptr[len] = 0;
-      // status = load_dll( load_path, ptr, 0, &wmImp );
-      imp_mod = LoadLibrary (ptr);
-      if (imp_mod == INVALID_HANDLE_VALUE)
-       status = GetLastError ();
-      free (ptr);
-    }
-  if (status)
-    {
-      if (status == STATUS_DLL_NOT_FOUND)
-       TRACE("Library %s (which is needed by %s) not found\n",
-           name, current_modref->ldr.FullDllName);
-      else
-       TRACE("Loading library %s (which is needed by %s) failed (error %x).\n",
-           name, current_modref->ldr.FullDllName, status);
-      return NULL;
-    }
-
-#if 0
-  /* unprotect the import address table since it can be located in
-   * readonly section */
-  while (import_list[protect_size].u1.Ordinal) protect_size++;
-  protect_base = thunk_list;
-  protect_size *= sizeof(*thunk_list);
-  NtProtectVirtualMemory( NtCurrentProcess(), &protect_base,
-                         &protect_size, PAGE_WRITECOPY, &protect_old );
-#endif
-
-#if 0
-  imp_mod = wmImp->ldr.BaseAddress;
-  exports = RtlImageDirectoryEntryToData( imp_mod, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &exp_size );
-
-  if (!exports)
-    {
-      /* set all imported function to deadbeef */
-      while (import_list->u1.Ordinal)
-        {
-         if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal))
-            {
-             int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
-             WARN("No implementation for %s.%d", name, ordinal );
-             thunk_list->u1.Function = allocate_stub( name, IntToPtr(ordinal) );
-            }
-         else
-            {
-             IMAGE_IMPORT_BY_NAME *pe_name = get_rva( module, (DWORD)import_list->u1.AddressOfData );
-             WARN("No implementation for %s.%s", name, pe_name->Name );
-             thunk_list->u1.Function = allocate_stub( name, (const char*)pe_name->Name );
-            }
-         WARN(" imported from %s, allocating stub %p\n",
-              current_modref->ldr.FullDllName,
-              (void *)thunk_list->u1.Function );
-         import_list++;
-         thunk_list++;
-        }
-      goto done;
-    }
-#endif
-
-  while (import_list->u1.Ordinal)
-    {
-      if (IMAGE_SNAP_BY_ORDINAL(import_list->u1.Ordinal))
-        {
-         int ordinal = IMAGE_ORDINAL(import_list->u1.Ordinal);
-
-         //      thunk_list->u1.Function = (ULONG_PTR)find_ordinal_export( imp_mod, exports, exp_size,
-         //                                                                ordinal - exports->Base, load_path );
-         thunk_list->u1.Function = (PDWORD)(ULONG_PTR)GetProcAddress (imp_mod, (void *) (ordinal & 0xffff));
-         if (!thunk_list->u1.Function)
-            {
-             thunk_list->u1.Function = (PDWORD) allocate_stub( name, IntToPtr(ordinal) );
-             TRACE("No implementation for %s.%d imported from %s, setting to %p\n",
-                   name, ordinal, current_modref->ldr.FullDllName,
-                   (void *)thunk_list->u1.Function );
-            }
-         TRACE("--- Ordinal %s.%d = %p\n", name, ordinal, (void *)thunk_list->u1.Function );
-        }
-      else  /* import by name */
-        {
-         IMAGE_IMPORT_BY_NAME *pe_name;
-         pe_name = get_rva( module, (DWORD)import_list->u1.AddressOfData );
-         //      thunk_list->u1.Function = (ULONG_PTR)find_named_export( imp_mod, exports, exp_size,
-         //                                                              (const char*)pe_name->Name,
-         //                                                              pe_name->Hint, load_path );
-         thunk_list->u1.Function = (PDWORD)(ULONG_PTR)GetProcAddressA (imp_mod, (const char*)pe_name->Name);
-         if (!thunk_list->u1.Function)
-            {
-             thunk_list->u1.Function = (PDWORD) allocate_stub( name, (const char*)pe_name->Name );
-             TRACE("No implementation for %s.%s imported from %s, setting to %p\n",
-        &n