[SCM] Packaging for libjna-java a library for dynamic access of native libraries from Java without JNI branch, master, updated. debian/3.2.4-2-7-gc43423a

Jan Dittberner jandd at alioth.debian.org
Sun Feb 13 19:22:04 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Packaging for libjna-java a library for dynamic access of native libraries from Java without JNI".

The branch, master has been updated
       via  c43423ae0cb9dfe1a7b4a45c71e3635532a7e740 (commit)
       via  1257275c77672321fa6b10b7d5e83f3cf9922be3 (commit)
       via  4910353d025dd81203cff187a89676541e7ee06c (commit)
       via  cc7ab239a5d12c3b42fd1de1b691d77d42bad2fb (commit)
       via  4e0247d4ff30edd0b087bd3e3cb74455f719435d (commit)
       via  bad9a267dc59490be6550e8eb3a777249243499c (commit)
       via  5141b74bf6f3567176fe5cb20248f00678e33735 (commit)
      from  a438647e71ae5ce6112051b40cc9e28729a64d66 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c43423ae0cb9dfe1a7b4a45c71e3635532a7e740
Merge: 1257275 a438647
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Feb 13 20:21:29 2011 +0100

    Merge branch 'master' of git+ssh://git.debian.org/git/pkg-java/libjna-java
    
    Conflicts:
    	debian/changelog

commit 1257275c77672321fa6b10b7d5e83f3cf9922be3
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Feb 13 18:53:59 2011 +0100

    New upstream version 3.2.7
    
    - bump version in debian/changelog
    - refresh patches
    - add .pc/ to .gitignore

commit 4910353d025dd81203cff187a89676541e7ee06c
Merge: 4e0247d cc7ab23
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Feb 13 18:47:06 2011 +0100

    Merge commit 'upstream/3.2.7'

commit 4e0247d4ff30edd0b087bd3e3cb74455f719435d
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Feb 13 18:45:51 2011 +0100

    fix debian/repack-source.sh to use the directory given to uscan via -destdir

commit bad9a267dc59490be6550e8eb3a777249243499c
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Feb 13 18:26:15 2011 +0100

    change SVN URL in debian/repack-source.sh

commit 5141b74bf6f3567176fe5cb20248f00678e33735
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Feb 13 18:12:11 2011 +0100

    switch debian/watch to new kenai URL

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |    1 +
 build.xml                                          |  106 +-
 .../src/com/sun/jna/platform/FileMonitor.java      |  135 +
 .../src/com/sun/jna/platform/FileUtils.java        |  106 +
 .../src/com/sun/jna/platform}/KeyboardUtils.java   |   27 +-
 .../com/sun/jna/platform}/RasterRangesUtils.java   |   36 +-
 .../src/com/sun/jna/platform}/WindowUtils.java     |  116 +-
 .../src/com/sun/jna/platform}/dnd/DragHandler.java |    7 +-
 .../src/com/sun/jna/platform}/dnd/DropHandler.java |    6 +-
 .../sun/jna/platform}/dnd/DropTargetPainter.java   |    2 +-
 .../sun/jna/platform}/dnd/GhostedDragImage.java    |    5 +-
 .../src/com/sun/jna/platform/mac/MacFileUtils.java |   45 +
 .../src/com/sun/jna/platform}/unix/X11.java        |   35 +-
 .../src/com/sun/jna/platform/win32/Advapi32.java   |  659 +
 .../com/sun/jna/platform/win32/Advapi32Util.java   |  902 +
 .../src/com/sun/jna/platform/win32/BaseTSD.java    |   90 +
 .../src/com/sun/jna/platform/win32/Crypt32.java    |  112 +
 .../com/sun/jna/platform/win32/Crypt32Util.java    |  140 +
 .../src/com/sun/jna/platform/win32/DsGetDC.java    |  225 +
 .../src/com/sun/jna/platform/win32/GDI32.java      |  316 +
 .../src/com/sun/jna/platform/win32/Guid.java       |   52 +
 .../src/com/sun/jna/platform/win32/Kernel32.java   |  848 +
 .../com/sun/jna/platform/win32/Kernel32Util.java   |  127 +
 .../src/com/sun/jna/platform/win32/LMAccess.java   |  310 +
 .../src/com/sun/jna/platform/win32/LMCons.java     |   30 +
 .../src/com/sun/jna/platform/win32/LMErr.java      |  566 +
 .../src/com/sun/jna/platform/win32/LMJoin.java     |   34 +
 .../src/com/sun/jna/platform/win32/NTSecApi.java   |  215 +
 .../src/com/sun/jna/platform/win32/NTStatus.java   |   90 +
 .../src/com/sun/jna/platform/win32/Netapi32.java   |  403 +
 .../com/sun/jna/platform/win32/Netapi32Util.java   |  605 +
 .../src/com/sun/jna/platform/win32/NtDll.java      |   55 +
 .../src/com/sun/jna/platform/win32/NtDllUtil.java  |   47 +
 .../src/com/sun/jna/platform/win32/ObjBase.java    |   37 +
 .../src/com/sun/jna/platform/win32/Ole32.java      |  106 +
 .../src/com/sun/jna/platform/win32/Ole32Util.java  |   73 +
 .../src/com/sun/jna/platform/win32/Oleaut32.java   |   51 +
 .../src/com/sun/jna/platform/win32/Secur32.java    |  316 +
 .../com/sun/jna/platform/win32/Secur32Util.java    |  102 +
 .../src/com/sun/jna/platform/win32/Shell32.java    |   76 +
 .../com/sun/jna/platform/win32/Shell32Util.java    |   58 +
 .../src/com/sun/jna/platform/win32/ShellAPI.java   |  111 +
 .../src/com/sun/jna/platform/win32/ShlObj.java     |   85 +
 .../src/com/sun/jna/platform/win32/Sspi.java       |  467 +
 .../src/com/sun/jna/platform/win32/User32.java     |  735 +
 .../src/com/sun/jna/platform/win32/W32Errors.java  |40786 ++++++++++++++++++++
 .../com/sun/jna/platform/win32/W32FileMonitor.java |  258 +
 .../com/sun/jna/platform/win32/W32FileUtils.java   |   46 +
 .../src/com/sun/jna/platform/win32/WTypes.java     |   43 +
 .../src/com/sun/jna/platform/win32/Wdm.java        |   91 +
 .../com/sun/jna/platform/win32/Win32Exception.java |   54 +
 .../src/com/sun/jna/platform/win32/WinBase.java    |  469 +
 .../src/com/sun/jna/platform/win32/WinCrypt.java   |  165 +
 .../src/com/sun/jna/platform/win32/WinDef.java     |  345 +
 .../src/com/sun/jna/platform/win32/WinGDI.java     |   97 +
 .../src/com/sun/jna/platform/win32/WinNT.java      | 1388 +
 .../src/com/sun/jna/platform/win32/WinReg.java     |   70 +
 .../src/com/sun/jna/platform/win32/WinUser.java    |  298 +
 .../src/com/sun/jna/platform/win32/Winspool.java   |  121 +
 .../com/sun/jna/platform/win32/WinspoolUtil.java   |   41 +
 .../test/com/sun/jna/platform}/FileUtilsTest.java  |    3 +-
 .../com/sun/jna/platform}/KeyboardUtilsTest.java   |    6 +-
 .../sun/jna/platform}/RasterRangesUtilsTest.java   |   13 +-
 .../com/sun/jna/platform}/WindowUtilsTest.java     |   22 +-
 .../com/sun/jna/platform/win32/Advapi32Test.java   |  475 +
 .../sun/jna/platform/win32/Advapi32UtilTest.java   |  244 +
 .../com/sun/jna/platform/win32/Crypt32Test.java    |   65 +
 .../sun/jna/platform/win32/Crypt32UtilTest.java    |   49 +
 .../test/com/sun/jna/platform/win32/GDI32Test.java |   40 +
 .../com/sun/jna/platform/win32/Kernel32Test.java   |  262 +
 .../sun/jna/platform/win32/Kernel32UtilTest.java   |  105 +
 .../com/sun/jna/platform/win32/Netapi32Test.java   |  258 +
 .../sun/jna/platform/win32/Netapi32UtilTest.java   |  155 +
 .../test/com/sun/jna/platform/win32/NtDllTest.java |   51 +
 .../com/sun/jna/platform/win32/NtDllUtilTest.java  |   35 +
 .../test/com/sun/jna/platform/win32/Ole32Test.java |   99 +
 .../com/sun/jna/platform/win32/Ole32UtilTest.java  |   62 +
 .../com/sun/jna/platform/win32/Oleaut32Test.java   |   38 +
 .../com/sun/jna/platform/win32/Secur32Test.java    |  336 +
 .../sun/jna/platform/win32/Secur32UtilTest.java    |   49 +
 .../com/sun/jna/platform/win32/Shell32Test.java    |   53 +
 .../sun/jna/platform/win32/Shell32UtilTest.java    |   32 +
 .../com/sun/jna/platform/win32/User32Test.java     |   60 +-
 .../sun/jna/platform/win32/W32FileMonitorTest.java |   38 +-
 .../sun/jna/platform/win32/Win32ExceptionTest.java |   43 +
 .../com/sun/jna/platform/win32/WinspoolTest.java   |   46 +
 .../sun/jna/platform/win32/WinspoolUtilTest.java   |   34 +
 debian/changelog                                   |   11 +
 debian/patches/01-nbproject.patch                  |   10 +-
 debian/patches/02-builddir.patch                   |    2 +-
 debian/patches/03-dynlink-and-cflags.patch         |    8 +-
 debian/patches/04-load-native-code-from-fs.patch   |    2 +-
 debian/repack-source.sh                            |   17 +-
 debian/watch                                       |    4 +-
 native/Makefile                                    |   12 +-
 native/README.libffi                               |   20 +-
 native/dispatch.c                                  |   10 +-
 native/jnidispatch.rc                              |    4 +-
 pom.xml                                            |    2 +-
 src/com/sun/jna/LastErrorException.java            |   26 +-
 src/com/sun/jna/Memory.java                        |   14 +-
 src/com/sun/jna/Native.java                        |   31 +-
 src/com/sun/jna/NativeLibrary.java                 |    9 +-
 src/com/sun/jna/Pointer.java                       |   39 +-
 src/com/sun/jna/PointerType.java                   |    4 +
 src/com/sun/jna/Structure.java                     |  188 +-
 src/com/sun/jna/examples/AlphaMaskDemo.java        |  524 -
 src/com/sun/jna/examples/AlphaMaskDemo2.java       |  299 -
 src/com/sun/jna/examples/BalloonManager.java       |  258 -
 src/com/sun/jna/examples/BalloonManagerDemo.java   |  133 -
 src/com/sun/jna/examples/CLibrary.java             |   26 -
 src/com/sun/jna/examples/FileMonitor.java          |  384 -
 src/com/sun/jna/examples/FileUtils.java            |  154 -
 src/com/sun/jna/examples/ShapedWindowDemo.java     |  276 -
 src/com/sun/jna/examples/X11AlphaMaskTest.java     |  173 -
 .../sun/jna/examples/dnd/GhostedDragImageDemo.java |  135 -
 src/com/sun/jna/examples/win32/GDI32.java          |  141 -
 src/com/sun/jna/examples/win32/Kernel32.java       |  240 -
 src/com/sun/jna/examples/win32/Shell32.java        |  129 -
 src/com/sun/jna/examples/win32/User32.java         |  245 -
 src/com/sun/jna/examples/win32/W32API.java         |  157 -
 src/com/sun/jna/examples/win32/W32Errors.java      |   20 -
 src/com/sun/jna/win32/W32APIOptions.java           |   23 +
 src/com/sun/jna/win32/W32APITypeMapper.java        |    4 +
 test/com/sun/jna/ArgumentsMarshalTest.java         |    1 +
 test/com/sun/jna/CallbacksTest.java                |    1 +
 test/com/sun/jna/DirectTest.java                   |    1 +
 test/com/sun/jna/LastErrorTest.java                |    5 +-
 test/com/sun/jna/MemoryTest.java                   |    2 +-
 test/com/sun/jna/NativeTest.java                   |    8 +
 test/com/sun/jna/PointerTest.java                  |   46 +-
 test/com/sun/jna/StructureByValueTest.java         |    4 +-
 test/com/sun/jna/StructureTest.java                |  127 +-
 test/com/sun/jna/TypeMapperTest.java               |    3 +-
 test/com/sun/jna/UnionTest.java                    |    1 +
 test/com/sun/jna/examples/win32/Kernel32Test.java  |   70 -
 test/com/sun/jna/win32/W32APIMapperTest.java       |   17 +-
 137 files changed, 55865 insertions(+), 3770 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..845ca06
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.pc
diff --git a/build.xml b/build.xml
index 7a28c48..212ce92 100644
--- a/build.xml
+++ b/build.xml
@@ -22,6 +22,7 @@
   <property name="dynlink.native" value="false"/>
   <property name="native" location="native"/>
   <property name="src" location="src"/>
+  <property name="contrib" location="contrib"/>
   <property name="dist" location="dist"/>
   <property name="test.src" location="test"/>
   <property name="doc" location="doc"/>
@@ -29,18 +30,18 @@
   <property name="stylesheet" location="${javadoc}/doc/css/javadoc.css"/>
   <property name="vendor" value="JNA Development Team"/>
   <property name="copyright"
-            value="Copyright &amp;copy; 2007-2009 Timothy Wall. All Rights Reserved."/>
+            value="Copyright &amp;copy; 2007-2010 Timothy Wall. All Rights Reserved."/>
   <buildnumber/>
   <!-- JNA library release version -->            
   <property name="jna.major" value="3"/>
   <property name="jna.minor" value="2"/>
-  <property name="jna.revision" value="4"/>
+  <property name="jna.revision" value="7"/>
   <property name="jna.build" value="${build.number}"/>
   <property name="jna.version" value="${jna.major}.${jna.minor}.${jna.revision}"/>
   <!-- jnidispatch library release version -->
   <property name="jni.major" value="3"/>
   <property name="jni.minor" value="2"/>
-  <property name="jni.revision" value="1"/>
+  <property name="jni.revision" value="2"/>
   <property name="jni.build" value="${build.number}"/>
   <property name="jni.version" value="${jni.major}.${jni.minor}.${jni.revision}"/>
   <property name="jni.md5" value="c870290c36c8d3fdf85db7c782febc3f"/>
@@ -59,7 +60,8 @@
 
   <target name="default" depends="test" description="Build and Test."/>
 
-  <import file="nbproject/profiler-build-impl.xml"/>
+  <!-- uncomment for netbeans profiling -->
+  <!--<import file="nbproject/profiler-build-impl.xml"/>-->
   <target name="init" depends="-setup"/>
   <target name="compile-test-single" depends="compile-tests"/>
   <target name="compile-single" depends="compile"/>
@@ -137,7 +139,7 @@
     <condition property="jdk.home" value="${java.home}/..">
       <available file="${java.home}/../include"/>
     </condition>
-    <fail unless="jdk.home" message="JAVA_HOME/java.home must be a JDK, not JRE"/>
+    <fail unless="jdk.home" message="Can't find JNI headers"/>
     <condition property="libjsig"
                value="${java.home}/lib/${jre.arch}/libjsig.so" else="">
       <available file="${java.home}/lib/${jre.arch}/libjsig.so"/>
@@ -156,7 +158,7 @@
   </target>
 
   <target name="-setup" depends="-dynamic-properties">
-    <path id="compile-test.path">
+  	<path id="compile-test.path">
       <pathelement path="${test.src}"/>
       <path id="test.libs">
         <fileset dir="lib">
@@ -168,12 +170,11 @@
         <path id="src.path">
           <pathelement location="${src}"/>
         </path>
-      </path>                           
+      </path>
     </path>                           
 
     <path id="test.runpath">
       <pathelement path="${build}/${jar}"/>
-      <pathelement path="${build}/examples.jar"/>
       <pathelement path="${test.classes}"/>
       <pathelement path="lib/clover.jar"/>
       <path refid="test.libs"/>
@@ -197,8 +198,6 @@
         <patternset id="jar-compiled">
           <include name="com/sun/jna/*"/>
           <include name="com/sun/jna/**/*"/>
-          <exclude name="com/sun/jna/examples/*"/>
-          <exclude name="com/sun/jna/examples/**/*"/>
         </patternset>
       </srcfiles>
     </uptodate>
@@ -209,12 +208,23 @@
       <manifest>
         <attribute name="Main-Class" value="com.sun.jna.Native"/>
         <section name="com/sun/jna/">
+          <attribute name="Manifest-Version" value="1.0"/>
           <attribute name="Implementation-Title" value="${impl.title}"/>
           <attribute name="Implementation-Vendor" value="${vendor}"/>
           <attribute name="Implementation-Version" value="${impl.version}"/>
           <attribute name="Specification-Title" value="${spec.title}"/>
           <attribute name="Specification-Vendor" value="${spec.vendor}"/>
           <attribute name="Specification-Version" value="${spec.version}"/>
+          <!-- OSGi Bundle attributes -->
+          <attribute name="Bundle-ManifestVersion" value="2"/>
+          <attribute name="Bundle-Name" value="jna"/>
+          <attribute name="Bundle-Description" value="JNA Library"/>
+          <attribute name="Bundle-SymbolicName" value="com.sun.jna"/>
+          <attribute name="Bundle-Version" value="${spec.version}"/>
+          <attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE-1.4"/>
+          <attribute name="Bundle-Vendor" value="${vendor}"/>
+          <attribute name="Bundle-ActivationPolicy" value="lazy"/>
+          <attribute name="Export-Package" value="com.sun.jna*"/>
         </section>
       </manifest>
       <fileset dir="${classes}" excludes="${jar.omitted}">
@@ -222,16 +232,16 @@
       </fileset>
     </jar>
   </target>
-  <target name="examples" depends="jar,native">
-    <jar jarfile="${build}/examples.jar">
-      <manifest>
-        <attribute name="Class-Path" value="jna.jar"/>
-        <attribute name="Main-Class" value="com.sun.jna.examples.ShapedWindowDemo"/>
-      </manifest>
-      <fileset dir="${src}" includes="**/examples/**/*.png"/>
-      <fileset dir="${classes}" includes="**/examples/*,**/examples/**/*"/>
-      <fileset dir="${classes}" includes="jnidispatch.dll"/>
-    </jar>
+
+  <target name="contrib-jars" depends="jar" description="Build contrib jars">
+    <subant target="jar">
+      <property name="file.reference.jna.build" location="${build}"/>
+      <property name="file.reference.jna.jar" location="${build}/${jar}"/>
+      <property name="libs.junit.classpath" location="lib/junit.jar"/>
+      <!-- platform.jar needs to be built first -->
+      <fileset dir="${contrib}" includes="platform/build.xml" />
+      <fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
+    </subant>
   </target>
 
   <target name="javah" depends="compile">
@@ -318,8 +328,8 @@
   <target name="native" depends="-setup,javah,-native-api-check,rsrc"
           description="Build native libraries.  Use 'ant -DCC=xxx' to build using a compiler other than gcc">
     <property name="comment" value="# auto-generated by ant"/>
-    <replaceregexp match="^VERSION=.*"
-                   replace="VERSION=${jni.version} ${comment}"
+    <replaceregexp match="^JNA_JNI_VERSION=.*"
+                   replace="JNA_JNI_VERSION=${jni.version} ${comment}"
                    file="native/Makefile" byline="true"/>
     <replaceregexp match="^CHECKSUM=.*"
                    replace="CHECKSUM=${jni.md5} ${comment}"
@@ -337,6 +347,10 @@
       <isset property="SDKROOT"/>
     </condition>
     <condition property="make.SDKROOT"
+	       value="SDKROOT=/Developer/SDKs/MacOSX10.6.sdk">
+      <available file="/Developer/SDKs/MacOSX10.6.sdk"/>
+    </condition>
+    <condition property="make.SDKROOT"
 	       value="SDKROOT=/Developer/SDKs/MacOSX10.5.sdk">
       <available file="/Developer/SDKs/MacOSX10.5.sdk"/>
     </condition>
@@ -361,6 +375,7 @@
         <os name="OpenBSD"/>
       </or>
     </condition>
+
     <!-- Default make program -->
     <property name="make" value="make"/>
 
@@ -375,7 +390,7 @@
       <arg value="${make.SDKROOT}"/>
       <arg value="${make.ARCH}"/>
       <arg value="${make.PATH}"/>
-      <arg value="VERSION=${jni.version}"/>
+      <arg value="JNA_JNI_VERSION=${jni.version}"/>
       <arg value="CHECKSUM=${jni.md5}"/>
     </exec>
     <mkdir dir="${classes}/com/sun/jna/${os.prefix}"/>
@@ -400,8 +415,8 @@
     </jar>
   </target>
 
-  <target name="compile-tests" depends="compile,native,jar"
-          description="Compile all test code">
+  <target name="compile-tests" depends="compile,native,jar" 
+  	description="Compile all test code">
     <javac classpathref="compile-test.path"
            source="${test.compatibility}"
            target="${test.compatibility}"
@@ -426,10 +441,10 @@
       <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
     </signjar>
   </target>
-
+	
   <!-- When running tests from an IDE, be sure to set jna.library.path -->
   <!-- to where the test library (testlib) is found.                   -->
-  <target name="test" depends="jar,examples,compile-tests"
+  <target name="test" depends="jar,contrib-jars,compile-tests"
           description="Run all unit tests">
     <property name="test.fork" value="yes"/>
     <property name="reports.junit" location="${reports}/junit"/>
@@ -437,7 +452,7 @@
     <mkdir dir="${results.junit}"/>
     <echo>Saving test results in ${results.junit}</echo>
     <property name="tests.stdcall" value="**/win32/*StdCallTest.java"/>
-    <condition property="tests.platform" value="**/win32/*Test.java">
+    <condition property="tests.platform" value="**/win32/**/*Test.java">
       <os family="windows"/>
     </condition>
     <condition property="tests.exclude" value="**/win32/*StdCallTest.java">
@@ -471,12 +486,14 @@
       <batchtest todir="${results.junit}">
         <fileset dir="${test.src}">
           <include name="com/sun/jna/*Test.java"/>
-          <include name="com/sun/jna/examples/*Test.java"/>
           <include name="${tests.platform}"/>
           <exclude name="${tests.exclude}"/>
         </fileset>
       </batchtest>
     </junit>
+    <subant target="test">
+      <fileset dir="${contrib}" includes="platform/build.xml"/>
+    </subant>
     <junitreport todir="${results.junit}">
       <fileset dir="${results.junit}">
         <include name="TEST-*.xml"/>
@@ -500,7 +517,7 @@
     <mkdir dir="${reports.clover}"/>
     <clover-report>
       <current outfile="${reports.clover}" title="clover">
-        <fileset dir="." includes="**/*.java" excludes="**/examples/**/*.java"/>
+        <fileset dir="." includes="**/*.java" />
         <testresults dir="${results.junit}" includes="TEST-*.xml"/>
         <format type="html"/>
       </current>
@@ -520,7 +537,7 @@
              sourcepathref="src.path"
              classpathref="compile.path"
              maxmemory="256m"
-             packagenames="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.examples,com.sun.jna.examples.win32,com.sun.jna.exmaples.unix"
+             packagenames="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.platform,com.sun.jna.platform.win32,com.sun.jna.exmaples.unix"
              overview="${src}/com/sun/jna/overview.html"
              destdir="${javadoc}">
       <!-- stylesheetfile="${stylesheet}" -->
@@ -536,15 +553,16 @@
       </packageset>
 
       <group title="Java Native Access" packages="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.win32"/>
-      <group title="Examples" packages="com.sun.jna.examples,com.sun.jna.examples.dnd"/>
-      <group title="Unix Examples" packages="com.sun.jna.examples.unix"/>
-      <group title="Windows Examples" packages="com.sun.jna.examples.win32"/>
-
+      <group title="Platform Specific" packages="com.sun.jna.platform"/>
+    	
       <arg value="-notimestamp"/>
     </javadoc>
+    <subant target="javadoc">
+      <fileset dir="${contrib}" includes="platform/build.xml"/>
+    </subant>	
   </target>
 
-  <target name="dist" depends="jar,compile-tests,native,examples,javadoc"
+  <target name="dist" depends="jar,contrib-jars,compile-tests,native,javadoc"
           description="Build distribution files">
     <jar jarfile="${dist}/jna.jar" duplicate="preserve">
       <manifest>
@@ -602,18 +620,27 @@
     <copy todir="${dist}">
       <fileset dir="${build}">
         <include name="${native.jar}"/>
-        <include name="examples.jar"/>
       </fileset>
+  	  <fileset dir="${contrib}/platform/dist">
+  		<include name="platform.jar" />
+  	  </fileset>
+    </copy>
+    <copy todir="${dist}/jnacontrib" flatten="true">
+	  <fileset dir="${contrib}">
+		<include name="**/build/demo-*.jar" />
+	  </fileset>
     </copy>
     <zip zipfile="${dist}/doc.zip">
       <zipfileset dir="${javadoc}" prefix="javadoc"/>
+      <zipfileset dir="${contrib}/platform/dist/javadoc" prefix="platform/javadoc"/>
     </zip>
     <!-- JNA sources only, for use in Linux build from source/shared libffi -->
     <zip zipfile="${dist}/src.zip">
       <zipfileset dir="." includes="build.xml,LICENSE.txt"/>
       <zipfileset dir="${src}" includes="**/*.java" prefix="src"/>
       <zipfileset dir="${test.src}" includes="**/*.java" prefix="test"/>
-      <zipfileset dir="${native}" excludes="libffi,libffi/**/*" prefix="native"/>
+      <zipfileset dir="${native}" excludes="libffi,libffi/**/*,build,build/**/*" prefix="native"/>
+      <zipfileset dir="${contrib}/platform" includes="**/*.java" prefix="contrib/platform"/>
     </zip>
     <!-- Full sources required to build and test everything -->
     <zip zipfile="${dist}/src-full.zip">
@@ -638,6 +665,9 @@
       <fileset dir="${javadoc}"/>
       <fileset dir="." includes="*~,**/*~"/>
     </delete>
+    <subant target="clean">
+      <fileset dir="${contrib}" includes="*/build.xml"/>
+    </subant>
   </target>
 
 </project>
diff --git a/contrib/platform/src/com/sun/jna/platform/FileMonitor.java b/contrib/platform/src/com/sun/jna/platform/FileMonitor.java
new file mode 100644
index 0000000..34c1436
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/FileMonitor.java
@@ -0,0 +1,135 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ *
+ * 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.
+ * <p/>
+ * 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.  
+ */
+package com.sun.jna.platform;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.sun.jna.platform.win32.W32FileMonitor;
+
+/** Provides notification of file system changes.  Actual capabilities may
+ * vary slightly by platform.
+ * <p>
+ * Watched files which are removed from the filesystem are no longer watched.
+ * @author twall
+ */
+
+ at SuppressWarnings("serial")
+public abstract class FileMonitor {
+
+    public static final int FILE_CREATED = 0x1;
+    public static final int FILE_DELETED = 0x2;
+    public static final int FILE_MODIFIED = 0x4;
+    public static final int FILE_ACCESSED = 0x8;
+    public static final int FILE_NAME_CHANGED_OLD = 0x10;
+    public static final int FILE_NAME_CHANGED_NEW = 0x20;
+    public static final int FILE_RENAMED = FILE_NAME_CHANGED_OLD|FILE_NAME_CHANGED_NEW;
+    public static final int FILE_SIZE_CHANGED = 0x40;
+    public static final int FILE_ATTRIBUTES_CHANGED = 0x80;
+    public static final int FILE_SECURITY_CHANGED = 0x100;
+    public static final int FILE_ANY = 0x1FF;
+
+    public interface FileListener {
+        public void fileChanged(FileEvent e);
+    }
+    
+	public class FileEvent extends EventObject {
+        private final File file;
+        private final int type;
+        public FileEvent(File file, int type) {
+            super(FileMonitor.this);
+            this.file = file;
+            this.type = type;
+        }
+        public File getFile() { return file; }
+        public int getType() { return type; }
+        public String toString() {
+            return "FileEvent: " + file + ":" + type;
+        }
+    }
+    
+    private final Map<File, Integer> watched = new HashMap<File, Integer>();
+    private List<FileListener> listeners = new ArrayList<FileListener>();
+    
+    protected abstract void watch(File file, int mask, boolean recursive) throws IOException ;
+    protected abstract void unwatch(File file);
+    public abstract void dispose();
+
+    public void addWatch(File dir) throws IOException {
+        addWatch(dir, FILE_ANY);
+    }
+    
+    public void addWatch(File dir, int mask) throws IOException {
+        addWatch(dir, mask, dir.isDirectory());
+    }
+    
+    public void addWatch(File dir, int mask, boolean recursive) throws IOException {
+        watched.put(dir, new Integer(mask));
+        watch(dir, mask, recursive);
+    }
+
+    public void removeWatch(File file) {
+        if (watched.remove(file) != null) {
+            unwatch(file);
+        }
+    }
+    
+    protected void notify(FileEvent e) {
+    	for (FileListener listener : listeners) {
+    		listener.fileChanged(e);
+    	}
+    }
+    
+    public synchronized void addFileListener(FileListener listener) {
+        List<FileListener> list = new ArrayList<FileListener>(listeners);
+        list.add(listener);
+        listeners = list;
+    }
+    
+    public synchronized void removeFileListener(FileListener x) {
+        List<FileListener> list = new ArrayList<FileListener>(listeners);
+        list.remove(x);
+        listeners = list;
+    }
+    
+    protected void finalize() {
+    	for (File watchedFile : watched.keySet()) {
+    		removeWatch(watchedFile);
+    	}
+    	
+        dispose();
+    }
+    
+    /** Canonical lazy loading of a singleton. */
+    private static class Holder {
+        public static final FileMonitor INSTANCE;
+        static {
+            String os = System.getProperty("os.name");
+            if (os.startsWith("Windows")) {
+                INSTANCE = new W32FileMonitor();
+            }
+            else {
+                throw new Error("FileMonitor not implemented for " + os);
+            }
+        }
+    }
+    
+    public static FileMonitor getInstance() {
+        return Holder.INSTANCE;
+    }
+ }
diff --git a/contrib/platform/src/com/sun/jna/platform/FileUtils.java b/contrib/platform/src/com/sun/jna/platform/FileUtils.java
new file mode 100644
index 0000000..59558a9
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/FileUtils.java
@@ -0,0 +1,106 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ *
+ * 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.
+ * <p/>
+ * 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.  
+ */
+package com.sun.jna.platform;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.sun.jna.platform.mac.MacFileUtils;
+import com.sun.jna.platform.win32.W32FileUtils;
+
+/** Miscellaneous file utils not provided for by Java. */
+public abstract class FileUtils {
+
+    public boolean hasTrash() {
+        return false;
+    }
+
+    /** Move the given file to the system trash, if one is available.
+        Throws an exception on failure.
+    */
+    public abstract void moveToTrash(File[] files) throws IOException;
+
+    /** Canonical lazy loading of a singleton. */
+    private static class Holder {
+        public static final FileUtils INSTANCE;
+        static {
+            String os = System.getProperty("os.name");
+            if (os.startsWith("Windows")) {
+                INSTANCE = new W32FileUtils();
+            }
+            else if (os.startsWith("Mac")){
+                INSTANCE = new MacFileUtils();
+            }
+            else {
+                INSTANCE = new DefaultFileUtils();
+            }
+        }
+    }
+    
+    public static FileUtils getInstance() {
+        return Holder.INSTANCE;
+    }    
+    
+    private static class DefaultFileUtils extends FileUtils {
+
+        private File getTrashDirectory() {
+            // very simple implementation.  should take care of renaming when
+            // a file already exists, or any other platform-specific behavior
+            File home = new File(System.getProperty("user.home"));
+            File trash = new File(home, ".Trash");
+            if (!trash.exists()) {
+                trash = new File(home, "Trash");
+                if (!trash.exists()) {
+                    File desktop = new File(home, "Desktop");
+                    if (desktop.exists()) {
+                        trash = new File(desktop, ".Trash");
+                        if (!trash.exists()) {
+                            trash = new File(desktop, "Trash");
+                            if (!trash.exists()) {
+                                trash = new File(System.getProperty("fileutils.trash", "Trash"));
+                            }
+                        }
+                    }
+                }
+            }
+            return trash;
+        }
+
+        public boolean hasTrash() {
+            return getTrashDirectory().exists();
+        }
+
+        /** The default implementation attempts to move the file to 
+         * the desktop "Trash" folder.
+         */
+        public void moveToTrash(File[] files) throws IOException {
+            File trash = getTrashDirectory();
+            if (!trash.exists()) {
+                throw new IOException("No trash location found (define fileutils.trash to be the path to the trash)");
+            }
+            List<File> failed = new ArrayList<File>();
+            for (int i=0;i < files.length;i++) {
+                File src = files[i];
+                File target = new File(trash, src.getName());
+                if (!src.renameTo(target)) {
+                    failed.add(src);
+                }
+            }
+            if (failed.size() > 0) {
+                throw new IOException("The following files could not be trashed: " + failed);
+            }
+        }
+    }
+}
diff --git a/src/com/sun/jna/examples/KeyboardUtils.java b/contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java
similarity index 90%
rename from src/com/sun/jna/examples/KeyboardUtils.java
rename to contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java
index 18e3353..804de5f 100644
--- a/src/com/sun/jna/examples/KeyboardUtils.java
+++ b/contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java
@@ -10,16 +10,17 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform;
 
 import java.awt.GraphicsEnvironment;
 import java.awt.HeadlessException;
 import java.awt.event.KeyEvent;
 
 import com.sun.jna.Platform;
-import com.sun.jna.examples.unix.X11;
-import com.sun.jna.examples.unix.X11.Display;
-import com.sun.jna.examples.win32.User32;
+import com.sun.jna.platform.unix.X11;
+import com.sun.jna.platform.unix.X11.Display;
+import com.sun.jna.platform.win32.User32;
+import com.sun.jna.platform.win32.WinUser;
 
 /** Provide access to the local keyboard state.  Note that this is meaningless
  * on a headless system and some VNC setups.
@@ -71,30 +72,30 @@ public class KeyboardUtils {
             }
             if (code == KeyEvent.VK_SHIFT) {
                 if ((loc & KeyEvent.KEY_LOCATION_RIGHT) != 0) {
-                    return User32.VK_RSHIFT; 
+                    return WinUser.VK_RSHIFT; 
                 }
                 if ((loc & KeyEvent.KEY_LOCATION_LEFT) != 0) {
-                    return User32.VK_LSHIFT; 
+                    return WinUser.VK_LSHIFT; 
                 }
-                return User32.VK_SHIFT;
+                return WinUser.VK_SHIFT;
             }
             if (code == KeyEvent.VK_CONTROL) {
                 if ((loc & KeyEvent.KEY_LOCATION_RIGHT) != 0) {
-                    return User32.VK_RCONTROL; 
+                    return WinUser.VK_RCONTROL; 
                 }
                 if ((loc & KeyEvent.KEY_LOCATION_LEFT) != 0) {
-                    return User32.VK_LCONTROL; 
+                    return WinUser.VK_LCONTROL; 
                 }
-                return User32.VK_CONTROL;
+                return WinUser.VK_CONTROL;
             }
             if (code == KeyEvent.VK_ALT) {
                 if ((loc & KeyEvent.KEY_LOCATION_RIGHT) != 0) {
-                    return User32.VK_RMENU; 
+                    return WinUser.VK_RMENU; 
                 }
                 if ((loc & KeyEvent.KEY_LOCATION_LEFT) != 0) {
-                    return User32.VK_LMENU; 
+                    return WinUser.VK_LMENU; 
                 }
-                return User32.VK_MENU;
+                return WinUser.VK_MENU;
             }
             return 0;
         }
diff --git a/src/com/sun/jna/examples/RasterRangesUtils.java b/contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java
similarity index 90%
rename from src/com/sun/jna/examples/RasterRangesUtils.java
rename to contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java
index 387987c..a5f025f 100644
--- a/src/com/sun/jna/examples/RasterRangesUtils.java
+++ b/contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java
@@ -11,7 +11,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform;
 
 import java.awt.Rectangle;
 import java.awt.image.DataBuffer;
@@ -44,7 +44,7 @@ public class RasterRangesUtils {
         0x0008, 0x0004, 0x0002, 0x0001
     };
 
-    private static final Comparator COMPARATOR = new Comparator() {
+    private static final Comparator<Object> COMPARATOR = new Comparator<Object>() {
         public int compare(Object o1, Object o2) {
             return ((Rectangle)o1).x - ((Rectangle)o2).x;
         }
@@ -116,11 +116,11 @@ public class RasterRangesUtils {
      * @return true if the output succeeded, false otherwise
      */
     public static boolean outputOccupiedRangesOfBinaryPixels(byte[] binaryBits, int w, int h, RangesOutput out) {
-        Set rects = new HashSet();
-        Set prevLine = Collections.EMPTY_SET;
+        Set<Rectangle> rects = new HashSet<Rectangle>();
+        Set<Rectangle> prevLine = Collections.EMPTY_SET;
         int scanlineBytes = binaryBits.length / h;
         for (int row = 0; row < h; row++) {
-            Set curLine = new TreeSet(COMPARATOR);
+            Set<Rectangle> curLine = new TreeSet<Rectangle>(COMPARATOR);
             int rowOffsetBytes = row * scanlineBytes;
             int startCol = -1;
             // Look at each batch of 8 columns in this row
@@ -163,14 +163,14 @@ public class RasterRangesUtils {
                 // end of last region
                 curLine.add(new Rectangle(startCol, row, w - startCol, 1));
             }
-            Set unmerged = mergeRects(prevLine, curLine);
+            Set<Rectangle> unmerged = mergeRects(prevLine, curLine);
             rects.addAll(unmerged);
             prevLine = curLine;
         }
         // Add anything left over
         rects.addAll(prevLine);
-        for (Iterator i=rects.iterator();i.hasNext();) {
-            Rectangle r = (Rectangle)i.next();
+        for (Iterator<Rectangle> i=rects.iterator();i.hasNext();) {
+            Rectangle r = i.next();
             if (!out.outputRange(r.x, r.y, r.width, r.height)) {
                 return false;
             }
@@ -189,10 +189,10 @@ public class RasterRangesUtils {
      * @return true if the output succeeded, false otherwise
      */
     public static boolean outputOccupiedRanges(int[] pixels, int w, int h, int occupationMask, RangesOutput out) {
-        Set rects = new HashSet();
-        Set prevLine = Collections.EMPTY_SET;
+        Set<Rectangle> rects = new HashSet<Rectangle>();
+        Set<Rectangle> prevLine = Collections.EMPTY_SET;
         for (int row = 0; row < h; row++) {
-            Set curLine = new TreeSet(COMPARATOR);
+            Set<Rectangle> curLine = new TreeSet<Rectangle>(COMPARATOR);
             int idxOffset = row * w;
             int startCol = -1;
 
@@ -213,14 +213,14 @@ public class RasterRangesUtils {
                 // end of last region of current row
                 curLine.add(new Rectangle(startCol, row, w-startCol, 1));
             }
-            Set unmerged = mergeRects(prevLine, curLine);
+            Set<Rectangle> unmerged = mergeRects(prevLine, curLine);
             rects.addAll(unmerged);
             prevLine = curLine;
         }
         // Add anything left over
         rects.addAll(prevLine);
-        for (Iterator i=rects.iterator();i.hasNext();) {
-            Rectangle r = (Rectangle)i.next();
+        for (Iterator<Rectangle> i=rects.iterator();i.hasNext();) {
+            Rectangle r = i.next();
             if (!out.outputRange(r.x, r.y, r.width, r.height)) {
                 return false;
             }
@@ -228,11 +228,11 @@ public class RasterRangesUtils {
         return true;
     }
 
-    private static Set mergeRects(Set prev, Set current) {
-        Set unmerged = new HashSet(prev);
+    private static Set<Rectangle> mergeRects(Set<Rectangle> prev, Set<Rectangle> current) {
+        Set<Rectangle> unmerged = new HashSet<Rectangle>(prev);
         if (!prev.isEmpty() && !current.isEmpty()) {
-            Rectangle[] pr = (Rectangle[])prev.toArray(new Rectangle[prev.size()]);
-            Rectangle[] cr = (Rectangle[])current.toArray(new Rectangle[current.size()]);
+            Rectangle[] pr = prev.toArray(new Rectangle[prev.size()]);
+            Rectangle[] cr = current.toArray(new Rectangle[current.size()]);
             int ipr = 0;
             int icr = 0;
             while (ipr < pr.length && icr < cr.length) {
diff --git a/src/com/sun/jna/examples/WindowUtils.java b/contrib/platform/src/com/sun/jna/platform/WindowUtils.java
similarity index 95%
rename from src/com/sun/jna/examples/WindowUtils.java
rename to contrib/platform/src/com/sun/jna/platform/WindowUtils.java
index cc1e30f..2b36ed2 100644
--- a/src/com/sun/jna/examples/WindowUtils.java
+++ b/contrib/platform/src/com/sun/jna/platform/WindowUtils.java
@@ -11,12 +11,12 @@
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform;
 
+import java.awt.AWTEvent;
 import java.awt.AlphaComposite;
 import java.awt.BorderLayout;
 import java.awt.Color;
-import java.awt.Cursor;
 import java.awt.Component;
 import java.awt.Container;
 import java.awt.Dialog;
@@ -31,15 +31,14 @@ import java.awt.Point;
 import java.awt.Rectangle;
 import java.awt.Shape;
 import java.awt.Toolkit;
-import java.awt.event.AWTEventListener;
-import java.awt.event.ContainerEvent;
-import java.awt.event.MouseEvent;
-import java.awt.AWTEvent;
 import java.awt.Window;
+import java.awt.event.AWTEventListener;
 import java.awt.event.ComponentEvent;
 import java.awt.event.ComponentListener;
+import java.awt.event.ContainerEvent;
 import java.awt.event.HierarchyEvent;
 import java.awt.event.HierarchyListener;
+import java.awt.event.MouseEvent;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.awt.geom.Area;
@@ -63,24 +62,26 @@ import com.sun.jna.Native;
 import com.sun.jna.NativeLong;
 import com.sun.jna.Platform;
 import com.sun.jna.Pointer;
-import com.sun.jna.examples.unix.X11;
-import com.sun.jna.examples.unix.X11.Display;
-import com.sun.jna.examples.unix.X11.GC;
-import com.sun.jna.examples.unix.X11.Pixmap;
-import com.sun.jna.examples.unix.X11.XVisualInfo;
-import com.sun.jna.examples.unix.X11.Xext;
-import com.sun.jna.examples.unix.X11.Xrender.XRenderPictFormat;
-import com.sun.jna.examples.win32.GDI32;
-import com.sun.jna.examples.win32.User32;
-import com.sun.jna.examples.win32.GDI32.BITMAPINFO;
-import com.sun.jna.examples.win32.User32.BLENDFUNCTION;
-import com.sun.jna.examples.win32.User32.POINT;
-import com.sun.jna.examples.win32.User32.SIZE;
-import com.sun.jna.examples.win32.W32API.HANDLE;
-import com.sun.jna.examples.win32.W32API.HBITMAP;
-import com.sun.jna.examples.win32.W32API.HDC;
-import com.sun.jna.examples.win32.W32API.HRGN;
-import com.sun.jna.examples.win32.W32API.HWND;
+import com.sun.jna.platform.unix.X11;
+import com.sun.jna.platform.unix.X11.Display;
+import com.sun.jna.platform.unix.X11.GC;
+import com.sun.jna.platform.unix.X11.Pixmap;
+import com.sun.jna.platform.unix.X11.XVisualInfo;
+import com.sun.jna.platform.unix.X11.Xext;
+import com.sun.jna.platform.unix.X11.Xrender.XRenderPictFormat;
+import com.sun.jna.platform.win32.GDI32;
+import com.sun.jna.platform.win32.User32;
+import com.sun.jna.platform.win32.WinGDI;
+import com.sun.jna.platform.win32.WinUser;
+import com.sun.jna.platform.win32.WinDef.HBITMAP;
+import com.sun.jna.platform.win32.WinDef.HDC;
+import com.sun.jna.platform.win32.WinDef.HRGN;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinGDI.BITMAPINFO;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinUser.BLENDFUNCTION;
+import com.sun.jna.platform.win32.WinUser.POINT;
+import com.sun.jna.platform.win32.WinUser.SIZE;
 import com.sun.jna.ptr.ByteByReference;
 import com.sun.jna.ptr.IntByReference;
 import com.sun.jna.ptr.PointerByReference;
@@ -150,6 +151,7 @@ public class WindowUtils {
      * </pre></code>
      */
     private static class HeavyweightForcer extends Window {
+		private static final long serialVersionUID = 1L;
         private final boolean packed;
 
         public HeavyweightForcer(Window parent) {
@@ -175,6 +177,7 @@ public class WindowUtils {
      * invoked whenever any part of the ancestor window is repainted.
      */
     protected static class RepaintTrigger extends JComponent {
+		private static final long serialVersionUID = 1L;
 
         protected class Listener
             extends WindowAdapter
@@ -265,6 +268,7 @@ public class WindowUtils {
     public static abstract class NativeWindowUtils {
         protected abstract class TransparentContentPane
             extends JPanel implements AWTEventListener {
+    		private static final long serialVersionUID = 1L;
             private boolean transparent;
             public TransparentContentPane(Container oldContent) {
                 super(new BorderLayout());
@@ -640,27 +644,27 @@ public class WindowUtils {
                 public void run() {
                     HWND hWnd = getHWnd(w);
                     User32 user = User32.INSTANCE;
-                    int flags = user.GetWindowLong(hWnd, User32.GWL_EXSTYLE);
+                    int flags = user.GetWindowLong(hWnd, WinUser.GWL_EXSTYLE);
                     byte level = (byte)((int)(255 * alpha) & 0xFF);
                     if (usingUpdateLayeredWindow(w)) {
                         // If already using UpdateLayeredWindow, continue to
                         // do so
                         BLENDFUNCTION blend = new BLENDFUNCTION();
                         blend.SourceConstantAlpha = level;
-                        blend.AlphaFormat = User32.AC_SRC_ALPHA;
+                        blend.AlphaFormat = WinUser.AC_SRC_ALPHA;
                         user.UpdateLayeredWindow(hWnd, null, null, null, null,
                                                  null, 0, blend,
-                                                 User32.ULW_ALPHA);
+                                                 WinUser.ULW_ALPHA);
                     }
                     else if (alpha == 1f) {
-                        flags &= ~User32.WS_EX_LAYERED;
-                        user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
+                        flags &= ~WinUser.WS_EX_LAYERED;
+                        user.SetWindowLong(hWnd, WinUser.GWL_EXSTYLE, flags);
                     }
                     else {
-                        flags |= User32.WS_EX_LAYERED;
-                        user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
+                        flags |= WinUser.WS_EX_LAYERED;
+                        user.SetWindowLong(hWnd, WinUser.GWL_EXSTYLE, flags);
                         user.SetLayeredWindowAttributes(hWnd, 0, level,
-                                                        User32.LWA_ALPHA);
+                        		WinUser.LWA_ALPHA);
                     }
                     setForceHeavyweightPopups(w, alpha != 1f);
                     storeAlpha(w, level);
@@ -673,6 +677,7 @@ public class WindowUtils {
          * when the window is transparent.
          */
         private class W32TransparentContentPane extends TransparentContentPane {
+    		private static final long serialVersionUID = 1L;
             private HDC memDC;
             private HBITMAP hBitmap;
             private Pointer pbits;
@@ -729,12 +734,12 @@ public class WindowUtils {
                         bmi.bmiHeader.biHeight = wh;
                         bmi.bmiHeader.biPlanes = 1;
                         bmi.bmiHeader.biBitCount = 32;
-                        bmi.bmiHeader.biCompression = GDI32.BI_RGB;
+                        bmi.bmiHeader.biCompression = WinGDI.BI_RGB;
                         bmi.bmiHeader.biSizeImage = ww * wh * 4;
                         PointerByReference ppbits = new PointerByReference();
                         hBitmap = gdi.CreateDIBSection(memDC, bmi,
-                                                       GDI32.DIB_RGB_COLORS,
-                                                       ppbits, null, 0);
+                        		WinGDI.DIB_RGB_COLORS,
+                        		ppbits, null, 0);
                         pbits = ppbits.getValue();
                         bitmapSize = new Dimension(ww, wh);
                     }
@@ -770,18 +775,17 @@ public class WindowUtils {
                     try {
                         // GetLayeredwindowAttributes supported WinXP and later
                         if (user.GetLayeredWindowAttributes(hWnd, null, bref, iref)
-                            && (iref.getValue() & User32.LWA_ALPHA) != 0) {
+                            && (iref.getValue() & WinUser.LWA_ALPHA) != 0) {
                             level = bref.getValue();
                         }
                     }
                     catch(UnsatisfiedLinkError e) {
                     }
                     blend.SourceConstantAlpha = level;
-                    blend.AlphaFormat = User32.AC_SRC_ALPHA;
+                    blend.AlphaFormat = WinUser.AC_SRC_ALPHA;
                     user.UpdateLayeredWindow(hWnd, screenDC, winLoc, winSize, memDC,
-                                             srcLoc, 0, blend, User32.ULW_ALPHA);
-                }
-                finally {
+                                             srcLoc, 0, blend, WinUser.ULW_ALPHA);
+                } finally {
                     user.ReleaseDC(null, screenDC);
                     if (memDC != null && oldBitmap != null) {
                         gdi.SelectObject(memDC, oldBitmap);
@@ -809,7 +813,7 @@ public class WindowUtils {
                 public void run() {
                     User32 user = User32.INSTANCE;
                     HWND hWnd = getHWnd(w);
-                    int flags = user.GetWindowLong(hWnd, User32.GWL_EXSTYLE);
+                    int flags = user.GetWindowLong(hWnd, WinUser.GWL_EXSTYLE);
                     JRootPane root = ((RootPaneContainer)w).getRootPane();
                     JLayeredPane lp = root.getLayeredPane();
                     Container content = root.getContentPane();
@@ -824,12 +828,12 @@ public class WindowUtils {
                                JLayeredPane.DRAG_LAYER);
                     }
                     if (transparent && !usingUpdateLayeredWindow(w)) {
-                        flags |= User32.WS_EX_LAYERED;
-                        user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
+                        flags |= WinUser.WS_EX_LAYERED;
+                        user.SetWindowLong(hWnd, WinUser.GWL_EXSTYLE, flags);
                     }
                     else if (!transparent && usingUpdateLayeredWindow(w)) {
-                        flags &= ~User32.WS_EX_LAYERED;
-                        user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
+                        flags &= ~WinUser.WS_EX_LAYERED;
+                        user.SetWindowLong(hWnd, WinUser.GWL_EXSTYLE, flags);
                     }
                     setLayersTransparent(w, transparent);
                     setForceHeavyweightPopups(w, transparent);
@@ -870,11 +874,11 @@ public class WindowUtils {
             GDI32 gdi = GDI32.INSTANCE;
             PathIterator pi = area.getPathIterator(null);
             int mode = pi.getWindingRule() == PathIterator.WIND_NON_ZERO
-                ? GDI32.WINDING: GDI32.ALTERNATE;
+                ? WinGDI.WINDING: WinGDI.ALTERNATE;
             float[] coords = new float[6];
-            List points = new ArrayList();
+            List<POINT> points = new ArrayList<POINT>();
             int size = 0;
-            List sizes = new ArrayList();
+            List<Integer> sizes = new ArrayList<Integer>();
             while (!pi.isDone()) {
                 int type = pi.currentSegment(coords);
                 if (type == PathIterator.SEG_MOVETO) {
@@ -918,7 +922,7 @@ public class WindowUtils {
                         public boolean outputRange(int x, int y, int w, int h) {
                             GDI32 gdi = GDI32.INSTANCE;
                             gdi.SetRectRgn(tempRgn, x, y, x + w, y + h);
-                            return gdi.CombineRgn(region, region, tempRgn, GDI32.RGN_OR) != GDI32.ERROR;
+                            return gdi.CombineRgn(region, region, tempRgn, WinGDI.RGN_OR) != WinGDI.ERROR;
                         }
                     });
                 }
@@ -1009,7 +1013,7 @@ public class WindowUtils {
                 fixWindowDragging(w, "setWindowAlpha");
             }
             whenDisplayable(w, new Runnable() {
-                public void run() {
+				public void run() {
                     Object peer = w.getPeer();
                     try {
                         peer.getClass().getMethod("setAlpha", new Class[]{
@@ -1050,6 +1054,7 @@ public class WindowUtils {
          * @author Olivier Chafik
          */
         private static class OSXMaskingContentPane extends JPanel {
+    		private static final long serialVersionUID = 1L;
             private Shape shape;
 
             public OSXMaskingContentPane(Component oldContent) {
@@ -1124,7 +1129,7 @@ public class WindowUtils {
             }
             x11.XSetForeground(dpy, gc, new NativeLong(0));
             x11.XFillRectangle(dpy, pm, gc, 0, 0, width, height);
-            final List rlist = new ArrayList();
+            final List<Rectangle> rlist = new ArrayList<Rectangle>();
             try {
                 RasterRangesUtils.outputOccupiedRanges(raster, new RasterRangesUtils.RangesOutput() {
                     public boolean outputRange(int x, int y, int w, int h) {
@@ -1230,7 +1235,7 @@ public class WindowUtils {
                 IntByReference pcount = new IntByReference();
                 info = x11.XGetVisualInfo(dpy, mask, template, pcount);
                 if (info != null) {
-                    List list = new ArrayList();
+                    List<X11.VisualID> list = new ArrayList<X11.VisualID>();
                     XVisualInfo[] infos =
                         (XVisualInfo[])info.toArray(pcount.getValue());
                     for (int i = 0; i < infos.length; i++) {
@@ -1270,9 +1275,9 @@ public class WindowUtils {
                 x11.XQueryTree(dpy, win, rootp, parentp, childrenp, countp);
                 Pointer p = childrenp.getValue();
                 int[] ids = p.getIntArray(0, countp.getValue());
-                for (int i=0;i < ids.length;i++) {
+                for (int id : ids) {
                     // TODO: more verification of correct window?
-                    X11.Window child = new X11.Window(ids[i]);
+                    X11.Window child = new X11.Window(id);
                     X11.XWindowAttributes xwa = new X11.XWindowAttributes();
                     x11.XGetWindowAttributes(dpy, child, xwa);
                     offset.x = -xwa.x;
@@ -1334,6 +1339,7 @@ public class WindowUtils {
         }
 
         private class X11TransparentContentPane extends TransparentContentPane {
+    		private static final long serialVersionUID = 1L;
 
             public X11TransparentContentPane(Container oldContent) {
                 super(oldContent);
@@ -1345,7 +1351,7 @@ public class WindowUtils {
             // Painting directly to the original Graphics
             // fails to properly composite unless the destination
             // is pure black.  Too bad.
-            protected void paintDirect(BufferedImage buf, Rectangle bounds) {
+			protected void paintDirect(BufferedImage buf, Rectangle bounds) {
                 Window window = SwingUtilities.getWindowAncestor(this);
                 X11 x11 = X11.INSTANCE;
                 X11.Display dpy = x11.XOpenDisplay(null);
diff --git a/src/com/sun/jna/examples/dnd/DragHandler.java b/contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java
similarity index 99%
rename from src/com/sun/jna/examples/dnd/DragHandler.java
rename to contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java
index 65dee05..ff0b66f 100644
--- a/src/com/sun/jna/examples/dnd/DragHandler.java
+++ b/contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java
@@ -10,7 +10,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples.dnd;
+package com.sun.jna.platform.dnd;
 
 import java.awt.AlphaComposite;
 import java.awt.Component;
@@ -38,6 +38,7 @@ import java.awt.dnd.DropTargetEvent;
 import java.awt.dnd.InvalidDnDOperationException;
 import java.awt.event.InputEvent;
 import java.awt.image.BufferedImage;
+
 import javax.swing.Icon;
 import javax.swing.JColorChooser;
 import javax.swing.JFileChooser;
@@ -179,7 +180,7 @@ public abstract class DragHandler
     private Component dragSource;
     private GhostedDragImage ghost;
     private Point imageOffset;
-    private Dimension maxGhostSize = MAX_GHOST_SIZE;
+	private Dimension maxGhostSize = MAX_GHOST_SIZE;
     private float ghostAlpha = DEFAULT_GHOST_ALPHA;
 
     /** Enable drags from the given component, supporting the actions in
@@ -529,4 +530,4 @@ public abstract class DragHandler
         }
         updateCursor(e);
     }
-}
\ No newline at end of file
+}
diff --git a/src/com/sun/jna/examples/dnd/DropHandler.java b/contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java
similarity index 99%
rename from src/com/sun/jna/examples/dnd/DropHandler.java
rename to contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java
index efb1d93..3be5223 100644
--- a/src/com/sun/jna/examples/dnd/DropHandler.java
+++ b/contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java
@@ -10,7 +10,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples.dnd;
+package com.sun.jna.platform.dnd;
 
 import java.awt.Component;
 import java.awt.Point;
@@ -88,7 +88,7 @@ import java.util.Set;
 public abstract class DropHandler implements DropTargetListener {
 
     private int acceptedActions;
-    private List acceptedFlavors;
+    private List<DataFlavor> acceptedFlavors;
     private DropTarget dropTarget;
     private boolean active = true;
     private DropTargetPainter painter;
@@ -347,7 +347,7 @@ public abstract class DropHandler implements DropTargetListener {
      * constructor.
      */
     protected boolean isSupported(DataFlavor[] flavors) {
-        Set set = new HashSet(Arrays.asList(flavors));
+        Set<DataFlavor> set = new HashSet<DataFlavor>(Arrays.asList(flavors));
         set.retainAll(acceptedFlavors);
         return !set.isEmpty();
     }
diff --git a/src/com/sun/jna/examples/dnd/DropTargetPainter.java b/contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java
similarity index 96%
rename from src/com/sun/jna/examples/dnd/DropTargetPainter.java
rename to contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java
index d743bba..a29f737 100644
--- a/src/com/sun/jna/examples/dnd/DropTargetPainter.java
+++ b/contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java
@@ -10,7 +10,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples.dnd;
+package com.sun.jna.platform.dnd;
 
 import java.awt.Point;
 import java.awt.dnd.DropTargetEvent;
diff --git a/src/com/sun/jna/examples/dnd/GhostedDragImage.java b/contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java
similarity index 97%
rename from src/com/sun/jna/examples/dnd/GhostedDragImage.java
rename to contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java
index cbbc152..12b0f72 100644
--- a/src/com/sun/jna/examples/dnd/GhostedDragImage.java
+++ b/contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java
@@ -10,7 +10,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples.dnd;
+package com.sun.jna.platform.dnd;
 
 import java.awt.Component;
 import java.awt.Dimension;
@@ -29,7 +29,7 @@ import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
 import javax.swing.Timer;
 
-import com.sun.jna.examples.WindowUtils;
+import com.sun.jna.platform.WindowUtils;
 
 /** Provide a ghosted drag image for use during drags where 
  * {@link DragSource#isDragImageSupported} returns false.<p>
@@ -56,6 +56,7 @@ public class GhostedDragImage {
         // FIXME ensure gc is compatible (X11)
         GraphicsConfiguration gc = parent.getGraphicsConfiguration();
         dragImage = new Window(JOptionPane.getRootFrame(), gc) {
+    		private static final long serialVersionUID = 1L;
             public void paint(Graphics g) {
                 icon.paintIcon(this, g, 0, 0);
             }
diff --git a/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java b/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java
new file mode 100644
index 0000000..3ce63b7
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java
@@ -0,0 +1,45 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.mac;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.sun.jna.platform.FileUtils;
+
+public class MacFileUtils extends FileUtils {
+
+    public boolean hasTrash() { return true; }
+
+    public void moveToTrash(File[] files) throws IOException {
+        // TODO: use native API for moving to trash (if any)
+        File home = new File(System.getProperty("user.home"));
+        File trash = new File(home, ".Trash");
+        if (!trash.exists()) {
+            throw new IOException("The Trash was not found in its expected location (" + trash + ")");
+        }
+        List<File> failed = new ArrayList<File>();
+        for (int i=0;i < files.length;i++) {
+            File src = files[i];
+            File target = new File(trash, src.getName());
+            if (!src.renameTo(target)) {
+                failed.add(src);
+            }
+        }
+        if (failed.size() > 0) {
+            throw new IOException("The following files could not be trashed: " + failed);
+        }
+    }
+}
diff --git a/src/com/sun/jna/examples/unix/X11.java b/contrib/platform/src/com/sun/jna/platform/unix/X11.java
similarity index 98%
rename from src/com/sun/jna/examples/unix/X11.java
rename to contrib/platform/src/com/sun/jna/platform/unix/X11.java
index 845d014..42931ca 100644
--- a/src/com/sun/jna/examples/unix/X11.java
+++ b/contrib/platform/src/com/sun/jna/platform/unix/X11.java
@@ -10,21 +10,33 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  */
-package com.sun.jna.examples.unix;
-
-import com.sun.jna.*;
-import com.sun.jna.ptr.*;
+package com.sun.jna.platform.unix;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.Library;
+import com.sun.jna.Native;
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.PointerType;
+import com.sun.jna.Structure;
+import com.sun.jna.Union;
+import com.sun.jna.ptr.ByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.NativeLongByReference;
+import com.sun.jna.ptr.PointerByReference;
 
 /** Definition (incomplete) of the X library. */
 public interface X11 extends Library {
 
     class VisualID extends NativeLong {
-        public VisualID() { }
+		private static final long serialVersionUID = 1L;
+		public VisualID() { }
         public VisualID(long value) { super(value); }
     }
 
     class XID extends NativeLong {
-        public static final XID None = null;
+		private static final long serialVersionUID = 1L;
+		public static final XID None = null;
         public XID() { this(0); }
         public XID(long id) { super(id); }
         protected boolean isNone(Object o) {
@@ -42,6 +54,7 @@ public interface X11 extends Library {
         }
     }
     class Atom extends XID {
+		private static final long serialVersionUID = 1L;
         public static final Atom None = null;
         public Atom() { }
         public Atom(long id) { super(id); }
@@ -133,6 +146,7 @@ public interface X11 extends Library {
         }
     }
     class Colormap extends XID {
+		private static final long serialVersionUID = 1L;
         public static final Colormap None = null;
         public Colormap() { }
         public Colormap(long id) { super(id); }
@@ -143,6 +157,7 @@ public interface X11 extends Library {
         }
     }
     class Font extends XID {
+		private static final long serialVersionUID = 1L;
         public static final Font None = null;
         public Font() { }
         public Font(long id) { super(id); }
@@ -153,6 +168,7 @@ public interface X11 extends Library {
         }
     }
     class Cursor extends XID {
+		private static final long serialVersionUID = 1L;
         public static final Cursor None = null;
         public Cursor() { }
         public Cursor(long id) { super(id); }
@@ -163,6 +179,7 @@ public interface X11 extends Library {
         }
     }
     class KeySym extends XID {
+		private static final long serialVersionUID = 1L;
         public static final KeySym None = null;
         public KeySym() { }
         public KeySym(long id) { super(id); }
@@ -173,6 +190,7 @@ public interface X11 extends Library {
         }
     }
     class Drawable extends XID {
+		private static final long serialVersionUID = 1L;
         public static final Drawable None = null;
         public Drawable() { }
         public Drawable(long id) { super(id); }
@@ -183,7 +201,8 @@ public interface X11 extends Library {
         }
     }
     class Window extends Drawable {
-        public static final Window None = null;
+		private static final long serialVersionUID = 1L;
+		public static final Window None = null;
         public Window() { }
         public Window(long id) { super(id); }
         public Object fromNative(Object nativeValue, FromNativeContext context) {
@@ -201,7 +220,8 @@ public interface X11 extends Library {
         }
     }
     class Pixmap extends Drawable {
-        public static final Pixmap None = null;
+		private static final long serialVersionUID = 1L;
+		public static final Pixmap None = null;
         public Pixmap() { }
         public Pixmap(long id) { super(id); }
         public Object fromNative(Object nativeValue, FromNativeContext context) {
@@ -258,6 +278,7 @@ public interface X11 extends Library {
             public short alpha, alphaMask;
         }
         class PictFormat extends NativeLong {
+    		private static final long serialVersionUID = 1L;
             public PictFormat(long value) { super(value); }
             public PictFormat() { }
         }
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java b/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java
new file mode 100644
index 0000000..641532e
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Advapi32.java
@@ -0,0 +1,659 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.platform.win32.WinNT.PSIDByReference;
+import com.sun.jna.platform.win32.WinNT.SECURITY_ATTRIBUTES;
+import com.sun.jna.platform.win32.WinReg.HKEY;
+import com.sun.jna.platform.win32.WinReg.HKEYByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Advapi32.dll Interface.
+ * @author dblock[at]dblock.org
+ */
+public interface Advapi32 extends StdCallLibrary {
+	Advapi32 INSTANCE = (Advapi32) Native.loadLibrary("Advapi32",
+			Advapi32.class, W32APIOptions.UNICODE_OPTIONS);
+
+	/**
+	 * Retrieves the name of the user associated with the current thread.
+	 * http://msdn.microsoft.com/en-us/library/ms724432(VS.85).aspx
+	 * 
+	 * @param buffer
+	 *  Buffer to receive the user's logon name.
+	 * @param len
+	 *  On input, the size of the buffer, on output the number of
+	 *  characters copied into the buffer, including the terminating
+	 *  null character.
+	 * @return 
+	 *  True if succeeded.
+	 */
+	public boolean GetUserNameW(char[] buffer, IntByReference len);
+
+	/**
+	 * Accepts the name of a system and anaccount as input and retrieves a security 
+	 * identifier (SID) for the account and the name of the domain on which the 
+	 * account was found.
+	 * http://msdn.microsoft.com/en-us/library/aa379159(VS.85).aspx
+	 * 
+	 * @param lpSystemName
+	 *  Specifies the name of the system.
+	 * @param lpAccountName
+	 *  Specifies the account name.
+	 * @param Sid
+	 *  Receives the SID structure that corresponds to the account
+	 *  name pointed to by the lpAccountName parameter.
+	 * @param cbSid
+	 *  On input, this value specifies the size, in bytes, of the Sid
+	 *  buffer. If the function fails because the buffer is too small
+	 *  or if cbSid is zero, this variable receives the required
+	 *  buffer size.
+	 * @param ReferencedDomainName
+	 *  Receives the name of the domain where the account name is found.
+	 * @param cchReferencedDomainName
+	 *  On input, this value specifies the size, in TCHARs, of the
+	 *  ReferencedDomainName buffer. If the function fails because the
+	 *  buffer is too small, this variable receives the required
+	 *  buffer size, including the terminating null character.
+	 * @param peUse
+	 *  SID_NAME_USE enumerated type that indicates the type of the
+	 *  account when the function returns.
+	 * @return 
+	 *  True if the function was successful, False otherwise.
+	 */
+	public boolean LookupAccountName(String lpSystemName,
+			String lpAccountName, PSID Sid, IntByReference cbSid,
+			char[] ReferencedDomainName,
+			IntByReference cchReferencedDomainName, PointerByReference peUse);
+
+	/**
+	 * Retrieves the name of the account for this SID and the name of the first domain 
+	 * on which this SID is found.
+	 * 
+	 * @param lpSystemName Specifies the target computer.
+	 * @param Sid The SID to look up. 
+	 * @param lpName
+	 *  Buffer that receives a null-terminated string that contains the 
+	 * 	account name that corresponds to the lpSid parameter. 
+	 * @param cchName 
+	 * 	On input, specifies the size, in TCHARs, of the lpName buffer. If the function fails 
+	 *  because the buffer is too small or if cchName is zero, cchName receives the required 
+	 *  buffer size, including the terminating null character. 
+	 * @param ReferencedDomainName
+	 *  Pointer to a buffer that receives a null-terminated string that contains the name of 
+	 *  the domain where the account name was found.
+	 * @param cchReferencedDomainName
+	 * 	On input, specifies the size, in TCHARs, of the lpReferencedDomainName buffer. If the 
+	 * 	function fails because the buffer is too small or if cchReferencedDomainName is zero, 
+	 * 	cchReferencedDomainName receives the required buffer size, including the terminating 
+	 * 	null character. 
+	 * @param peUse
+	 *  Pointer to a variable that receives a SID_NAME_USE value that indicates the type of 
+	 *  the account.
+	 * @return 
+	 *  If the function succeeds, the function returns nonzero.
+	 *  If the function fails, it returns zero. To get extended error information, call 
+	 *  GetLastError.
+	 */
+	public boolean LookupAccountSid(String lpSystemName, PSID Sid,
+			char[] lpName, IntByReference cchName,  char[] ReferencedDomainName,
+	        IntByReference cchReferencedDomainName, PointerByReference peUse);
+	
+	/**
+	 * Convert a security identifier (SID) to a string format suitable for display, 
+	 * storage, or transmission.
+	 * http://msdn.microsoft.com/en-us/library/aa376399(VS.85).aspx
+	 * 
+	 * @param Sid
+	 *            The SID structure to be converted.
+	 * @param StringSid
+	 *            Pointer to a variable that receives a pointer to a
+	 *            null-terminated SID string. To free the returned buffer, call
+	 *            the LocalFree function.
+	 * @return True if the function was successful, False otherwise.
+	 */
+	public boolean ConvertSidToStringSid(PSID Sid,
+			PointerByReference StringSid);	
+	
+	/**
+	 * Convert a string-format security identifier (SID) into a valid, functional SID.
+	 * http://msdn.microsoft.com/en-us/library/aa376402(VS.85).aspx
+	 * 
+	 * @param StringSid The string-format SID to convert.
+	 * @param Sid Receives a pointer to the converted SID.
+	 * @return True if the function was successful, False otherwise.
+	 */
+	public boolean ConvertStringSidToSid(String StringSid,
+			PSIDByReference Sid);
+	
+	/**
+	 * Returns the length, in bytes, of a valid security identifier (SID).
+	 * http://msdn.microsoft.com/en-us/library/aa446642(VS.85).aspx
+	 * 
+	 * @param pSid A pointer to the SID structure whose length is returned.
+	 * @return Length of the SID.
+	 */
+	public int GetLengthSid(PSID pSid);
+	
+	/**
+	 * The IsValidSid function validates a security identifier (SID) by verifying that 
+	 * the revision number is within a known range, and that the number of subauthorities 
+	 * is less than the maximum.
+	 * @param pSid 
+	 *  Pointer to the SID structure to validate. This parameter cannot be NULL.
+	 * @return
+	 *  If the SID structure is valid, the return value is nonzero.
+	 *  If the SID structure is not valid, the return value is zero. There is no extended 
+	 *  error information for this function; do not call GetLastError.
+	 */
+	public boolean IsValidSid(PSID pSid);
+	
+	/**
+	 * Compares a SID to a well known SID and returns TRUE if they match.
+	 * @param pSid
+	 *  SID to test.
+	 * @param wellKnownSidType
+	 *  Member of the WELL_KNOWN_SID_TYPE enumeration to compare with the SID at pSid. 
+	 * @return
+	 *  True if the SID is of a given well known type, false otherwise.
+	 */
+	public boolean IsWellKnownSid(PSID pSid, int wellKnownSidType);
+	
+	
+	/**
+	 * The CreateWellKnownSid function creates a SID for predefined aliases.
+	 * @param wellKnownSidType
+	 *  Member of the WELL_KNOWN_SID_TYPE enumeration that specifies what the SID will identify.
+	 * @param domainSid
+	 *  Pointer to a SID that identifies the domain control to use when creating the SID. 
+	 *  Pass NULL to use the local computer.
+	 * @param pSid
+	 *  Pointer to memory where CreateWellKnownSid will store the new SID.
+	 * @param cbSid
+	 *  Pointer to a DWORD that contains the number of bytes available at pSid. 
+	 *  The CreateWellKnownSid function stores the number of bytes actually used 
+	 *  at this location. 
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. For extended error information, 
+	 *  call GetLastError.
+	 */
+	public boolean CreateWellKnownSid(int wellKnownSidType, 
+			PSID domainSid, PSID pSid, IntByReference cbSid);
+	
+	/**
+	 * The LogonUser function attempts to log a user on to the local computer. The local computer is
+	 * the computer from which LogonUser was called. You cannot use LogonUser to log on to a remote
+	 * computer. You specify the user with a user name and domain, and authenticate the user with a 
+	 * plaintext password. If the function succeeds, you receive a handle to a token that represents 
+	 * the logged-on user. You can then use this token handle to impersonate the specified user or, 
+	 * in most cases, to create a process that runs in the context of the specified user.
+	 * @param lpszUsername
+	 *  A pointer to a null-terminated string that specifies the name of the user. This is the name of 
+	 *  the user account to log on to. If you use the user principal name (UPN) format, 
+	 *  user at DNS_domain_name, the lpszDomain parameter must be NULL. 
+	 * @param lpszDomain
+	 *  A pointer to a null-terminated string that specifies the name of the domain or server whose 
+	 *  account database contains the lpszUsername account. If this parameter is NULL, the user name 
+	 *  must be specified in UPN format. If this parameter is ".", the function validates the account 
+	 *  using only the local account database. 
+	 * @param lpszPassword
+	 *  A pointer to a null-terminated string that specifies the plaintext password for the user 
+	 *  account specified by lpszUsername. 
+	 * @param logonType
+	 *  The type of logon operation to perform.
+	 * @param logonProvider
+	 *  Specifies the logon provider.
+	 * @param phToken
+	 *  A pointer to a handle variable that receives a handle to a token that represents the specified user. 
+	 * @return
+	 *  If the function succeeds, the function returns nonzero.
+	 *  If the function fails, it returns zero. To get extended error information, call GetLastError.
+	 */
+	public boolean LogonUser(
+			String lpszUsername,
+			String lpszDomain,
+			String lpszPassword,
+			int logonType,
+			int logonProvider,
+			HANDLEByReference phToken);	
+	
+	/**
+	 * The OpenThreadToken function opens the access token associated with a thread.
+	 * @param ThreadHandle
+	 *  Handle to the thread whose access token is opened. 
+	 * @param DesiredAccess
+	 *  Specifies an access mask that specifies the requested types of access to the access token. 
+	 *  These requested access types are reconciled against the token's discretionary access 
+	 *  control list (DACL) to determine which accesses are granted or denied. 
+	 * @param OpenAsSelf
+	 *  Indicates whether the access check is to be made against the security context of the 
+	 *  thread calling the OpenThreadToken function or against the security context of the 
+	 *  process for the calling thread. 
+	 * @param TokenHandle
+	 *  Pointer to a variable that receives the handle to the newly opened access token.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, 
+	 *  call GetLastError. 
+	 */
+	public boolean OpenThreadToken(
+			HANDLE ThreadHandle,
+			int DesiredAccess,
+			boolean OpenAsSelf,
+			HANDLEByReference TokenHandle);
+	
+	/**
+	 * The OpenProcessToken function opens the access token associated with a process.
+	 * @param ProcessHandle
+	 *  Handle to the process whose access token is opened. The process must have the 
+	 *  PROCESS_QUERY_INFORMATION access permission. 
+	 * @param DesiredAccess
+	 *  Specifies an access mask that specifies the requested types of access to the access 
+	 *  token. These requested access types are compared with the discretionary access 
+	 *  control list (DACL) of the token to determine which accesses are granted or denied. 
+	 * @param TokenHandle
+	 *  Pointer to a handle that identifies the newly opened access token when the function returns. 
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, 
+	 *  call GetLastError.
+	 */
+	public boolean OpenProcessToken(
+			HANDLE ProcessHandle,
+			int DesiredAccess,
+			HANDLEByReference TokenHandle);
+
+	/**
+	 * The DuplicateToken function creates a new access token that duplicates 
+	 * one already in existence.
+	 * 
+	 * @param ExistingTokenHandle
+	 *  Handle to an access token opened with TOKEN_DUPLICATE access. 
+	 * @param ImpersonationLevel
+	 *  Specifies a SECURITY_IMPERSONATION_LEVEL enumerated type that supplies 
+	 *  the impersonation level of the new token. 
+	 * @param DuplicateTokenHandle
+	 *  Pointer to a variable that receives a handle to the duplicate token. 
+	 *  This handle has TOKEN_IMPERSONATE and TOKEN_QUERY access to the new token. 
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, 
+	 *  call GetLastError.
+	 */
+	public boolean DuplicateToken(
+			HANDLE ExistingTokenHandle,
+			int ImpersonationLevel, 
+			HANDLEByReference DuplicateTokenHandle);
+	
+	
+	/**
+	 * Retrieves a specified type of information about an access token. 
+	 * The calling process must have appropriate access rights to obtain the information.
+
+	 * @param tokenHandle
+	 *  Handle to an access token from which information is retrieved. If TokenInformationClass
+	 *  specifies TokenSource, the handle must have TOKEN_QUERY_SOURCE access. For all other 
+	 *  TokenInformationClass values, the handle must have TOKEN_QUERY access. 
+	 * @param tokenInformationClass
+	 *  Specifies a value from the TOKEN_INFORMATION_CLASS enumerated type to identify the type of 
+	 *  information the function retrieves. 
+	 * @param tokenInformation
+	 *  Pointer to a buffer the function fills with the requested information. The structure put 
+	 *  into this buffer depends upon the type of information specified by the TokenInformationClass 
+	 *  parameter.
+	 * @param tokenInformationLength
+	 *  Specifies the size, in bytes, of the buffer pointed to by the TokenInformation parameter. 
+	 *  If TokenInformation is NULL, this parameter must be zero. 
+	 * @param returnLength
+	 *  Pointer to a variable that receives the number of bytes needed for the buffer pointed to by 
+	 *  the TokenInformation parameter. If this value is larger than the value specified in the 
+	 *  TokenInformationLength parameter, the function fails and stores no data in the buffer.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+	 */
+	public boolean GetTokenInformation(
+			HANDLE tokenHandle,
+			int tokenInformationClass,
+			Structure tokenInformation,
+			int tokenInformationLength,
+			IntByReference returnLength);
+	
+	/**
+	 * The ImpersonateLoggedOnUser function lets the calling thread impersonate the 
+	 * security context of a logged-on user. The user is represented by a token 
+	 * handle.
+	 * @param hToken
+	 *  Handle to a primary or impersonation access token that represents a logged-on 
+	 *  user. This can be a token handle returned by a call to LogonUser, 
+	 *  CreateRestrictedToken, DuplicateToken, DuplicateTokenEx, OpenProcessToken, 
+	 *  or OpenThreadToken functions. If hToken is a primary token, it must have 
+	 *  TOKEN_QUERY and TOKEN_DUPLICATE access. If hToken is an impersonation token, 
+	 *  it must have TOKEN_QUERY and TOKEN_IMPERSONATE access. 
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 */
+	public boolean ImpersonateLoggedOnUser(
+			HANDLE hToken); 
+	
+	/**
+	 * The RevertToSelf function terminates the impersonation of a client application.
+	 * @return If the function succeeds, the return value is nonzero. 
+	 */
+	public boolean RevertToSelf();
+	
+	
+	/**
+	 * The RegOpenKeyEx function opens the specified registry key. 
+	 * Note that key names are not case sensitive.
+	 * @param hKey
+	 *  Handle to an open key.
+	 * @param lpSubKey
+	 *  Pointer to a null-terminated string containing the name of the subkey to open. 
+	 * @param ulOptions
+	 *  Reserved; must be zero. 
+	 * @param samDesired
+	 *  Access mask that specifies the desired access rights to the key. The function 
+	 *  fails if the security descriptor of the key does not permit the requested access
+	 *  for the calling process.
+	 * @param phkResult
+	 *  Pointer to a variable that receives a handle to the opened key. If the key is 
+	 *  not one of the predefined registry keys, call the RegCloseKey function after 
+	 *  you have finished using the handle. 
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS.
+	 *  If the function fails, the return value is a nonzero error code defined in Winerror.h.
+	 */
+	public int RegOpenKeyEx(HKEY hKey, String lpSubKey, int ulOptions, int samDesired, 
+			HKEYByReference phkResult);
+	  
+	/**
+	 * The RegQueryValueEx function retrieves the type and data for a specified value name 
+	 * associated with an open registry key.
+	 * @param hKey
+	 *  Handle to an open key. The key must have been opened with the 
+	 *  KEY_QUERY_VALUE access right. 
+	 * @param lpValueName
+	 *  Pointer to a null-terminated string containing the name of the value to query. 
+	 *  If lpValueName is NULL or an empty string, "", the function retrieves the type 
+	 *  and data for the key's unnamed or default value, if any.
+	 * @param lpReserved
+	 *  Reserved; must be NULL. 
+	 * @param lpType
+	 *  Pointer to a variable that receives a code indicating the type of data stored 
+	 *  in the specified value.
+	 * @param lpData
+	 *  Pointer to a buffer that receives the value's data. This parameter can be NULL
+	 *  if the data is not required. If the data is a string, the function checks for 
+	 *  a terminating null character. If one is not found, the string is stored with a 
+	 *  null terminator if the buffer is large enough to accommodate the extra 
+	 *  character. Otherwise, the string is stored as is.
+	 * @param lpcbData
+	 *  Pointer to a variable that specifies the size of the buffer pointed to by the
+	 *  lpData parameter, in bytes. When the function returns, this variable contains 
+	 *  the size of the data copied to lpData. The lpcbData parameter can be NULL only 
+	 *  if lpData is NULL. If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ 
+	 *  type, this size includes any terminating null character or characters. 
+	 *  If the buffer specified by lpData parameter is not large enough to hold the 
+	 *  data, the function returns ERROR_MORE_DATA and stores the required buffer size
+	 *  in the variable pointed to by lpcbData. In this case, the contents of the lpData
+	 *  buffer are undefined. If lpData is NULL, and lpcbData is non-NULL, the function
+	 *  returns ERROR_SUCCESS and stores the size of the data, in bytes, in the variable
+	 *  pointed to by lpcbData. This enables an application to determine the best way 
+	 *  to allocate a buffer for the value's data.
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS.
+	 *  If the function fails, the return value is a nonzero error code defined in Winerror.h.
+	 */
+	public int RegQueryValueEx(HKEY hKey, String lpValueName, int lpReserved, 
+			IntByReference lpType, char[] lpData, IntByReference lpcbData);
+	
+	public int RegQueryValueEx(HKEY hKey, String lpValueName, int lpReserved, 
+			IntByReference lpType, byte[] lpData, IntByReference lpcbData);
+
+	public int RegQueryValueEx(HKEY hKey, String lpValueName, int lpReserved, 
+			IntByReference lpType, IntByReference lpData, IntByReference lpcbData);
+	
+	/**
+	 * The RegCloseKey function releases a handle to the specified registry key.
+	 * @param hKey
+	 *  Handle to the open key to be closed. The handle must have been opened by the 
+	 *  RegCreateKeyEx, RegOpenKeyEx, or RegConnectRegistry function. 
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h.
+	 */
+	public int RegCloseKey(HKEY hKey);
+
+	/**
+	 * The RegDeleteValue function removes a named value from the specified registry 
+	 * key. Note that value names are not case sensitive.
+	 * @param hKey
+	 *  Handle to an open key. The key must have been opened with the KEY_SET_VALUE 
+	 *  access right. 
+	 * @param lpValueName
+	 *  Pointer to a null-terminated string that names the value to remove. If this
+	 *  parameter is NULL or an empty string, the value set by the RegSetValue function
+	 *  is removed. 
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h. 
+	 */
+	public int RegDeleteValue(HKEY hKey, String lpValueName);
+	
+	/**
+	 * The RegSetValueEx function sets the data and type of a specified value under a
+	 * registry key.
+	 * @param hKey
+	 *  Handle to an open key. The key must have been opened with the KEY_SET_VALUE 
+	 *  access right.
+	 * @param lpValueName
+	 *  Pointer to a string containing the name of the value to set. If a value with
+	 *  this name is not already present in the key, the function adds it to the key. 
+	 *  If lpValueName is NULL or an empty string, "", the function sets the type and
+	 *  data for the key's unnamed or default value.
+	 * @param Reserved
+	 *  Reserved; must be zero. 
+	 * @param dwType
+	 *  Type of data pointed to by the lpData parameter. 
+	 * @param lpData
+	 *  Pointer to a buffer containing the data to be stored with the specified value name. 
+	 * @param cbData
+	 *  Size of the information pointed to by the lpData parameter, in bytes. If the data 
+	 *  is of type REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ, cbData must include the size of 
+	 *  the terminating null character or characters. 
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h. 
+	 */
+	public int RegSetValueEx(HKEY hKey, String lpValueName, int Reserved, int dwType, 
+			char[] lpData, int cbData);
+	
+	public int RegSetValueEx(HKEY hKey, String lpValueName, int Reserved, int dwType, 
+			byte[] lpData, int cbData);
+	
+	/**
+	 * 
+	 * @param hKey
+	 * @param lpSubKey
+	 * @param Reserved
+	 * @param lpClass
+	 * @param dwOptions
+	 * @param samDesired
+	 * @param lpSecurityAttributes
+	 * @param phkResult
+	 * @param lpdwDisposition
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h. 
+	 */
+	public int RegCreateKeyEx(HKEY hKey, String lpSubKey, int Reserved, String lpClass, 
+			int dwOptions, int samDesired, SECURITY_ATTRIBUTES lpSecurityAttributes,
+			HKEYByReference phkResult, IntByReference lpdwDisposition);
+	
+	/**
+	 * 
+	 * @param hKey
+	 * @param name
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h. 
+	 */
+	public int RegDeleteKey(HKEY hKey, String name);
+	  
+	/**
+	 * The RegEnumKeyEx function enumerates subkeys of the specified open registry key.
+	 * The function retrieves information about one subkey each time it is called.
+	 * @param hKey
+	 *  Handle to an open key. The key must have been opened with the 
+	 *  KEY_ENUMERATE_SUB_KEYS access right. 
+	 * @param dwIndex
+	 *  Index of the subkey to retrieve. This parameter should be zero for the first 
+	 *  call to the RegEnumKeyEx function and then incremented for subsequent calls. 
+	 *  Because subkeys are not ordered, any new subkey will have an arbitrary index.
+	 *  This means that the function may return subkeys in any order.
+	 * @param lpName
+	 *  Pointer to a buffer that receives the name of the subkey, including the 
+	 *  terminating null character. The function copies only the name of the subkey,
+	 *  not the full key hierarchy, to the buffer. 
+	 * @param lpcName
+	 *  Pointer to a variable that specifies the size of the buffer specified by the 
+	 *  lpName parameter, in TCHARs. This size should include the terminating null 
+	 *  character. When the function returns, the variable pointed to by lpcName 
+	 *  contains the number of characters stored in the buffer. The count returned 
+	 *  does not include the terminating null character.
+	 * @param reserved
+	 *  Reserved; must be NULL.
+	 * @param lpClass
+	 *  Pointer to a buffer that receives the null-terminated class string of the 
+	 *  enumerated subkey. This parameter can be NULL. 
+	 * @param lpcClass
+	 *  Pointer to a variable that specifies the size of the buffer specified by the
+	 *  lpClass parameter, in TCHARs. The size should include the terminating null 
+	 *  character. When the function returns, lpcClass contains the number of 
+	 *  characters stored in the buffer. The count returned does not include the
+	 *  terminating null character. This parameter can be NULL only if lpClass is NULL. 
+	 * @param lpftLastWriteTime
+	 *  Pointer to a variable that receives the time at which the enumerated subkey 
+	 *  was last written.
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h. 
+	 */
+	public int RegEnumKeyEx(HKEY hKey, int dwIndex, char[] lpName, IntByReference lpcName,
+			IntByReference reserved, char[] lpClass, IntByReference lpcClass, 
+			WinBase.FILETIME lpftLastWriteTime);
+	
+	/**
+	 * The RegEnumValue function enumerates the values for the specified open registry 
+	 * key. The function copies one indexed value name and data block for the key each 
+	 * time it is called.
+	 * @param hKey
+	 *  Handle to an open key. The key must have been opened with the KEY_QUERY_VALUE 
+	 *  access right. 
+	 * @param dwIndex
+	 *  Index of the value to be retrieved. This parameter should be zero for the first
+	 *  call to the RegEnumValue function and then be incremented for subsequent calls. 
+	 *  Because values are not ordered, any new value will have an arbitrary index. 
+	 *  This means that the function may return values in any order.
+	 * @param lpValueName
+	 *  Pointer to a buffer that receives the name of the value, including the 
+	 *  terminating null character. 
+	 * @param lpcchValueName
+	 *  Pointer to a variable that specifies the size of the buffer pointed to by the
+	 *  lpValueName parameter, in TCHARs. This size should include the terminating null 
+	 *  character. When the function returns, the variable pointed to by lpcValueName 
+	 *  contains the number of characters stored in the buffer. The count returned 
+	 *  does not include the terminating null character. 
+	 * @param reserved
+	 *  Reserved; must be NULL. 
+	 * @param lpType
+	 *  Pointer to a variable that receives a code indicating the type of data stored 
+	 *  in the specified value. 
+	 * @param lpData
+	 *  Pointer to a buffer that receives the data for the value entry. This parameter 
+	 *  can be NULL if the data is not required. 
+	 * @param lpcbData
+	 *  Pointer to a variable that specifies the size of the buffer pointed to by the 
+	 *  lpData parameter, in bytes. 
+	 * @return
+	 *  If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 *  fails, the return value is a nonzero error code defined in Winerror.h. 
+	 */
+	public int RegEnumValue(HKEY hKey, int dwIndex, char[] lpValueName, 
+			IntByReference lpcchValueName, IntByReference reserved, 
+			IntByReference lpType, byte[] lpData, IntByReference lpcbData);	
+	
+	/**
+	 * The RegQueryInfoKey function retrieves information about the specified 
+	 * registry key.
+	 * @param hKey
+	 *  A handle to an open key. The key must have been opened with the 
+	 *  KEY_QUERY_VALUE access right. 
+	 * @param lpClass
+	 *  A pointer to a buffer that receives the null-terminated class 
+	 *  string of the key. This parameter can be ignored. This parameter can be NULL. 
+	 * @param lpcClass
+	 *  A pointer to a variable that specifies the size of the buffer pointed to by
+	 *  the lpClass parameter, in characters.
+	 * @param lpReserved
+	 *  Reserved; must be NULL. 
+	 * @param lpcSubKeys
+	 *  A pointer to a variable that receives the number of subkeys that are contained by the specified key. 
+	 *  This parameter can be NULL. 
+	 * @param lpcMaxSubKeyLen
+	 *  A pointer to a variable that receives the size of the key's subkey with the 
+	 *  longest name, in characters, not including the terminating null character. 
+	 *  This parameter can be NULL. 
+	 * @param lpcMaxClassLen
+	 *  A pointer to a variable that receives the size of the longest string that 
+	 *  specifies a subkey class, in characters. The count returned does not include
+	 *  the terminating null character. This parameter can be NULL. 
+	 * @param lpcValues
+	 *  A pointer to a variable that receives the number of values that are associated 
+	 *  with the key. This parameter can be NULL. 
+	 * @param lpcMaxValueNameLen
+	 *  A pointer to a variable that receives the size of the key's longest value name,
+	 *  in characters. The size does not include the terminating null character. This 
+	 *  parameter can be NULL. 
+	 * @param lpcMaxValueLen
+	 *  A pointer to a variable that receives the size of the longest data component
+	 *  among the key's values, in bytes. This parameter can be NULL. 
+	 * @param lpcbSecurityDescriptor
+	 *  A pointer to a variable that receives the size of the key's security descriptor,
+	 *  in bytes. This parameter can be NULL. 
+	 * @param lpftLastWriteTime
+	 *  A pointer to a FILETIME structure that receives the last write time. 
+	 *  This parameter can be NULL. 
+	 * @return
+	 * If the function succeeds, the return value is ERROR_SUCCESS. If the function 
+	 * fails, the return value is a nonzero error code defined in Winerror.h.
+	 */	
+	public int RegQueryInfoKey(HKEY hKey, char[] lpClass, 
+			IntByReference lpcClass, IntByReference lpReserved,
+			IntByReference lpcSubKeys, IntByReference lpcMaxSubKeyLen,
+			IntByReference lpcMaxClassLen, IntByReference lpcValues,
+			IntByReference lpcMaxValueNameLen, IntByReference lpcMaxValueLen,
+			IntByReference lpcbSecurityDescriptor, 
+			WinBase.FILETIME lpftLastWriteTime);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Advapi32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Advapi32Util.java
new file mode 100644
index 0000000..03d012c
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Advapi32Util.java
@@ -0,0 +1,902 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.TreeMap;
+
+import com.sun.jna.Memory;
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.platform.win32.WinNT.PSIDByReference;
+import com.sun.jna.platform.win32.WinNT.SID_AND_ATTRIBUTES;
+import com.sun.jna.platform.win32.WinNT.SID_NAME_USE;
+import com.sun.jna.platform.win32.WinReg.HKEY;
+import com.sun.jna.platform.win32.WinReg.HKEYByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * Advapi32 utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Advapi32Util {
+	
+	/**
+	 * An account.
+	 */
+	public static class Account {
+		/**
+		 * Account name.
+		 */
+		public String name;
+		/**
+		 * Account domain.
+		 */
+		public String domain;
+		/**
+		 * Account SID.
+		 */
+		public byte[] sid;
+		/**
+		 * String representation of the account SID.
+		 */
+		public String sidString;
+		/**
+		 * Account type, one of SID_NAME_USE.
+		 */
+		public int accountType;
+		/**
+		 * Fully qualified account name.
+		 */
+		public String fqn;
+	}
+	
+	/**
+	 * Retrieves the name of the user associated with the current thread.
+	 * @return A user name.
+	 */
+	public static String getUserName() {
+		char[] buffer = new char[128];
+		IntByReference len = new IntByReference(buffer.length);
+		boolean result = Advapi32.INSTANCE.GetUserNameW(buffer, len); 
+		
+		if (! result) {
+			
+			int rc = Kernel32.INSTANCE.GetLastError();
+
+			switch(rc) {
+			case W32Errors.ERROR_INSUFFICIENT_BUFFER:
+				buffer = new char[len.getValue()];
+				break;
+			default:
+				throw new Win32Exception(Native.getLastError());
+			}
+			
+			result = Advapi32.INSTANCE.GetUserNameW(buffer, len);
+		}
+		
+		if (! result) {
+			throw new Win32Exception(Native.getLastError());
+		}
+		
+		return Native.toString(buffer);
+	}
+
+	/**
+	 * Retrieves a security identifier (SID) for the account on the current system.
+	 * @param accountName Specifies the account name.
+	 * @return A structure containing the account SID;
+	 */
+	public static Account getAccountByName(String accountName) {
+		return getAccountByName(null, accountName);
+	}
+			
+	/**
+	 * Retrieves a security identifier (SID) for a given account.
+	 * @param systemName Name of the system.
+	 * @param accountName Account name.
+	 * @return A structure containing the account SID.
+	 */
+	public static Account getAccountByName(String systemName, String accountName) {
+		IntByReference pSid = new IntByReference(0);
+		IntByReference cchDomainName = new IntByReference(0);
+		PointerByReference peUse = new PointerByReference();
+		
+		if (Advapi32.INSTANCE.LookupAccountName(systemName, accountName, null, pSid, null, cchDomainName, peUse)) {
+			throw new RuntimeException("LookupAccountNameW was expected to fail with ERROR_INSUFFICIENT_BUFFER");
+		}
+		
+		int rc = Kernel32.INSTANCE.GetLastError();
+		if (pSid.getValue() == 0 || rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+			throw new Win32Exception(rc);
+		}
+
+		Memory sidMemory = new Memory(pSid.getValue());
+		PSID result = new PSID(sidMemory);
+		char[] referencedDomainName = new char[cchDomainName.getValue() + 1]; 
+
+		if (! Advapi32.INSTANCE.LookupAccountName(systemName, accountName, result, pSid, referencedDomainName, cchDomainName, peUse)) {
+			throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+		}
+		
+		Account account = new Account();
+		account.accountType = peUse.getPointer().getInt(0);
+		account.name = accountName;
+
+        String[] accountNamePartsBs = accountName.split("\\\\", 2);
+        String[] accountNamePartsAt = accountName.split("@", 2);
+
+        if (accountNamePartsBs.length == 2) {
+        	account.name = accountNamePartsBs[1];
+        } else if (accountNamePartsAt.length == 2) {
+        	account.name = accountNamePartsAt[0];
+        } else {
+            account.name = accountName;
+        }
+		
+		if (cchDomainName.getValue() > 0) {
+			account.domain = Native.toString(referencedDomainName);
+			account.fqn = account.domain + "\\" + account.name;
+		} else {
+			account.fqn = account.name;
+		}
+		
+		account.sid = result.getBytes();
+		account.sidString = convertSidToStringSid(new PSID(account.sid));
+		return account;
+	}
+
+	/**
+	 * Get the account by SID on the local system.
+	 * 
+	 * @param sid SID.
+	 * @return Account.
+	 */
+	public static Account getAccountBySid(PSID sid) {
+		return getAccountBySid(null, sid);
+	}
+	
+	/**
+	 * Get the account by SID.
+	 * 
+	 * @param systemName Name of the system.
+	 * @param sid SID.
+	 * @return Account.
+	 */
+	public static Account getAccountBySid(String systemName, PSID sid) {
+    	IntByReference cchName = new IntByReference();
+    	IntByReference cchDomainName = new IntByReference();
+    	PointerByReference peUse = new PointerByReference();
+
+    	if (Advapi32.INSTANCE.LookupAccountSid(null, sid, 
+    			null, cchName, null, cchDomainName, peUse)) {
+			throw new RuntimeException("LookupAccountSidW was expected to fail with ERROR_INSUFFICIENT_BUFFER");
+    	}
+    	
+    	int rc = Kernel32.INSTANCE.GetLastError();
+		if (cchName.getValue() == 0 || rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+			throw new Win32Exception(rc);
+		}    	
+		
+		char[] domainName = new char[cchDomainName.getValue()];
+		char[] name = new char[cchName.getValue()];
+    	
+		if (! Advapi32.INSTANCE.LookupAccountSid(null, sid, 
+    			name, cchName, domainName, cchDomainName, peUse)) {
+    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    	}
+		
+		Account account = new Account();
+		account.accountType = peUse.getPointer().getInt(0);
+		account.name = Native.toString(name);
+		
+		if (cchDomainName.getValue() > 0) {
+			account.domain = Native.toString(domainName);
+			account.fqn = account.domain + "\\" + account.name;
+		} else {
+			account.fqn = account.name;
+		}
+		
+		account.sid = sid.getBytes();
+		account.sidString = convertSidToStringSid(sid);
+		return account;
+	}
+	
+	/**
+	 * Convert a security identifier (SID) to a string format suitable for display, 
+	 * storage, or transmission.
+	 * @param sid SID bytes.
+	 * @return String SID.
+	 */
+	public static String convertSidToStringSid(PSID sid) {
+		PointerByReference stringSid = new PointerByReference();
+		if (! Advapi32.INSTANCE.ConvertSidToStringSid(sid, stringSid)) {
+			throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+		}
+		String result = stringSid.getValue().getString(0, true);
+		Kernel32.INSTANCE.LocalFree(stringSid.getValue()); 
+		return result;
+	}
+	
+	/**
+	 * Convert a string representation of a security identifier (SID) to 
+	 * a binary format.
+	 * @param sidString 
+	 * 	String SID.
+	 * @return SID bytes.
+	 */
+	public static byte[] convertStringSidToSid(String sidString) {
+		PSIDByReference pSID = new PSIDByReference();
+		if (! Advapi32.INSTANCE.ConvertStringSidToSid(sidString, pSID)) {
+			throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+		}
+		return pSID.getValue().getBytes();
+	}
+	
+	/**
+	 * Compares a SID to a well known SID and returns TRUE if they match.
+	 * @param sidString
+	 *  String representation of a SID.
+	 * @param wellKnownSidType
+	 *  Member of the WELL_KNOWN_SID_TYPE enumeration to compare with the SID at pSid.
+	 * @return
+	 *  True if the SID is of the well-known type, false otherwise.
+	 */
+	public static boolean isWellKnownSid(String sidString, int wellKnownSidType) {
+		PSIDByReference pSID = new PSIDByReference();
+		if (! Advapi32.INSTANCE.ConvertStringSidToSid(sidString, pSID)) {
+			throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+		}
+		return Advapi32.INSTANCE.IsWellKnownSid(pSID.getValue(), wellKnownSidType);
+	}
+
+	/**
+	 * Compares a SID to a well known SID and returns TRUE if they match.
+	 * @param sidBytes
+	 *  Byte representation of a SID.
+	 * @param wellKnownSidType
+	 *  Member of the WELL_KNOWN_SID_TYPE enumeration to compare with the SID at pSid.
+	 * @return
+	 *  True if the SID is of the well-known type, false otherwise.
+	 */
+	public static boolean isWellKnownSid(byte[] sidBytes, int wellKnownSidType) {
+		PSID pSID = new PSID(sidBytes);
+		return Advapi32.INSTANCE.IsWellKnownSid(pSID, wellKnownSidType);		
+	}
+	
+	/**
+	 * Get an account name from a string SID on the local machine.
+	 * 
+	 * @param sidString SID.
+	 * @return Account.
+	 */
+	public static Account getAccountBySid(String sidString) {
+		return getAccountBySid(null, sidString); 
+	}
+	
+	/**
+	 * Get an account name from a string SID.
+	 * 
+	 * @param systemName System name.
+	 * @param sidString SID.
+	 * @return Account.
+	 */
+	public static Account getAccountBySid(String systemName, String sidString) {
+		return getAccountBySid(systemName, new PSID(convertStringSidToSid(sidString))); 
+	}
+	
+	/**
+	 * This function returns the groups associated with a security token,
+	 * such as a user token.
+	 * 
+	 * @param hToken Token.
+	 * @return Token groups.
+	 */
+	public static Account[] getTokenGroups(HANDLE hToken) {
+    	// get token group information size
+        IntByReference tokenInformationLength = new IntByReference();
+        if (Advapi32.INSTANCE.GetTokenInformation(hToken, 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenGroups, null, 0, tokenInformationLength)) {
+        	throw new RuntimeException("Expected GetTokenInformation to fail with ERROR_INSUFFICIENT_BUFFER");
+        }
+        int rc = Kernel32.INSTANCE.GetLastError();
+        if (rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+        	throw new Win32Exception(rc);
+        }
+        // get token group information
+		WinNT.TOKEN_GROUPS groups = new WinNT.TOKEN_GROUPS(tokenInformationLength.getValue());
+        if (! Advapi32.INSTANCE.GetTokenInformation(hToken,
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenGroups, groups, 
+        		tokenInformationLength.getValue(), tokenInformationLength)) {
+        	throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+        }
+        ArrayList<Account> userGroups = new ArrayList<Account>(); 
+        // make array of names
+    	for (SID_AND_ATTRIBUTES sidAndAttribute : groups.getGroups()) {
+    		Account group = null;
+    		try {
+    			group = Advapi32Util.getAccountBySid(sidAndAttribute.Sid);
+    		} catch(Exception e) {
+    			group = new Account();
+        		group.sid = sidAndAttribute.Sid.getBytes();
+        		group.sidString = Advapi32Util.convertSidToStringSid(sidAndAttribute.Sid);
+    			group.name = group.sidString;
+    			group.fqn = group.sidString;
+        		group.accountType = SID_NAME_USE.SidTypeGroup;
+    		}
+    		userGroups.add(group);
+    	}
+        return userGroups.toArray(new Account[0]);
+	}
+
+	/**
+	 * This function returns the information about the user who owns a security token,
+	 * 
+	 * @param hToken Token.
+	 * @return Token user.
+	 */
+	public static Account getTokenAccount(HANDLE hToken) {
+    	// get token group information size
+        IntByReference tokenInformationLength = new IntByReference();
+        if (Advapi32.INSTANCE.GetTokenInformation(hToken, 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenUser, null, 0, tokenInformationLength)) {
+        	throw new RuntimeException("Expected GetTokenInformation to fail with ERROR_INSUFFICIENT_BUFFER");
+        }
+        int rc = Kernel32.INSTANCE.GetLastError();
+        if (rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+        	throw new Win32Exception(rc);
+        }
+        // get token user information
+		WinNT.TOKEN_USER user = new WinNT.TOKEN_USER(tokenInformationLength.getValue());
+        if (! Advapi32.INSTANCE.GetTokenInformation(hToken,
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenUser, user, 
+        		tokenInformationLength.getValue(), tokenInformationLength)) {
+        	throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+        }        
+        return getAccountBySid(user.User.Sid);
+	}
+	
+	/**
+	 * Return the group memberships of the currently logged on user.
+	 * @return An array of groups.
+	 */
+	public static Account[] getCurrentUserGroups() {		
+    	HANDLEByReference phToken = new HANDLEByReference();    	
+    	try {
+    		// open thread or process token
+        	HANDLE threadHandle = Kernel32.INSTANCE.GetCurrentThread();
+        	if (! Advapi32.INSTANCE.OpenThreadToken(threadHandle, 
+        			WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, true, phToken)) {
+            	if (W32Errors.ERROR_NO_TOKEN != Kernel32.INSTANCE.GetLastError()) {
+            		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+            	}        	
+            	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+            	if (! Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+            			WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken)) {
+            		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+            	}
+        	}
+        	return getTokenGroups(phToken.getValue());
+    	} finally {
+    		if (phToken.getValue() != WinBase.INVALID_HANDLE_VALUE) {
+    			if (! Kernel32.INSTANCE.CloseHandle(phToken.getValue())) {
+    				throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    			}
+    		}
+    	}		
+	}
+
+	/**
+	 * Checks whether a registry key exists.
+	 * @param root 
+	 *  HKEY_LOCAL_MACHINE, etc.
+	 * @param key 
+	 *  Path to the registry key.
+	 * @return 
+	 *  True if the key exists.
+	 */
+	public static boolean registryKeyExists(HKEY root, String key) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ, phkKey);
+		switch(rc) {
+		case W32Errors.ERROR_SUCCESS:
+			Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			return true;
+		case W32Errors.ERROR_FILE_NOT_FOUND:
+			return false;
+		default:
+			throw new Win32Exception(rc);
+		}
+	}
+	
+	/**
+	 * Checks whether a registry value exists.
+	 * @param root
+	 *  HKEY_LOCAL_MACHINE, etc.
+	 * @param key
+	 *  Registry key path.
+	 * @param value
+	 *  Value name.
+	 * @return
+	 *  True if the value exists.
+	 */
+	public static boolean registryValueExists(HKEY root, String key, String value) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ, phkKey);
+		try {
+			switch(rc) {
+			case W32Errors.ERROR_SUCCESS:
+				break;
+			case W32Errors.ERROR_FILE_NOT_FOUND:
+				return false;
+			default:
+				throw new Win32Exception(rc);
+			}
+			IntByReference lpcbData = new IntByReference();
+			IntByReference lpType = new IntByReference();
+			rc = Advapi32.INSTANCE.RegQueryValueEx(
+					phkKey.getValue(), value, 0, lpType, (char[]) null, lpcbData);
+			switch(rc) {
+			case W32Errors.ERROR_SUCCESS:
+			case W32Errors.ERROR_INSUFFICIENT_BUFFER:
+				return true;
+			case W32Errors.ERROR_FILE_NOT_FOUND:
+				return false;
+			default:
+				throw new Win32Exception(rc);
+			}
+		} finally {
+			if (phkKey.getValue() != WinBase.INVALID_HANDLE_VALUE) {
+				rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+				if (rc != W32Errors.ERROR_SUCCESS) {
+					throw new Win32Exception(rc);
+				}
+			}
+		}
+	}	
+
+	/**
+	 * Get a registry REG_SZ value.
+	 * @param root
+	 *  Root key.
+	 * @param key
+	 *  Registry path.
+	 * @param value
+	 *  Name of the value to retrieve.
+	 * @return
+	 *  String value.
+	 */
+	public static String registryGetStringValue(HKEY root, String key, String value) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			IntByReference lpcbData = new IntByReference();
+			IntByReference lpType = new IntByReference();
+			rc = Advapi32.INSTANCE.RegQueryValueEx(
+					phkKey.getValue(), value, 0, lpType, (char[]) null, lpcbData);
+			if (rc != W32Errors.ERROR_SUCCESS && rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+				throw new Win32Exception(rc);
+			}
+			if (lpType.getValue() != WinNT.REG_SZ) {
+				throw new RuntimeException("Unexpected registry type " + lpType.getValue() + ", expected REG_SZ");
+			}
+			char[] data = new char[lpcbData.getValue()];
+			rc = Advapi32.INSTANCE.RegQueryValueEx(
+					phkKey.getValue(), value, 0, lpType, data, lpcbData);
+			if (rc != W32Errors.ERROR_SUCCESS && rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+				throw new Win32Exception(rc);
+			}
+			return Native.toString(data);
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}
+	}
+
+	/**
+	 * Get a registry DWORD value.
+	 * @param root
+	 *  Root key.
+	 * @param key
+	 *  Registry key path.
+	 * @param value
+	 *  Name of the value to retrieve.
+	 * @return
+	 *  Integer value.
+	 */
+	public static int registryGetIntValue(HKEY root, String key, String value) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			IntByReference lpcbData = new IntByReference();
+			IntByReference lpType = new IntByReference();
+			rc = Advapi32.INSTANCE.RegQueryValueEx(
+					phkKey.getValue(), value, 0, lpType, (char[]) null, lpcbData);
+			if (rc != W32Errors.ERROR_SUCCESS && rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+				throw new Win32Exception(rc);
+			}
+			if (lpType.getValue() != WinNT.REG_DWORD) {
+				throw new RuntimeException("Unexpected registry type " + lpType.getValue() + ", expected REG_SZ");
+			}
+			IntByReference data = new IntByReference();
+			rc = Advapi32.INSTANCE.RegQueryValueEx(
+					phkKey.getValue(), value, 0, lpType, data, lpcbData);
+			if (rc != W32Errors.ERROR_SUCCESS && rc != W32Errors.ERROR_INSUFFICIENT_BUFFER) {
+				throw new Win32Exception(rc);
+			}
+			return data.getValue();
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}
+	}
+	
+	/**
+	 * Create a registry key.
+	 * @param hKey 
+	 *  Parent key.
+	 * @param keyName 
+	 *  Key name.
+	 */
+	public static void registryCreateKey(HKEY hKey, String keyName) {
+		HKEYByReference phkResult = new HKEYByReference();
+    	int rc = Advapi32.INSTANCE.RegCreateKeyEx(hKey, keyName, 0, null, 0, 
+    			WinNT.KEY_READ, null, phkResult, null);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		rc = Advapi32.INSTANCE.RegCloseKey(phkResult.getValue());
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}		
+	}
+
+	/**
+	 * Create a registry key.
+	 * @param root
+	 *  Root key.
+	 * @param parentPath
+	 *  Path to an existing registry key.
+	 * @param keyName
+	 *  Key name.
+	 */
+	public static void registryCreateKey(HKEY root, String parentPath, String keyName) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, parentPath, 0, WinNT.KEY_CREATE_SUB_KEY, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			registryCreateKey(phkKey.getValue(), keyName);
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}		
+	}
+	
+	/**
+	 * Set an integer value in registry.
+	 * @param hKey
+	 *  Parent key.
+	 * @param name
+	 *  Name.
+	 * @param value
+	 *  Value.
+	 */
+	public static void registrySetIntValue(HKEY hKey, String name, int value) {
+        byte[] data = new byte[4];
+        data[0] = (byte)(value & 0xff);
+        data[1] = (byte)((value >> 8) & 0xff);
+        data[2] = (byte)((value >> 16) & 0xff);
+        data[3] = (byte)((value >> 24) & 0xff);
+		int rc = Advapi32.INSTANCE.RegSetValueEx(hKey, name, 0, WinNT.REG_DWORD, data, 4);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+	}
+	
+	/**
+	 * Set an integer value in registry.
+	 * @param root
+	 *  Root key.
+	 * @param keyPath
+	 *  Path to an existing registry key.
+	 * @param name
+	 *  Name.
+	 * @param value
+	 *  Value.
+	 */
+	public static void registrySetIntValue(HKEY root, String keyPath, String name, int value) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			registrySetIntValue(phkKey.getValue(), name, value);
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}		
+	}
+
+	/**
+	 * Set a string value in registry.
+	 * @param hKey
+	 *  Parent key.
+	 * @param name
+	 *  Name.
+	 * @param value
+	 *  Value.
+	 */
+	public static void registrySetStringValue(HKEY hKey, String name, String value) {
+    	char[] data = Native.toCharArray(value);
+		int rc = Advapi32.INSTANCE.RegSetValueEx(hKey, name, 0, WinNT.REG_SZ, data, data.length * 2);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}	
+	}
+
+	/**
+	 * Set a string value in registry.
+	 * @param root
+	 *  Root key.
+	 * @param keyPath
+	 *  Path to an existing registry key.
+	 * @param name
+	 *  Name.
+	 * @param value
+	 *  Value.
+	 */
+	public static void registrySetStringValue(HKEY root, String keyPath, String name, String value) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			registrySetStringValue(phkKey.getValue(), name, value);
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}
+	}
+	
+	/**
+	 * Delete a registry key.
+	 * @param hKey
+	 *  Parent key.
+	 * @param keyName
+	 *  Name of the key to delete.
+	 */
+	public static void registryDeleteKey(HKEY hKey, String keyName) {
+		int rc = Advapi32.INSTANCE.RegDeleteKey(hKey, keyName);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}		
+	}
+	
+	/**
+	 * Delete a registry key.
+	 * @param root
+	 *  Root key.
+	 * @param keyPath
+	 *  Path to an existing registry key.
+	 * @param keyName
+	 *  Name of the key to delete.
+	 */
+	public static void registryDeleteKey(HKEY root, String keyPath, String keyName) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			registryDeleteKey(phkKey.getValue(), keyName);
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}
+	}
+	
+	/**
+	 * Delete a registry value.
+	 * @param hKey
+	 *  Parent key.
+	 * @param valueName
+	 *  Name of the value to delete.
+	 */
+	public static void registryDeleteValue(HKEY hKey, String valueName) {
+		int rc = Advapi32.INSTANCE.RegDeleteValue(hKey, valueName);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}		
+	}
+	
+	/**
+	 * Delete a registry value.
+	 * @param root
+	 *  Root key.
+	 * @param keyPath
+	 *  Path to an existing registry key.
+	 * @param valueName
+	 *  Name of the value to delete.
+	 */
+	public static void registryDeleteValue(HKEY root, String keyPath, String valueName) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			registryDeleteValue(phkKey.getValue(), valueName);
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}
+	}
+	
+	/**
+	 * Get names of the registry key's sub-keys.
+	 * @param hKey
+	 *  Registry key.
+	 * @return
+	 *  Array of registry key names.
+	 */
+	public static String[] registryGetKeys(HKEY hKey) {
+    	IntByReference lpcSubKeys = new IntByReference();
+    	IntByReference lpcMaxSubKeyLen = new IntByReference();
+    	int rc = Advapi32.INSTANCE.RegQueryInfoKey(hKey, null, null, null, 
+    			lpcSubKeys, lpcMaxSubKeyLen, null, null, null, null, null, null);
+    	if (rc != W32Errors.ERROR_SUCCESS) {
+    		throw new Win32Exception(rc);
+    	}
+    	ArrayList<String> keys = new ArrayList<String>(lpcSubKeys.getValue());
+    	char[] name = new char[lpcMaxSubKeyLen.getValue() + 1];
+    	for (int i = 0; i < lpcSubKeys.getValue(); i++) {
+    		IntByReference lpcchValueName = new IntByReference(lpcMaxSubKeyLen.getValue() + 1);
+        	rc = Advapi32.INSTANCE.RegEnumKeyEx(hKey, i, name, lpcchValueName, 
+        			null, null, null, null);
+        	if (rc != W32Errors.ERROR_SUCCESS) {
+        		throw new Win32Exception(rc);
+        	}
+        	keys.add(Native.toString(name));
+    	}
+    	return keys.toArray(new String[0]);
+	}
+
+	/**
+	 * Get names of the registry key's sub-keys.
+	 * @param root
+	 *  Root key.
+	 * @param keyPath
+	 *  Path to a registry key.
+	 * @return
+	 *  Array of registry key names.
+	 */
+	public static String[] registryGetKeys(HKEY root, String keyPath) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {
+			throw new Win32Exception(rc);
+		}
+		try {
+			return registryGetKeys(phkKey.getValue());
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}
+	}
+
+	/**
+	 * Get a table of registry values.
+	 * @param hKey
+	 *  Registry key.
+	 * @return
+	 *  Table of values.
+	 */
+	public static TreeMap<String, Object> registryGetValues(HKEY hKey) {
+    	IntByReference lpcValues = new IntByReference();
+    	IntByReference lpcMaxValueNameLen = new IntByReference();
+    	IntByReference lpcMaxValueLen = new IntByReference();
+    	int rc = Advapi32.INSTANCE.RegQueryInfoKey(hKey, null, null, null, null, 
+    			null, null, lpcValues, lpcMaxValueNameLen, lpcMaxValueLen, null, null);
+    	if (rc != W32Errors.ERROR_SUCCESS) {
+    		throw new Win32Exception(rc);
+    	}
+		TreeMap<String, Object> keyValues = new TreeMap<String, Object>();
+    	char[] name = new char[lpcMaxValueNameLen.getValue() + 1];
+    	byte[] data = new byte[lpcMaxValueLen.getValue()];
+    	for (int i = 0; i < lpcValues.getValue(); i++) {
+    		IntByReference lpcchValueName = new IntByReference(lpcMaxValueNameLen.getValue() + 1);
+    		IntByReference lpcbData = new IntByReference(lpcMaxValueLen.getValue());
+    		IntByReference lpType = new IntByReference();
+        	rc = Advapi32.INSTANCE.RegEnumValue(hKey, i, name, lpcchValueName, null, 
+        			lpType, data, lpcbData);
+        	if (rc != W32Errors.ERROR_SUCCESS) {
+        		throw new Win32Exception(rc);
+        	}
+        	switch(lpType.getValue()) {
+        	case WinNT.REG_DWORD:
+            	keyValues.put(Native.toString(name), 
+            			((int)(data[0] & 0xff)) + 
+            			(((int)(data[1] & 0xff)) << 8) + 
+            			(((int)(data[2] & 0xff)) << 16) + 
+            			(((int)(data[3] & 0xff)) << 24));
+        		break;
+        	case WinNT.REG_SZ:
+            	try {
+					keyValues.put(Native.toString(name),
+							new String(data, 0, data.length - 2, "UTF-16LE"));
+				} catch (UnsupportedEncodingException e) {
+					throw new RuntimeException(e.getMessage());
+				}
+        		break;
+        	default:
+        		throw new RuntimeException("Unsupported type: " + lpType.getValue());
+        	}
+    	}
+    	return keyValues;
+	}
+	
+	/**
+	 * Get a table of registry values.
+	 * @param root
+	 *  Registry root.
+	 * @param keyPath
+	 *  Regitry key path.
+	 * @return
+	 *  Table of values.
+	 */
+	public static TreeMap<String, Object> registryGetValues(HKEY root, String keyPath) {
+		HKEYByReference phkKey = new HKEYByReference();
+		int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ, phkKey);
+		if (rc != W32Errors.ERROR_SUCCESS) {			throw new Win32Exception(rc);
+		}
+		try {
+			return registryGetValues(phkKey.getValue());
+		} finally {
+			rc = Advapi32.INSTANCE.RegCloseKey(phkKey.getValue());
+			if (rc != W32Errors.ERROR_SUCCESS) {
+				throw new Win32Exception(rc);
+			}
+		}		
+	}
+
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/BaseTSD.java b/contrib/platform/src/com/sun/jna/platform/win32/BaseTSD.java
new file mode 100644
index 0000000..4fe5ce2
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/BaseTSD.java
@@ -0,0 +1,90 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.IntegerType;
+import com.sun.jna.Pointer;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+ at SuppressWarnings("serial")
+public interface BaseTSD extends StdCallLibrary {
+	/**
+	 * Signed long type for pointer precision. 
+	 * Use when casting a pointer to a long to perform pointer arithmetic. 
+	 */
+	public static class LONG_PTR extends IntegerType {
+		public LONG_PTR() {
+			this(0);
+		}
+
+		public LONG_PTR(long value) {
+			super(Pointer.SIZE, value);
+		}
+	}
+	
+	/**
+	 * Signed SIZE_T. 
+	 */
+	public static class SSIZE_T extends LONG_PTR {
+		public SSIZE_T() {
+			this(0);
+		}
+
+		public SSIZE_T(long value) {
+			super(value);
+		}
+	}
+
+	/**
+	 * Unsigned LONG_PTR. 
+	 */
+	public static class ULONG_PTR extends IntegerType {
+		public ULONG_PTR() {
+			this(0);
+		}
+
+		public ULONG_PTR(long value) {
+			super(Pointer.SIZE, value);
+		}
+	}
+
+	/**
+	 * Unsigned DWORD_PTR. 
+	 */
+	public static class DWORD_PTR extends IntegerType {
+		public DWORD_PTR() {
+			this(0);
+		}
+
+		public DWORD_PTR(long value) {
+			super(Pointer.SIZE, value);
+		}
+	}
+
+	/**
+	 * The maximum number of bytes to which a pointer can point. 
+	 * Use for a count that must span the full range of a pointer. 
+	 */
+	public static class SIZE_T extends ULONG_PTR {
+		public SIZE_T() {
+			this(0);
+		}
+
+		public SIZE_T(long value) {
+			super(value);
+		}
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Crypt32.java b/contrib/platform/src/com/sun/jna/platform/win32/Crypt32.java
new file mode 100644
index 0000000..696e5b4
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Crypt32.java
@@ -0,0 +1,112 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.WinCrypt.CRYPTPROTECT_PROMPTSTRUCT;
+import com.sun.jna.platform.win32.WinCrypt.DATA_BLOB;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Crypt32.dll Interface.
+ * @author dblock[at]dblock.org
+ */
+public interface Crypt32 extends StdCallLibrary {
+	
+	Crypt32 INSTANCE = (Crypt32) Native.loadLibrary("Crypt32",
+			Crypt32.class, W32APIOptions.UNICODE_OPTIONS);
+	
+	/**
+	 * The CryptProtectData function performs encryption on the data in a DATA_BLOB
+	 * structure. Typically, only a user with the same logon credential as the encrypter 
+	 * can decrypt the data. In addition, the encryption and decryption usually must be
+	 * done on the same computer.
+	 * @param pDataIn
+	 *  Pointer to a DATA_BLOB structure that contains the plaintext to be encrypted. 
+	 * @param szDataDescr
+	 *  String with a readable description of the data to be encrypted. This description 
+	 *  string is included with the encrypted data. This parameter is optional and can 
+	 *  be set to NULL, except on Windows 2000.
+	 * @param pOptionalEntropy
+	 *  Pointer to a DATA_BLOB structure that contains a password or other additional 
+	 *  entropy used to encrypt the data. The DATA_BLOB structure used in the encryption 
+	 *  phase must also be used in the decryption phase. This parameter can be set to NULL
+	 *  for no additional entropy.
+	 * @param pvReserved
+	 *  Reserved for future use and must be set to NULL. 
+	 * @param pPromptStruct
+	 *  Pointer to a CRYPTPROTECT_PROMPTSTRUCT structure that provides information about 
+	 *  where and when prompts are to be displayed and what the content of those prompts 
+	 *  should be. This parameter can be set to NULL in both the encryption and decryption
+	 *  phases.
+	 * @param dwFlags
+	 *  One of CRYPTPROTECT_LOCAL_MACHINE, CRYPTPROTECT_UI_FORBIDDEN, CRYPTPROTECT_AUDIT, 
+	 *  CRYPTPROTECT_VERIFY_PROTECTION.
+	 * @param pDataOut
+	 *  Pointer to a DATA_BLOB structure that receives the encrypted data. When you have 
+	 *  finished using the DATA_BLOB structure, free its pbData member by calling the 
+	 *  LocalFree function. 
+	 * @return
+	 *  If the function succeeds, the function returns TRUE. If the function fails, 
+	 *  it returns FALSE. For extended error information, call GetLastError.
+	 */
+	public boolean CryptProtectData(DATA_BLOB pDataIn, String szDataDescr,
+			DATA_BLOB pOptionalEntropy, Pointer pvReserved, 
+			CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
+			int dwFlags,
+			DATA_BLOB pDataOut);
+	
+	/**
+	 * The CryptUnprotectData function decrypts and does an integrity check of the data in
+	 * a DATA_BLOB structure. Usually, only a user with the same logon credentials as the
+	 * encrypter can decrypt the data. In addition, the encryption and decryption must be
+	 * done on the same computer.  
+	 * @param pDataIn
+	 *  Pointer to a DATA_BLOB structure that holds the encrypted data. The DATA_BLOB 
+	 *  structure's cbData member holds the length of the pbData member's byte string that 
+	 *  contains the text to be encrypted.  
+	 * @param szDataDescr
+	 *  Pointer to a string-readable description of the encrypted data included with the 
+	 *  encrypted data. This parameter can be set to NULL. When you have finished using 
+	 *  ppszDataDescr, free it by calling the LocalFree function. 
+	 * @param pOptionalEntropy
+	 *  Pointer to a DATA_BLOB structure that contains a password or other additional 
+	 *  entropy used when the data was encrypted. This parameter can be set to NULL; 
+	 *  however, if an optional entropy DATA_BLOB structure was used in the encryption 
+	 *  phase, that same DATA_BLOB structure must be used for the decryption phase.
+	 * @param pvReserved
+	 *  Reserved for future use; must be set to NULL. 
+	 * @param pPromptStruct
+	 *  Pointer to a CRYPTPROTECT_PROMPTSTRUCT structure that provides information about 
+	 *  where and when prompts are to be displayed and what the content of those prompts 
+	 *  should be. This parameter can be set to NULL. 
+ 	 * @param dwFlags
+	 *  DWORD value that specifies options for this function. This parameter can be zero, 
+	 *  in which case no option is set, or CRYPTPROTECT_UI_FORBIDDEN. 
+	 * @param pDataOut
+	 *  Pointer to a DATA_BLOB structure where the function stores the decrypted data. 
+	 *  When you have finished using the DATA_BLOB structure, free its pbData member by
+	 *  calling the LocalFree function. 
+	 * @return
+	 *  If the function succeeds, the return value is TRUE. If the function fails, the 
+	 *  return value is FALSE.
+	 */
+	public boolean CryptUnprotectData(DATA_BLOB pDataIn, PointerByReference szDataDescr,
+			DATA_BLOB pOptionalEntropy, Pointer pvReserved, 
+			CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
+			int dwFlags,
+			DATA_BLOB pDataOut);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Crypt32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Crypt32Util.java
new file mode 100644
index 0000000..82024cd
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Crypt32Util.java
@@ -0,0 +1,140 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.WinCrypt.CRYPTPROTECT_PROMPTSTRUCT;
+import com.sun.jna.platform.win32.WinCrypt.DATA_BLOB;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * Crypt32 utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Crypt32Util {
+
+	/**
+	 * Protect a blob of data.
+	 * @param data
+	 *  Data to protect.
+	 * @return
+	 *  Protected data.
+	 */
+	public static byte[] cryptProtectData(byte[] data) {
+		return cryptProtectData(data, 0);
+	}
+
+	/**
+	 * Protect a blob of data with optional flags.
+	 * @param data
+	 *  Data to protect.
+	 * @param flags
+	 *  Optional flags, eg. CRYPTPROTECT_LOCAL_MACHINE | CRYPTPROTECT_UI_FORBIDDEN.
+	 * @return
+	 *  Protected data.
+	 */
+	public static byte[] cryptProtectData(byte[] data, int flags) {
+		return cryptProtectData(data, null, flags, "", null);
+	}
+	
+	/**
+	 * Protect a blob of data.
+	 * @param data
+	 *  Data to protect.
+	 * @param entropy
+	 *  Optional entropy.
+	 * @param flags
+	 *  Optional flags.
+	 * @param description
+	 *  Optional description.
+	 * @param prompt
+	 *  Prompt structure.
+	 * @return
+	 *  Protected bytes.
+	 */
+	public static byte[] cryptProtectData(byte[] data, byte[] entropy, int flags, 
+			String description, CRYPTPROTECT_PROMPTSTRUCT prompt) {
+    	DATA_BLOB pDataIn = new DATA_BLOB(data);
+    	DATA_BLOB pDataProtected = new DATA_BLOB();
+    	DATA_BLOB pEntropy = (entropy == null) ? null : new DATA_BLOB(entropy);
+    	try {
+	    	if (! Crypt32.INSTANCE.CryptProtectData(pDataIn, description, 
+	    			pEntropy, null, prompt, flags, pDataProtected)) {
+	    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+	    	}
+	    	return pDataProtected.getData();
+    	} finally {
+    		if (pDataProtected.pbData != null) {
+    			Kernel32.INSTANCE.LocalFree(pDataProtected.pbData);
+    		}
+    	}
+	}
+	
+	/**
+	 * Unprotect a blob of data.
+	 * @param data
+	 *  Data to unprotect.
+	 * @return
+	 *  Unprotected blob of data.
+	 */
+	public static byte[] cryptUnprotectData(byte[] data) {
+		return cryptUnprotectData(data, 0);
+	}
+
+	/**
+	 * Unprotect a blob of data.
+	 * @param data
+	 *  Data to unprotect.
+	 * @param flags
+	 *  Optional flags, eg. CRYPTPROTECT_UI_FORBIDDEN.
+	 * @return
+	 *  Unprotected blob of data.
+	 */
+	public static byte[] cryptUnprotectData(byte[] data, int flags) {
+		return cryptUnprotectData(data, null, flags, null);
+	}
+	
+	/**
+	 * Unprotect a blob of data.
+	 * @param data
+	 *  Data to unprotect.
+	 * @param entropy
+	 *  Optional entropy.
+	 * @param flags
+	 *  Optional flags.
+	 * @param prompt
+	 *  Optional prompt structure.
+	 * @return
+	 *  Unprotected blob of data.
+	 */
+	public static byte[] cryptUnprotectData(byte[] data, byte[] entropy, int flags, 
+			CRYPTPROTECT_PROMPTSTRUCT prompt) {
+    	DATA_BLOB pDataIn = new DATA_BLOB(data);
+    	DATA_BLOB pDataUnprotected = new DATA_BLOB();
+    	DATA_BLOB pEntropy = (entropy == null) ? null : new DATA_BLOB(entropy);
+    	PointerByReference pDescription = new PointerByReference();
+    	try {
+	    	if (! Crypt32.INSTANCE.CryptUnprotectData(pDataIn, pDescription, 
+	    			pEntropy, null, prompt, flags, pDataUnprotected)) {
+	    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+	    	}
+	    	return pDataUnprotected.getData();
+    	} finally {
+    		if (pDataUnprotected.pbData != null) {
+    			Kernel32.INSTANCE.LocalFree(pDataUnprotected.pbData);
+    		}
+    		if (pDescription.getValue() != null) {
+    			Kernel32.INSTANCE.LocalFree(pDescription.getValue());
+    		}
+    	}
+	}
+}
\ No newline at end of file
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/DsGetDC.java b/contrib/platform/src/com/sun/jna/platform/win32/DsGetDC.java
new file mode 100644
index 0000000..2fa9b04
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/DsGetDC.java
@@ -0,0 +1,225 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.WString;
+import com.sun.jna.platform.win32.Guid.GUID;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.win32.StdCallLibrary;
+
+
+/**
+ * Ported from DsGetDC.h.
+ * Windows SDK 6.0a
+ * @author dblock[at]dblock.org 
+ */
+public interface DsGetDC extends StdCallLibrary {
+	
+	/**
+	 * The DOMAIN_CONTROLLER_INFO structure is used with the DsGetDcName 
+	 * function to receive data about a domain controller.
+	 */
+	public static class DOMAIN_CONTROLLER_INFO extends Structure {
+	    
+		public static class ByReference extends DOMAIN_CONTROLLER_INFO implements Structure.ByReference {
+
+		}
+		
+		public DOMAIN_CONTROLLER_INFO() {
+			
+		}
+		
+		public DOMAIN_CONTROLLER_INFO(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a null-terminated WString that specifies the computer name 
+		 * of the discovered domain controller. The returned computer name is 
+		 * prefixed with "\\". The DNS-style name, for example, "\\phoenix.fabrikam.com", 
+		 * is returned, if available. If the DNS-style name is not available, the 
+		 * flat-style name (for example, "\\phoenix") is returned. This example would apply 
+		 * if the domain is a Windows NT 4.0 domain or if the domain does not support the 
+		 * IP family of protocols.
+		 */
+	    public WString DomainControllerName;
+	    /**
+	     * Pointer to a null-terminated WString that specifies the address of the discovered 
+	     * domain controller. The address is prefixed with "\\". This WString is one of the
+	     * types defined by the DomainControllerAddressType member.
+	     */
+	    public WString DomainControllerAddress;
+	    /**
+	     * Indicates the type of WString that is contained in the DomainControllerAddress member.
+	     */
+	    public int DomainControllerAddressType;
+	    /**
+	     * The GUID of the domain. This member is zero if the domain controller does not have 
+	     * a Domain GUID; for example, the domain controller is not a Windows 2000 domain 
+	     * controller.
+	     */
+	    public GUID DomainGuid;
+	    /**
+	     * Pointer to a null-terminated WString that specifies the name of the domain. The 
+	     * DNS-style name, for example, "fabrikam.com", is returned if available. Otherwise, 
+	     * the flat-style name, for example, "fabrikam", is returned. This name may be different 
+	     * than the requested domain name if the domain has been renamed.
+	     */
+	    public WString DomainName;
+	    /**
+	     * Pointer to a null-terminated WString that specifies the name of the domain at the root 
+	     * of the DS tree. The DNS-style name, for example, "fabrikam.com", is returned if 
+	     * available. Otherwise, the flat-style name, for example, "fabrikam" is returned.
+	     */
+	    public WString DnsForestName;
+	    /**
+	     * Contains a set of flags that describe the domain controller. 
+	     */
+	    public int Flags;
+	    /**
+	     * Pointer to a null-terminated WString that specifies the name of the site where the 
+	     * domain controller is located. This member may be NULL if the domain controller is 
+	     * not in a site; for example, the domain controller is a Windows NT 4.0 domain 
+	     * controller.
+	     */
+	    public WString DcSiteName;
+	    /**
+	     * Pointer to a null-terminated WString that specifies the name of the site that the 
+	     * computer belongs to. The computer is specified in the ComputerName parameter passed 
+	     * to DsGetDcName. This member may be NULL if the site that contains the computer 
+	     * cannot be found; for example, if the DS administrator has not associated the 
+	     * subnet that the computer is in with a valid site.
+	     */
+	    public WString ClientSiteName;
+	}	
+	
+	/**
+	 * Pointer to DOMAIN_CONTROLLER_INFO.
+	 */
+	public static class PDOMAIN_CONTROLLER_INFO extends Structure {
+
+		public static class ByReference extends PDOMAIN_CONTROLLER_INFO implements Structure.ByReference {
+
+		}
+
+		public DOMAIN_CONTROLLER_INFO.ByReference dci;
+	}
+	
+	/**
+	 * Domain is a member of the forest.
+	 */
+	public static final int DS_DOMAIN_IN_FOREST = 0x0001;
+	/**
+	 * Domain is directly trusted.
+	 */
+	public static final int DS_DOMAIN_DIRECT_OUTBOUND = 0x0002;
+	/**
+	 * Domain is root of a tree in the forest.
+	 */
+	public static final int DS_DOMAIN_TREE_ROOT = 0x0004; 
+	/**
+	 * Domain is the primary domain of queried server.
+	 */
+	public static final int DS_DOMAIN_PRIMARY = 0x0008;
+	/**
+	 * Primary domain is running in native mode.
+	 */
+	public static final int DS_DOMAIN_NATIVE_MODE = 0x0010;
+	/**
+	 * Domain is directly trusting.
+	 */
+	public static final int DS_DOMAIN_DIRECT_INBOUND = 0x0020;
+	/**
+	 * Valid domain flags.
+	 */
+	public static final int DS_DOMAIN_VALID_FLAGS = 
+		DS_DOMAIN_IN_FOREST       |
+	    DS_DOMAIN_DIRECT_OUTBOUND |
+	    DS_DOMAIN_TREE_ROOT       |
+	    DS_DOMAIN_PRIMARY         |
+	    DS_DOMAIN_NATIVE_MODE     |
+	    DS_DOMAIN_DIRECT_INBOUND;
+
+	/**
+	 * The DS_DOMAIN_TRUSTS structure is used with the DsEnumerateDomainTrusts function to 
+	 * contain trust data for a domain.
+	 */
+	public static class DS_DOMAIN_TRUSTS extends Structure {
+			
+		public static class ByReference extends DS_DOMAIN_TRUSTS implements Structure.ByReference {
+
+		}
+		
+		/**
+		 * Pointer to a null-terminated string that contains the NetBIOS name of the domain.
+		 */
+	    public WString NetbiosDomainName;
+	    /**
+	     * Pointer to a null-terminated string that contains the DNS name of the domain. This member may be NULL.
+	     */
+	    public WString DnsDomainName;
+	    /**
+	     * Contains a set of flags that specify more data about the domain trust.
+	     */	    
+	    public NativeLong Flags;
+	    /**
+	     * Contains the index in the Domains array returned by the DsEnumerateDomainTrusts function that 
+	     * corresponds to the parent domain of the domain represented by this structure.
+	     */
+	    public NativeLong ParentIndex;
+	    /**
+	     * Contains a value that indicates the type of trust represented by this structure.
+	     */
+	    public NativeLong TrustType;	    
+	    /**
+	     * Contains a value that indicates the attributes of the trust represented by this structure.
+	     */
+	    public NativeLong TrustAttributes;
+	    
+	    /**
+	     * Contains the security identifier of the domain represented by this structure.
+	     */
+	    public PSID.ByReference DomainSid;
+
+	    /**
+	     * Contains the GUID of the domain represented by this structure.
+	     */
+	    public GUID DomainGuid;
+	};
+	
+	/**
+	 * A pointer to an array of DS_DOMAIN_TRUSTS.
+	 */
+	public static class PDS_DOMAIN_TRUSTS extends Structure {
+		public static class ByReference extends PDS_DOMAIN_TRUSTS implements Structure.ByReference {
+
+		}
+		
+		public DS_DOMAIN_TRUSTS.ByReference t;
+		
+		/**
+		 * Returns domain trusts.
+		 * @param count
+		 *  Number of domain trusts.
+		 * @return
+		 *  An array of domain trusts.
+		 */
+		public DS_DOMAIN_TRUSTS[] getTrusts(int count) {
+			return (DS_DOMAIN_TRUSTS[]) t.toArray(count);
+		}
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/GDI32.java b/contrib/platform/src/com/sun/jna/platform/win32/GDI32.java
new file mode 100644
index 0000000..b96698e
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/GDI32.java
@@ -0,0 +1,316 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ *
+ * 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.
+ * <p/>
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.WinDef.HBITMAP;
+import com.sun.jna.platform.win32.WinDef.HDC;
+import com.sun.jna.platform.win32.WinDef.HRGN;
+import com.sun.jna.platform.win32.WinGDI.BITMAPINFO;
+import com.sun.jna.platform.win32.WinGDI.BITMAPINFOHEADER;
+import com.sun.jna.platform.win32.WinGDI.RGNDATA;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/** Definition (incomplete) of <code>gdi32.dll</code>. */
+public interface GDI32 extends StdCallLibrary {
+
+    GDI32 INSTANCE = (GDI32) Native.loadLibrary("gdi32", GDI32.class,
+                                                W32APIOptions.DEFAULT_OPTIONS);
+
+    /**
+     * The ExtCreateRegion function creates a region from the specified region and transformation data.
+     * @param lpXform
+     *  Pointer to an XFORM structure that defines the transformation to be performed on the region. If this pointer is NULL, 
+     *  the identity transformation is used. 
+     * @param nCount
+     *  Specifies the number of bytes pointed to by lpRgnData.
+     * @param lpRgnData
+     *  Pointer to a RGNDATA structure that contains the region data in logical units.
+     * @return
+     *  If the function succeeds, the return value is the value of the region.
+     *  If the function fails, the return value is NULL. 
+     *  To get extended error information, call GetLastError.
+     */
+    public HRGN ExtCreateRegion(Pointer lpXform, int nCount, RGNDATA lpRgnData);
+
+    /**
+     * The CombineRgn function combines two regions and stores the result in a third region. 
+     * The two regions are combined according to the specified mode.
+     * @param hrgnDest
+     *  Handle to a new region with dimensions defined by combining two other regions.
+     * @param hrgnSrc1
+     *  Handle to the first of two regions to be combined. 
+     * @param hrgnSrc2
+     *  Handle to the second of two regions to be combined. 
+     * @param fnCombineMode
+     *  Specifies a mode indicating how the two regions will be combined.
+     * @return
+     *  The return value specifies the type of the resulting region.
+     */
+    int CombineRgn(HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2,
+                   int fnCombineMode);
+
+    /**
+     * The CreateRectRgn function creates a rectangular region. 
+     * @param nLeftRect
+     *  Specifies the x-coordinate of the upper-left corner of the region in logical units.
+     * @param nTopRect
+     *  Specifies the y-coordinate of the upper-left corner of the region in logical units.
+     * @param nRightRect
+     *  Specifies the x-coordinate of the lower-right corner of the region in logical units. 
+     * @param nBottomRect
+     *  Specifies the y-coordinate of the lower-right corner of the region in logical units.
+     * @return
+     *  If the function succeeds, the return value is the handle to the region.
+     *  If the function fails, the return value is NULL. 
+     *  To get extended error information, call GetLastError.
+     */
+    HRGN CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect,
+                       int nBottomRect);
+
+    /**
+     * The CreateRoundRectRgn function creates a rectangular region with rounded corners. 
+     * @param nLeftRect
+     *  Specifies the x-coordinate of the upper-left corner of the region in logical units. 
+     * @param nTopRect
+     *  Specifies the y-coordinate of the upper-left corner of the region in logical units.
+     * @param nRightRect
+     *  Specifies the x-coordinate of the lower-right corner of the region in logical units.
+     * @param nBottomRect
+     *  Specifies the y-coordinate of the lower-right corner of the region in logical units.
+     * @param nWidthEllipse
+     *  Specifies the width of the ellipse used to create the rounded corners in logical units.
+     * @param nHeightEllipse
+     *  Specifies the height of the ellipse used to create the rounded corners in logical units.
+     * @return
+     *  If the function succeeds, the return value is the handle to the region.
+     *  If the function fails, the return value is NULL. 
+     *  To get extended error information, call GetLastError.
+     */
+    HRGN CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect,
+                            int nBottomRect, int nWidthEllipse, int nHeightEllipse);
+
+    /**
+     * The CreatePolyPolygonRgn function creates a region consisting of a series 
+     * of polygons. The polygons can overlap. 
+     * @param lppt
+     *  Pointer to an array of POINT structures that define the vertices of the polygons in logical units. 
+     *  The polygons are specified consecutively. Each polygon is presumed closed and each vertex is 
+     *  specified only once.
+     * @param lpPolyCounts
+     *  Pointer to an array of integers, each of which specifies the number of points in one of the polygons 
+     *  in the array pointed to by lppt. 
+     * @param nCount
+     *  Specifies the total number of integers in the array pointed to by lpPolyCounts. 
+     * @param fnPolyFillMode
+     *  Specifies the fill mode used to determine which pixels are in the region.
+     * @return
+     *  If the function succeeds, the return value is the handle to the region.
+     *  If the function fails, the return value is zero. 
+     *  To get extended error information, call GetLastError.
+     */
+    HRGN CreatePolyPolygonRgn(WinUser.POINT[] lppt, int[] lpPolyCounts,
+                              int nCount, int fnPolyFillMode);
+
+    /**
+     * The SetRectRgn function converts a region into a rectangular region with the specified coordinates. 
+     * @param hrgn
+     *  Handle to the region.
+     * @param nLeftRect
+     *  Specifies the x-coordinate of the upper-left corner of the rectangular region in logical units.
+     * @param nTopRect
+     *  Specifies the y-coordinate of the upper-left corner of the rectangular region in logical units.
+     * @param nRightRect
+     *  Specifies the x-coordinate of the lower-right corner of the rectangular region in logical units. 
+     * @param nBottomRect
+     *  Specifies the y-coordinate of the lower-right corner of the rectangular region in logical units. 
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. 
+     *  To get extended error information, call GetLastError.
+     */
+    boolean SetRectRgn(HRGN hrgn, int nLeftRect, int nTopRect, int nRightRect,
+                       int nBottomRect);
+
+    /**
+     * The SetPixel function sets the pixel at the specified coordinates to the specified color. 
+     * @param hDC
+     *  Handle to the device context.
+     * @param x
+     *  Specifies the x-coordinate, in logical units, of the point to be set. 
+     * @param y
+     *  Specifies the y-coordinate, in logical units, of the point to be set. 
+     * @param crColor
+     *  Specifies the color to be used to paint the point. To create a COLORREF color value, use the RGB macro.
+     * @return
+     *  If the function succeeds, the return value is the RGB value that the function sets the pixel to. 
+     *  This value may differ from the color specified by crColor; that occurs when an exact match for the 
+     *  specified color cannot be found. If the function fails, the return value is 1. To get extended error 
+     *  information, call GetLastError. This can be the following value.
+     */
+    int SetPixel(HDC hDC, int x, int y, int crColor);
+
+    /**
+     * The CreateCompatibleDC function creates a memory device context (DC) compatible with the specified device. 
+     * @param hDC
+     *  Handle to an existing DC. If this handle is NULL, the function creates a memory DC compatible with the 
+     *  application's current screen.
+     * @return
+     *  If the function succeeds, the return value is the handle to a memory DC.
+     *  If the function fails, the return value is NULL. 
+     *  To get extended error information, call GetLastError.
+     */
+    HDC CreateCompatibleDC(HDC hDC);
+
+    /**
+     * The DeleteDC function deletes the specified device context (DC).
+     * @param hDC
+     *  Handle to the device context. 
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. 
+     *  To get extended error information, call GetLastError.
+     */
+    boolean DeleteDC(HDC hDC);
+
+    /**
+     * The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB and, optionally,
+     * sets the bitmap bits. 
+     * @param hDC
+     *  Handle to a device context. 
+     * @param lpbmih
+     *  Pointer to a bitmap information header structure, which may be one of those shown in the following table.
+     * @param fdwInit
+     *  Specifies how the system initializes the bitmap bits.
+     * @param lpbInit
+     *  Pointer to an array of bytes containing the initial bitmap data.
+     * @param lpbmi
+     *  Pointer to a BITMAPINFO structure that describes the dimensions and color format of 
+     *  the array pointed to by the lpbInit parameter.
+     * @param fuUsage
+     *  Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, if so,
+     *  whether bmiColors contains explicit red, green, blue (RGB) values or palette indexes. The 
+     *  fuUsage parameter must be one of the following values. 
+     * @return
+     *  If the function succeeds, the return value is a handle to the compatible bitmap. 
+     *  If the function fails, the return value is NULL. 
+     *  To get extended error information, call GetLastError.
+     */
+    HBITMAP CreateDIBitmap(HDC hDC, BITMAPINFOHEADER lpbmih, int fdwInit,
+                           Pointer lpbInit, BITMAPINFO lpbmi, int fuUsage);
+
+    /**
+     * The CreateDIBSection function creates a DIB that applications can write to directly. 
+     * The function gives you a pointer to the location of the bitmap bit values. You can supply
+     * a handle to a file-mapping object that the function will use to create the bitmap, or you
+     * can let the system allocate the memory for the bitmap.
+     * @param hDC
+     *  Handle to a device context. If the value of iUsage is DIB_PAL_COLORS, the function uses this
+     *  device context's logical palette to initialize the DIB colors.
+     * @param pbmi
+     *  Pointer to a BITMAPINFO structure that specifies various attributes of the DIB, including 
+     *  the bitmap dimensions and colors. 
+     * @param iUsage
+     *  Specifies the type of data contained in the bmiColors array member of the BITMAPINFO structure 
+     *  pointed to by pbmi (either logical palette indexes or literal RGB values). 
+     * @param ppvBits
+     *  Pointer to a variable that receives a pointer to the location of the DIB bit values.
+     * @param hSection
+     *  Handle to a file-mapping object that the function will use to create the DIB. This parameter can be NULL.
+     * @param dwOffset
+     *  Specifies the offset from the beginning of the file-mapping object referenced by hSection where storage 
+     *  for the bitmap bit values is to begin.
+     * @return
+     *  Specifies the offset from the beginning of the file-mapping object referenced by hSection where storage 
+     *  for the bitmap bit values is to begin.
+     */
+    HBITMAP CreateDIBSection(HDC hDC, BITMAPINFO pbmi, int iUsage,
+                             PointerByReference ppvBits, Pointer hSection, int dwOffset);
+
+    /**
+     * The CreateCompatibleBitmap function creates a bitmap compatible with the device that is
+     * associated with the specified device context. 
+     * @param hDC
+     *  Handle to a device context. 
+     * @param width
+     *  Specifies the bitmap width, in pixels. 
+     * @param height
+     *  Specifies the bitmap height, in pixels. 
+     * @return
+     *  If the function succeeds, the return value is a handle to the compatible bitmap (DDB).
+     *  If the function fails, the return value is NULL. 
+     *  To get extended error information, call GetLastError.
+     */
+    HBITMAP CreateCompatibleBitmap(HDC hDC, int width, int height);
+
+    /**
+     * The SelectObject function selects an object into the specified device context (DC). 
+     * The new object replaces the previous object of the same type. 
+     * @param hDC
+     *  Handle to the DC. 
+     * @param hGDIObj
+     *  Handle to the object to be selected.
+     * @return
+     *  If the selected object is not a region and the function succeeds, the return value 
+     *  is a handle to the object being replaced. If the selected object is a region and the 
+     *  function succeeds, the return value is one of the REGION values. 
+     */
+    HANDLE SelectObject(HDC hDC, HANDLE hGDIObj);
+
+    /**
+     * The DeleteObject function deletes a logical pen, brush, font, bitmap, region, or palette, 
+     * freeing all system resources associated with the object. After the object is deleted, the 
+     * specified handle is no longer valid.
+     * @param hObject
+     *  Handle to a logical pen, brush, font, bitmap, region, or palette. 
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the specified handle is not valid or is currently selected into a DC, the return value is zero. 
+     *  To get extended error information, call GetLastError.
+     */
+    boolean DeleteObject(HANDLE hObject);
+
+    /** The GetDeviceCaps function retrieves device-specific information for
+     * the specified device.
+     * @param hdc A handle to the DC.
+     * @param nIndex The item to be returned.  
+     * @return
+     *  The return value specifies the value of the desired item.  When
+     *  <i>nIndex</i> is <code>BITSPIXEL</code> and the device has 15bpp or
+     *  16bpp, the return value is 16.
+     */
+    int GetDeviceCaps(HDC hdc, int nIndex);
+
+    /** The GetDIBits function retrieves the bits fo the specified compatible
+     * bitmap and copies them into a buffer as a DIB using the specified
+     * format. 
+     * @param hdc A handle to the device context.
+     * @param hbmp A handle to the bitmap.  This must be a compatible bitmap
+     * (DDB). 
+     * @param uStartScan The first scan line to retrieve
+     * @param cScanLines The number of scan lines to retrieve.
+     * @param lpvBits A pointer to a buffer to receive the bitmap data.  If
+     * this parameter is <code>null</code>, the function passes the dimensions
+     * and format of the bitmap to the {@link BITMAPINFO} structure pointed to
+     * by the <i>lpbi</i> parameter.
+     * @param lpbi A pointer to a {@link BITMAPINFO} structure that specifies
+     * the desired format for the DIB data.
+     * @param uUsage The format of the bmiColors member of the {@link
+     * BITMAPINFO} structure.  
+     */
+    int GetDIBits(HDC hdc, HBITMAP hbmp, int uStartScan, int cScanLines, Pointer lpvBits, BITMAPINFO lpbi, int uUsage);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Guid.java b/contrib/platform/src/com/sun/jna/platform/win32/Guid.java
new file mode 100644
index 0000000..f1c531b
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Guid.java
@@ -0,0 +1,52 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from Guid.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface Guid extends StdCallLibrary {
+	
+	public static class GUID extends Structure {
+		
+		public static class ByReference extends GUID implements Structure.ByReference {
+			public ByReference() {
+				
+			}
+			
+			public ByReference(Pointer memory) {
+				super(memory);
+			}
+		}
+		
+		public GUID() {
+			
+		}
+		    
+		public GUID(Pointer memory) {
+			useMemory(memory);
+		    read();
+		}
+		    
+		public int Data1;
+		public short Data2;
+		public short Data3;
+		public byte[] Data4 = new byte[8];
+	}	
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java b/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
new file mode 100644
index 0000000..5c1f15a
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
@@ -0,0 +1,848 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ *
+ * 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.
+ * <p/>
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import java.nio.Buffer;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.WinBase.MEMORYSTATUSEX;
+import com.sun.jna.platform.win32.WinBase.SYSTEM_INFO;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinDef.HMODULE;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.platform.win32.WinNT.LARGE_INTEGER;
+import com.sun.jna.platform.win32.WinNT.OSVERSIONINFO;
+import com.sun.jna.platform.win32.WinNT.OSVERSIONINFOEX;
+import com.sun.jna.ptr.ByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/** Definition (incomplete) of <code>kernel32.dll</code>. */
+public interface Kernel32 extends StdCallLibrary {
+
+    Kernel32 INSTANCE = (Kernel32) Native.loadLibrary("kernel32", Kernel32.class, 
+    		W32APIOptions.UNICODE_OPTIONS);
+
+    /**
+     * Frees the specified local memory object and invalidates its handle.
+     * @param hLocal
+     *  A handle to the local memory object.
+     * @return 
+     * 	If the function succeeds, the return value is NULL.
+     * 	If the function fails, the return value is equal to a handle to the local memory object.
+     *  To get extended error information, call GetLastError.
+     */
+    Pointer LocalFree(Pointer hLocal);
+    
+    /**
+     * Frees the specified global memory object and invalidates its handle.
+     * @param hGlobal 
+     *  A handle to the global memory object. 
+     * @return 
+     * 	If the function succeeds, the return value is NULL
+     * 	If the function fails, the return value is equal to a handle to the global memory object.
+     *  To get extended error information, call GetLastError.
+     */
+    Pointer GlobalFree(Pointer hGlobal);
+
+    /**
+     * The GetModuleHandle function retrieves a module handle for the specified module 
+     * if the file has been mapped into the address space of the calling process.
+     * @param name
+     *  Pointer to a null-terminated string that contains the name of the module 
+     *  (either a .dll or .exe file). 
+     * @return
+     *  If the function succeeds, the return value is a handle to the specified module. 
+     *  If the function fails, the return value is NULL. To get extended error 
+     *  information, call GetLastError.
+     */
+    HMODULE GetModuleHandle(String name);
+    
+    /**
+     * The GetSystemTime function retrieves the current system date and time. 
+     * The system time is expressed in Coordinated Universal Time (UTC).
+     * @param lpSystemTime
+     *  Pointer to a SYSTEMTIME structure to receive the current system date and time. 
+     */
+    void GetSystemTime(WinBase.SYSTEMTIME lpSystemTime);
+    
+    /**
+     * The GetCurrentThreadId function retrieves the thread identifier of the calling thread.
+     * @return The return value is the thread identifier of the calling thread.
+     */
+    int GetCurrentThreadId();
+    
+    /**
+     * The GetCurrentThread function retrieves a pseudo handle for the current thread.
+     * @return The return value is a pseudo handle for the current thread.
+     */
+    HANDLE GetCurrentThread();
+    
+    /**
+     * This function returns the process identifier of the calling process. 
+     * @return The return value is the process identifier of the calling process.
+     */
+    int GetCurrentProcessId();
+    
+    /**
+     * This function returns a pseudohandle for the current process. 
+     * @return The return value is a pseudohandle to the current process. 
+     */
+    HANDLE GetCurrentProcess();
+    
+    /**
+     * The GetProcessId function retrieves the process identifier of the 
+     * specified process.
+     * @param process
+     *  Handle to the process. The handle must have the PROCESS_QUERY_INFORMATION access right. 
+     * @return
+     *  If the function succeeds, the return value is the process identifier of the 
+     *  specified process. If the function fails, the return value is zero. To get
+     *  extended error information, call GetLastError.
+     */
+    int GetProcessId(HANDLE process);
+    
+    /**
+     * The GetProcessVersion function retrieves the major and minor version numbers of the system 
+     * on which the specified process expects to run.
+     * @param processId
+     *  Process identifier of the process of interest. A value of zero specifies the 
+     *  calling process. 
+     * @return
+     *  If the function succeeds, the return value is the version of the system on 
+     *  which the process expects to run. The high word of the return value contains 
+     *  the major version number. The low word of the return value contains the minor
+     *  version number. If the function fails, the return value is zero. To get extended
+     *  error information, call GetLastError. The function fails if ProcessId is an 
+     *  invalid value.
+     */
+    int GetProcessVersion(int processId);
+    
+    /**
+     * The GetLastError function retrieves the calling thread's last-error code value.
+     * The last-error code is maintained on a per-thread basis. Multiple threads do not
+     * overwrite each other's last-error code.
+     * @return
+     *  The return value is the calling thread's last-error code value.
+     */
+    int GetLastError();
+    
+    /**
+     * The SetLastError function sets the last-error code for the calling thread.
+     * @param dwErrCode
+     *  Last-error code for the thread. 
+     */
+    void SetLastError(int dwErrCode);
+    
+    /**
+     * The GetDriveType function determines whether a disk drive is a removable,
+     * fixed, CD-ROM, RAM disk, or network drive.
+     * @param lpRootPathName
+     *  Pointer to a null-terminated string that specifies the root directory of
+     *  the disk to return information about. A trailing backslash is required. 
+     *  If this parameter is NULL, the function uses the root of the current directory.
+     * @return
+     *  The return value specifies the type of drive.
+     */
+    int GetDriveType(String lpRootPathName);
+
+    /**
+     * The FormatMessage function formats a message string. The function requires a
+     * message definition as input. The message definition can come from a buffer 
+     * passed into the function. It can come from a message table resource in an 
+     * already-loaded module. Or the caller can ask the function to search the 
+     * system's message table resource(s) for the message definition. The function 
+     * finds the message definition in a message table resource based on a message 
+     * identifier and a language identifier. The function copies the formatted message 
+     * text to an output buffer, processing any embedded insert sequences if requested.
+     * @param dwFlags
+     *  Formatting options, and how to interpret the lpSource parameter. The low-order
+     *  byte of dwFlags specifies how the function handles line breaks in the output 
+     *  buffer. The low-order byte can also specify the maximum width of a formatted
+     *  output line. 
+     * @param lpSource
+     *  Location of the message definition.
+     * @param dwMessageId
+     *  Message identifier for the requested message.
+     * @param dwLanguageId
+     *  Language identifier for the requested message.
+     * @param lpBuffer
+     *  Pointer to a buffer that receives the null-terminated string that specifies the 
+     *  formatted message.
+     * @param nSize
+     *  If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies
+     *  the size of the output buffer, in TCHARs. If FORMAT_MESSAGE_ALLOCATE_BUFFER is 
+     *  set, this parameter specifies the minimum number of TCHARs to allocate for an 
+     *  output buffer.
+     * @param va_list
+     *  Pointer to an array of values that are used as insert values in the formatted message.
+     * @return
+     * 	If the function succeeds, the return value is the number of TCHARs stored in 
+     * 	the output buffer, excluding the terminating null character. If the function 
+     * 	fails, the return value is zero. To get extended error information, call 
+     *  GetLastError.
+     */
+    int FormatMessage(int dwFlags, Pointer lpSource, int dwMessageId,
+                      int dwLanguageId, PointerByReference lpBuffer,
+                      int nSize, Pointer va_list);
+    
+    /**
+     * The FormatMessage function formats a message string. The function requires a
+     * message definition as input. The message definition can come from a buffer 
+     * passed into the function. It can come from a message table resource in an 
+     * already-loaded module. Or the caller can ask the function to search the 
+     * system's message table resource(s) for the message definition. The function 
+     * finds the message definition in a message table resource based on a message 
+     * identifier and a language identifier. The function copies the formatted message 
+     * text to an output buffer, processing any embedded insert sequences if requested.
+     * @param dwFlags
+     *  Formatting options, and how to interpret the lpSource parameter. The low-order
+     *  byte of dwFlags specifies how the function handles line breaks in the output 
+     *  buffer. The low-order byte can also specify the maximum width of a formatted
+     *  output line. 
+     * @param lpSource
+     *  Location of the message definition.
+     * @param dwMessageId
+     *  Message identifier for the requested message.
+     * @param dwLanguageId
+     *  Language identifier for the requested message.
+     * @param lpBuffer
+     *  Pointer to a buffer that receives the null-terminated string that specifies the 
+     *  formatted message.
+     * @param nSize
+     *  If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies
+     *  the size of the output buffer, in TCHARs. If FORMAT_MESSAGE_ALLOCATE_BUFFER is 
+     *  set, this parameter specifies the minimum number of TCHARs to allocate for an 
+     *  output buffer.
+     * @param va_list
+     *  Pointer to an array of values that are used as insert values in the formatted message.
+     * @return
+     * 	If the function succeeds, the return value is the number of TCHARs stored in 
+     * 	the output buffer, excluding the terminating null character. If the function 
+     * 	fails, the return value is zero. To get extended error information, call 
+     *  GetLastError.
+     */
+    int FormatMessage(int dwFlags, Pointer lpSource, int dwMessageId,
+                      int dwLanguageId, Buffer lpBuffer,
+                      int nSize, Pointer va_list);
+
+    /**
+     * The CreateFile function creates or opens a file, file stream, directory, physical
+     * disk, volume, console buffer, tape drive, communications resource, mailslot, or 
+     * named pipe. The function returns a handle that can be used to access an object.
+     * @param lpFileName
+     *  A pointer to a null-terminated string that specifies the name of an object to create or open. 
+     * @param dwDesiredAccess
+     *  The access to the object, which can be read, write, or both.
+     * @param dwShareMode
+     *  The sharing mode of an object, which can be read, write, both, or none.
+     * @param lpSecurityAttributes
+     *  A pointer to a SECURITY_ATTRIBUTES structure that determines whether or not 
+     *  the returned handle can be inherited by child processes.  If lpSecurityAttributes 
+     *  is NULL, the handle cannot be inherited. 
+     * @param dwCreationDisposition
+     *  An action to take on files that exist and do not exist. 
+     * @param dwFlagsAndAttributes
+     *  The file attributes and flags. 
+     * @param hTemplateFile
+     *  Handle to a template file with the GENERIC_READ access right. The template file
+     *  supplies file attributes and extended attributes for the file that is being 
+     *  created. This parameter can be NULL.
+     * @return
+     * 	If the function succeeds, the return value is an open handle to a specified file.
+     *  If a specified file exists before the function call and dwCreationDisposition is
+     *  CREATE_ALWAYS or OPEN_ALWAYS, a call to GetLastError returns ERROR_ALREADY_EXISTS,
+     *  even when the function succeeds. If a file does not exist before the call, 
+     *  GetLastError returns 0 (zero). If the function fails, the return value is 
+     *  INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
+     */
+    HANDLE CreateFile(String lpFileName, int dwDesiredAccess, int dwShareMode, 
+    		WinNT.SECURITY_ATTRIBUTES lpSecurityAttributes, int dwCreationDisposition, 
+    		int dwFlagsAndAttributes, HANDLE hTemplateFile);
+        
+    
+    /**
+     * The CreateDirectory function creates a new directory. If the underlying file
+     * system supports security on files and directories, the function applies a 
+     * specified security descriptor to the new directory.
+     * @param lpPathName
+     *  Pointer to a null-terminated string that specifies the path of the directory 
+     *  to be created. 
+     * @param lpSecurityAttributes
+     *  Pointer to a SECURITY_ATTRIBUTES structure. The lpSecurityDescriptor member 
+     *  of the structure specifies a security descriptor for the new directory. If 
+     *  lpSecurityAttributes is NULL, the directory gets a default security descriptor. 
+     * @return
+     *  If the function succeeds, the return value is nonzero. If the function fails, 
+     *  the return value is zero. To get extended error information, call GetLastError. 
+     */
+    boolean CreateDirectory(String lpPathName, 
+    		WinNT.SECURITY_ATTRIBUTES lpSecurityAttributes);
+
+    /**
+     * Creates an input/output (I/O) completion port and associates it with a specified
+     * file handle, or creates an I/O completion port that is not yet associated with a
+     * file handle, allowing association at a later time.
+     * @param FileHandle
+     *  An open file handle or INVALID_HANDLE_VALUE.
+     * @param ExistingCompletionPort
+     *  A handle to an existing I/O completion port or NULL.
+     * @param CompletionKey
+     *  The per-handle user-defined completion key that is included in every I/O completion 
+     *  packet for the specified file handle.
+     * @param NumberOfConcurrentThreads
+     * 	The maximum number of threads that the operating system can allow to concurrently 
+     * 	process I/O completion packets for the I/O completion port.
+     * @return
+     * 	If the function succeeds, the return value is the handle to an I/O completion port:
+     *   If the ExistingCompletionPort parameter was NULL, the return value is a new handle.
+     *   If the ExistingCompletionPort parameter was a valid I/O completion port handle, the return value is that same handle.
+     *   If the FileHandle parameter was a valid handle, that file handle is now associated with the returned I/O completion port.
+     *   If the function fails, the return value is NULL. To get extended error information, call the GetLastError function.
+     */
+    HANDLE CreateIoCompletionPort(HANDLE FileHandle, HANDLE ExistingCompletionPort,
+    		Pointer CompletionKey, int NumberOfConcurrentThreads);
+
+    /**
+     * Attempts to dequeue an I/O completion packet from the specified I/O completion 
+     * port. If there is no completion packet queued, the function waits for a pending 
+     * I/O operation associated with the completion port to complete.
+     * @param CompletionPort
+     *  A handle to the completion port.
+     * @param lpNumberOfBytes
+     *  A pointer to a variable that receives the number of bytes transferred during 
+     *  an I/O operation that has completed.
+     * @param lpCompletionKey
+     *  A pointer to a variable that receives the completion key value associated with 
+     *  the file handle whose I/O operation has completed.
+     * @param lpOverlapped
+     *  A pointer to a variable that receives the address of the OVERLAPPED structure 
+     *  that was specified when the completed I/O operation was started. 
+     * @param dwMilliseconds
+     *  The number of milliseconds that the caller is willing to wait for a completion 
+     *  packet to appear at the completion port. 
+     * @return
+     *  Returns nonzero (TRUE) if successful or zero (FALSE) otherwise.
+     */
+    boolean GetQueuedCompletionStatus(HANDLE CompletionPort, 
+    		IntByReference lpNumberOfBytes, ByReference lpCompletionKey, 
+    		PointerByReference lpOverlapped, int dwMilliseconds);
+
+    /**
+     * Posts an I/O completion packet to an I/O completion port.
+     * @param CompletionPort
+     *  A handle to an I/O completion port to which the I/O completion packet is to be posted.
+     * @param dwNumberOfBytesTransferred
+     *  The value to be returned through the lpNumberOfBytesTransferred parameter of the GetQueuedCompletionStatus function.
+     * @param dwCompletionKey
+     *  The value to be returned through the lpCompletionKey parameter of the GetQueuedCompletionStatus function.
+     * @param lpOverlapped
+     *  The value to be returned through the lpOverlapped parameter of the GetQueuedCompletionStatus function.
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. To get extended error information, call GetLastError .
+     */
+    boolean PostQueuedCompletionStatus(HANDLE CompletionPort,
+    		int dwNumberOfBytesTransferred, Pointer dwCompletionKey,
+    		WinBase.OVERLAPPED lpOverlapped);
+    
+    /**
+     * Waits until the specified object is in the signaled state or the time-out interval elapses.
+	 * To enter an alertable wait state, use the WaitForSingleObjectEx function. 
+	 * To wait for multiple objects, use the WaitForMultipleObjects.
+	 * @param hHandle 
+	 *  A handle to the object. For a list of the object types whose handles can be specified, see the following Remarks section.
+	 *  If this handle is closed while the wait is still pending, the function's behavior is undefined.
+	 *	The handle must have the SYNCHRONIZE access right. For more information, see Standard Access Rights.
+     * @param dwMilliseconds
+     * 	The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the object is signaled or the interval elapses. 
+     * 	If dwMilliseconds is zero, the function does not enter a wait state if the object is not signaled; it always returns immediately. 
+     * 	If dwMilliseconds is INFINITE, the function will return only when the object is signaled.
+     * @return	
+     *  If the function succeeds, the return value indicates the event that caused the function to return.
+     */    
+    int WaitForSingleObject(HANDLE hHandle, int dwMilliseconds);
+    
+    /**
+     * Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses.
+     * To enter an alertable wait state, use the WaitForMultipleObjectsEx function.
+     * @param nCount 
+     * 	The number of object handles in the array pointed to by lpHandles. The maximum number of object handles is MAXIMUM_WAIT_OBJECTS.
+     * @param hHandle
+     * 	An array of object handles. For a list of the object types whose handles can be specified, see the following Remarks section. The array can contain handles to objects of different types. 
+     * 	It may not contain multiple copies of the same handle.
+     * 	If one of these handles is closed while the wait is still pending, the function's behavior is undefined.
+     * 	The handles must have the SYNCHRONIZE access right. For more information, see Standard Access Rights.
+     * @param bWaitAll
+     * 	If this parameter is TRUE, the function returns when the state of all objects in the lpHandles array is signaled. 
+     * 	If FALSE, the function returns when the state of any one of the objects is set to signaled. 
+     * 	In the latter case, the return value indicates the object whose state caused the function to return.
+     * @param dwMilliseconds
+     *  The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the specified objects are signaled or the interval elapses. 
+     * 	If dwMilliseconds is zero, the function does not enter a wait state if the specified objects are not signaled; it always returns immediately. 
+     * 	If dwMilliseconds is INFINITE, the function will return only when the specified objects are signaled.
+     * @return	
+     *  If the function succeeds, the return value indicates the event that caused the function to return. 
+     */
+    int WaitForMultipleObjects(int nCount, HANDLE[] hHandle, boolean bWaitAll, int dwMilliseconds);
+    
+    /**
+     * The DuplicateHandle function duplicates an object handle. 
+     * 
+     * @param hSourceProcessHandle
+     *  Handle to the process with the handle to duplicate. 
+     *  The handle must have the PROCESS_DUP_HANDLE access right.
+     * @param hSourceHandle
+     *  Handle to duplicate. This is an open object handle that is valid in the 
+     *  context of the source process.
+     * @param hTargetProcessHandle
+     *  Handle to the process that is to receive the duplicated handle. 
+     *  The handle must have the PROCESS_DUP_HANDLE access right. 
+     * @param lpTargetHandle
+     *  Pointer to a variable that receives the duplicate handle. This handle value is valid in 
+     *  the context of the target process. If hSourceHandle is a pseudo handle returned by 
+     *  GetCurrentProcess or GetCurrentThread, DuplicateHandle converts it to a real handle to 
+     *  a process or thread, respectively.
+     * @param dwDesiredAccess
+     *  Access requested for the new handle. 
+     * @param bInheritHandle
+     *  Indicates whether the handle is inheritable.
+     * @param dwOptions
+     *  Optional actions.
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError.
+     */
+    boolean DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle,
+    		HANDLE hTargetProcessHandle, HANDLEByReference lpTargetHandle,
+    		int dwDesiredAccess, boolean bInheritHandle, int dwOptions);
+    
+    /**
+     * The CloseHandle function closes an open object handle.
+     * 
+     * @param hObject
+     *  Handle to an open object. This parameter can be a pseudo handle or INVALID_HANDLE_VALUE.
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError.
+     */
+    boolean CloseHandle(HANDLE hObject);
+    
+    // TODO: figure out how OVERLAPPED is used and apply an appropriate mapping
+    interface OVERLAPPED_COMPLETION_ROUTINE extends StdCallCallback {
+        void callback(int errorCode, int nBytesTransferred,
+        		WinBase.OVERLAPPED overlapped);
+    }
+    
+    /**
+     * Retrieves information that describes the changes within the specified directory. 
+     * The function does not report changes to the specified directory itself.
+     * Note: there's no ReadDirectoryChangesA.
+     * @param directory
+     *  A handle to the directory to be monitored. This directory must be opened with the 
+     *  FILE_LIST_DIRECTORY access right.
+     * @param info
+     *  A pointer to the DWORD-aligned formatted buffer in which the read results are to be returned.
+     * @param length
+     *  The size of the buffer that is pointed to by the lpBuffer parameter, in bytes.
+     * @param watchSubtree
+     *  If this parameter is TRUE, the function monitors the directory tree rooted at the specified
+     *  directory. If this parameter is FALSE, the function monitors only the directory specified by
+     *  the hDirectory parameter.
+     * @param notifyFilter
+     *  The filter criteria that the function checks to determine if the wait operation has completed.
+     * @param bytesReturned
+     *  For synchronous calls, this parameter receives the number of bytes transferred into the 
+     *  lpBuffer parameter. For asynchronous calls, this parameter is undefined. You must use an asynchronous 
+     *  notification technique to retrieve the number of bytes transferred.
+     * @param overlapped
+     *  A pointer to an OVERLAPPED structure that supplies data to be used during asynchronous operation. 
+     *  Otherwise, this value is NULL. The Offset and OffsetHigh members of this structure are not used.
+     * @param completionRoutine
+     * 	A pointer to a completion routine to be called when the operation has been completed or canceled and
+     *  the calling thread is in an alertable wait state.
+     * @return
+     *  If the function succeeds, the return value is nonzero. For synchronous calls, this means that the 
+     *  operation succeeded. For asynchronous calls, this indicates that the operation was successfully queued.
+     *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+     *  If the network redirector or the target file system does not support this operation, the function 
+     *  fails with ERROR_INVALID_FUNCTION.
+     */
+    public boolean ReadDirectoryChangesW(HANDLE directory, 
+    		WinNT.FILE_NOTIFY_INFORMATION info, int length, boolean watchSubtree,
+            int notifyFilter, IntByReference bytesReturned, WinBase.OVERLAPPED overlapped, 
+            OVERLAPPED_COMPLETION_ROUTINE completionRoutine);
+
+    /**
+     * Retrieves the short path form of the specified path.
+     * @param lpszLongPath
+     *  The path string. 
+     * @param lpdzShortPath
+     *  A pointer to a buffer to receive the null-terminated short form of the path that lpszLongPath specifies.
+     * @param cchBuffer
+     *  The size of the buffer that lpszShortPath points to, in TCHARs.
+     * @return
+     *  If the function succeeds, the return value is the length, in TCHARs, of the string that is copied to 
+     *  lpszShortPath, not including the terminating null character.
+     *  If the lpszShortPath buffer is too small to contain the path, the return value is the size of the buffer, 
+     *  in TCHARs, that is required to hold the path and the terminating null character. 
+     *  If the function fails for any other reason, the return value is zero. To get extended error information, 
+     *  call GetLastError.
+     */
+    int GetShortPathName(String lpszLongPath, char[] lpdzShortPath, int cchBuffer);
+
+    /**
+     * The LocalAlloc function allocates the specified number of bytes from the heap. 
+     * Windows memory management does not provide a separate local heap and global heap.
+     * @param type
+     *  Memory allocation attributes. The default is the LMEM_FIXED value.
+     * @param cbInput
+     *  Number of bytes to allocate. If this parameter is zero and the uFlags parameter 
+     *  specifies LMEM_MOVEABLE, the function returns a handle to a memory object that 
+     *  is marked as discarded. 
+     * @return
+     *  If the function succeeds, the return value is a handle to the newly allocated memory object.
+     *  If the function fails, the return value is NULL. To get extended error information, call GetLastError.
+     */
+    Pointer LocalAlloc(int type, int cbInput);
+
+    /**
+     * Writes data to the specified file or input/output (I/O) device.
+     * @param hFile
+     *  A handle to the file or I/O device (for example, a file, file stream, physical disk, volume, 
+     *  console buffer, tape drive, socket, communications resource, mailslot, or pipe). 
+     * @param lpBuffer
+     *  A pointer to the buffer containing the data to be written to the file or device.
+     * @param nNumberOfBytesToWrite
+     *  The number of bytes to be written to the file or device.
+     * @param lpNumberOfBytesWritten
+     *  A pointer to the variable that receives the number of bytes written when using a synchronous hFile parameter. 
+     * @param lpOverlapped
+     *  A pointer to an OVERLAPPED structure is required if the hFile parameter was opened with FILE_FLAG_OVERLAPPED, 
+     *  otherwise this parameter can be NULL. 
+     * @return
+     *  If the function succeeds, the return value is nonzero (TRUE).
+     *  If the function fails, or is completing asynchronously, the return value is zero (FALSE). 
+     *  To get extended error information, call the GetLastError function. 
+     */
+    boolean WriteFile(HANDLE hFile, byte[] lpBuffer, int nNumberOfBytesToWrite,
+                      IntByReference lpNumberOfBytesWritten,
+                      WinBase.OVERLAPPED lpOverlapped);
+
+    /**
+     * Creates or opens a named or unnamed event object.
+     * @param lpEventAttributes
+     *  A pointer to a SECURITY_ATTRIBUTES structure. If this parameter is NULL, 
+     *  the handle cannot be inherited by child processes.
+     * @param bManualReset
+     *  If this parameter is TRUE, the function creates a manual-reset event object,
+     *  which requires the use of the ResetEvent function to set the event state to nonsignaled. 
+     *  If this parameter is FALSE, the function creates an auto-reset event object, and system 
+     *  automatically resets the event state to nonsignaled after a single waiting thread has
+     *  been released. 
+     * @param bInitialState
+     *  If this parameter is TRUE, the initial state of the event object is signaled; otherwise, 
+     *  it is nonsignaled. 
+     * @param lpName
+     *  The name of the event object. The name is limited to MAX_PATH characters. Name comparison 
+     *  is case sensitive. 
+     * @return
+     *  If the function succeeds, the return value is a handle to the event object. If the named event 
+     *  object existed before the function call, the function returns a handle to the existing object
+     *  and GetLastError returns ERROR_ALREADY_EXISTS. 
+     *  If the function fails, the return value is NULL. To get extended error information, call GetLastError. 
+     */
+    HANDLE CreateEvent(WinNT.SECURITY_ATTRIBUTES lpEventAttributes,
+                       boolean bManualReset, boolean bInitialState,
+                       String lpName);
+
+    /**
+     * Sets the specified event object to the signaled state.
+     * @param hEvent
+     *  A handle to the event object. The CreateEvent or OpenEvent function returns this handle.
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+     */
+    boolean SetEvent(HANDLE hEvent);
+
+    /**
+     * Sets the specified event object to the signaled state and then resets it to the nonsignaled 
+     * state after releasing the appropriate number of waiting threads.
+     * @param hEvent
+     *  A handle to the event object. The CreateEvent or OpenEvent function returns this handle. 
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+     */
+    boolean PulseEvent(HANDLE hEvent);
+
+    /**
+     * Creates or opens a named or unnamed file mapping object for a specified file.
+     * @param hFile
+     *  A handle to the file from which to create a file mapping object. 
+     * @param lpAttributes
+     *  A pointer to a SECURITY_ATTRIBUTES structure that determines whether a returned handle can be inherited by child processes. The lpSecurityDescriptor member of the SECURITY_ATTRIBUTES structure specifies a security descriptor for a new file mapping object. 
+     * @param flProtect
+     *  Specifies the page protection of the file mapping object. All mapped views of the object must be compatible with this protection. 
+     * @param dwMaximumSizeHigh
+     *  The high-order DWORD of the maximum size of the file mapping object.
+     * @param dwMaximumSizeLow
+     *  The low-order DWORD of the maximum size of the file mapping object. 
+     * @param lpName
+     *  The name of the file mapping object. 
+     * @return
+     *  If the function succeeds, the return value is a handle to the newly created file mapping object.
+     *  If the object exists before the function call, the function returns a handle to the existing object (with its current size, not the specified size), and GetLastError returns ERROR_ALREADY_EXISTS. 
+     *  If the function fails, the return value is NULL. To get extended error information, call GetLastError.
+     */
+    HANDLE CreateFileMapping(HANDLE hFile, WinNT.SECURITY_ATTRIBUTES lpAttributes,
+                             int flProtect, int dwMaximumSizeHigh,
+                             int dwMaximumSizeLow, String lpName);
+
+    /**
+     * Maps a view of a file mapping into the address space of a calling process.
+     * @param hFileMappingObject
+     *  A handle to a file mapping object. The CreateFileMapping and OpenFileMapping functions return this handle.
+     * @param dwDesiredAccess
+     *  The type of access to a file mapping object, which determines the protection of the pages.
+     * @param dwFileOffsetHigh
+     *  A high-order DWORD of the file offset where the view begins.
+     * @param dwFileOffsetLow
+     *  A low-order DWORD of the file offset where the view is to begin.
+     * @param dwNumberOfBytesToMap
+     *  The number of bytes of a file mapping to map to the view. 
+     * @return
+     *  If the function succeeds, the return value is the starting address of the mapped view.
+     *  If the function fails, the return value is NULL. To get extended error information, call GetLastError.
+     */
+    Pointer MapViewOfFile(HANDLE hFileMappingObject, int dwDesiredAccess,
+                          int dwFileOffsetHigh, int dwFileOffsetLow,
+                          int dwNumberOfBytesToMap);
+
+    /**
+     * Unmaps a mapped view of a file from the calling process's address space.
+     * @param lpBaseAddress
+     *  A pointer to the base address of the mapped view of a file that is to be unmapped. 
+     * @return
+     *  If the function succeeds, the return value is the starting address of the mapped view.
+     *  If the function fails, the return value is NULL. To get extended error information, call GetLastError.
+     */
+    boolean UnmapViewOfFile(Pointer lpBaseAddress);
+    
+    /**
+     * Retrieves only the NetBIOS name of the local computer.
+     * 
+     * @param buffer 
+     * 	A pointer to a buffer that receives the computer name or the cluster virtual server
+     *  name. The buffer size should be large enough to contain MAX_COMPUTERNAME_LENGTH + 1
+     *  characters.
+     * @param lpnSize
+     * 	On input, specifies the size of the buffer, in TCHARs. On output, the number of TCHARs 
+     * 	copied to the destination buffer, not including the terminating null character. If 
+     *  the buffer is too small, the function fails and GetLastError returns 
+     *  ERROR_BUFFER_OVERFLOW. The lpnSize parameter specifies the size of the buffer required,
+     *  including the terminating null character.
+     * @return
+     * 	If the function succeeds, the return value is a nonzero value.
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError.
+     */
+    public boolean GetComputerName(char[] buffer, IntByReference lpnSize);
+    
+    /**
+     * The OpenThread function opens an existing thread object.
+     * @param dwDesiredAccess
+     *  Access to the thread object. This access right is checked against any security 
+     *  descriptor for the thread.
+     * @param bInheritHandle
+     *  If this parameter is TRUE, the new process inherits the handle. If the parameter 
+     *  is FALSE, the handle is not inherited. 
+     * @param dwThreadId
+     *  Identifier of the thread to be opened. 
+     * @return
+     *  If the function succeeds, the return value is an open handle to the specified process.
+     *  If the function fails, the return value is NULL. To get extended error information, 
+     *  call GetLastError.
+     */
+    HANDLE OpenThread(int dwDesiredAccess, boolean bInheritHandle, int dwThreadId);
+    
+    /**
+     * This function returns a handle to an existing process object.
+     * @param fdwAccess
+     *  Not supported; set to zero. 
+     * @param fInherit
+     *  Not supported; set to FALSE. 
+     * @param IDProcess
+     *  Specifies the process identifier of the process to open. 
+     * @return
+     *  An open handle to the specified process indicates success. 
+     *  NULL indicates failure. 
+     *  To get extended error information, call GetLastError. 
+     */
+    HANDLE OpenProcess(int fdwAccess, boolean fInherit, int IDProcess);    
+
+    /**
+     * The GetTempPath function retrieves the path of the directory designated 
+     * for temporary files.
+     * @param nBufferLength
+     *  Size of the string buffer identified by lpBuffer, in TCHARs.
+     * @param buffer
+     *  Pointer to a string buffer that receives the null-terminated string specifying the 
+     *  temporary file path. The returned string ends with a backslash, for example, 
+     *  C:\TEMP\. 
+     * @return
+     *  If the function succeeds, the return value is the length, in TCHARs, of the string 
+     *  copied to lpBuffer, not including the terminating null character. If the return value 
+     *  is greater than nBufferLength, the return value is the length, in TCHARs, of the 
+     *  buffer required to hold the path.
+     *  
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError.
+     */
+    DWORD GetTempPath(DWORD nBufferLength, char[] buffer);
+    
+    /**
+     * The GetVersion function returns the current version number of the operating system.
+     * @return
+     *  If the function succeeds, the return value includes the major and minor version numbers 
+     *  of the operating system in the low order word, and information about the operating system 
+     *  platform in the high order word.
+     */
+    DWORD GetVersion();
+
+    /**
+     * The GetVersionEx function obtains extended information about the version of the operating 
+     * system that is currently running.
+     * @param lpVersionInfo
+     *  Pointer to an OSVERSIONINFO data structure that the function fills with operating system 
+     *  version information. 
+     * @return
+     *  If the function succeeds, the return value is a nonzero value.
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError. The function fails if you specify an invalid value for the 
+     *  dwOSVersionInfoSize member of the OSVERSIONINFO or OSVERSIONINFOEX structure.
+     */
+    boolean GetVersionEx(OSVERSIONINFO lpVersionInfo);
+    
+    /**
+     * The GetVersionEx function obtains extended information about the version of the operating 
+     * system that is currently running.
+     * @param lpVersionInfo
+     *  Pointer to an OSVERSIONINFOEX data structure that the function fills with operating system 
+     *  version information. 
+     * @return
+     *  If the function succeeds, the return value is a nonzero value.
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError. The function fails if you specify an invalid value for the 
+     *  dwOSVersionInfoSize member of the OSVERSIONINFO or OSVERSIONINFOEX structure.
+     */
+    boolean GetVersionEx(OSVERSIONINFOEX lpVersionInfo);
+    
+    /**
+     * The GetSystemInfo function returns information about the current system.
+     * @param lpSystemInfo
+     *  Pointer to a SYSTEM_INFO structure that receives the information. 
+     */
+    void GetSystemInfo(SYSTEM_INFO lpSystemInfo);
+    
+    /**
+     * The GetNativeSystemInfo function retrieves information about the current system to an 
+     * application running under WOW64. If the function is called from a 64-bit application, 
+     * it is equivalent to the GetSystemInfo function.
+     * @param lpSystemInfo
+     *  Pointer to a SYSTEM_INFO structure that receives the information. 
+     */
+    void GetNativeSystemInfo(SYSTEM_INFO lpSystemInfo);
+    
+    /**
+     * The IsWow64Process function determines whether the specified process is running under WOW64.
+     * @param hProcess
+     *  Handle to a process. 
+     * @param Wow64Process
+     *  Pointer to a value that is set to TRUE if the process is running under WOW64. 
+     *  Otherwise, the value is set to FALSE. 
+     * @return
+     *  If the function succeeds, the return value is a nonzero value.
+     *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+     */
+    boolean IsWow64Process(HANDLE hProcess, IntByReference Wow64Process);
+    
+    /**
+     * Retrieves information about the system's current usage of both physical and virtual memory.
+     * @param lpBuffer
+     *  A pointer to a MEMORYSTATUSEX structure that receives information about current memory availability.
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is zero. To get extended error information, 
+     *  call GetLastError.
+     */
+    boolean GlobalMemoryStatusEx(MEMORYSTATUSEX lpBuffer);
+    
+    /**
+     * The GetLogicalDriveStrings function fills a buffer with strings that specify 
+     * valid drives in the system.
+     * @param nBufferLength
+     *  Maximum size of the buffer pointed to by lpBuffer, in TCHARs. This size does not include 
+     *  the terminating null character. If this parameter is zero, lpBuffer is not used.
+     * @param lpBuffer
+     *  Pointer to a buffer that receives a series of null-terminated strings, one for each valid 
+     *  drive in the system, plus with an additional null character. Each string is a device name.
+     * @return
+     *  If the function succeeds, the return value is the length, in characters, of the strings 
+     *  copied to the buffer, not including the terminating null character. Note that an ANSI-ASCII 
+     *  null character uses one byte, but a Unicode null character uses two bytes.
+     *  If the buffer is not large enough, the return value is greater than nBufferLength. It is 
+     *  the size of the buffer required to hold the drive strings.
+     *  If the function fails, the return value is zero. To get extended error information, use 
+     *  the GetLastError function.
+     */
+    DWORD GetLogicalDriveStrings(DWORD nBufferLength, char[] lpBuffer);
+    
+    /**
+     * The GetDiskFreeSpaceEx function retrieves information about the amount of space that is 
+     * available on a disk volume, which is the total amount of space, the total amount of free 
+     * space, and the total amount of free space available to the user that is associated with 
+     * the calling thread.
+     * @param lpDirectoryName
+     *  A pointer to a null-terminated string that specifies a directory on a disk. 
+     *  If this parameter is NULL, the function uses the root of the current disk. 
+     *  If this parameter is a UNC name, it must include a trailing backslash, for example,
+     *   \\MyServer\MyShare\.
+     *   This parameter does not have to specify the root directory on a disk. The function 
+     *   accepts any directory on a disk. 
+     * @param lpFreeBytesAvailable
+     *   A pointer to a variable that receives the total number of free bytes on a disk that
+     *   are available to the user who is associated with the calling thread.  
+     *   This parameter can be NULL.
+     * @param lpTotalNumberOfBytes
+     *  A pointer to a variable that receives the total number of bytes on a disk that are 
+     *  available to the user who is associated with the calling thread. 
+     *  This parameter can be NULL.
+     * @param lpTotalNumberOfFreeBytes
+     *  A pointer to a variable that receives the total number of free bytes on a disk. 
+     *  This parameter can be NULL.
+     * @return
+     *  If the function succeeds, the return value is nonzero.
+     *  If the function fails, the return value is 0 (zero). To get extended error information, 
+     *  call GetLastError.
+     */
+    boolean GetDiskFreeSpaceEx(String lpDirectoryName, LARGE_INTEGER.ByReference lpFreeBytesAvailable,
+    		LARGE_INTEGER.ByReference lpTotalNumberOfBytes, LARGE_INTEGER.ByReference lpTotalNumberOfFreeBytes);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Kernel32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Kernel32Util.java
new file mode 100644
index 0000000..74c937e
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Kernel32Util.java
@@ -0,0 +1,127 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.sun.jna.LastErrorException;
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * Kernel32 utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Kernel32Util {
+	
+	/**
+	 * Get current computer NetBIOS name.
+	 * @return 
+	 *  Netbios name.
+	 */
+	public static String getComputerName() {
+    	char buffer[] = new char[WinBase.MAX_COMPUTERNAME_LENGTH() + 1];
+    	IntByReference lpnSize = new IntByReference(buffer.length);
+    	if (! Kernel32.INSTANCE.GetComputerName(buffer, lpnSize)) {
+    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    	}
+    	return Native.toString(buffer);
+	}
+	
+	/**
+	 * Format a message from an HRESULT.
+	 * @param code
+	 *  HRESULT
+	 * @return
+	 *  Formatted message.
+	 */
+	public static String formatMessageFromHR(HRESULT code) {
+		PointerByReference buffer = new PointerByReference();        
+        if (0 == Kernel32.INSTANCE.FormatMessage(
+        		WinBase.FORMAT_MESSAGE_ALLOCATE_BUFFER
+        		| WinBase.FORMAT_MESSAGE_FROM_SYSTEM 
+        		| WinBase.FORMAT_MESSAGE_IGNORE_INSERTS, 
+                null,
+                code.intValue(), 
+                0, // TODO: MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)
+                buffer, 
+                0, 
+                null)) {
+        	throw new LastErrorException(Kernel32.INSTANCE.GetLastError());
+        }	       
+    	String s = buffer.getValue().getString(0, ! Boolean.getBoolean("w32.ascii"));
+    	s = s.replace(".\r",".").replace(".\n",".");
+    	Kernel32.INSTANCE.LocalFree(buffer.getValue());
+    	return s;		
+	}
+	
+	/**
+	 * Format a system message from an error code.
+	 * @param code
+	 *  Error code, typically a result of GetLastError.
+	 * @return
+	 *  Formatted message.
+	 */
+	public static String formatMessageFromLastErrorCode(int code) {
+		return formatMessageFromHR(W32Errors.HRESULT_FROM_WIN32(code));
+	}
+	
+	/**
+	 * Return the path designated for temporary files.
+	 * @return
+	 *  Path.
+	 */
+	public static String getTempPath() {
+		DWORD nBufferLength = new DWORD(WinDef.MAX_PATH);
+    	char[] buffer = new char[nBufferLength.intValue()]; 
+    	if (Kernel32.INSTANCE.GetTempPath(nBufferLength, buffer).intValue() == 0) {
+    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    	}
+    	return Native.toString(buffer);
+	}
+	
+	/**
+	 * Returns valid drives in the system.
+	 * @return
+	 *  An array of valid drives.
+	 */
+	public static String[] getLogicalDriveStrings() {
+    	DWORD dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(new DWORD(0), null);
+    	if (dwSize.intValue() <= 0) {
+    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    	}
+    	
+    	char buf[] = new char[dwSize.intValue()];
+    	dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf);
+    	if (dwSize.intValue() <= 0) {
+    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    	}
+
+    	List<String> drives = new ArrayList<String>();    	
+    	String drive = "";
+    	// the buffer is double-null-terminated
+    	for(int i = 0; i < buf.length - 1; i++) {
+    		if (buf[i] == 0) {
+    			drives.add(drive);
+    			drive = "";
+    		} else {
+    			drive += buf[i];
+    		}
+    	}
+    	return drives.toArray(new String[0]);
+	}	
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/LMAccess.java b/contrib/platform/src/com/sun/jna/platform/win32/LMAccess.java
new file mode 100644
index 0000000..5425a80
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/LMAccess.java
@@ -0,0 +1,310 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.WString;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from LMAccess.h.
+ * Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface LMAccess extends StdCallLibrary {
+	
+	public static class LOCALGROUP_INFO_0 extends Structure {
+		public LOCALGROUP_INFO_0() {
+			super();
+		}
+
+		public LOCALGROUP_INFO_0(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		public WString lgrui0_name;
+	}
+
+	public static class LOCALGROUP_INFO_1 extends Structure {
+		public LOCALGROUP_INFO_1() {
+			super();
+		}
+
+		public LOCALGROUP_INFO_1(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		public WString lgrui1_name;
+		public WString lgrui1_comment;
+	}
+	
+	//
+	// bit masks for the NetUserEnum filter parameter.
+	//
+
+	public static final int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
+	public static final int FILTER_NORMAL_ACCOUNT = 0x0002;
+	// public static final int FILTER_PROXY_ACCOUNT = 0x0004;
+	public static final int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
+	public static final int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
+	public static final int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;	
+	
+	/**
+	 * The USER_INFO_0 structure contains a user account name.
+	 */
+	public static class USER_INFO_0 extends Structure {
+		public USER_INFO_0() {
+			super();
+		}
+
+		public USER_INFO_0(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a Unicode string that specifies the name of the user account. 
+		 */
+	    public WString usri0_name;
+	}
+	
+	/**
+	 * The USER_INFO_1 structure contains information about a user account, including 
+	 * account name, password data, privilege level, and the path to the user's home 
+	 * directory.
+	 */
+	public static class USER_INFO_1 extends Structure {
+		public USER_INFO_1() {
+			super();
+		}
+
+		public USER_INFO_1(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a Unicode string that specifies the name of the user 
+		 * account.
+		 */
+	    public WString usri1_name;
+	    /**
+	     * Pointer to a Unicode string that specifies the password of the user
+	     * indicated by the usri1_name member. 
+	     */
+	    public WString usri1_password;
+	    /**
+	     * Specifies a DWORD value that indicates the number of seconds that have 
+	     * elapsed since the usri1_password member was last changed.
+	     */
+	    public int usri1_password_age;
+	    /**
+	     * Specifies a DWORD value that indicates the level of privilege assigned 
+	     * to the usri1_name member.
+	     */
+	    public int usri1_priv;
+	    /**
+	     * Pointer to a Unicode string specifying the path of the home directory 
+	     * for the user specified in the usri1_name member. 
+	     */
+	    public WString usri1_home_dir;
+	    /**
+	     * Pointer to a Unicode string that contains a comment to associate with 
+	     * the user account.
+	     */
+	    public WString usri1_comment;
+	    /**
+	     * Specifies a DWORD value that determines several features.
+	     */
+	    public int usri1_flags;
+	    /**
+	     * Pointer to a Unicode string specifying the path for the user's 
+	     * logon script file. 
+	     */
+	    public WString usri1_script_path;
+	}
+
+	/**
+	 * The GROUP_USERS_INFO_0 structure contains global group member information.
+	 */
+	public static class GROUP_USERS_INFO_0 extends Structure {
+		public GROUP_USERS_INFO_0() {
+			super();
+		}
+
+		public GROUP_USERS_INFO_0(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a null-terminated Unicode character string that specifies a name. 
+		 */
+	    public WString grui0_name;
+	}
+	
+	/**
+	 * The LOCALGROUP_USERS_INFO_0 structure contains local group member information.
+	 */
+	public static class LOCALGROUP_USERS_INFO_0 extends Structure {
+		public LOCALGROUP_USERS_INFO_0() {
+			super();
+		}
+
+		public LOCALGROUP_USERS_INFO_0(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a Unicode string specifying the name of a local group to which the user belongs. 
+		 */
+	    public WString lgrui0_name;
+	}
+	
+	/**
+	 * The GROUP_INFO_0 structure contains the name of a global group in the security
+	 * database, which is the security accounts manager (SAM) database or, in the case
+	 * of domain controllers, the Active Directory.
+	 */
+	public static class GROUP_INFO_0  extends Structure {
+		public GROUP_INFO_0() {
+			super();
+		}
+
+		public GROUP_INFO_0(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a null-terminated Unicode character string that specifies 
+		 * the name of the global group.
+		 */
+	    public WString grpi0_name;
+	}
+
+	/**
+	 * The GROUP_INFO_1 structure contains a global group name and a comment to 
+	 * associate with the group.
+	 */
+	public static class GROUP_INFO_1  extends Structure {
+		public GROUP_INFO_1() {
+			super();
+		}
+
+		public GROUP_INFO_1(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a null-terminated Unicode character string that specifies 
+		 * the name of the global group. 
+		 */
+	    public WString grpi1_name;
+	    /**
+	     * Pointer to a null-terminated Unicode character string that specifies 
+	     * a remark associated with the global group. This member can be a null 
+	     * string. The comment can contain MAXCOMMENTSZ characters. 
+	     */
+	    public WString grpi1_comment;
+	}
+
+	/**
+	 * The GROUP_INFO_2 structure contains information about a global group, including
+	 * name, identifier, and resource attributes.
+	 */
+	public static class GROUP_INFO_2  extends Structure {
+		public GROUP_INFO_2() {
+			super();
+		}
+
+		public GROUP_INFO_2(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a null-terminated Unicode character string that 
+		 * specifies the name of the global group.
+		 */
+	    public WString grpi2_name;
+	    /**
+	     * Pointer to a null-terminated Unicode character string that contains a 
+	     * remark associated with the global group. This member can be a null string. 
+	     * The comment can contain MAXCOMMENTSZ characters. 
+	     */
+	    public WString grpi2_comment;
+	    /**
+	     * Specifies a DWORD value that contains the relative identifier (RID) of 
+	     * the global group.
+	     */
+	    public int grpi2_group_id;
+	    /**
+	     * These attributes are hard-coded to SE_GROUP_MANDATORY, SE_GROUP_ENABLED, 
+	     * and SE_GROUP_ENABLED_BY_DEFAULT. 
+	     */
+	    public int grpi2_attributes;
+	}
+
+	/**
+	 * The GROUP_INFO_3 structure contains information about a global group, including 
+	 * name, security identifier (SID), and resource attributes.
+	 */
+	public static class GROUP_INFO_3  extends Structure {
+		public GROUP_INFO_3() {
+			super();
+		}
+
+		public GROUP_INFO_3(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a null-terminated Unicode character string that 
+		 * specifies the name of the global group. 
+		 */
+	    public WString grpi3_name;
+	    /**
+	     * Pointer to a null-terminated Unicode character string that 
+	     * contains a remark associated with the global group. This member can be 
+	     * a null string. The comment can contain MAXCOMMENTSZ characters. 
+	     */
+	    public WString grpi3_comment;
+	    /**
+	     * Pointer to a SID structure that contains the security identifier (SID) that 
+	     * uniquely identifies the global group.
+	     */
+	    public PSID grpi3_group_sid;
+	    /**
+	     * These attributes are hard-coded to SE_GROUP_MANDATORY, SE_GROUP_ENABLED, and 
+	     * SE_GROUP_ENABLED_BY_DEFAULT.
+	     */
+	    public int grpi3_attributes;
+	}
+	
+	//
+	// Privilege levels (USER_INFO_X field usriX_priv (X = 0/1)).
+	//
+
+	public static final int USER_PRIV_MASK = 3;
+	public static final int USER_PRIV_GUEST = 0;
+	public static final int USER_PRIV_USER = 1;
+	public static final int USER_PRIV_ADMIN = 2;	
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/LMCons.java b/contrib/platform/src/com/sun/jna/platform/win32/LMCons.java
new file mode 100644
index 0000000..9eaff88
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/LMCons.java
@@ -0,0 +1,30 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from LMCons.h.
+ * @author dblock[at]dblock.org
+ * Windows SDK 6.0A
+ */
+public interface LMCons extends StdCallLibrary {
+	public static final int  NETBIOS_NAME_LEN = 16;            // NetBIOS net name (bytes)
+
+	/**
+	 * Value to be used with APIs which have a "preferred maximum length" parameter.
+	 * This value indicates that the API should just allocate "as much as it takes."
+	 */
+	public static final int  MAX_PREFERRED_LENGTH = -1;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/LMErr.java b/contrib/platform/src/com/sun/jna/platform/win32/LMErr.java
new file mode 100644
index 0000000..7c07a97
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/LMErr.java
@@ -0,0 +1,566 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from LMErr.h.
+ * @author dblock[at]dblock.org
+ * Windows SDK 6.0A
+ */
+public interface LMErr extends StdCallLibrary {
+    public static final int NERR_Success =  0;
+    public static final int NERR_BASE =  2100;
+    
+    public static final int NERR_NetNotStarted = NERR_BASE + 2;   /* The workstation driver is not installed. */
+    public static final int NERR_UnknownServer = NERR_BASE + 3;   /* The server could not be located. */
+    public static final int NERR_ShareMem = NERR_BASE + 4;   /* An internal error occurred.  The network cannot access a shared memory segment. */
+
+    public static final int NERR_NoNetworkResource = NERR_BASE + 5;   /* A network resource shortage occurred . */
+    public static final int NERR_RemoteOnly = NERR_BASE + 6;   /* This operation is not supported on workstations. */
+    public static final int NERR_DevNotRedirected = NERR_BASE + 7;   /* The device is not connected. */
+    /* NERR_BASE + 8 is used for ERROR_CONNECTED_OTHER_PASSWORD */
+    /* NERR_BASE + 9 is used for ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT */
+    /* UNUSED BASE + 10 */
+    /* UNUSED BASE + 11 */
+    /* UNUSED BASE + 12 */
+    /* UNUSED BASE + 13 */
+    public static final int NERR_ServerNotStarted = NERR_BASE + 14;  /* The Server service is not started. */
+    public static final int NERR_ItemNotFound = NERR_BASE + 15;  /* The queue is empty. */
+    public static final int NERR_UnknownDevDir = NERR_BASE + 16;  /* The device or directory does not exist. */
+    public static final int NERR_RedirectedPath = NERR_BASE + 17;  /* The operation is invalid on a redirected resource. */
+    public static final int NERR_DuplicateShare = NERR_BASE + 18;  /* The name has already been shared. */
+    public static final int NERR_NoRoom = NERR_BASE + 19;  /* The server is currently out of the requested resource. */
+    /* UNUSED BASE + 20 */
+    public static final int NERR_TooManyItems = NERR_BASE + 21;  /* Requested addition of items exceeds the maximum allowed. */
+    public static final int NERR_InvalidMaxUsers = NERR_BASE + 22;  /* The Peer service supports only two simultaneous users. */
+    public static final int NERR_BufTooSmall = NERR_BASE + 23;  /* The API return buffer is too small. */
+    /* UNUSED BASE + 24 */
+    /* UNUSED BASE + 25 */
+    /* UNUSED BASE + 26 */
+    public static final int NERR_RemoteErr = NERR_BASE + 27;  /* A remote API error occurred.  */
+    /* UNUSED BASE + 28 */
+    /* UNUSED BASE + 29 */
+    /* UNUSED BASE + 30 */
+    public static final int NERR_LanmanIniError = NERR_BASE + 31;  /* An error occurred when opening or reading the configuration file. */
+    /* UNUSED BASE + 32 */
+    /* UNUSED BASE + 33 */
+    /* UNUSED BASE + 34 */
+    /* UNUSED BASE + 35 */
+    public static final int NERR_NetworkError = NERR_BASE + 36;  /* A general network error occurred. */
+    public static final int NERR_WkstaInconsistentState = NERR_BASE + 37;
+        /* The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service. */
+    public static final int NERR_WkstaNotStarted = NERR_BASE + 38;  /* The Workstation service has not been started. */
+    public static final int NERR_BrowserNotStarted = NERR_BASE + 39;  /* The requested information is not available. */
+    public static final int NERR_InternalError = NERR_BASE + 40;  /* An internal Windows error occurred.*/
+    public static final int NERR_BadTransactConfig = NERR_BASE + 41;  /* The server is not configured for transactions. */
+    public static final int NERR_InvalidAPI = NERR_BASE + 42;  /* The requested API is not supported on the remote server. */
+    public static final int NERR_BadEventName = NERR_BASE + 43;  /* The event name is invalid. */
+    public static final int NERR_DupNameReboot = NERR_BASE + 44;  /* The computer name already exists on the network. Change it and restart the computer. */
+    /*
+     *      Config API related
+     *              Error codes from BASE + 45 to BASE + 49
+     */
+
+    /* UNUSED BASE + 45 */
+    public static final int NERR_CfgCompNotFound = NERR_BASE + 46;  /* The specified component could not be found in the configuration information. */
+    public static final int NERR_CfgParamNotFound = NERR_BASE + 47;  /* The specified parameter could not be found in the configuration information. */
+    public static final int NERR_LineTooLong = NERR_BASE + 49;  /* A line in the configuration file is too long. */
+
+    /*
+     *      Spooler API related
+     *              Error codes from BASE + 50 to BASE + 79
+     */
+
+    public static final int NERR_QNotFound = NERR_BASE + 50;  /* The printer does not exist. */
+    public static final int NERR_JobNotFound = NERR_BASE + 51;  /* The print job does not exist. */
+    public static final int NERR_DestNotFound = NERR_BASE + 52;  /* The printer destination cannot be found. */
+    public static final int NERR_DestExists = NERR_BASE + 53;  /* The printer destination already exists. */
+    public static final int NERR_QExists = NERR_BASE + 54;  /* The printer queue already exists. */
+    public static final int NERR_QNoRoom = NERR_BASE + 55;  /* No more printers can be added. */
+    public static final int NERR_JobNoRoom = NERR_BASE + 56;  /* No more print jobs can be added.  */
+    public static final int NERR_DestNoRoom = NERR_BASE + 57;  /* No more printer destinations can be added. */
+    public static final int NERR_DestIdle = NERR_BASE + 58;  /* This printer destination is idle and cannot accept control operations. */
+    public static final int NERR_DestInvalidOp = NERR_BASE + 59;  /* This printer destination request contains an invalid control function. */
+    public static final int NERR_ProcNoRespond = NERR_BASE + 60;  /* The print processor is not responding. */
+    public static final int NERR_SpoolerNotLoaded = NERR_BASE + 61;  /* The spooler is not running. */
+    public static final int NERR_DestInvalidState = NERR_BASE + 62;  /* This operation cannot be performed on the print destination in its current state. */
+    public static final int NERR_QInvalidState = NERR_BASE + 63;  /* This operation cannot be performed on the printer queue in its current state. */
+    public static final int NERR_JobInvalidState = NERR_BASE + 64;  /* This operation cannot be performed on the print job in its current state. */
+    public static final int NERR_SpoolNoMemory = NERR_BASE + 65;  /* A spooler memory allocation failure occurred. */
+    public static final int NERR_DriverNotFound = NERR_BASE + 66;  /* The device driver does not exist. */
+    public static final int NERR_DataTypeInvalid = NERR_BASE + 67;  /* The data type is not supported by the print processor. */
+    public static final int NERR_ProcNotFound = NERR_BASE + 68;  /* The print processor is not installed. */
+
+    /*
+     *      Service API related
+     *              Error codes from BASE + 80 to BASE + 99
+     */
+
+    public static final int NERR_ServiceTableLocked = NERR_BASE + 80;  /* The service database is locked. */
+    public static final int NERR_ServiceTableFull = NERR_BASE + 81;  /* The service table is full. */
+    public static final int NERR_ServiceInstalled = NERR_BASE + 82;  /* The requested service has already been started. */
+    public static final int NERR_ServiceEntryLocked = NERR_BASE + 83;  /* The service does not respond to control actions. */
+    public static final int NERR_ServiceNotInstalled = NERR_BASE + 84; /* The service has not been started. */
+    public static final int NERR_BadServiceName = NERR_BASE + 85;  /* The service name is invalid. */
+    public static final int NERR_ServiceCtlTimeout = NERR_BASE + 86;  /* The service is not responding to the control function. */
+    public static final int NERR_ServiceCtlBusy = NERR_BASE + 87;  /* The service control is busy. */
+    public static final int NERR_BadServiceProgName = NERR_BASE + 88;  /* The configuration file contains an invalid service program name. */
+    public static final int NERR_ServiceNotCtrl = NERR_BASE + 89;  /* The service could not be controlled in its present state. */
+    public static final int NERR_ServiceKillProc = NERR_BASE + 90;  /* The service ended abnormally. */
+    public static final int NERR_ServiceCtlNotValid = NERR_BASE + 91;  /* The requested pause, continue, or stop is not valid for this service. */
+    public static final int NERR_NotInDispatchTbl = NERR_BASE + 92;  /* The service control dispatcher could not find the service name in the dispatch table. */
+    public static final int NERR_BadControlRecv = NERR_BASE + 93;  /* The service control dispatcher pipe read failed. */
+    public static final int NERR_ServiceNotStarting = NERR_BASE + 94;  /* A thread for the new service could not be created. */
+
+    /*
+     *      Wksta and Logon API related
+     *              Error codes from BASE + 100 to BASE + 118
+     */
+
+    public static final int NERR_AlreadyLoggedOn = NERR_BASE + 100; /* This workstation is already logged on to the local-area network. */
+    public static final int NERR_NotLoggedOn = NERR_BASE + 101; /* The workstation is not logged on to the local-area network. */
+    public static final int NERR_BadUsername = NERR_BASE + 102; /* The user name or group name parameter is invalid.  */
+    public static final int NERR_BadPassword = NERR_BASE + 103; /* The password parameter is invalid. */
+    public static final int NERR_UnableToAddName_W = NERR_BASE + 104; /* @W The logon processor did not add the message alias. */
+    public static final int NERR_UnableToAddName_F = NERR_BASE + 105; /* The logon processor did not add the message alias. */
+    public static final int NERR_UnableToDelName_W = NERR_BASE + 106; /* @W The logoff processor did not delete the message alias. */
+    public static final int NERR_UnableToDelName_F = NERR_BASE + 107; /* The logoff processor did not delete the message alias. */
+    /* UNUSED BASE + 108 */
+    public static final int NERR_LogonsPaused = NERR_BASE + 109; /* Network logons are paused. */
+    public static final int NERR_LogonServerConflict = NERR_BASE + 110;/* A centralized logon-server conflict occurred. */
+    public static final int NERR_LogonNoUserPath = NERR_BASE + 111; /* The server is configured without a valid user path. */
+    public static final int NERR_LogonScriptError = NERR_BASE + 112; /* An error occurred while loading or running the logon script. */
+    /* UNUSED BASE + 113 */
+    public static final int NERR_StandaloneLogon = NERR_BASE + 114; /* The logon server was not specified.  Your computer will be logged on as STANDALONE. */
+    public static final int NERR_LogonServerNotFound = NERR_BASE + 115; /* The logon server could not be found.  */
+    public static final int NERR_LogonDomainExists = NERR_BASE + 116; /* There is already a logon domain for this computer.  */
+    public static final int NERR_NonValidatedLogon = NERR_BASE + 117; /* The logon server could not validate the logon. */
+
+    /*
+     *      ACF API related = access, user, group;
+     *              Error codes from BASE + 119 to BASE + 149
+     */
+
+    public static final int NERR_ACFNotFound = NERR_BASE + 119; /* The security database could not be found. */
+    public static final int NERR_GroupNotFound = NERR_BASE + 120; /* The group name could not be found. */
+    public static final int NERR_UserNotFound = NERR_BASE + 121; /* The user name could not be found. */
+    public static final int NERR_ResourceNotFound = NERR_BASE + 122; /* The resource name could not be found.  */
+    public static final int NERR_GroupExists = NERR_BASE + 123; /* The group already exists. */
+    public static final int NERR_UserExists = NERR_BASE + 124; /* The account already exists. */
+    public static final int NERR_ResourceExists = NERR_BASE + 125; /* The resource permission list already exists. */
+    public static final int NERR_NotPrimary = NERR_BASE + 126; /* This operation is only allowed on the primary domain controller of the domain. */
+    public static final int NERR_ACFNotLoaded = NERR_BASE + 127; /* The security database has not been started. */
+    public static final int NERR_ACFNoRoom = NERR_BASE + 128; /* There are too many names in the user accounts database. */
+    public static final int NERR_ACFFileIOFail = NERR_BASE + 129; /* A disk I/O failure occurred.*/
+    public static final int NERR_ACFTooManyLists = NERR_BASE + 130; /* The limit of 64 entries per resource was exceeded. */
+    public static final int NERR_UserLogon = NERR_BASE + 131; /* Deleting a user with a session is not allowed. */
+    public static final int NERR_ACFNoParent = NERR_BASE + 132; /* The parent directory could not be located. */
+    public static final int NERR_CanNotGrowSegment = NERR_BASE + 133; /* Unable to add to the security database session cache segment. */
+    public static final int NERR_SpeGroupOp = NERR_BASE + 134; /* This operation is not allowed on this special group. */
+    public static final int NERR_NotInCache = NERR_BASE + 135; /* This user is not cached in user accounts database session cache. */
+    public static final int NERR_UserInGroup = NERR_BASE + 136; /* The user already belongs to this group. */
+    public static final int NERR_UserNotInGroup = NERR_BASE + 137; /* The user does not belong to this group. */
+    public static final int NERR_AccountUndefined = NERR_BASE + 138; /* This user account is undefined. */
+    public static final int NERR_AccountExpired = NERR_BASE + 139; /* This user account has expired. */
+    public static final int NERR_InvalidWorkstation = NERR_BASE + 140; /* The user is not allowed to log on from this workstation. */
+    public static final int NERR_InvalidLogonHours = NERR_BASE + 141; /* The user is not allowed to log on at this time.  */
+    public static final int NERR_PasswordExpired = NERR_BASE + 142; /* The password of this user has expired. */
+    public static final int NERR_PasswordCantChange = NERR_BASE + 143; /* The password of this user cannot change. */
+    public static final int NERR_PasswordHistConflict = NERR_BASE + 144; /* This password cannot be used now. */
+    public static final int NERR_PasswordTooShort = NERR_BASE + 145; /* The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements. */
+    public static final int NERR_PasswordTooRecent = NERR_BASE + 146; /* The password of this user is too recent to change.  */
+    public static final int NERR_InvalidDatabase = NERR_BASE + 147; /* The security database is corrupted. */
+    public static final int NERR_DatabaseUpToDate = NERR_BASE + 148; /* No updates are necessary to this replicant network/local security database. */
+    public static final int NERR_SyncRequired = NERR_BASE + 149; /* This replicant database is outdated; synchronization is required. */
+
+    /*
+     *      Use API related
+     *              Error codes from BASE + 150 to BASE + 169
+     */
+
+    public static final int NERR_UseNotFound = NERR_BASE + 150; /* The network connection could not be found. */
+    public static final int NERR_BadAsgType = NERR_BASE + 151; /* This asg_type is invalid. */
+    public static final int NERR_DeviceIsShared = NERR_BASE + 152; /* This device is currently being shared. */
+    public static final int NERR_SameAsComputerName = NERR_BASE + 153; /* The user name may not be same as computer name. */
+
+
+    /*
+     *      Message Server related
+     *              Error codes BASE + 170 to BASE + 209
+     */
+
+    public static final int NERR_NoComputerName = NERR_BASE + 170; /* The computer name could not be added as a message alias.  The name may already exist on the network. */
+    public static final int NERR_MsgAlreadyStarted = NERR_BASE + 171; /* The Messenger service is already started. */
+    public static final int NERR_MsgInitFailed = NERR_BASE + 172; /* The Messenger service failed to start.  */
+    public static final int NERR_NameNotFound = NERR_BASE + 173; /* The message alias could not be found on the network. */
+    public static final int NERR_AlreadyForwarded = NERR_BASE + 174; /* This message alias has already been forwarded. */
+    public static final int NERR_AddForwarded = NERR_BASE + 175; /* This message alias has been added but is still forwarded. */
+    public static final int NERR_AlreadyExists = NERR_BASE + 176; /* This message alias already exists locally. */
+    public static final int NERR_TooManyNames = NERR_BASE + 177; /* The maximum number of added message aliases has been exceeded. */
+    public static final int NERR_DelComputerName = NERR_BASE + 178; /* The computer name could not be deleted.*/
+    public static final int NERR_LocalForward = NERR_BASE + 179; /* Messages cannot be forwarded back to the same workstation. */
+    public static final int NERR_GrpMsgProcessor = NERR_BASE + 180; /* An error occurred in the domain message processor. */
+    public static final int NERR_PausedRemote = NERR_BASE + 181; /* The message was sent, but the recipient has paused the Messenger service. */
+    public static final int NERR_BadReceive = NERR_BASE + 182; /* The message was sent but not received. */
+    public static final int NERR_NameInUse = NERR_BASE + 183; /* The message alias is currently in use. Try again later. */
+    public static final int NERR_MsgNotStarted = NERR_BASE + 184; /* The Messenger service has not been started. */
+    public static final int NERR_NotLocalName = NERR_BASE + 185; /* The name is not on the local computer. */
+    public static final int NERR_NoForwardName = NERR_BASE + 186; /* The forwarded message alias could not be found on the network. */
+    public static final int NERR_RemoteFull = NERR_BASE + 187; /* The message alias table on the remote station is full. */
+    public static final int NERR_NameNotForwarded = NERR_BASE + 188; /* Messages for this alias are not currently being forwarded. */
+    public static final int NERR_TruncatedBroadcast = NERR_BASE + 189; /* The broadcast message was truncated. */
+    public static final int NERR_InvalidDevice = NERR_BASE + 194; /* This is an invalid device name. */
+    public static final int NERR_WriteFault = NERR_BASE + 195; /* A write fault occurred. */
+    /* UNUSED BASE + 196 */
+    public static final int NERR_DuplicateName = NERR_BASE + 197; /* A duplicate message alias exists on the network. */
+    public static final int NERR_DeleteLater = NERR_BASE + 198; /* @W This message alias will be deleted later. */
+    public static final int NERR_IncompleteDel = NERR_BASE + 199; /* The message alias was not successfully deleted from all networks. */
+    public static final int NERR_MultipleNets = NERR_BASE + 200; /* This operation is not supported on computers with multiple networks. */
+
+    /*
+     *      Server API related
+     *              Error codes BASE + 210 to BASE + 229
+     */
+
+    public static final int NERR_NetNameNotFound = NERR_BASE + 210; /* This shared resource does not exist.*/
+    public static final int NERR_DeviceNotShared = NERR_BASE + 211; /* This device is not shared. */
+    public static final int NERR_ClientNameNotFound = NERR_BASE + 212; /* A session does not exist with that computer name. */
+    public static final int NERR_FileIdNotFound = NERR_BASE + 214; /* There is not an open file with that identification number. */
+    public static final int NERR_ExecFailure = NERR_BASE + 215; /* A failure occurred when executing a remote administration command. */
+    public static final int NERR_TmpFile = NERR_BASE + 216; /* A failure occurred when opening a remote temporary file. */
+    public static final int NERR_TooMuchData = NERR_BASE + 217; /* The data returned from a remote administration command has been truncated to 64K. */
+    public static final int NERR_DeviceShareConflict = NERR_BASE + 218; /* This device cannot be shared as both a spooled and a non-spooled resource. */
+    public static final int NERR_BrowserTableIncomplete = NERR_BASE + 219;  /* The information in the list of servers may be incorrect. */
+    public static final int NERR_NotLocalDomain = NERR_BASE + 220; /* The computer is not active in this domain. */
+    public static final int NERR_IsDfsShare = NERR_BASE + 221; /* The share must be removed from the Distributed File System before it can be deleted. */
+
+    /*
+     *      CharDev API related
+     *              Error codes BASE + 230 to BASE + 249
+     */
+
+    /* UNUSED BASE + 230 */
+    public static final int NERR_DevInvalidOpCode = NERR_BASE + 231; /* The operation is invalid for this device. */
+    public static final int NERR_DevNotFound = NERR_BASE + 232; /* This device cannot be shared. */
+    public static final int NERR_DevNotOpen = NERR_BASE + 233; /* This device was not open. */
+    public static final int NERR_BadQueueDevString = NERR_BASE + 234; /* This device name list is invalid. */
+    public static final int NERR_BadQueuePriority = NERR_BASE + 235; /* The queue priority is invalid. */
+    public static final int NERR_NoCommDevs = NERR_BASE + 237; /* There are no shared communication devices. */
+    public static final int NERR_QueueNotFound = NERR_BASE + 238; /* The queue you specified does not exist. */
+    public static final int NERR_BadDevString = NERR_BASE + 240; /* This list of devices is invalid. */
+    public static final int NERR_BadDev = NERR_BASE + 241; /* The requested device is invalid. */
+    public static final int NERR_InUseBySpooler = NERR_BASE + 242; /* This device is already in use by the spooler. */
+    public static final int NERR_CommDevInUse = NERR_BASE + 243; /* This device is already in use as a communication device. */
+
+    /*
+     *      NetICanonicalize and NetIType and NetIMakeLMFileName
+     *      NetIListCanon and NetINameCheck
+     *              Error codes BASE + 250 to BASE + 269
+     */
+
+    public static final int NERR_InvalidComputer = NERR_BASE + 251; /* This computer name is invalid. */
+    /* UNUSED BASE + 252 */
+    /* UNUSED BASE + 253 */
+    public static final int NERR_MaxLenExceeded = NERR_BASE + 254; /* The string and prefix specified are too long. */
+    /* UNUSED BASE + 255 */
+    public static final int NERR_BadComponent = NERR_BASE + 256; /* This path component is invalid. */
+    public static final int NERR_CantType = NERR_BASE + 257; /* Could not determine the type of input. */
+    /* UNUSED BASE + 258 */
+    /* UNUSED BASE + 259 */
+    public static final int NERR_TooManyEntries = NERR_BASE + 262; /* The buffer for types is not big enough. */
+
+    /*
+     *      NetProfile
+     *              Error codes BASE + 270 to BASE + 276
+     */
+
+    public static final int NERR_ProfileFileTooBig = NERR_BASE + 270; /* Profile files cannot exceed 64K. */
+    public static final int NERR_ProfileOffset = NERR_BASE + 271; /* The start offset is out of range. */
+    public static final int NERR_ProfileCleanup = NERR_BASE + 272; /* The system cannot delete current connections to network resources. */
+    public static final int NERR_ProfileUnknownCmd = NERR_BASE + 273; /* The system was unable to parse the command line in this file.*/
+    public static final int NERR_ProfileLoadErr = NERR_BASE + 274; /* An error occurred while loading the profile file. */
+    public static final int NERR_ProfileSaveErr = NERR_BASE + 275; /* @W Errors occurred while saving the profile file.  The profile was partially saved. */
+
+
+    /*
+     *      NetAudit and NetErrorLog
+     *              Error codes BASE + 277 to BASE + 279
+     */
+
+    public static final int NERR_LogOverflow = NERR_BASE + 277;      /* Log file %1 is full. */
+    public static final int NERR_LogFileChanged = NERR_BASE + 278;      /* This log file has changed between reads. */
+    public static final int NERR_LogFileCorrupt = NERR_BASE + 279;      /* Log file %1 is corrupt. */
+
+
+    /*
+     *      NetRemote
+     *              Error codes BASE + 280 to BASE + 299
+     */
+    public static final int NERR_SourceIsDir = NERR_BASE + 280; /* The source path cannot be a directory. */
+    public static final int NERR_BadSource = NERR_BASE + 281; /* The source path is illegal. */
+    public static final int NERR_BadDest = NERR_BASE + 282; /* The destination path is illegal. */
+    public static final int NERR_DifferentServers = NERR_BASE + 283; /* The source and destination paths are on different servers. */
+    /* UNUSED BASE + 284 */
+    public static final int NERR_RunSrvPaused = NERR_BASE + 285; /* The Run server you requested is paused. */
+    /* UNUSED BASE + 286 */
+    /* UNUSED BASE + 287 */
+    /* UNUSED BASE + 288 */
+    public static final int NERR_ErrCommRunSrv = NERR_BASE + 289; /* An error occurred when communicating with a Run server. */
+    /* UNUSED BASE + 290 */
+    public static final int NERR_ErrorExecingGhost = NERR_BASE + 291; /* An error occurred when starting a background process. */
+    public static final int NERR_ShareNotFound = NERR_BASE + 292; /* The shared resource you are connected to could not be found.*/
+    /* UNUSED BASE + 293 */
+    /* UNUSED BASE + 294 */
+
+
+    /*
+     *  NetWksta.sys = redir; returned error codes.
+     *
+     *          NERR_BASE + = 300-329;
+     */
+
+    public static final int NERR_InvalidLana = NERR_BASE + 300; /* The LAN adapter number is invalid.  */
+    public static final int NERR_OpenFiles = NERR_BASE + 301; /* There are open files on the connection.    */
+    public static final int NERR_ActiveConns = NERR_BASE + 302; /* Active connections still exist. */
+    public static final int NERR_BadPasswordCore = NERR_BASE + 303; /* This share name or password is invalid. */
+    public static final int NERR_DevInUse = NERR_BASE + 304; /* The device is being accessed by an active process. */
+    public static final int NERR_LocalDrive = NERR_BASE + 305; /* The drive letter is in use locally. */
+
+    /*
+     *  Alert error codes.
+     *
+     *          NERR_BASE + = 330-339;
+     */
+    public static final int NERR_AlertExists = NERR_BASE + 330; /* The specified client is already registered for the specified event. */
+    public static final int NERR_TooManyAlerts = NERR_BASE + 331; /* The alert table is full. */
+    public static final int NERR_NoSuchAlert = NERR_BASE + 332; /* An invalid or nonexistent alert name was raised. */
+    public static final int NERR_BadRecipient = NERR_BASE + 333; /* The alert recipient is invalid.*/
+    public static final int NERR_AcctLimitExceeded = NERR_BASE + 334; /* A user's session with this server has been deleted
+                                                     * because the user's logon hours are no longer valid. */
+
+    /*
+     *  Additional Error and Audit log codes.
+     *
+     *          NERR_BASE  + (340-343;
+     */
+    public static final int NERR_InvalidLogSeek = NERR_BASE + 340; /* The log file does not contain the requested record number. */
+    /* UNUSED BASE + 341 */
+    /* UNUSED BASE + 342 */
+    /* UNUSED BASE + 343 */
+
+    /*
+     *  Additional UAS and NETLOGON codes
+     *
+     *          NERR_BASE  + (350-359;
+     */
+    public static final int NERR_BadUasConfig = NERR_BASE + 350; /* The user accounts database is not configured correctly. */
+    public static final int NERR_InvalidUASOp = NERR_BASE + 351; /* This operation is not permitted when the Netlogon service is running. */
+    public static final int NERR_LastAdmin = NERR_BASE + 352; /* This operation is not allowed on the last administrative account. */
+    public static final int NERR_DCNotFound = NERR_BASE + 353; /* Could not find domain controller for this domain. */
+    public static final int NERR_LogonTrackingError = NERR_BASE + 354; /* Could not set logon information for this user. */
+    public static final int NERR_NetlogonNotStarted = NERR_BASE + 355; /* The Netlogon service has not been started. */
+    public static final int NERR_CanNotGrowUASFile = NERR_BASE + 356; /* Unable to add to the user accounts database. */
+    public static final int NERR_TimeDiffAtDC = NERR_BASE + 357; /* This server's clock is not synchronized with the primary domain controller's clock. */
+    public static final int NERR_PasswordMismatch = NERR_BASE + 358; /* A password mismatch has been detected. */
+
+
+    /*
+     *  Server Integration error codes.
+     *
+     *          NERR_BASE  + (360-369;
+     */
+    public static final int NERR_NoSuchServer = NERR_BASE + 360; /* The server identification does not specify a valid server. */
+    public static final int NERR_NoSuchSession = NERR_BASE + 361; /* The session identification does not specify a valid session. */
+    public static final int NERR_NoSuchConnection = NERR_BASE + 362; /* The connection identification does not specify a valid connection. */
+    public static final int NERR_TooManyServers = NERR_BASE + 363; /* There is no space for another entry in the table of available servers. */
+    public static final int NERR_TooManySessions = NERR_BASE + 364; /* The server has reached the maximum number of sessions it supports. */
+    public static final int NERR_TooManyConnections = NERR_BASE + 365; /* The server has reached the maximum number of connections it supports. */
+    public static final int NERR_TooManyFiles = NERR_BASE + 366; /* The server cannot open more files because it has reached its maximum number. */
+    public static final int NERR_NoAlternateServers = NERR_BASE + 367; /* There are no alternate servers registered on this server. */
+    /* UNUSED BASE + 368 */
+    /* UNUSED BASE + 369 */
+
+    public static final int NERR_TryDownLevel = NERR_BASE + 370; /* Try down-level = remote admin protocol; version of API instead. */
+
+    /*
+     *  UPS error codes.
+     *
+     *          NERR_BASE + = 380-384;
+     */
+    public static final int NERR_UPSDriverNotStarted = NERR_BASE + 380; /* The UPS driver could not be accessed by the UPS service. */
+    public static final int NERR_UPSInvalidConfig = NERR_BASE + 381; /* The UPS service is not configured correctly. */
+    public static final int NERR_UPSInvalidCommPort = NERR_BASE + 382; /* The UPS service could not access the specified Comm Port. */
+    public static final int NERR_UPSSignalAsserted = NERR_BASE + 383; /* The UPS indicated a line fail or low battery situation. Service not started. */
+    public static final int NERR_UPSShutdownFailed = NERR_BASE + 384; /* The UPS service failed to perform a system shut down. */
+
+    /*
+     *  Remoteboot error codes.
+     *
+     *          NERR_BASE + = 400-419;
+     *          Error codes 400 - 405 are used by RPLBOOT.SYS.
+     *          Error codes 403, 407 - 416 are used by RPLLOADR.COM,
+     *          Error code 417 is the alerter message of REMOTEBOOT = RPLSERVR.EXE;.
+     *          Error code 418 is for when REMOTEBOOT can't start
+     *          Error code 419 is for a disallowed 2nd rpl connection
+     *
+     */
+    public static final int NERR_BadDosRetCode = NERR_BASE + 400; /* The program below returned an MS-DOS error code:*/
+    public static final int NERR_ProgNeedsExtraMem = NERR_BASE + 401; /* The program below needs more memory:*/
+    public static final int NERR_BadDosFunction = NERR_BASE + 402; /* The program below called an unsupported MS-DOS function:*/
+    public static final int NERR_RemoteBootFailed = NERR_BASE + 403; /* The workstation failed to boot.*/
+    public static final int NERR_BadFileCheckSum = NERR_BASE + 404; /* The file below is corrupt.*/
+    public static final int NERR_NoRplBootSystem = NERR_BASE + 405; /* No loader is specified in the boot-block definition file.*/
+    public static final int NERR_RplLoadrNetBiosErr = NERR_BASE + 406; /* NetBIOS returned an error: The NCB and SMB are dumped above.*/
+    public static final int NERR_RplLoadrDiskErr = NERR_BASE + 407; /* A disk I/O error occurred.*/
+    public static final int NERR_ImageParamErr = NERR_BASE + 408; /* Image parameter substitution failed.*/
+    public static final int NERR_TooManyImageParams = NERR_BASE + 409; /* Too many image parameters cross disk sector boundaries.*/
+    public static final int NERR_NonDosFloppyUsed = NERR_BASE + 410; /* The image was not generated from an MS-DOS diskette formatted with /S.*/
+    public static final int NERR_RplBootRestart = NERR_BASE + 411; /* Remote boot will be restarted later.*/
+    public static final int NERR_RplSrvrCallFailed = NERR_BASE + 412; /* The call to the Remoteboot server failed.*/
+    public static final int NERR_CantConnectRplSrvr = NERR_BASE + 413; /* Cannot connect to the Remoteboot server.*/
+    public static final int NERR_CantOpenImageFile = NERR_BASE + 414; /* Cannot open image file on the Remoteboot server.*/
+    public static final int NERR_CallingRplSrvr = NERR_BASE + 415; /* Connecting to the Remoteboot server...*/
+    public static final int NERR_StartingRplBoot = NERR_BASE + 416; /* Connecting to the Remoteboot server...*/
+    public static final int NERR_RplBootServiceTerm = NERR_BASE + 417; /* Remote boot service was stopped; check the error log for the cause of the problem.*/
+    public static final int NERR_RplBootStartFailed = NERR_BASE + 418; /* Remote boot startup failed; check the error log for the cause of the problem.*/
+    public static final int NERR_RPL_CONNECTED = NERR_BASE + 419; /* A second connection to a Remoteboot resource is not allowed.*/
+
+    /*
+     *  FTADMIN API error codes
+     *
+     *       NERR_BASE + = 425-434;
+     *
+     * = Currently not used in NT;
+     *
+     */
+
+    /*
+     *  Browser service API error codes
+     *
+     *       NERR_BASE + = 450-475;
+     *
+     */
+    public static final int NERR_BrowserConfiguredToNotRun = NERR_BASE + 450; /* The browser service was configured with MaintainServerList = No. */
+
+    /*
+     *  Additional Remoteboot error codes.
+     *
+     *          NERR_BASE + = 510-550;
+     */
+    public static final int NERR_RplNoAdaptersStarted = NERR_BASE + 510; /*Service failed to start since none of the network adapters started with this service.*/
+    public static final int NERR_RplBadRegistry = NERR_BASE + 511; /*Service failed to start due to bad startup information in the registry.*/
+    public static final int NERR_RplBadDatabase = NERR_BASE + 512; /*Service failed to start because its database is absent or corrupt.*/
+    public static final int NERR_RplRplfilesShare = NERR_BASE + 513; /*Service failed to start because RPLFILES share is absent.*/
+    public static final int NERR_RplNotRplServer = NERR_BASE + 514; /*Service failed to start because RPLUSER group is absent.*/
+    public static final int NERR_RplCannotEnum = NERR_BASE + 515; /*Cannot enumerate service records.*/
+    public static final int NERR_RplWkstaInfoCorrupted = NERR_BASE + 516; /*Workstation record information has been corrupted.*/
+    public static final int NERR_RplWkstaNotFound = NERR_BASE + 517; /*Workstation record was not found.*/
+    public static final int NERR_RplWkstaNameUnavailable = NERR_BASE + 518; /*Workstation name is in use by some other workstation.*/
+    public static final int NERR_RplProfileInfoCorrupted = NERR_BASE + 519; /*Profile record information has been corrupted.*/
+    public static final int NERR_RplProfileNotFound = NERR_BASE + 520; /*Profile record was not found.*/
+    public static final int NERR_RplProfileNameUnavailable = NERR_BASE + 521; /*Profile name is in use by some other profile.*/
+    public static final int NERR_RplProfileNotEmpty = NERR_BASE + 522; /*There are workstations using this profile.*/
+    public static final int NERR_RplConfigInfoCorrupted = NERR_BASE + 523; /*Configuration record information has been corrupted.*/
+    public static final int NERR_RplConfigNotFound = NERR_BASE + 524; /*Configuration record was not found.*/
+    public static final int NERR_RplAdapterInfoCorrupted = NERR_BASE + 525; /*Adapter id record information has been corrupted.*/
+    public static final int NERR_RplInternal   = NERR_BASE + 526; /*An internal service error has occurred.*/
+    public static final int NERR_RplVendorInfoCorrupted = NERR_BASE + 527; /*Vendor id record information has been corrupted.*/
+    public static final int NERR_RplBootInfoCorrupted = NERR_BASE + 528; /*Boot block record information has been corrupted.*/
+    public static final int NERR_RplWkstaNeedsUserAcct = NERR_BASE + 529; /*The user account for this workstation record is missing.*/
+    public static final int NERR_RplNeedsRPLUSERAcct = NERR_BASE + 530; /*The RPLUSER local group could not be found.*/
+    public static final int NERR_RplBootNotFound = NERR_BASE + 531; /*Boot block record was not found.*/
+    public static final int NERR_RplIncompatibleProfile = NERR_BASE + 532; /*Chosen profile is incompatible with this workstation.*/
+    public static final int NERR_RplAdapterNameUnavailable = NERR_BASE + 533; /*Chosen network adapter id is in use by some other workstation.*/
+    public static final int NERR_RplConfigNotEmpty = NERR_BASE + 534; /*There are profiles using this configuration.*/
+    public static final int NERR_RplBootInUse  = NERR_BASE + 535; /*There are workstations, profiles or configurations using this boot block.*/
+    public static final int NERR_RplBackupDatabase = NERR_BASE + 536; /*Service failed to backup Remoteboot database.*/
+    public static final int NERR_RplAdapterNotFound = NERR_BASE + 537; /*Adapter record was not found.*/
+    public static final int NERR_RplVendorNotFound = NERR_BASE + 538; /*Vendor record was not found.*/
+    public static final int NERR_RplVendorNameUnavailable = NERR_BASE + 539; /*Vendor name is in use by some other vendor record.*/
+    public static final int NERR_RplBootNameUnavailable = NERR_BASE + 540; /*(boot name, vendor id; is in use by some other boot block record.*/
+    public static final int NERR_RplConfigNameUnavailable = NERR_BASE + 541; /*Configuration name is in use by some other configuration.*/
+
+    /**INTERNAL_ONLY**/
+
+    /*
+     *  Dfs API error codes.
+     *
+     *          NERR_BASE + = 560-590;
+     */
+
+    public static final int NERR_DfsInternalCorruption = NERR_BASE + 560; /*The internal database maintained by the DFS service is corrupt*/
+    public static final int NERR_DfsVolumeDataCorrupt = NERR_BASE + 561; /*One of the records in the internal DFS database is corrupt*/
+    public static final int NERR_DfsNoSuchVolume = NERR_BASE + 562; /*There is no DFS name whose entry path matches the input Entry Path*/
+    public static final int NERR_DfsVolumeAlreadyExists = NERR_BASE + 563; /*A root or link with the given name already exists*/
+    public static final int NERR_DfsAlreadyShared = NERR_BASE + 564; /*The server share specified is already shared in the DFS*/
+    public static final int NERR_DfsNoSuchShare = NERR_BASE + 565; /*The indicated server share does not support the indicated DFS namespace*/
+    public static final int NERR_DfsNotALeafVolume = NERR_BASE + 566; /*The operation is not valid on this portion of the namespace*/
+    public static final int NERR_DfsLeafVolume = NERR_BASE + 567; /*The operation is not valid on this portion of the namespace*/
+    public static final int NERR_DfsVolumeHasMultipleServers = NERR_BASE + 568; /*The operation is ambiguous because the link has multiple servers*/
+    public static final int NERR_DfsCantCreateJunctionPoint = NERR_BASE + 569; /*Unable to create a link*/
+    public static final int NERR_DfsServerNotDfsAware = NERR_BASE + 570; /*The server is not DFS Aware*/
+    public static final int NERR_DfsBadRenamePath = NERR_BASE + 571; /*The specified rename target path is invalid*/
+    public static final int NERR_DfsVolumeIsOffline = NERR_BASE + 572; /*The specified DFS link is offline*/
+    public static final int NERR_DfsNoSuchServer = NERR_BASE + 573; /*The specified server is not a server for this link*/
+    public static final int NERR_DfsCyclicalName = NERR_BASE + 574; /*A cycle in the DFS name was detected*/
+    public static final int NERR_DfsNotSupportedInServerDfs = NERR_BASE + 575; /*The operation is not supported on a server-based DFS*/
+    public static final int NERR_DfsDuplicateService = NERR_BASE + 576; /*This link is already supported by the specified server-share*/
+    public static final int NERR_DfsCantRemoveLastServerShare = NERR_BASE + 577; /*Can't remove the last server-share supporting this root or link*/
+    public static final int NERR_DfsVolumeIsInterDfs = NERR_BASE + 578; /*The operation is not supported for an Inter-DFS link*/
+    public static final int NERR_DfsInconsistent = NERR_BASE + 579; /*The internal state of the DFS Service has become inconsistent*/
+    public static final int NERR_DfsServerUpgraded = NERR_BASE + 580; /*The DFS Service has been installed on the specified server*/
+    public static final int NERR_DfsDataIsIdentical = NERR_BASE + 581; /*The DFS data being reconciled is identical*/
+    public static final int NERR_DfsCantRemoveDfsRoot = NERR_BASE + 582; /*The DFS root cannot be deleted - Uninstall DFS if required*/
+    public static final int NERR_DfsChildOrParentInDfs = NERR_BASE + 583; /*A child or parent directory of the share is already in a DFS*/
+    public static final int NERR_DfsInternalError = NERR_BASE + 590; /*DFS internal error*/
+
+    /*
+     *  Net setup error codes.
+     *
+     *          NERR_BASE + = 591-600;
+     */
+    public static final int NERR_SetupAlreadyJoined = NERR_BASE + 591; /*This machine is already joined to a domain.*/
+    public static final int NERR_SetupNotJoined = NERR_BASE + 592; /*This machine is not currently joined to a domain.*/
+    public static final int NERR_SetupDomainController = NERR_BASE + 593; /*This machine is a domain controller and cannot be unjoined from a domain.*/
+    public static final int NERR_DefaultJoinRequired = NERR_BASE + 594; /*The destination domain controller does not support creating machine accounts in OUs.*/
+    public static final int NERR_InvalidWorkgroupName = NERR_BASE + 595; /*The specified workgroup name is invalid.*/
+    public static final int NERR_NameUsesIncompatibleCodePage = NERR_BASE + 596; /*The specified computer name is incompatible with the default language used on the domain controller.*/
+    public static final int NERR_ComputerAccountNotFound = NERR_BASE + 597; /*The specified computer account could not be found. Contact an administrator to verify the account is in the domain. If the account has been deleted unjoin, reboot, and rejoin the domain.*/
+    public static final int NERR_PersonalSku   = NERR_BASE + 598; /*This version of Windows cannot be joined to a domain.*/
+    public static final int NERR_SetupCheckDNSConfig = NERR_BASE + 599; /*An attempt to resolve the DNS name of a DC in the domain being joined has failed.  Please verify this client is configured to reach a DNS server that can resolve DNS names in the target domain.*/
+
+    /*
+     *  Some Password and account error results
+     *
+     *          NERR_BASE + = 601 - 608;
+    */
+    public static final int NERR_PasswordMustChange = NERR_BASE + 601;   /* Password must change at next logon */
+    public static final int NERR_AccountLockedOut = NERR_BASE + 602;   /* Account is locked out */
+    public static final int NERR_PasswordTooLong = NERR_BASE + 603;   /* Password is too long */
+    public static final int NERR_PasswordNotComplexEnough = NERR_BASE + 604;   /* Password doesn't meet the complexity policy */ 
+    public static final int NERR_PasswordFilterError = NERR_BASE + 605;   /* Password doesn't meet the requirements of the filter dll's */
+
+    /***********WARNING ****************
+     *The range 2750-2799 has been     *
+     *allocated to the IBM LAN Server  *
+     ***********************************/
+
+    /***********WARNING ****************
+     *The range 2900-2999 has been     *
+     *reserved for Microsoft OEMs      *
+     ***********************************/
+
+    public static final int MAX_NERR = NERR_BASE + 899; /* This is the last error in NERR range. */    
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/LMJoin.java b/contrib/platform/src/com/sun/jna/platform/win32/LMJoin.java
new file mode 100644
index 0000000..62a1197
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/LMJoin.java
@@ -0,0 +1,34 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from LMJoin.h.
+ * Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface LMJoin extends StdCallLibrary {
+
+	/**
+	 * Status of a workstation.
+	 */
+	public abstract class NETSETUP_JOIN_STATUS {
+		public static final int NetSetupUnknownStatus = 0;
+		public static final int NetSetupUnjoined = 1;
+		public static final int NetSetupWorkgroupName = 2;
+		public static final int NetSetupDomainName = 3;		
+	};
+
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/NTSecApi.java b/contrib/platform/src/com/sun/jna/platform/win32/NTSecApi.java
new file mode 100644
index 0000000..56c556a
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/NTSecApi.java
@@ -0,0 +1,215 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Memory;
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.Union;
+import com.sun.jna.platform.win32.WinNT.LARGE_INTEGER;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from NTSecApi.h
+ * Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface NTSecApi extends StdCallLibrary {
+	
+	/**
+	 * The LSA_UNICODE_STRING structure is used by various Local Security Authority (LSA) 
+	 * functions to specify a Unicode string.
+	 */
+	public static class LSA_UNICODE_STRING extends Structure {
+		public static class ByReference extends LSA_UNICODE_STRING implements Structure.ByReference {
+
+		}
+	
+		/**
+		 * Specifies the length, in bytes, of the string pointed to by the Buffer member, 
+		 * not including the terminating null character, if any.
+		 */
+		public short Length;
+		/**
+		 * Specifies the total size, in bytes, of the memory allocated for Buffer. Up to 
+		 * MaximumLength bytes can be written into the buffer without trampling memory.
+		 */
+		public short MaximumLength;
+		/**
+		 * Pointer to a wide character string. Note that the strings returned by the 
+		 * various LSA functions might not be null terminated.
+		 */
+		public Pointer Buffer;
+		
+		/**
+		 * String representation of the buffer.
+		 * @return
+		 *  Unicode string.
+		 */
+		public String getString() {
+        	byte[] data = Buffer.getByteArray(0, Length);
+        	if (data.length < 2 || data[data.length - 1] != 0) {
+        		Memory newdata = new Memory(data.length + 2);
+        		newdata.write(0, data, 0, data.length);
+        		return newdata.getString(0, true);
+        	}
+        	return Buffer.getString(0, true);
+		}
+	}
+
+	/**
+	 * Pointer to an LSA_UNICODE_STRING.
+	 */
+	public static class PLSA_UNICODE_STRING {
+		public static class ByReference extends PLSA_UNICODE_STRING 
+			implements Structure.ByReference {
+
+		}
+		
+		public LSA_UNICODE_STRING.ByReference s;
+	}
+	
+	/**
+	 * Record contains an included top-level name.
+	 */
+	public static final int ForestTrustTopLevelName = 0;
+	/**
+	 * Record contains an excluded top-level name.
+	 */
+	public static final int ForestTrustTopLevelNameEx = 1;
+	/**
+	 * Record contains an LSA_FOREST_TRUST_DOMAIN_INFO structure.
+	 */
+	public static final int ForestTrustDomainInfo = 2;
+
+	public static class LSA_FOREST_TRUST_DOMAIN_INFO extends Structure {
+		public PSID.ByReference Sid;
+		public LSA_UNICODE_STRING DnsName;
+		public LSA_UNICODE_STRING NetbiosName;
+	}
+	
+	public static class LSA_FOREST_TRUST_BINARY_DATA extends Structure {
+		public NativeLong Length;
+		public Pointer Buffer;
+	}
+	
+	public static class LSA_FOREST_TRUST_RECORD extends Structure {    
+		
+		public static class ByReference extends LSA_FOREST_TRUST_RECORD  implements Structure.ByReference {
+
+		}
+
+		public static class UNION extends Union {
+			public static class ByReference extends UNION  implements Structure.ByReference {
+
+			}
+			
+			public LSA_UNICODE_STRING TopLevelName;
+			public LSA_FOREST_TRUST_DOMAIN_INFO DomainInfo;
+			public LSA_FOREST_TRUST_BINARY_DATA Data;
+		}
+		
+		/**
+		 * Flags that control the behavior of the operation.
+		 */
+		public NativeLong Flags;
+		
+		/**
+		 * LSA_FOREST_TRUST_RECORD_TYPE enumeration that indicates the type of the record. 
+		 * The following table shows the possible values.
+		 * ForestTrustTopLevelName
+		 *  Record contains an included top-level name.
+		 * ForestTrustTopLevelNameEx
+		 *  Record contains an excluded top-level name.
+		 * ForestTrustDomainInfo
+		 *  Record contains an LSA_FOREST_TRUST_DOMAIN_INFO structure.
+		 * ForestTrustRecordTypeLast
+		 *  Marks the end of an enumeration.
+		 */
+		public int ForestTrustType;
+		public LARGE_INTEGER Time;
+		
+		/**
+		 * Data type depending on ForestTrustType. 
+		 */
+		public UNION u;
+		
+		public void read() {
+			super.read();
+			
+			switch(ForestTrustType) {
+    		case NTSecApi.ForestTrustTopLevelName:
+    		case NTSecApi.ForestTrustTopLevelNameEx:
+    			u.setType(LSA_UNICODE_STRING.class);
+    			break;
+    		case NTSecApi.ForestTrustDomainInfo:
+    			u.setType(LSA_FOREST_TRUST_DOMAIN_INFO.class);
+    			break;
+    		default:
+    			u.setType(LSA_FOREST_TRUST_BINARY_DATA.class);
+				break;
+    		}
+			
+			u.read();
+		}
+	}
+	
+	public static class PLSA_FOREST_TRUST_RECORD extends Structure {
+		public static class ByReference extends PLSA_FOREST_TRUST_RECORD implements Structure.ByReference {
+			
+		}
+		
+		public LSA_FOREST_TRUST_RECORD.ByReference tr;	
+	}
+	
+	public static class LSA_FOREST_TRUST_INFORMATION extends Structure {
+		
+		public static class ByReference extends LSA_FOREST_TRUST_INFORMATION implements Structure.ByReference {
+			
+		}
+		
+		/**
+		 * Number of LSA_FOREST_TRUST_RECORD structures in the array pointed to by the 
+		 * Entries member.
+		 */
+		public NativeLong RecordCount;
+		/**
+		 * Pointer to a pointer to an array of LSA_FOREST_TRUST_RECORD structures, 
+		 * each of which contains one piece of forest trust information.
+		 */
+		public PLSA_FOREST_TRUST_RECORD.ByReference Entries;
+
+		/**
+		 * Get an array of LSA_FOREST_TRUST_RECORD entries.
+		 * @return
+		 *  An array of forest trust records.
+		 */
+		public PLSA_FOREST_TRUST_RECORD[] getEntries() {
+			return (PLSA_FOREST_TRUST_RECORD[]) Entries.toArray(RecordCount.intValue());
+		}
+	}
+	/**
+	 * The LSA_FOREST_TRUST_INFORMATION structure contains Local Security Authority 
+	 * forest trust information.
+	 */
+	public static class PLSA_FOREST_TRUST_INFORMATION extends Structure {
+		
+		public static class ByReference extends PLSA_FOREST_TRUST_INFORMATION implements Structure.ByReference {
+			
+		}
+
+		public LSA_FOREST_TRUST_INFORMATION.ByReference fti;		
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/NTStatus.java b/contrib/platform/src/com/sun/jna/platform/win32/NTStatus.java
new file mode 100644
index 0000000..749d054
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/NTStatus.java
@@ -0,0 +1,90 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.win32.StdCallLibrary;
+
+public interface NTStatus extends StdCallLibrary {
+	
+	public static final int STATUS_SUCCESS = 0x00000000; // ntsubauth
+	public static final int STATUS_BUFFER_TOO_SMALL  = 0xC0000023;
+
+	//
+	// MessageId: STATUS_WAIT_0
+	//
+	// MessageText:
+	//
+	//  STATUS_WAIT_0
+	//
+	public static final int  STATUS_WAIT_0 = 0x00000000;    // winnt
+
+	//
+	// MessageId: STATUS_WAIT_1
+	//
+	// MessageText:
+	//
+	//  STATUS_WAIT_1
+	//
+	public static final int  STATUS_WAIT_1 = 0x00000001;
+
+	//
+	// MessageId: STATUS_WAIT_2
+	//
+	// MessageText:
+	//
+	//  STATUS_WAIT_2
+	//
+	public static final int  STATUS_WAIT_2 = 0x00000002;
+
+	//
+	// MessageId: STATUS_WAIT_3
+	//
+	// MessageText:
+	//
+	//  STATUS_WAIT_3
+	//
+	public static final int  STATUS_WAIT_3 = 0x00000003;
+
+	//
+	// MessageId: STATUS_WAIT_63
+	//
+	// MessageText:
+	//
+	//  STATUS_WAIT_63
+	//
+	public static final int  STATUS_WAIT_63 = 0x0000003F;
+
+	//
+	// The success status codes 128 - 191 are reserved for wait completion
+	// status with an abandoned mutant object.
+	//
+	public static final int  STATUS_ABANDONED = 0x00000080;
+
+	//
+	// MessageId: STATUS_ABANDONED_WAIT_0
+	//
+	// MessageText:
+	//
+	//  STATUS_ABANDONED_WAIT_0
+	//
+	public static final int  STATUS_ABANDONED_WAIT_0 = 0x00000080;    // winnt
+
+	//
+	// MessageId: STATUS_ABANDONED_WAIT_63
+	//
+	// MessageText:
+	//
+	//  STATUS_ABANDONED_WAIT_63
+	//
+	public static final int  STATUS_ABANDONED_WAIT_63 = 0x000000BF;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Netapi32.java b/contrib/platform/src/com/sun/jna/platform/win32/Netapi32.java
new file mode 100644
index 0000000..8a586d6
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Netapi32.java
@@ -0,0 +1,403 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.DsGetDC.PDOMAIN_CONTROLLER_INFO;
+import com.sun.jna.platform.win32.DsGetDC.PDS_DOMAIN_TRUSTS;
+import com.sun.jna.platform.win32.Guid.GUID;
+import com.sun.jna.platform.win32.NTSecApi.PLSA_FOREST_TRUST_INFORMATION;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.NativeLongByReference;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Netapi32.dll Interface.
+ * @author dblock[at]dblock.org
+ */
+public interface Netapi32 extends StdCallLibrary {
+	
+	Netapi32 INSTANCE = (Netapi32) Native.loadLibrary("Netapi32",
+			Netapi32.class, W32APIOptions.UNICODE_OPTIONS);
+
+	/**
+	 * Retrieves join status information for the specified computer.
+	 * 
+	 * @param lpServer
+	 *  Specifies the DNS or NetBIOS name of the computer on which to
+	 *  call the function.
+	 * @param lpNameBuffer
+	 *  Receives the NetBIOS name of the domain or workgroup to which
+	 *  the computer is joined.
+	 * @param BufferType
+	 *  Join status of the specified computer.
+	 * @return If the function succeeds, the return value is NERR_Success. If
+	 *         the function fails, the return value is a system error code.
+	 */
+	public int NetGetJoinInformation(String lpServer,
+			PointerByReference lpNameBuffer, IntByReference BufferType);
+
+	/**
+	 * Frees the memory that the NetApiBufferAllocate function allocates.
+	 * 
+	 * @param buffer
+	 * @return If the function succeeds, the return value is NERR_Success. If
+	 *         the function fails, the return value is a system error code.
+	 */
+	public int NetApiBufferFree(Pointer buffer);
+
+	/**
+	 * Returns information about each local group account on the specified
+	 * server.
+	 * 
+	 * @param serverName
+	 *  Specifies the DNS or NetBIOS name of the remote server on
+	 *  which the function is to execute. If this parameter is NULL,
+	 *  the local computer is used.
+	 * @param level
+	 *  Specifies the information level of the data.
+	 * @param bufptr
+	 *  Pointer to the address of the buffer that receives the
+	 *  information structure.
+	 * @param prefmaxlen
+	 *  Specifies the preferred maximum length of returned data, in
+	 *  bytes.
+	 * @param entriesread
+	 *  Pointer to a value that receives the count of elements
+	 *  actually enumerated.
+	 * @param totalentries
+	 *  Pointer to a value that receives the approximate total number
+	 *  of entries that could have been enumerated from the current
+	 *  resume position.
+	 * @param resume_handle
+	 *  Pointer to a value that contains a resume handle that is used
+	 *  to continue an existing local group search.
+	 * @return If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetLocalGroupEnum(String serverName, int level,
+			PointerByReference bufptr, int prefmaxlen,
+			IntByReference entriesread, IntByReference totalentries,
+			IntByReference resume_handle);
+	
+	/**
+	 * Returns the name of the primary domain controller (PDC).
+	 * 
+	 * @param serverName 
+	 * 	Specifies the DNS or NetBIOS name of the remote server on which the function is 
+	 * 	to execute. If this parameter is NULL, the local computer is used. 
+	 * @param domainName
+	 * 	Specifies the name of the domain. 
+	 * @param bufptr
+	 * 	Receives a string that specifies the server name of the PDC of the domain.
+	 * @return 
+	 * 	If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetGetDCName(String serverName, String domainName, 
+			PointerByReference bufptr);
+
+	/**
+	 * The NetGroupEnum function retrieves information about each global group 
+	 * in the security database, which is the security accounts manager (SAM) database or,
+	 * in the case of domain controllers, the Active Directory.
+	 * @param servername
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of the 
+	 *  remote server on which the function is to execute. If this parameter is NULL, 
+	 *  the local computer is used. 
+	 * @param level
+	 *  Specifies the information level of the data. 
+	 * @param bufptr
+	 *  Pointer to the buffer to receive the global group information structure. 
+	 *  The format of this data depends on the value of the level parameter. 
+	 * @param prefmaxlen
+	 *  Specifies the preferred maximum length of the returned data, in bytes. 
+	 *  If you specify MAX_PREFERRED_LENGTH, the function allocates the amount of 
+	 *  memory required to hold the data. If you specify another value in this 
+	 *  parameter, it can restrict the number of bytes that the function returns. 
+	 *  If the buffer size is insufficient to hold all entries, the function 
+	 *  returns ERROR_MORE_DATA.
+	 * @param entriesread
+	 *  Pointer to a value that receives the count of elements actually enumerated. 
+	 * @param totalentries
+	 *  Pointer to a value that receives the total number of entries that could have 
+	 *  been enumerated from the current resume position. The total number of entries 
+	 *  is only a hint.
+	 * @param resume_handle
+	 *  Pointer to a variable that contains a resume handle that is used to continue 
+	 *  the global group enumeration. The handle should be zero on the first call and 
+	 *  left unchanged for subsequent calls. If resume_handle is NULL, no resume handle 
+	 *  is stored. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetGroupEnum(String servername, int level, PointerByReference bufptr,
+			int prefmaxlen, IntByReference entriesread, IntByReference totalentries,
+			IntByReference resume_handle);
+
+	/**
+	 * The NetUserEnum function provides information about all user accounts on a server.	 
+	 * @param servername
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of the 
+	 *  remote server on which the function is to execute. If this parameter is NULL, 
+	 *  the local computer is used. 
+	 * @param level
+	 *  Specifies the information level of the data.
+	 * @param filter
+	 *  Specifies a value that filters the account types for enumeration.
+	 * @param bufptr
+	 *  Pointer to the buffer that receives the data. The format of this data depends 
+	 *  on the value of the level parameter. This buffer is allocated by the system and
+	 *  must be freed using the NetApiBufferFree function. Note that you must free the
+	 *  buffer even if the function fails with ERROR_MORE_DATA. 
+	 * @param prefmaxlen
+	 *  Specifies the preferred maximum length, in 8-bit bytes of returned data. If you 
+	 *  specify MAX_PREFERRED_LENGTH, the function allocates the amount of memory 
+	 *  required for the data. If you specify another value in this parameter, it can
+	 *  restrict the number of bytes that the function returns. If the buffer size is
+	 *  insufficient to hold all entries, the function returns ERROR_MORE_DATA. 
+	 * @param entriesread
+	 *  Pointer to a value that receives the count of elements actually enumerated. 
+	 * @param totalentries
+	 *  Pointer to a value that receives the total number of entries that could have 
+	 *  been enumerated from the current resume position. Note that applications should 
+	 *  consider this value only as a hint.
+	 * @param resume_handle
+	 *  Pointer to a value that contains a resume handle which is used to continue an 
+	 *  existing user search. The handle should be zero on the first call and left 
+	 *  unchanged for subsequent calls. If resume_handle is NULL, then no resume 
+	 *  handle is stored. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetUserEnum(String servername, int level, int filter, PointerByReference bufptr,
+			int prefmaxlen, IntByReference entriesread, IntByReference totalentries,
+			IntByReference resume_handle);
+
+	/**
+	 * The NetUserGetGroups function retrieves a list of global groups to which a 
+	 * specified user belongs.
+	 * @param servername
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of the 
+	 *  remote server on which the function is to execute. If this parameter is NULL, 
+	 *  the local computer is used. 
+	 * @param username
+	 *  Pointer to a constant string that specifies the name of the user to search for 
+	 *  in each group account. For more information, see the following Remarks section. 
+	 * @param level
+	 *  Specifies the information level of the data.
+	 * @param bufptr
+	 *  Pointer to the buffer that receives the data. This buffer is allocated by the 
+	 *  system and must be freed using the NetApiBufferFree function. Note that you must 
+	 *  free the buffer even if the function fails with ERROR_MORE_DATA. 
+	 * @param prefmaxlen
+	 *  Specifies the preferred maximum length of returned data, in bytes. If you specify 
+	 *  MAX_PREFERRED_LENGTH, the function allocates the amount of memory required for the 
+	 *  data. If you specify another value in this parameter, it can restrict the number 
+	 *  of bytes that the function returns. If the buffer size is insufficient to hold 
+	 *  all entries, the function returns ERROR_MORE_DATA.
+	 * @param entriesread
+	 *  Pointer to a value that receives the count of elements actually retrieved. 
+	 * @param totalentries
+	 *  Pointer to a value that receives the total number of entries that could have been retrieved. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetUserGetGroups(String servername, String username, int level,
+			PointerByReference bufptr, int prefmaxlen,
+			IntByReference entriesread, IntByReference totalentries);
+ 
+	/**
+	 * The NetUserGetLocalGroups function retrieves a list of local groups to which a
+	 * specified user belongs.
+	 * @param servername
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of the remote 
+	 *  server on which the function is to execute. If this parameter is NULL, the local 
+	 *  computer is used. 
+	 * @param username
+	 *  Pointer to a constant string that specifies the name of the user for which to return
+	 *  local group membership information. If the string is of the form DomainName\UserName 
+	 *  the user name is expected to be found on that domain. If the string is of the form 
+	 *  UserName, the user name is expected to be found on the server specified by the 
+	 *  servername parameter.
+	 * @param level
+	 *  Specifies the information level of the data.
+	 * @param flags
+	 *  Specifies a bitmask of flags. Currently, only the value LG_INCLUDE_INDIRECT is 
+	 *  defined. If this bit is set, the function also returns the names of the local 
+	 *  groups in which the user is indirectly a member (that is, the user has membership 
+	 *  in a global group that is itself a member of one or more local groups). 
+	 * @param bufptr
+	 *  Pointer to the buffer that receives the data. The format of this data depends on 
+	 *  the value of the level parameter. This buffer is allocated by the system and must 
+	 *  be freed using the NetApiBufferFree function. Note that you must free the buffer 
+	 *  even if the function fails with ERROR_MORE_DATA. 
+	 * @param prefmaxlen
+	 *  Specifies the preferred maximum length of returned data, in bytes. If you specify 
+	 *  MAX_PREFERRED_LENGTH, the function allocates the amount of memory required for the 
+	 *  data. If you specify another value in this parameter, it can restrict the number of 
+	 *  bytes that the function returns. If the buffer size is insufficient to hold all 
+	 *  entries, the function returns ERROR_MORE_DATA. For more information, see Network 
+	 *  Management Function Buffers and Network Management Function Buffer Lengths. 
+	 * @param entriesread
+	 *  Pointer to a value that receives the count of elements actually enumerated.
+	 * @param totalentries
+	 *  Pointer to a value that receives the total number of entries that could have been enumerated. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetUserGetLocalGroups(String servername, String username, int level,
+			int flags, PointerByReference bufptr, int prefmaxlen,
+			IntByReference entriesread, IntByReference totalentries);
+	
+	/**
+	 * The NetUserAdd function adds a user account and assigns a password and privilege level.
+	 * @param servername
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of the remote server 
+	 *  on which the function is to execute.
+	 * @param level
+	 *  Specifies the information level of the data.
+	 * @param buf
+	 *  Pointer to the buffer that specifies the data. The format of this data depends on the 
+	 *  value of the level parameter.
+	 * @param parm_err
+	 *  Pointer to a value that receives the index of the first member of the user information 
+	 *  structure that causes ERROR_INVALID_PARAMETER. If this parameter is NULL, the index is 
+	 *  not returned on error. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetUserAdd(String servername, int level, 
+			Structure buf, IntByReference parm_err);
+	
+	
+	/**
+	 * The NetUserDel function deletes a user account from a server.
+	 * @param servername
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of the remote 
+	 *  server on which the function is to execute. If this parameter is NULL, the local 
+	 *  computer is used. 
+	 * @param username
+	 *  Pointer to a constant string that specifies the name of the user account to delete. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetUserDel(String servername, String username);		
+	
+	/**
+	 * The NetUserChangePassword function changes a user's password for a specified
+	 * network server or domain.
+	 * @param domainname
+	 *  Pointer to a constant string that specifies the DNS or NetBIOS name of a remote 
+	 *  server or domain on which the function is to execute. If this parameter is NULL, 
+	 *  the logon domain of the caller is used. 
+	 * @param username
+	 *  Pointer to a constant string that specifies a user name. The NetUserChangePassword 
+	 *  function changes the password for the specified user. If this parameter is NULL, 
+	 *  the logon name of the caller is used.
+	 * @param oldpassword
+	 *  Pointer to a constant string that specifies the user's old password. 
+	 * @param newpassword
+	 *  Pointer to a constant string that specifies the user's new password. 
+	 * @return
+	 *  If the function succeeds, the return value is NERR_Success.
+	 */
+	public int NetUserChangePassword(String domainname, String username, 
+			String oldpassword, String newpassword);
+	
+	/**
+	 * The DsGetDcName function returns the name of a domain controller in a specified domain. 
+	 * This function accepts additional domain controller selection criteria to indicate 
+	 * preference for a domain controller with particular characteristics.
+	 * @param ComputerName
+	 *  Pointer to a null-terminated string that specifies the name of the server to process 
+	 *  this function. Typically, this parameter is NULL, which indicates that the local 
+	 *  computer is used. 
+	 * @param DomainName
+	 *  Pointer to a null-terminated string that specifies the name of the domain or application
+	 *  partition to query. This name can either be a DNS style name, for example, fabrikam.com,
+	 *  or a flat-style name, for example, Fabrikam. If a DNS style name is specified, the name 
+	 *  may be specified with or without a trailing period.
+	 * @param DomainGuid
+	 *  Pointer to a GUID structure that specifies the GUID of the domain queried. If DomainGuid 
+	 *  is not NULL and the domain specified by DomainName or ComputerName cannot be found, 
+	 *  DsGetDcName attempts to locate a domain controller in the domain having the GUID specified 
+	 *  by DomainGuid.
+	 * @param SiteName
+	 *  Pointer to a null-terminated string that specifies the name of the site where the returned 
+	 *  domain controller should physically exist. If this parameter is NULL, DsGetDcName attempts 
+	 *  to return a domain controller in the site closest to the site of the computer specified by 
+	 *  ComputerName. This parameter should be NULL, by default.
+	 * @param Flags
+	 *  Contains a set of flags that provide additional data used to process the request.
+	 * @param DomainControllerInfo
+	 *  Pointer to a PDOMAIN_CONTROLLER_INFO value that receives a pointer to a 
+	 *  DOMAIN_CONTROLLER_INFO structure that contains data about the domain controller selected. 
+	 *  This structure is allocated by DsGetDcName. The caller must free the structure using 
+	 *  the NetApiBufferFree function when it is no longer required.
+	 * @return
+	 *  If the function returns domain controller data, the return value is ERROR_SUCCESS.
+	 *  If the function fails, the return code is one of ERROR_* values.
+	 */
+	public int DsGetDcName(String ComputerName, String DomainName, GUID DomainGuid,
+            String SiteName, int Flags, PDOMAIN_CONTROLLER_INFO.ByReference DomainControllerInfo);
+	
+	/**
+	 * The DsGetForestTrustInformationW function obtains forest trust data for a specified domain.
+	 * @param serverName
+	 *  Contains the name of the domain controller that DsGetForestTrustInformationW 
+	 *  is connected to remotely. The caller must be an authenticated user on this server. 
+	 *  If this parameter is NULL, the local server is used.
+	 * @param trustedDomainName
+	 *  Contains the NETBIOS or DNS name of the trusted domain that the forest trust data 
+	 *  is to be retrieved for. This domain must have the TRUST_ATTRIBUTE_FOREST_TRANSITIVE 
+	 *  trust attribute. If this parameter is NULL, the forest trust data for the domain 
+	 *  hosted by ServerName is retrieved.
+	 * @param Flags
+	 *  Contains a set of flags that modify the behavior of this function.
+	 *  DS_GFTI_UPDATE_TDO: If this flag is set, DsGetForestTrustInformationW will update the 
+	 *  forest trust data of the trusted domain identified by the TrustedDomainName parameter. 
+	 * @param ForestTrustInfo
+	 *  Pointer to an LSA_FOREST_TRUST_INFORMATION structure pointer that receives the forest 
+	 *  trust data that describes the namespaces claimed by the domain specified by 
+	 *  TrustedDomainName. The Time member of all returned records will be zero. 
+	 * @return
+	 *  Returns NO_ERROR if successful or a Win32 error code otherwise. 
+	 */
+	public int DsGetForestTrustInformation(String serverName, String trustedDomainName, int Flags, 
+			PLSA_FOREST_TRUST_INFORMATION.ByReference ForestTrustInfo);
+	
+	/**
+	 * The DsEnumerateDomainTrusts function obtains domain trust data for a specified domain.
+	 * @param serverName
+	 *  Pointer to a null-terminated string that specifies the name of a computer in the domain to 
+	 *  obtain the trust information for. This computer must be running the Windows 2000 or later 
+	 *  operating system. If this parameter is NULL, the name of the local computer is used. 
+	 *  The caller must be an authenticated user in this domain.
+	 * @param Flags
+	 *  Contains a set of flags that determines which domain trusts to enumerate.
+	 * @param Domains
+	 *  Pointer to a PDS_DOMAIN_TRUSTS value that receives an array of DS_DOMAIN_TRUSTS structures. 
+	 *  Each structure in this array contains trust data about a domain. The caller must free this 
+	 *  memory when it is no longer required by calling NetApiBufferFree.
+	 * @param DomainCount
+	 *  Pointer to a ULONG value that receives the number of elements returned in the Domains array.
+	 * @return
+	 *  Returns ERROR_SUCCESS if successful or a Win32 error code otherwise.
+	 */
+	public int DsEnumerateDomainTrusts(String serverName, NativeLong Flags, 
+			PDS_DOMAIN_TRUSTS.ByReference Domains, NativeLongByReference DomainCount);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java
new file mode 100644
index 0000000..98286e2
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Netapi32Util.java
@@ -0,0 +1,605 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.util.ArrayList;
+
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.DsGetDC.DS_DOMAIN_TRUSTS;
+import com.sun.jna.platform.win32.DsGetDC.PDOMAIN_CONTROLLER_INFO;
+import com.sun.jna.platform.win32.DsGetDC.PDS_DOMAIN_TRUSTS;
+import com.sun.jna.platform.win32.Guid.GUID;
+import com.sun.jna.platform.win32.LMAccess.GROUP_USERS_INFO_0;
+import com.sun.jna.platform.win32.LMAccess.LOCALGROUP_INFO_1;
+import com.sun.jna.platform.win32.LMAccess.LOCALGROUP_USERS_INFO_0;
+import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.NativeLongByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * Netapi32 Utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Netapi32Util {
+	
+	/**
+	 * A group.
+	 */
+	public static class Group {
+		/**
+		 * Group name.
+		 */
+		public String name;
+	}
+	
+	/**
+	 * A user.
+	 */
+	public static class User {
+		/**
+		 * The name of the user account. 
+		 */
+		public String name;
+		/**
+		 * Contains a comment associated with the user account.
+		 */
+		public String comment;
+	}
+	/**
+	 * A local group.
+	 */
+	public static class LocalGroup extends Group {
+		/**
+		 * Group comment.
+		 */
+		public String comment;
+	}
+	
+	/**
+	 * Returns the name of the primary domain controller (PDC) on the current computer.
+	 * @return The name of the primary domain controller.
+	 */
+	public static String getDCName() {
+		return getDCName(null, null);
+	}
+	
+	/**
+	 * Returns the name of the primary domain controller (PDC).
+	 * @param serverName 
+	 * 	Specifies the DNS or NetBIOS name of the remote server on which the function is 
+	 * 	to execute.
+	 * @param domainName
+	 * 	Specifies the name of the domain.
+	 * @return 
+	 *  Name of the primary domain controller.
+	 */
+	public static String getDCName(String serverName, String domainName) {
+		PointerByReference bufptr = new PointerByReference();
+		try {		
+	    	int rc = Netapi32.INSTANCE.NetGetDCName(domainName, serverName, bufptr);
+	    	if (LMErr.NERR_Success != rc) {
+	    		throw new Win32Exception(rc);
+	    	}
+	    	return bufptr.getValue().getString(0, true);
+		} finally {
+			if (W32Errors.ERROR_SUCCESS != Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue())) {
+				throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+			}
+		}
+	}
+
+	/**
+	 * Return the domain/workgroup join status for a computer. 
+	 * @return Join status.
+	 */
+	public static int getJoinStatus() {
+		return getJoinStatus(null);
+	}
+	
+	/**
+	 * Return the domain/workgroup join status for a computer. 
+	 * @param computerName Computer name.
+	 * @return Join status.
+	 */
+	public static int getJoinStatus(String computerName) {
+		PointerByReference lpNameBuffer = new PointerByReference();
+		IntByReference bufferType = new IntByReference();
+		
+		try {
+			int rc = Netapi32.INSTANCE.NetGetJoinInformation(computerName, lpNameBuffer, bufferType);
+			if (LMErr.NERR_Success != rc) {
+				throw new Win32Exception(rc);			
+			}
+			return bufferType.getValue();
+		} finally {
+			if (lpNameBuffer.getPointer() != null) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(lpNameBuffer.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);			
+				}
+			}
+		}		
+	}
+	
+	/**
+	 * Get information about a computer.
+	 * @param computerName
+	 * @return Domain or workgroup name.
+	 */
+	public static String getDomainName(String computerName) {
+		PointerByReference lpNameBuffer = new PointerByReference();
+		IntByReference bufferType = new IntByReference();
+		
+		try {
+			int rc = Netapi32.INSTANCE.NetGetJoinInformation(computerName, lpNameBuffer, bufferType);
+			if (LMErr.NERR_Success != rc) {
+				throw new Win32Exception(rc);			
+			}		
+			// type of domain: bufferType.getValue()
+			return lpNameBuffer.getValue().getString(0, true);
+		} finally {
+			if (lpNameBuffer.getPointer() != null) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(lpNameBuffer.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);			
+				}
+			}
+		}
+	}
+
+	/**
+	 * Get the names of local groups on the current computer.
+	 * @return An array of local group names.
+	 */
+	public static LocalGroup[] getLocalGroups() {
+		return getLocalGroups(null);
+	}
+		
+	/**
+	 * Get the names of local groups on a computer.
+	 * @param serverName Name of the computer.
+	 * @return An array of local group names.
+	 */
+	public static LocalGroup[] getLocalGroups(String serverName) {
+		PointerByReference bufptr = new PointerByReference();
+		IntByReference entriesRead = new IntByReference();
+		IntByReference totalEntries = new IntByReference();		
+		try {
+			int rc = Netapi32.INSTANCE.NetLocalGroupEnum(serverName, 1, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesRead, totalEntries, null);
+			if (LMErr.NERR_Success != rc || bufptr.getValue() == Pointer.NULL) {
+				throw new Win32Exception(rc);
+			}
+			LMAccess.LOCALGROUP_INFO_1 group = new LMAccess.LOCALGROUP_INFO_1(bufptr.getValue());
+			LMAccess.LOCALGROUP_INFO_1[] groups = (LOCALGROUP_INFO_1[]) group.toArray(entriesRead.getValue());
+			
+			ArrayList<LocalGroup> result = new ArrayList<LocalGroup>(); 
+			for(LOCALGROUP_INFO_1 lgpi : groups) {
+				LocalGroup lgp = new LocalGroup();
+				lgp.name = lgpi.lgrui1_name.toString();			
+				lgp.comment = lgpi.lgrui1_comment.toString();;
+				result.add(lgp);
+			}
+			return result.toArray(new LocalGroup[0]);
+		} finally {			
+			if (bufptr.getValue() != Pointer.NULL) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Get the names of global groups on a computer.
+	 * @return An array of group names.
+	 */
+	public static Group[] getGlobalGroups() {
+		return getGlobalGroups(null);
+	}
+	
+	/**
+	 * Get the names of global groups on a computer.
+	 * @param serverName Name of the computer.
+	 * @return An array of group names.
+	 */
+	public static Group[] getGlobalGroups(String serverName) {
+		PointerByReference bufptr = new PointerByReference();
+		IntByReference entriesRead = new IntByReference();
+		IntByReference totalEntries = new IntByReference();		
+		try {
+			int rc = Netapi32.INSTANCE.NetGroupEnum(serverName, 1, bufptr, 
+					LMCons.MAX_PREFERRED_LENGTH, entriesRead, 
+					totalEntries, null);
+			if (LMErr.NERR_Success != rc || bufptr.getValue() == Pointer.NULL) {
+				throw new Win32Exception(rc);
+			}
+			LMAccess.GROUP_INFO_1 group = new LMAccess.GROUP_INFO_1(bufptr.getValue());
+			LMAccess.GROUP_INFO_1[] groups = (LMAccess.GROUP_INFO_1[]) group.toArray(entriesRead.getValue());
+			
+			ArrayList<LocalGroup> result = new ArrayList<LocalGroup>(); 
+			for(LMAccess.GROUP_INFO_1 lgpi : groups) {
+				LocalGroup lgp = new LocalGroup();
+				lgp.name = lgpi.grpi1_name.toString();			
+				lgp.comment = lgpi.grpi1_comment.toString();;
+				result.add(lgp);
+			}
+			return result.toArray(new LocalGroup[0]);
+		} finally {			
+			if (bufptr.getValue() != Pointer.NULL) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Get the names of users on a local computer.
+	 * @return Users.
+	 */
+	public static User[] getUsers() {
+		return getUsers(null);
+	}
+
+	/**
+	 * Get the names of users on a computer.
+	 * @param serverName Name of the computer.
+	 * @return An array of users.
+	 */
+	public static User[] getUsers(String serverName) {
+		PointerByReference bufptr = new PointerByReference();
+		IntByReference entriesRead = new IntByReference();
+		IntByReference totalEntries = new IntByReference();		
+		try {
+			int rc = Netapi32.INSTANCE.NetUserEnum(serverName, 1, 0, bufptr, 
+					LMCons.MAX_PREFERRED_LENGTH, entriesRead, 
+					totalEntries, null);
+			if (LMErr.NERR_Success != rc || bufptr.getValue() == Pointer.NULL) {
+				throw new Win32Exception(rc);
+			}
+			LMAccess.USER_INFO_1 user = new LMAccess.USER_INFO_1(bufptr.getValue());
+			LMAccess.USER_INFO_1[] users = (LMAccess.USER_INFO_1[]) user.toArray(entriesRead.getValue());
+			
+			ArrayList<User> result = new ArrayList<User>(); 
+			for(LMAccess.USER_INFO_1 lu : users) {
+				User auser = new User();
+				auser.name = lu.usri1_name.toString();
+				result.add(auser);
+			}
+			return result.toArray(new User[0]);
+		} finally {			
+			if (bufptr.getValue() != Pointer.NULL) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Get local groups of the current user.
+	 * @return Local groups.
+	 */
+	public static Group[] getCurrentUserLocalGroups() {
+		return getUserLocalGroups(Secur32Util.getUserNameEx(
+				EXTENDED_NAME_FORMAT.NameSamCompatible));
+	}
+	
+	/**
+	 * Get local groups of a given user.
+	 * @param userName User name.
+	 * @return Local groups.
+	 */
+	public static Group[] getUserLocalGroups(String userName) {
+		return getUserLocalGroups(userName, null);
+	}
+	
+	/**
+	 * Get local groups of a given user on a given system.
+	 * @param userName User name.
+	 * @param serverName Server name.
+	 * @return Local groups.
+	 */
+	public static Group[] getUserLocalGroups(String userName, String serverName) {
+    	PointerByReference bufptr = new PointerByReference();
+    	IntByReference entriesread = new IntByReference();
+    	IntByReference totalentries = new IntByReference();
+    	try {
+	    	int rc = Netapi32.INSTANCE.NetUserGetLocalGroups(serverName, userName, 
+	    			0, 0, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries);
+	    	if (rc != LMErr.NERR_Success) {
+	    		throw new Win32Exception(rc);
+	    	}
+	    	LOCALGROUP_USERS_INFO_0 lgroup = new LOCALGROUP_USERS_INFO_0(bufptr.getValue());    	
+	    	LOCALGROUP_USERS_INFO_0[] lgroups = (LOCALGROUP_USERS_INFO_0[]) lgroup.toArray(entriesread.getValue());
+			ArrayList<Group> result = new ArrayList<Group>(); 
+	        for (LOCALGROUP_USERS_INFO_0 lgpi : lgroups) {
+				LocalGroup lgp = new LocalGroup();
+				lgp.name = lgpi.lgrui0_name.toString();
+				result.add(lgp);
+			}
+			return result.toArray(new Group[0]);
+    	} finally {
+    		if (bufptr.getValue() != Pointer.NULL) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);
+				}
+			}
+    	}
+	}
+	
+	/**
+	 * Get groups of a given user.
+	 * @param userName User name.
+	 * @return Groups.
+	 */
+	public static Group[] getUserGroups(String userName) {
+		return getUserGroups(userName, null);
+	}
+	
+	/**
+	 * Get groups of a given user on a given system.
+	 * @param userName User name.
+	 * @param serverName Server name.
+	 * @return Groups.
+	 */
+	public static Group[] getUserGroups(String userName, String serverName) {
+    	PointerByReference bufptr = new PointerByReference();
+    	IntByReference entriesread = new IntByReference();
+    	IntByReference totalentries = new IntByReference();
+    	try {
+	    	int rc = Netapi32.INSTANCE.NetUserGetGroups(serverName, userName, 
+	    			0, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries);
+	    	if (rc != LMErr.NERR_Success) {
+	    		throw new Win32Exception(rc);
+	    	}
+	    	GROUP_USERS_INFO_0 lgroup = new GROUP_USERS_INFO_0(bufptr.getValue());    	
+	    	GROUP_USERS_INFO_0[] lgroups = (GROUP_USERS_INFO_0[]) lgroup.toArray(entriesread.getValue());
+			ArrayList<Group> result = new ArrayList<Group>(); 
+	        for (GROUP_USERS_INFO_0 lgpi : lgroups) {
+				Group lgp = new Group();
+				lgp.name = lgpi.grui0_name.toString();
+				result.add(lgp);
+			}
+			return result.toArray(new Group[0]);
+    	} finally {
+    		if (bufptr.getValue() != Pointer.NULL) {
+				int rc = Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue());
+				if (LMErr.NERR_Success != rc) {
+					throw new Win32Exception(rc);
+				}
+			}
+    	}
+	}	
+	
+	/**
+	 * A domain controller.
+	 */
+	public static class DomainController {
+		/**
+		 * Specifies the computer name of the discovered domain controller.
+		 */
+		public String name;
+		/**
+		 * Specifies the address of the discovered domain controller.
+		 */
+		public String address;
+		/**
+		 * Indicates the type of WString that is contained in the 
+		 * DomainControllerAddress member.
+		 */
+		public int addressType;
+		/**
+		 * The GUID of the domain.
+		 */
+		public GUID domainGuid;
+		/**
+		 * Pointer to a null-terminated WString that specifies the name of the domain. 
+		 */
+		public String domainName;
+		/**
+		 * Pointer to a null-terminated WString that specifies the name of the domain at the root 
+	     * of the DS tree.
+		 */
+		public String dnsForestName;
+		/**
+		 * Contains a set of flags that describe the domain controller. 
+		 */
+		public int flags;
+		/**
+		 * The name of the site that the computer belongs to.
+		 */
+		public String clientSiteName;
+	}
+	
+	/**
+	 * Return the domain controller for a current computer.
+	 * @return
+	 *  Domain controller information.
+	 */
+	public static DomainController getDC() {
+        PDOMAIN_CONTROLLER_INFO.ByReference pdci = new PDOMAIN_CONTROLLER_INFO.ByReference();
+        int rc = Netapi32.INSTANCE.DsGetDcName(null, null, null, null, 0, pdci);
+    	if (W32Errors.ERROR_SUCCESS != rc) {
+    		throw new Win32Exception(rc);
+    	}
+    	DomainController dc = new DomainController();
+    	dc.address = pdci.dci.DomainControllerAddress.toString();
+    	dc.addressType = pdci.dci.DomainControllerAddressType;
+    	dc.clientSiteName = pdci.dci.ClientSiteName.toString();
+    	dc.dnsForestName = pdci.dci.DnsForestName.toString();
+    	dc.domainGuid = pdci.dci.DomainGuid;
+    	dc.domainName = pdci.dci.DomainName.toString();
+    	dc.flags = pdci.dci.Flags;
+    	dc.name = pdci.dci.DomainControllerName.toString();
+		rc = Netapi32.INSTANCE.NetApiBufferFree(pdci.getPointer());
+		if (LMErr.NERR_Success != rc) {
+			throw new Win32Exception(rc);
+		}
+		return dc;
+	}
+	
+	/**
+	 * A domain trust relationship.
+	 */
+	public static class DomainTrust {
+		/**
+		 * NetBIOS name of the domain.
+		 */
+		public String NetbiosDomainName;
+		/**
+		 * DNS name of the domain.
+		 */
+		public String DnsDomainName;
+		/**
+		 * Contains the security identifier of the domain represented by this structure.
+		 */
+		public PSID DomainSid;
+		/**
+		 * Contains the string representation of the security identifier of the domain 
+		 * represented by this structure.
+		 */
+		public String DomainSidString;
+		/**
+		 * Contains the GUID of the domain represented by this structure.
+		 */
+		public GUID DomainGuid;
+		/**
+		 * Contains the string representation of the GUID of the domain represented by 
+		 * this structure.
+		 */	
+		public String DomainGuidString;
+		
+		/**
+		 * Contains a set of flags that specify more data about the domain trust.
+		 */
+		private int flags;
+		
+		/**
+		 * The domain represented by this structure is a member of the same forest 
+		 * as the server specified in the ServerName parameter of the 
+		 * DsEnumerateDomainTrusts function.
+		 * @return
+		 *  True or false.
+		 */
+		public boolean isInForest() { 
+			return (flags & DsGetDC.DS_DOMAIN_IN_FOREST) != 0; 
+		}
+		
+		/**
+		 * The domain represented by this structure is directly trusted by the domain
+		 * that the server specified in the ServerName parameter of the 
+		 * DsEnumerateDomainTrusts function is a member of.
+		 * @return
+		 *  True or false.
+		 */
+		public boolean isOutbound() { 
+			return (flags & DsGetDC.DS_DOMAIN_DIRECT_OUTBOUND) != 0; 
+		}
+		
+		/**
+		 * The domain represented by this structure is the root of a tree and a member 
+		 * of the same forest as the server specified in the ServerName parameter of the
+		 * DsEnumerateDomainTrusts function.
+		 * @return
+		 *  True or false.
+		 */
+		public boolean isRoot() { 
+			return (flags & DsGetDC.DS_DOMAIN_TREE_ROOT) != 0; 
+		}
+	
+		/**
+		 * The domain represented by this structure is the primary domain of the server
+		 * specified in the ServerName parameter of the DsEnumerateDomainTrusts function.
+		 * @return
+		 *  True or false.
+		 */
+		public boolean isPrimary() { 
+			return (flags & DsGetDC.DS_DOMAIN_PRIMARY) != 0; 
+		}
+		
+		/**
+		 * The domain represented by this structure is running in the Windows 2000 native mode.
+		 * @return
+		 *  True or false.
+		 */
+		public boolean isNativeMode() {
+			return (flags & DsGetDC.DS_DOMAIN_NATIVE_MODE) != 0; 
+		}
+		
+		/**
+		 * The domain represented by this structure directly trusts the domain that
+		 * the server specified in the ServerName parameter of the DsEnumerateDomainTrusts
+		 * function is a member of.
+		 * @return
+		 *  True or false.
+		 */
+		public boolean isInbound() { 
+			return (flags & DsGetDC.DS_DOMAIN_DIRECT_INBOUND) != 0; 
+		}		
+	}
+	
+	/**
+	 * Retrieve all domain trusts.
+	 * @return
+	 *  An array of domain trusts.
+	 */
+	public static DomainTrust[] getDomainTrusts() {
+		return getDomainTrusts(null);
+	}
+	
+	/**
+	 * Retrieve all domain trusts for a given server.
+	 * @param serverName
+	 *  Server name.
+	 * @return
+	 *  An array of domain trusts.
+	 */
+	public static DomainTrust[] getDomainTrusts(String serverName) {
+    	NativeLongByReference domainCount = new NativeLongByReference();
+    	PDS_DOMAIN_TRUSTS.ByReference domains = new PDS_DOMAIN_TRUSTS.ByReference();
+    	int rc = Netapi32.INSTANCE.DsEnumerateDomainTrusts(
+    			serverName, new NativeLong(DsGetDC.DS_DOMAIN_VALID_FLAGS), domains, domainCount);
+    	if(W32Errors.NO_ERROR != rc) {
+    		throw new Win32Exception(rc);
+    	}
+    	try {
+	    	int domainCountValue = domainCount.getValue().intValue();
+	    	ArrayList<DomainTrust> trusts = new ArrayList<DomainTrust>(domainCountValue);
+	    	for(DS_DOMAIN_TRUSTS trust : domains.getTrusts(domainCountValue)) {
+	    		DomainTrust t = new DomainTrust();
+	    		t.DnsDomainName = trust.DnsDomainName.toString();
+	    		t.NetbiosDomainName = trust.NetbiosDomainName.toString();
+	    		t.DomainSid = trust.DomainSid;
+	    		t.DomainSidString = Advapi32Util.convertSidToStringSid(trust.DomainSid);
+	    		t.DomainGuid = trust.DomainGuid;
+	    		t.DomainGuidString = Ole32Util.getStringFromGUID(trust.DomainGuid);
+	    		t.flags = trust.Flags.intValue();
+	    		trusts.add(t);
+	    	}
+	    	return trusts.toArray(new DomainTrust[0]);
+    	} finally {
+	    	rc = Netapi32.INSTANCE.NetApiBufferFree(domains.getPointer());   	    	
+	    	if(W32Errors.NO_ERROR != rc) {
+	    		throw new Win32Exception(rc);
+	    	}
+    	}
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/NtDll.java b/contrib/platform/src/com/sun/jna/platform/win32/NtDll.java
new file mode 100644
index 0000000..a49d7af
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/NtDll.java
@@ -0,0 +1,55 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * ntdll.dll Interface.
+ * @author dblock[at]dblock.org
+ */
+public interface NtDll extends StdCallLibrary {
+	
+	NtDll INSTANCE = (NtDll) Native.loadLibrary("NtDll",
+			NtDll.class, W32APIOptions.UNICODE_OPTIONS);
+
+	/**
+	 * The ZwQueryKey routine provides information about the class of a registry key, 
+	 * and the number and sizes of its subkeys.
+	 * @param KeyHandle
+	 *  Handle to the registry key to obtain information about. This handle is created by 
+	 *  a successful call to ZwCreateKey or ZwOpenKey. 
+	 * @param KeyInformationClass
+	 *  Specifies a KEY_INFORMATION_CLASS value that determines the type of information 
+	 *  returned in the KeyInformation buffer. 
+	 * @param KeyInformation
+	 *  Pointer to a caller-allocated buffer that receives the requested information.
+	 * @param Length
+	 *  Specifies the size, in bytes, of the KeyInformation buffer. 
+	 * @param ResultLength
+	 *  Pointer to a variable that receives the size, in bytes, of the requested key 
+	 *  information. If ZwQueryKey returns STATUS_SUCCESS, the variable contains the amount 
+	 *  of data returned. If ZwQueryKey returns STATUS_BUFFER_OVERFLOW or 
+	 *  STATUS_BUFFER_TOO_SMALL, you can use the value of the variable to determine the 
+	 *  required buffer size. 
+	 * @return
+	 *  ZwQueryKey returns STATUS_SUCCESS on success, or the appropriate error code on failure.
+	 */
+	public int ZwQueryKey(HANDLE KeyHandle, int KeyInformationClass,
+			Structure KeyInformation, int Length, IntByReference ResultLength);
+}
\ No newline at end of file
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/NtDllUtil.java b/contrib/platform/src/com/sun/jna/platform/win32/NtDllUtil.java
new file mode 100644
index 0000000..8253ad8
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/NtDllUtil.java
@@ -0,0 +1,47 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.Wdm.KEY_BASIC_INFORMATION;
+import com.sun.jna.platform.win32.Wdm.KEY_INFORMATION_CLASS;
+import com.sun.jna.platform.win32.WinReg.HKEY;
+import com.sun.jna.ptr.IntByReference;
+
+/**
+ * NtDll Utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class NtDllUtil {
+	
+	/**
+	 * Retrieve the name of an opened registry key.
+	 * @param hkey Opened registry key.
+	 * @return Basic key name, not including node information.
+	 */
+	public static String getKeyName(HKEY hkey) {
+    	IntByReference resultLength = new IntByReference();    	
+    	int rc = NtDll.INSTANCE.ZwQueryKey(hkey, KEY_INFORMATION_CLASS.KeyBasicInformation, 
+    			null, 0, resultLength);
+    	if (rc != NTStatus.STATUS_BUFFER_TOO_SMALL || resultLength.getValue() <= 0) {
+    		throw new Win32Exception(rc);
+    	}    	
+    	KEY_BASIC_INFORMATION keyInformation = new KEY_BASIC_INFORMATION(
+    			resultLength.getValue());
+    	rc = NtDll.INSTANCE.ZwQueryKey(hkey, KEY_INFORMATION_CLASS.KeyBasicInformation,
+    			keyInformation, resultLength.getValue(), resultLength);
+    	if (rc != NTStatus.STATUS_SUCCESS) {
+    		throw new Win32Exception(rc);
+    	}    	
+    	return keyInformation.getName();
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/ObjBase.java b/contrib/platform/src/com/sun/jna/platform/win32/ObjBase.java
new file mode 100644
index 0000000..6773063
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/ObjBase.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2010 Digital Rapids Corp.
+ */
+
+/* Copyright (c) 2010 Timothy Wall, All Rights Reserved
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.WTypes;
+
+/**
+ * Definitions from ObjBase.h
+ * @author scott.palmer
+ */
+public interface ObjBase {
+
+public static final int CLSCTX_INPROC = (WTypes.CLSCTX_INPROC_SERVER | WTypes.CLSCTX_INPROC_HANDLER);
+
+// With DCOM, CLSCTX_REMOTE_SERVER should be included
+public static final int CLSCTX_ALL = (WTypes.CLSCTX_INPROC_SERVER
+        | WTypes.CLSCTX_INPROC_HANDLER
+        | WTypes.CLSCTX_LOCAL_SERVER
+        | WTypes.CLSCTX_REMOTE_SERVER);
+
+public static final int CLSCTX_SERVER = (WTypes.CLSCTX_INPROC_SERVER
+        | WTypes.CLSCTX_LOCAL_SERVER
+        | WTypes.CLSCTX_REMOTE_SERVER);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Ole32.java b/contrib/platform/src/com/sun/jna/platform/win32/Ole32.java
new file mode 100644
index 0000000..aa261fa
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Ole32.java
@@ -0,0 +1,106 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.Guid.GUID;
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Ole32.dll Interface.
+ * @author dblock[at]dblock.org
+ */
+public interface Ole32 extends StdCallLibrary {
+	
+	Ole32 INSTANCE = (Ole32) Native.loadLibrary(
+			"Ole32", Ole32.class, W32APIOptions.UNICODE_OPTIONS);
+	
+	/**
+	 * Creates a GUID, a unique 128-bit integer used for CLSIDs and interface identifiers. 
+	 * @param pguid
+	 *  A pointer to the requested GUID.
+	 * @return
+	 *  S_OK if the GUID was successfully created.
+	 */
+	HRESULT CoCreateGuid(GUID.ByReference pguid);
+	
+	/**
+	 * Converts a globally unique identifier (GUID) into a string of printable characters. 
+	 * @param rguid
+	 *  The GUID to be converted.
+	 * @param lpsz
+	 *  A pointer to a caller-allocated string variable to receive the resulting string.
+	 * @param cchMax
+	 *  The number of characters available in the lpsz buffer. 
+	 * @return
+	 *  If the function succeeds, the return value is the number of characters in the 
+	 *  returned string, including the null terminator. If the buffer is too small to contain 
+	 *  the string, the return value is 0.
+	 */
+	int StringFromGUID2(GUID.ByReference rguid, char[] lpsz, int cchMax);
+	
+	/**
+	 * Converts a string generated by the StringFromIID function back into the 
+	 * original interface identifier (IID).
+	 * @param lpsz
+	 *  A pointer to the string representation of the IID.
+	 * @param lpiid
+	 *  A pointer to the requested IID on return.
+	 * @return
+	 *  This function can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, 
+	 *  and S_OK.
+	 */
+	HRESULT IIDFromString(String lpsz, GUID.ByReference lpiid);
+
+    /**
+     * Initializes the COM library for use by the calling thread, sets the thread's
+     * concurrency model, and creates a new apartment for the thread if one is required.
+     * @param reserved This parameter is reserved and must be NULL.
+     * @param dwCoInit The concurrency model and initialization options for the
+     * thread. Values for this parameter are taken from the COINIT enumeration.
+     * Any combination of values from COINIT can be used, except that the
+     * COINIT_APARTMENTTHREADED and COINIT_MULTITHREADED flags cannot both be
+     * set. The default (and only sane choice) is COINIT_MULTITHREADED.
+     * @return This function can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values. S_OK, S_FALSE, RPC_E_CHANGED_MODE
+     */
+    HRESULT CoInitializeEx(Pointer reserved, int dwCoInit);
+    
+    /**
+     * Closes the COM library on the current thread, unloads all DLLs loaded by
+     * the thread, frees any other resources that the thread maintains, and
+     * forces all RPC connections on the thread to close.
+     * 
+     */
+    void CoUninitialize();
+
+    /**
+     * Creates a single uninitialized object of the class associated with a specified CLSID.
+     * @param rclsid The CLSID associated with the data and code that will be used to create the object.
+     * @param pUnkOuter If NULL, indicates that the object is not being created as part of an aggregate. If non-NULL, pointer to the aggregate object's IUnknown interface (the controlling IUnknown).
+     * @param dwClsContext Context in which the code that manages the newly created object will run. The values are taken from the enumeration CLSCTX defined in WTypes.
+     * @param riid A reference to the identifier of the interface to be used to communicate with the object.
+     * @param ppv Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppv contains the requested interface pointer. Upon failure, *ppv contains NULL.
+     * @return an HRESULT
+     */
+    HRESULT CoCreateInstance(
+            GUID rclsid,
+            Pointer pUnkOuter,
+            int dwClsContext,
+            GUID riid,
+            PointerByReference ppv);
+
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Ole32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Ole32Util.java
new file mode 100644
index 0000000..beef109
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Ole32Util.java
@@ -0,0 +1,73 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.Guid.GUID;
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+
+/**
+ * Ole32 Utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Ole32Util {
+	
+	/**
+	 * Convert a string to a GUID.
+	 * @param guidString
+	 *  String representation of a GUID, including { }.
+	 * @return
+	 *  A GUID.
+	 */
+	public static GUID getGUIDFromString(String guidString) {
+		GUID.ByReference lpiid = new GUID.ByReference();
+    	HRESULT hr = Ole32.INSTANCE.IIDFromString(guidString, lpiid);
+    	if (! hr.equals(W32Errors.S_OK)) {
+    		throw new RuntimeException(hr.toString());
+    	}
+    	return lpiid;
+	}
+	
+	/**
+	 * Convert a GUID into a string.
+	 * @param guid
+	 *  GUID.
+	 * @return
+	 *  String representation of a GUID.
+	 */
+	public static String getStringFromGUID(GUID guid) {
+		GUID.ByReference pguid = new GUID.ByReference(guid.getPointer());
+    	int max = 39;
+    	char[] lpsz = new char[max];
+    	int len = Ole32.INSTANCE.StringFromGUID2(pguid, lpsz, max);
+    	if (len == 0) {
+    		throw new RuntimeException("StringFromGUID2");
+    	}
+    	lpsz[len - 1] = 0;    	
+    	return Native.toString(lpsz);
+	}
+	
+	/**
+	 * Generate a new GUID.
+	 * @return
+	 *  New GUID.
+	 */
+	public static GUID generateGUID() {
+		GUID.ByReference pguid = new GUID.ByReference();
+    	HRESULT hr = Ole32.INSTANCE.CoCreateGuid(pguid);
+    	if (! hr.equals(W32Errors.S_OK)) {
+    		throw new RuntimeException(hr.toString());
+    	}
+    	return pguid;
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Oleaut32.java b/contrib/platform/src/com/sun/jna/platform/win32/Oleaut32.java
new file mode 100644
index 0000000..dad1c56
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Oleaut32.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 Digital Rapids Corp., All rights reserved.
+ */
+
+/* Copyright (c) 2010 Timothy Wall, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Oleaut32.dll Interface.
+ * @author scott.palmer
+ */
+public interface Oleaut32 extends StdCallLibrary {
+	
+    Oleaut32 INSTANCE = (Oleaut32) Native.loadLibrary(
+			"Oleaut32", Oleaut32.class, W32APIOptions.UNICODE_OPTIONS);
+
+    /**
+     * This function allocates a new string and copies the passed string into it. 
+     * @param sz 
+     * 	Null-terminated UNICODE string to copy. 
+     * @return
+     *  Null if there is insufficient memory or if a null pointer is passed in.
+     */
+    Pointer SysAllocString(String sz);
+    
+    /**
+     * This function frees a string allocated previously by SysAllocString, 
+     * SysAllocStringByteLen, SysReAllocString, SysAllocStringLen, or 
+     * SysReAllocStringLen.
+     * @param bstr
+     *  Unicode string that was allocated previously, or NULL. Setting this parameter 
+     *  to NULL causes the function to simply return.
+     */
+    void SysFreeString(Pointer bstr);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Secur32.java b/contrib/platform/src/com/sun/jna/platform/win32/Secur32.java
new file mode 100644
index 0000000..ec1d176
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Secur32.java
@@ -0,0 +1,316 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.Sspi.CredHandle;
+import com.sun.jna.platform.win32.Sspi.CtxtHandle;
+import com.sun.jna.platform.win32.Sspi.PSecPkgInfo;
+import com.sun.jna.platform.win32.Sspi.SecBufferDesc;
+import com.sun.jna.platform.win32.Sspi.TimeStamp;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.platform.win32.WinNT.LUID;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.NativeLongByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Secur32.dll Interface.
+ * @author dblock[at]dblock.org
+ */
+public interface Secur32 extends StdCallLibrary {
+	Secur32 INSTANCE = (Secur32) Native.loadLibrary(
+			"Secur32", Secur32.class, W32APIOptions.UNICODE_OPTIONS);
+	
+	/**
+	 * Specifies a format for a directory service object name.
+	 * http://msdn.microsoft.com/en-us/library/ms724268(VS.85).aspx
+	 */
+	public abstract class EXTENDED_NAME_FORMAT {
+		public static final int NameUnknown = 0;
+		public static final int NameFullyQualifiedDN = 1;
+		public static final int NameSamCompatible = 2;
+		public static final int NameDisplay = 3;
+		public static final int NameUniqueId = 6;
+		public static final int NameCanonical = 7;
+		public static final int NameUserPrincipal = 8;
+		public static final int NameCanonicalEx = 9;
+		public static final int NameServicePrincipal = 10;
+		public static final int NameDnsDomain = 12;
+	};
+	
+	/**
+	 * Retrieves the name of the user or other security principal associated with 
+	 * the calling thread. You can specify the format of the returned name.
+	 * @param nameFormat The format of the name. 
+	 * @param lpNameBuffer A pointer to a buffer that receives the name in the specified format. 
+	 * @param len On input, the size of the buffer, on output the number of characters copied into the buffer, not including the terminating null character.
+	 * @return True if the function succeeds. False otherwise.
+	 */
+	public boolean GetUserNameEx(int nameFormat, char[] lpNameBuffer, IntByReference len);
+
+	/**
+	 * The AcquireCredentialsHandle function acquires a handle to preexisting credentials 
+	 * of a security principal. This handle is required by the AcceptSecurityContext 
+	 * and InitializeSecurityContext functions. These can be either preexisting credentials, 
+	 * which are established through a system logon that is not described here, or the 
+	 * caller can provide alternative credentials.
+	 * @param pszPrincipal
+	 *  A pointer to a null-terminated string that specifies the name of the principal whose 
+	 *  credentials the handle will reference.
+	 * @param pszPackage
+	 *   A pointer to a null-terminated string that specifies the name of the security package 
+	 *   with which these credentials will be used.
+	 * @param fCredentialUse
+	 *  A flag that indicates how these credentials will be used.
+	 * @param pvLogonID
+	 *  A pointer to a locally unique identifier (LUID) that identifies the user. 
+	 * @param pAuthData
+	 *  A pointer to package-specific data. This parameter can be NULL, which indicates 
+	 *  that the default credentials for that package must be used. To use supplied 
+	 *  credentials, pass a SEC_WINNT_AUTH_IDENTITY structure that includes those credentials 
+	 *  in this parameter.
+	 * @param pGetKeyFn
+	 *  This parameter is not used and should be set to NULL. 
+	 * @param pvGetKeyArgument
+	 *  This parameter is not used and should be set to NULL.
+	 * @param phCredential
+	 *  A pointer to a CredHandle structure to receive the credential handle. 
+	 * @param ptsExpiry
+	 *  A pointer to a TimeStamp structure that receives the time at which the returned 
+	 *  credentials expire. The value returned in this TimeStamp structure depends on 
+	 *  the security package. The security package must return this value in local time.
+	 * @return
+	 *  If the function succeeds, the function returns one of the SEC_I_ success codes.
+	 *  If the function fails, the function returns one of the SEC_E_ error codes.
+	 */
+	public int AcquireCredentialsHandle(String pszPrincipal, String pszPackage,
+			NativeLong fCredentialUse, LUID pvLogonID,
+			Pointer pAuthData, Pointer pGetKeyFn, // TODO: SEC_GET_KEY_FN
+			Pointer pvGetKeyArgument, CredHandle phCredential, 
+			TimeStamp ptsExpiry);
+	
+	/**
+	 * The InitializeSecurityContext function initiates the client side, outbound security 
+	 * context from a credential handle. The function is used to build a security context 
+	 * between the client application and a remote peer. InitializeSecurityContext returns 
+	 * a token that the client must pass to the remote peer, which the peer in turn submits 
+	 * to the local security implementation through the AcceptSecurityContext call. The 
+	 * token generated should be considered opaque by all callers.
+	 * 
+	 * Typically, the InitializeSecurityContext function is called in a loop until a 
+	 * sufficient security context is established.
+	 * 
+	 * @param phCredential
+	 *  A handle to the credentials returned by AcquireCredentialsHandle. This handle is 
+	 *  used to build the security context. The InitializeSecurityContext function requires 
+	 *  at least OUTBOUND credentials. 
+	 * @param phContext
+	 *  A pointer to a CtxtHandle structure. On the first call to InitializeSecurityContext,
+	 *  this pointer is NULL. On the second call, this parameter is a pointer to the handle 
+	 *  to the partially formed context returned in the phNewContext parameter by the first 
+	 *  call.
+	 * @param pszTargetName
+	 *  A pointer to a null-terminated string that indicates the target of the context. 
+	 *  The string contents are security-package specific.
+	 * @param fContextReq
+	 *  Bit flags that indicate requests for the context. Not all packages can support all 
+	 *  requirements. Flags used for this parameter are prefixed with ISC_REQ_, for example,
+	 *  ISC_REQ_DELEGATE. 
+	 * @param Reserved1
+	 *  This parameter is reserved and must be set to zero.
+	 * @param TargetDataRep
+	 *  The data representation, such as byte ordering, on the target. This parameter can be 
+	 *  either SECURITY_NATIVE_DREP or SECURITY_NETWORK_DREP.
+	 * @param pInput
+	 *  A pointer to a SecBufferDesc structure that contains pointers to the buffers supplied 
+	 *  as input to the package. The pointer must be NULL on the first call to the function. 
+	 *  On subsequent calls to the function, it is a pointer to a buffer allocated with enough 
+	 *  memory to hold the token returned by the remote peer.
+	 * @param Reserved2
+	 *  This parameter is reserved and must be set to zero. 
+	 * @param phNewContext
+	 *  A pointer to a CtxtHandle structure. On the first call to InitializeSecurityContext, 
+	 *  this pointer receives the new context handle. On the second call, phNewContext can be 
+	 *  the same as the handle specified in the phContext parameter.
+	 * @param pOutput
+	 *  A pointer to a SecBufferDesc structure that contains pointers to the SecBuffer structure 
+	 *  that receives the output data. If a buffer was typed as SEC_READWRITE in the input, it 
+	 *  will be there on output. The system will allocate a buffer for the security token if 
+	 *  requested (through ISC_REQ_ALLOCATE_MEMORY) and fill in the address in the buffer 
+	 *  descriptor for the security token.
+	 * @param pfContextAttr
+	 *  A pointer to a variable to receive a set of bit flags that indicate the attributes of 
+	 *  the established context. Flags used for this parameter are prefixed with ISC_RET, 
+	 *  such as ISC_RET_DELEGATE.
+	 * @param ptsExpiry
+	 *  A pointer to a TimeStamp structure that receives the expiration time of the context.
+	 *  It is recommended that the security package always return this value in local time. 
+	 *  This parameter is optional and NULL should be passed for short-lived clients.
+	 * @return
+	 *  If the function succeeds, the function returns one of the SEC_I_ success codes.
+	 *  If the function fails, the function returns one of the SEC_E_ error codes.
+	 */
+	public int InitializeSecurityContext(CredHandle phCredential, CtxtHandle phContext,
+			String pszTargetName, NativeLong fContextReq, NativeLong Reserved1,
+			NativeLong TargetDataRep, SecBufferDesc pInput, NativeLong Reserved2,
+			CtxtHandle phNewContext, SecBufferDesc pOutput, NativeLongByReference pfContextAttr,
+			TimeStamp ptsExpiry);
+	
+	/**
+	 * The DeleteSecurityContext function deletes the local data structures associated 
+	 * with the specified security context.
+	 * @param phContext
+	 *  Handle of the security context to delete. 
+	 * @return
+	 *  If the function succeeds, the return value is SEC_E_OK.
+	 *  If the function fails, the return value is SEC_E_INVALID_HANDLE;
+	 */
+	public int DeleteSecurityContext(CtxtHandle phContext);
+	
+	/**
+	 * The FreeCredentialsHandle function notifies the security system that the 
+	 * credentials are no longer needed. An application calls this function to free 
+	 * the credential handle acquired in the call to the AcquireCredentialsHandle 
+	 * function. When all references to this credential set have been removed, the 
+	 * credentials themselves can be removed.
+	 * @param phCredential
+	 *  A pointer to the credential handle obtained by using the AcquireCredentialsHandle
+	 *  function. 
+	 * @return
+	 *  If the function succeeds, the return value is SEC_E_OK.
+	 *  If the function fails, the return value is SEC_E_INVALID_HANDLE;
+	 */
+	public int FreeCredentialsHandle(CredHandle phCredential);
+	
+	/**
+	 * The AcceptSecurityContext function enables the server component of a transport 
+	 * application to establish a security context between the server and a remote client.
+	 * The remote client uses the InitializeSecurityContext function to start the process 
+	 * of establishing a security context. The server can require one or more reply tokens
+	 * from the remote client to complete establishing the security context.
+	 * @param phCredential
+	 *  A handle to the credentials of the server. The server calls the AcquireCredentialsHandle 
+	 *  function with either the SECPKG_CRED_INBOUND or SECPKG_CRED_BOTH flag set to retrieve 
+	 *  this handle. 
+	 * @param phContext
+	 *  A pointer to a CtxtHandle structure. On the first call to AcceptSecurityContext, 
+	 *  this pointer is NULL. On subsequent calls, phContext is the handle to the partially 
+	 *  formed context that was returned in the phNewContext parameter by the first call. 
+	 * @param pInput
+	 *  A pointer to a SecBufferDesc structure generated by a client call to 
+	 *  InitializeSecurityContext that contains the input buffer descriptor. 
+	 * @param fContextReq
+	 *  Bit flags that specify the attributes required by the server to establish the 
+	 *  context. Bit flags can be combined by using bitwise-OR operations.
+	 * @param TargetDataRep
+	 *  The data representation, such as byte ordering, on the target. This parameter can 
+	 *  be either SECURITY_NATIVE_DREP or SECURITY_NETWORK_DREP.
+	 * @param phNewContext
+	 *  A pointer to a CtxtHandle structure. On the first call to AcceptSecurityContext, 
+	 *  this pointer receives the new context handle. On subsequent calls, phNewContext 
+	 *  can be the same as the handle specified in the phContext parameter. 
+	 * @param pOutput
+	 *  A pointer to a SecBufferDesc structure that contains the output buffer descriptor. 
+	 *  This buffer is sent to the client for input into additional calls to 
+	 *  InitializeSecurityContext. An output buffer may be generated even if the function 
+	 *  returns SEC_E_OK. Any buffer generated must be sent back to the client application. 
+	 * @param pfContextAttr
+	 *  A pointer to a variable that receives a set of bit flags that indicate the 
+	 *  attributes of the established context. For a description of the various attributes, 
+	 *  see Context Requirements. Flags used for this parameter are prefixed with ASC_RET, 
+	 *  for example, ASC_RET_DELEGATE.
+	 * @param ptsTimeStamp
+	 *  A pointer to a TimeStamp structure that receives the expiration time of the context. 
+	 * @return
+	 *  This function returns one of SEC_* values.
+	 */
+	public int AcceptSecurityContext(CredHandle phCredential, CtxtHandle phContext,
+			SecBufferDesc pInput, NativeLong fContextReq, NativeLong TargetDataRep,
+			CtxtHandle phNewContext, SecBufferDesc pOutput, NativeLongByReference pfContextAttr,
+			TimeStamp ptsTimeStamp);
+
+	/**
+	 * The EnumerateSecurityPackages function returns an array of SecPkgInfo structures that 
+	 * describe the security packages available to the client.
+	 * @param pcPackages
+	 *  A pointer to a ULONG variable that receives the number of packages returned.
+	 * @param ppPackageInfo
+	 *  A pointer to a variable that receives a pointer to an array of SecPkgInfo structures. 
+	 *  Each structure contains information from the security support provider (SSP) that 
+	 *  describes a security package that is available within that SSP. 
+	 * @return
+	 *  If the function succeeds, the function returns SEC_E_OK.
+	 *  If the function fails, it returns a nonzero error code.
+	 */
+	public int EnumerateSecurityPackages(IntByReference pcPackages, 
+			PSecPkgInfo.ByReference ppPackageInfo);
+	
+	/**
+	 * The FreeContextBuffer function enables callers of security package functions to free a memory 
+	 * buffer that was allocated by the security package as a result of calls to InitializeSecurityContext 
+	 * and AcceptSecurityContext.
+	 * @param buffer
+	 *  A pointer to memory allocated by the security package.
+	 * @return
+	 *  If the function succeeds, the function returns SEC_E_OK.
+	 *  If the function fails, it returns a nonzero error code.
+	 */
+	public int FreeContextBuffer(Pointer buffer);
+	
+	/**
+	 * The QuerySecurityContextToken function obtains the access token for a client security context
+	 * and uses it directly.
+	 * @param phContext
+	 *  Handle of the context to query. 
+	 * @param phToken
+	 *  Returned handle to the access token. 
+	 * @return
+	 *  If the function succeeds, the function returns SEC_E_OK.
+	 *  If the function fails, it returns a nonzero error code. One possible error code return is 
+	 *  SEC_E_INVALID_HANDLE.
+	 */
+	public int QuerySecurityContextToken(CtxtHandle phContext, 
+			HANDLEByReference phToken);
+	
+	/**
+	 * The ImpersonateSecurityContext function allows a server to impersonate a client by using 
+	 * a token previously obtained by a call to AcceptSecurityContext or QuerySecurityContextToken. 
+	 * This function allows the application server to act as the client, and thus all necessary 
+	 * access controls are enforced.
+	 * @param phContext
+	 *  The handle of the context to impersonate. This handle must have been obtained by a call 
+	 *  to the AcceptSecurityContext function.
+	 * @return
+	 *  If the function succeeds, the function returns SEC_E_OK.
+	 *  If the function fails, it returns a SEC_E_INVALID_HANDLE, SEC_E_NO_IMPERSONATION or 
+	 *  SEC_E_UNSUPPORTED_FUNCTION error code.
+	 */
+	public int ImpersonateSecurityContext(CtxtHandle phContext);
+	
+	/**
+	 * Allows a security package to discontinue the impersonation of the caller and restore its 
+	 * own security context.
+	 * @param phContext
+	 *  Handle of the security context being impersonated. This handle must have been obtained in 
+	 *  the call to the AcceptSecurityContext function and used in the call to the 
+	 *  ImpersonateSecurityContext function.
+	 * @return
+	 *  If the function succeeds, the return value is SEC_E_OK.
+	 *  If the function fails, the return value can be either SEC_E_INVALID_HANDLE or SEC_E_UNSUPPORTED_FUNCTION.
+	 */
+	public int RevertSecurityContext(CtxtHandle phContext);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Secur32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Secur32Util.java
new file mode 100644
index 0000000..18ed9f4
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Secur32Util.java
@@ -0,0 +1,102 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.util.ArrayList;
+
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.Sspi.PSecPkgInfo;
+import com.sun.jna.platform.win32.Sspi.SecPkgInfo;
+import com.sun.jna.ptr.IntByReference;
+
+/**
+ * Secur32 Utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Secur32Util {
+
+	/**
+	 * An SSPI package.
+	 */
+	public static class SecurityPackage {
+		/**
+		 * Package name.
+		 */
+		public String name;
+		/**
+		 * Package comment.
+		 */
+		public String comment;
+	}
+	
+	/**
+	 * Retrieves the name of the user or other security principal associated 
+	 * with the calling thread.
+	 * 
+	 * @param format User name format.
+	 * @return User name in a given format.
+	 */
+	public static String getUserNameEx(int format) {
+		char[] buffer = new char[128];
+		IntByReference len = new IntByReference(buffer.length);
+		boolean result = Secur32.INSTANCE.GetUserNameEx(format, buffer, len); 
+		
+		if (! result) {
+			
+			int rc = Kernel32.INSTANCE.GetLastError();
+
+			switch(rc) {
+			case W32Errors.ERROR_MORE_DATA:
+				buffer = new char[len.getValue() + 1];
+				break;
+			default:
+				throw new Win32Exception(Native.getLastError());
+			}
+			
+			result = Secur32.INSTANCE.GetUserNameEx(format, buffer, len);
+		}
+		
+		if (! result) {
+			throw new Win32Exception(Native.getLastError());
+		}
+		
+		return Native.toString(buffer);		
+	}
+	
+	/**
+	 * Get the security packages installed on the current computer.
+	 * @return
+	 *  An array of SSPI security packages.
+	 */
+	public static SecurityPackage[] getSecurityPackages() {
+    	IntByReference pcPackages = new IntByReference();
+    	PSecPkgInfo.ByReference pPackageInfo = new PSecPkgInfo.ByReference();
+    	int rc = Secur32.INSTANCE.EnumerateSecurityPackages(pcPackages, pPackageInfo);
+    	if(W32Errors.SEC_E_OK != rc) {
+    		throw new Win32Exception(rc);
+    	}
+    	SecPkgInfo[] packagesInfo = pPackageInfo.toArray(pcPackages.getValue());
+    	ArrayList<SecurityPackage> packages = new ArrayList<SecurityPackage>(pcPackages.getValue());
+    	for(SecPkgInfo packageInfo : packagesInfo) {
+    		SecurityPackage securityPackage = new SecurityPackage();
+    		securityPackage.name = packageInfo.Name.toString();
+    		securityPackage.comment = packageInfo.Comment.toString();
+    		packages.add(securityPackage);
+    	}
+    	rc = Secur32.INSTANCE.FreeContextBuffer(pPackageInfo.pPkgInfo.getPointer());
+    	if(W32Errors.SEC_E_OK != rc) {
+    		throw new Win32Exception(rc);
+    	}
+    	return packages.toArray(new SecurityPackage[0]);		
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Shell32.java b/contrib/platform/src/com/sun/jna/platform/win32/Shell32.java
new file mode 100644
index 0000000..f1ec2c8
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Shell32.java
@@ -0,0 +1,76 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ *
+ * 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.
+ * <p/>
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.ShellAPI.SHFILEOPSTRUCT;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+import com.sun.jna.ptr.PointerByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/** 
+ * Shell32.dll Interface.
+ */
+public interface Shell32 extends StdCallLibrary {
+	
+    Shell32 INSTANCE = (Shell32) Native.loadLibrary("shell32", Shell32.class, 
+    		W32APIOptions.UNICODE_OPTIONS);
+    
+    /**
+     * This function can be used to copy, move, rename, or delete a file system object.
+     * @param fileop
+     *  Address of an SHFILEOPSTRUCT structure that contains information this function 
+     *  needs to carry out the specified operation. 
+     * @return
+     *  Returns zero if successful, or nonzero otherwise.
+     */
+    int SHFileOperation(SHFILEOPSTRUCT fileop);
+
+    /**
+     * Takes the CSIDL of a folder and returns the path.
+     * @param hwndOwner
+     *  Handle to an owner window. This parameter is typically set to NULL. If it is not NULL, 
+     *  and a dial-up connection needs to be made to access the folder, a user interface (UI) 
+     *  prompt will appear in this window. 
+     * @param nFolder
+     *  A CSIDL value that identifies the folder whose path is to be retrieved. Only real 
+     *  folders are valid. If a virtual folder is specified, this function will fail. You can 
+     *  force creation of a folder with SHGetFolderPath by combining the folder's CSIDL with 
+     *  CSIDL_FLAG_CREATE. 
+     * @param hToken
+     *  An access token that can be used to represent a particular user. 
+     * @param dwFlags
+     *   Flags to specify which path is to be returned.
+     * @param pszPath
+     *  Pointer to a null-terminated string of length MAX_PATH which will receive the path. 
+     *  If an error occurs or S_FALSE is returned, this string will be empty. 
+     * @return
+     *  Returns standard HRESULT codes.
+     */
+    HRESULT SHGetFolderPath(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, 
+    		char[] pszPath);
+
+    /**
+     * Retrieves the IShellFolder interface for the desktop folder, which is the root of the Shell's namespace.
+     * The retrieved COM interface pointer can be used via Com4JNA's ComObject.wrapNativeInterface call
+     * given a suitable interface definition for IShellFolder
+     * @param ppshf A place to put the IShellFolder interface pointer
+     * @return If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
+     */
+    HRESULT SHGetDesktopFolder( PointerByReference ppshf );
+
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Shell32Util.java b/contrib/platform/src/com/sun/jna/platform/win32/Shell32Util.java
new file mode 100644
index 0000000..5c1c964
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Shell32Util.java
@@ -0,0 +1,58 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+
+/**
+ * Shell32 Utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class Shell32Util {
+	
+	/**
+	 * Get a special folder path.
+	 * @param hwnd
+	 *  Parent window.
+	 * @param nFolder
+	 *  Folder CSLID.
+	 * @param dwFlags
+	 *  Flags.
+	 * @return
+	 *  Special folder.
+	 */
+	public static String getFolderPath(HWND hwnd, int nFolder, DWORD dwFlags) {
+    	char[] pszPath = new char[WinDef.MAX_PATH];
+    	HRESULT hr = Shell32.INSTANCE.SHGetFolderPath(hwnd, 
+    			nFolder, null, dwFlags, 
+    			pszPath);
+    	if (! hr.equals(W32Errors.S_OK)) {
+    		throw new Win32Exception(hr);
+    	}
+    	return Native.toString(pszPath);
+	}
+	
+	/**
+	 * Get a special folder path.
+	 * @param nFolder
+	 *  Folder CSLID.
+	 * @return
+	 *  Special folder path.
+	 */
+	public static String getFolderPath(int nFolder) {
+		return getFolderPath(null, nFolder, ShlObj.SHGFP_TYPE_CURRENT);
+	}
+}
\ No newline at end of file
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java b/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java
new file mode 100644
index 0000000..58e0d9e
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java
@@ -0,0 +1,111 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.WString;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from ShellAPI.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface ShellAPI extends StdCallLibrary {
+
+	int STRUCTURE_ALIGNMENT = Structure.ALIGN_NONE;
+	
+    public static final int FO_MOVE = 0x0001;
+    public static final int FO_COPY = 0x0002;
+    public static final int FO_DELETE = 0x0003;
+    public static final int FO_RENAME = 0x0004;
+    
+	public static final int FOF_MULTIDESTFILES = 0x0001;
+	public static final int FOF_CONFIRMMOUSE = 0x0002;
+	public static final int FOF_SILENT = 0x0004; // don't display progress UI (confirm prompts may be displayed still)
+	public static final int FOF_RENAMEONCOLLISION = 0x0008; // automatically rename the source files to avoid the collisions
+	public static final int FOF_NOCONFIRMATION = 0x0010; // don't display confirmation UI, assume "yes" for cases that can be bypassed, "no" for those that can not
+	public static final int FOF_WANTMAPPINGHANDLE = 0x0020; // Fill in SHFILEOPSTRUCT.hNameMappings
+	public static final int FOF_ALLOWUNDO = 0x0040; // enable undo including Recycle behavior for IFileOperation::Delete()
+	public static final int FOF_FILESONLY = 0x0080; // only operate on the files (non folders), both files and folders are assumed without this
+	public static final int FOF_SIMPLEPROGRESS = 0x0100; // means don't show names of files
+	public static final int FOF_NOCONFIRMMKDIR = 0x0200; // don't dispplay confirmatino UI before making any needed directories, assume "Yes" in these cases
+	public static final int FOF_NOERRORUI = 0x0400; // don't put up error UI, other UI may be displayed, progress, confirmations
+	public static final int FOF_NOCOPYSECURITYATTRIBS = 0x0800; // dont copy file security attributes (ACLs)
+	public static final int FOF_NORECURSION = 0x1000; // don't recurse into directories for operations that would recurse
+	public static final int FOF_NO_CONNECTED_ELEMENTS = 0x2000; // don't operate on connected elements ("xxx_files" folders that go with .htm files)
+	public static final int FOF_WANTNUKEWARNING = 0x4000; // during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)
+	public static final int FOF_NORECURSEREPARSE = 0x8000; // deprecated; the operations engine always does the right thing on FolderLink objects (symlinks, reparse points, folder shortcuts)
+	public static final int FOF_NO_UI = (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR); // don't display any UI at all
+	  
+	public static final int PO_DELETE = 0x0013; // printer is being deleted
+	public static final int PO_RENAME = 0x0014; // printer is being renamed
+	public static final int PO_PORTCHANGE = 0x0020; // port this printer connected to is being changed
+	public static final int PO_REN_PORT = 0x0034; // PO_RENAME and PO_PORTCHANGE at same time.
+
+	/**
+	 * Contains information that the SHFileOperation function uses to perform file operations. 
+	 */
+	public static class SHFILEOPSTRUCT extends Structure {
+		/**
+		 * A window handle to the dialog box to display information about 
+		 * the status of the file operation.
+		 */
+		public HANDLE hwnd;
+		/**
+		 * An FO_* value that indicates which operation to perform.
+		 */
+		public int wFunc;
+		/**
+		 * A pointer to one or more source file names, double null-terminated. 
+		 */
+		public WString pFrom;
+		/**
+		 * A pointer to the destination file or directory name.
+		 */
+		public WString pTo;
+		/**
+		 * Flags that control the file operation.
+		 */
+		public short fFlags;
+		/**
+		 * When the function returns, this member contains TRUE if any file operations 
+		 * were aborted before they were completed; otherwise, FALSE. An operation can 
+		 * be manually aborted by the user through UI or it can be silently aborted by 
+		 * the system if the FOF_NOERRORUI or FOF_NOCONFIRMATION flags were set.
+		 */
+		public boolean fAnyOperationsAborted;
+		/**
+		 * When the function returns, this member contains a handle to a name mapping 
+		 * object that contains the old and new names of the renamed files. This member 
+		 * is used only if the fFlags member includes the FOF_WANTMAPPINGHANDLE flag. 
+		 */
+		public Pointer pNameMappings;
+		/**
+		 * A pointer to the title of a progress dialog box. This is a null-terminated string. 
+		 */
+		public WString lpszProgressTitle;
+
+		/** Use this to encode <code>pFrom/pTo</code> paths. */
+		public String encodePaths(String[] paths) {
+			String encoded = "";
+			for (int i=0; i < paths.length;i++) {
+				encoded += paths[i];
+				encoded += "\0";
+			}
+			return encoded + "\0";
+		}
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/ShlObj.java b/contrib/platform/src/com/sun/jna/platform/win32/ShlObj.java
new file mode 100644
index 0000000..317cd25
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/ShlObj.java
@@ -0,0 +1,85 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from ShlObj.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface ShlObj extends StdCallLibrary {
+	
+	public static final DWORD SHGFP_TYPE_CURRENT = new DWORD(0); // current value for user, verify it exists
+	public static final DWORD SHGFP_TYPE_DEFAULT = new DWORD(1); // default value, may not exist
+	
+	public static final int CSIDL_DESKTOP = 0x0000; // <desktop>
+	public static final int CSIDL_INTERNET = 0x0001; // Internet Explorer (icon on desktop)
+	public static final int CSIDL_PROGRAMS = 0x0002; // Start Menu\Programs
+	public static final int CSIDL_CONTROLS = 0x0003; // My Computer\Control Panel
+	public static final int CSIDL_PRINTERS = 0x0004; // My Computer\Printers
+	public static final int CSIDL_PERSONAL = 0x0005; // My Documents
+	public static final int CSIDL_FAVORITES = 0x0006; // <user name>\Favorites
+	public static final int CSIDL_STARTUP = 0x0007; // Start Menu\Programs\Startup
+	public static final int CSIDL_RECENT = 0x0008; // <user name>\Recent
+	public static final int CSIDL_SENDTO = 0x0009; // <user name>\SendTo
+	public static final int CSIDL_BITBUCKET = 0x000a; // <desktop>\Recycle Bin
+	public static final int CSIDL_STARTMENU = 0x000b; // <user name>\Start Menu
+	public static final int CSIDL_MYDOCUMENTS = CSIDL_PERSONAL; // Personal was just a silly name for My Documents
+	public static final int CSIDL_MYMUSIC = 0x000d; // "My Music" folder
+	public static final int CSIDL_MYVIDEO = 0x000e; // "My Videos" folder
+	public static final int CSIDL_DESKTOPDIRECTORY = 0x0010; // <user name>\Desktop
+	public static final int CSIDL_DRIVES = 0x0011; // My Computer
+	public static final int CSIDL_NETWORK = 0x0012; // Network Neighborhood (My Network Places)
+	public static final int CSIDL_NETHOOD = 0x0013; // <user name>\nethood
+	public static final int CSIDL_FONTS = 0x0014; // windows\fonts
+	public static final int CSIDL_TEMPLATES = 0x0015;
+	public static final int CSIDL_COMMON_STARTMENU = 0x0016; // All Users\Start Menu
+	public static final int CSIDL_COMMON_PROGRAMS = 0X0017; // All Users\Start Menu\Programs
+	public static final int CSIDL_COMMON_STARTUP = 0x0018; // All Users\Startup
+	public static final int CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019; // All Users\Desktop
+	public static final int CSIDL_APPDATA = 0x001a; // <user name>\Application Data
+	public static final int CSIDL_PRINTHOOD = 0x001b; // <user name>\PrintHood
+	public static final int CSIDL_LOCAL_APPDATA = 0x001c; // <user name>\Local Settings\Applicaiton Data (non roaming)
+	public static final int CSIDL_ALTSTARTUP = 0x001d; // non localized startup
+	public static final int CSIDL_COMMON_ALTSTARTUP = 0x001e; // non localized common startup
+	public static final int CSIDL_COMMON_FAVORITES = 0x001f;
+	public static final int CSIDL_INTERNET_CACHE = 0x0020;
+	public static final int CSIDL_COOKIES = 0x0021;
+	public static final int CSIDL_HISTORY = 0x0022;
+	public static final int CSIDL_COMMON_APPDATA = 0x0023; // All Users\Application Data
+	public static final int CSIDL_WINDOWS = 0x0024; // GetWindowsDirectory()
+	public static final int CSIDL_SYSTEM = 0x0025; // GetSystemDirectory()
+	public static final int CSIDL_PROGRAM_FILES = 0x0026; // C:\Program Files
+	public static final int CSIDL_MYPICTURES = 0x0027; // C:\Program Files\My Pictures
+	public static final int CSIDL_PROFILE = 0x0028; // USERPROFILE
+	public static final int CSIDL_SYSTEMX86 = 0x0029; // x86 system directory on RISC
+	public static final int CSIDL_PROGRAM_FILESX86 = 0x002a; // x86 C:\Program Files on RISC
+	public static final int CSIDL_PROGRAM_FILES_COMMON = 0x002b; // C:\Program Files\Common
+	public static final int CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c; // x86 Program Files\Common on RISC
+	public static final int CSIDL_COMMON_TEMPLATES = 0x002d; // All Users\Templates
+	public static final int CSIDL_COMMON_DOCUMENTS = 0x002e; // All Users\Documents
+	public static final int CSIDL_COMMON_ADMINTOOLS = 0x002f; // All Users\Start Menu\Programs\Administrative Tools
+	public static final int CSIDL_ADMINTOOLS = 0x0030; // <user name>\Start Menu\Programs\Administrative Tools
+	public static final int CSIDL_CONNECTIONS = 0x0031; // Network and Dial-up Connections
+	public static final int CSIDL_COMMON_MUSIC = 0x0035; // All Users\My Music
+	public static final int CSIDL_COMMON_PICTURES = 0x0036; // All Users\My Pictures
+	public static final int CSIDL_COMMON_VIDEO = 0x0037; // All Users\My Video
+	public static final int CSIDL_RESOURCES = 0x0038; // Resource Direcotry
+	public static final int CSIDL_RESOURCES_LOCALIZED = 0x0039; // Localized Resource Direcotry
+	public static final int CSIDL_COMMON_OEM_LINKS = 0x003a; // Links to All Users OEM specific apps
+	public static final int CSIDL_CDBURN_AREA = 0x003b; // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
+	public static final int CSIDL_COMPUTERSNEARME = 0x003d; // Computers Near Me (computered from Workgroup membership)
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Sspi.java b/contrib/platform/src/com/sun/jna/platform/win32/Sspi.java
new file mode 100644
index 0000000..b93aad0
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Sspi.java
@@ -0,0 +1,467 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Memory;
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.WString;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from Sspi.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface Sspi extends StdCallLibrary {
+
+    /**
+     * Maximum size in bytes of a security token.
+     */
+    public static final int MAX_TOKEN_SIZE = 12288;
+
+    // Flags for the fCredentialUse parameter of AcquireCredentialsHandle
+
+    /**
+     * Validate an incoming server credential. Inbound credentials might be validated 
+     * by using an authenticating authority when InitializeSecurityContext or
+     * AcceptSecurityContext is called. If such an authority is not available, the function will 
+     * fail and return SEC_E_NO_AUTHENTICATING_AUTHORITY. Validation is package specific.
+     */
+    public static final int SECPKG_CRED_INBOUND = 1;
+
+    /**
+     * Allow a local client credential to prepare an outgoing token.
+     */
+    public static final int SECPKG_CRED_OUTBOUND = 2;
+
+    
+    // Flags for the TargetDataRep parameter of AcceptSecurityContext and InitializeSecurityContext
+
+    /**
+     * Specifies Native data representation. 
+     */
+    public static final int SECURITY_NATIVE_DREP = 0x10;
+
+
+    // Flags for the fContextReq parameter of InitializeSecurityContext or AcceptSecurityContext.
+
+    /**
+     * The security package allocates output buffers for you. 
+     * When you have finished using the output buffers, free them by calling the FreeContextBuffer function.
+     */
+    public static final int ISC_REQ_ALLOCATE_MEMORY = 0x00000100;
+
+    /**
+     * Encrypt messages by using the EncryptMessage function.
+     */
+    public static final int ISC_REQ_CONFIDENTIALITY = 0x00000010;
+
+    /**
+     * The security context will not handle formatting messages. This value is the default.
+     */
+    public static final int ISC_REQ_CONNECTION = 0x00000800;
+
+    /**
+     * The server can use the context to authenticate to other servers as the client. 
+     * The ISC_REQ_MUTUAL_AUTH flag must be set for this flag to work. Valid for Kerberos. 
+     * Ignore this flag for constrained delegation.
+     */
+    public static final int ISC_REQ_DELEGATE = 0x00000001;
+
+    /**
+     * When errors occur, the remote party will be notified.
+     */
+    public static final int ISC_REQ_EXTENDED_ERROR = 0x00004000;
+
+    /**
+     * Sign messages and verify signatures by using the EncryptMessage and MakeSignature functions.
+     */
+    public static final int ISC_REQ_INTEGRITY = 0x00010000;
+
+    /**
+     * The mutual authentication policy of the service will be satisfied.
+     */
+    public static final int ISC_REQ_MUTUAL_AUTH = 0x00000002;
+
+    /**
+     * Detect replayed messages that have been encoded by using the 
+     * EncryptMessage or MakeSignature functions.
+     */
+    public static final int ISC_REQ_REPLAY_DETECT = 0x00000004;
+
+    /**
+     * Detect messages received out of sequence.
+     */
+    public static final int ISC_REQ_SEQUENCE_DETECT = 0x00000008;
+
+    /**
+     * Support a stream-oriented connection.
+     */
+    public static final int ISC_REQ_STREAM = 0x00008000;
+
+    /**
+     * Version of the SecBuffer struct.
+     */
+    public static final int SECBUFFER_VERSION = 0;
+
+    /**
+     * This is a placeholder in the buffer array.
+     */
+    public static final int SECBUFFER_EMPTY = 0;
+    /**
+     * This buffer type is used for common data. The security package can read
+     * and write this data.
+     */
+    public static final int SECBUFFER_DATA = 1;
+    /**
+     * This buffer type is used to indicate the security token portion of the message. 
+     * This is read-only for input parameters or read/write for output parameters.
+     */
+    public static final int SECBUFFER_TOKEN = 2;
+	
+    /**
+	 * Security handle.
+	 */
+	public static class SecHandle extends Structure {		
+		public Pointer dwLower;
+		public Pointer dwUpper;
+
+		public static class ByReference extends SecHandle implements Structure.ByReference {
+
+		}
+		
+		/**
+		 * An empty SecHandle.
+		 */
+		public SecHandle() {
+			dwLower = null;
+			dwUpper = null;
+		}
+		
+		/**
+		 * Returns true if the handle is NULL.
+		 * @return
+		 *  True if NULL, False otherwise.
+		 */
+		public boolean isNull() {
+			return dwLower == null && dwUpper == null;
+		}
+	}
+
+	/**
+	 * A pointer to a SecHandle
+	 */
+	public static class PSecHandle extends Structure {
+
+		public static class ByReference extends PSecHandle implements Structure.ByReference {
+
+		}
+		
+		/**
+		 * The first entry in an array of SecPkgInfo structures.
+		 */
+		public SecHandle.ByReference secHandle;
+		
+		public PSecHandle() {
+			
+		}
+
+		public PSecHandle(SecHandle h) {
+			useMemory(h.getPointer());
+			read();
+		}
+	}
+	
+    /**
+	 * Credentials handle.
+	 */
+	public static class CredHandle extends SecHandle {		
+	}
+	
+    /**
+	 * Security context handle.
+	 */
+	public static class CtxtHandle extends SecHandle {		
+	}
+
+	/**
+	 * The SecBuffer structure describes a buffer allocated by a transport application 
+	 * to pass to a security package.
+	 */
+	public static class SecBuffer extends Structure {
+		
+		/**
+		 * A ByReference SecBuffer.
+		 */
+    	public static class ByReference extends SecBuffer implements Structure.ByReference {
+    		/**
+    		 * Create a SECBUFFER_EMPTY SecBuffer.
+    		 */
+    		public ByReference() {
+    			
+    		}
+    		
+    		/**
+    		 * Create a SecBuffer of a given type and size.
+    		 * @param type
+    		 *  Buffer type, one of SECBUFFER_EMTPY, etc.
+    		 * @param size
+    		 *  Buffer size, eg. MAX_TOKEN_SIZE.
+    		 */
+			public ByReference(int type, int size) {
+				super(type, size);
+			}
+
+			public ByReference(int type, byte[] token) {
+				super(type, token);
+			}
+			
+		    /**
+		     * Get buffer bytes.
+		     * @return
+		     *  Raw buffer bytes.
+		     */
+			public byte[] getBytes() {
+				return super.getBytes();
+			}
+    	}
+		
+		/**
+		 * Specifies the size, in bytes, of the buffer pointed to by the pvBuffer member.
+		 */
+	    public NativeLong cbBuffer;
+	    /**
+	     * Bit flags that indicate the type of buffer. Must be one of the values of 
+	     * the SecBufferType enumeration.
+	     */
+	    public NativeLong BufferType;
+	    /**
+	     * A pointer to a buffer.
+	     */
+	    public Pointer pvBuffer;
+	    
+	    /**
+	     * Create a new SECBUFFER_EMPTY buffer.
+	     */
+	    public SecBuffer() {
+	    	cbBuffer = new NativeLong(0);
+	    	pvBuffer = null;
+	    	BufferType = new NativeLong(SECBUFFER_EMPTY);
+	    }
+	    
+		/**
+		 * Create a SecBuffer of a given type and size.
+		 * @param type
+		 *  Buffer type, one of SECBUFFER_EMTPY, etc.
+		 * @param size
+		 *  Buffer size, eg. MAX_TOKEN_SIZE.
+		 */
+	    public SecBuffer(int type, int size) {
+	    	cbBuffer = new NativeLong(size);	    	
+	    	pvBuffer = new Memory(size);
+	    	BufferType = new NativeLong(type);
+	    	allocateMemory();
+	    }
+	    
+	    /**
+	     * Create a SecBuffer of a given type with initial data.
+		 * @param type
+		 *  Buffer type, one of SECBUFFER_EMTPY, etc.
+	     * @param token
+	     *  Existing token.
+	     */
+	    public SecBuffer(int type, byte[] token) {
+	    	cbBuffer = new NativeLong(token.length);	    	
+	    	pvBuffer = new Memory(token.length);
+	    	pvBuffer.write(0, token, 0, token.length);
+	    	BufferType = new NativeLong(type);
+	    	allocateMemory();
+	    }
+	    
+	    /**
+	     * Get buffer bytes.
+	     * @return
+	     *  Raw buffer bytes.
+	     */
+	    public byte[] getBytes() {
+	    	return pvBuffer.getByteArray(0, cbBuffer.intValue());
+	    }
+	}
+
+	public static class SecBufferDesc extends Structure {
+				
+		/**
+		 * Version number.
+		 */
+	    public NativeLong ulVersion;
+	    /**
+	     * Number of buffers.
+	     */
+	    public NativeLong cBuffers;
+	    /**
+	     * Pointer to array of buffers.
+	     */
+	    public SecBuffer.ByReference[] pBuffers;
+
+	    /**
+	     * Create a new SecBufferDesc with one SECBUFFER_EMPTY buffer.
+	     */
+	    public SecBufferDesc() {
+	    	ulVersion = new NativeLong(SECBUFFER_VERSION);
+	    	cBuffers = new NativeLong(1);
+	    	SecBuffer.ByReference secBuffer = new SecBuffer.ByReference();
+	    	pBuffers = (SecBuffer.ByReference[]) secBuffer.toArray(1);
+	    	allocateMemory();
+	    }
+	    
+	    /**
+	     * Create a new SecBufferDesc with initial data.
+	     * @param type
+	     *  Token type.
+	     * @param token
+	     *  Initial token data.
+	     */
+	    public SecBufferDesc(int type, byte[] token) {
+	    	ulVersion = new NativeLong(SECBUFFER_VERSION);
+	    	cBuffers = new NativeLong(1);
+	    	SecBuffer.ByReference secBuffer = new SecBuffer.ByReference(type, token);
+	    	pBuffers = (SecBuffer.ByReference[]) secBuffer.toArray(1);
+	    	allocateMemory();	    	
+	    }
+	    
+	    /**
+	     * Create a new SecBufferDesc with one SecBuffer of a given type and size.
+	     * @param type
+	     * @param tokenSize
+	     */
+	    public SecBufferDesc(int type, int tokenSize) {
+	    	ulVersion = new NativeLong(SECBUFFER_VERSION);
+	    	cBuffers = new NativeLong(1);
+	    	SecBuffer.ByReference secBuffer = new SecBuffer.ByReference(type, tokenSize);
+	    	pBuffers = (SecBuffer.ByReference[]) secBuffer.toArray(1);
+	    	allocateMemory();
+	    }	    	
+	    
+	    public byte[] getBytes() {
+	    	if (pBuffers == null || cBuffers == null) {
+	    		throw new RuntimeException("pBuffers | cBuffers");
+	    	}
+	    	if (cBuffers.intValue() == 1) {
+	    		return pBuffers[0].getBytes();
+	    	}	    	
+	    	throw new RuntimeException("cBuffers > 1");
+	    }
+	}
+	
+	/**
+	 * A security integer.
+	 */
+	public static class SECURITY_INTEGER extends Structure {
+		public NativeLong dwLower;
+		public NativeLong dwUpper;
+
+		/**
+		 * An security integer of 0.
+		 */
+		public SECURITY_INTEGER() {
+			dwLower = new NativeLong(0);
+			dwUpper = new NativeLong(0);
+		}
+	}
+	
+	/**
+	 * A timestamp.
+	 */
+	public static class TimeStamp extends SECURITY_INTEGER {
+		
+	}
+	
+	/**
+	 * A pointer to an array of SecPkgInfo structures.
+	 */
+	public static class PSecPkgInfo extends Structure {
+
+		public static class ByReference extends PSecPkgInfo implements Structure.ByReference {
+
+		}
+		
+		/**
+		 * The first entry in an array of SecPkgInfo structures.
+		 */
+		public SecPkgInfo.ByReference pPkgInfo;
+		
+		public PSecPkgInfo() {
+			
+		}
+		
+		/**
+		 * An array of SecPkgInfo structures.
+		 */
+		public SecPkgInfo.ByReference[] toArray(int size) {
+			return (SecPkgInfo.ByReference[]) pPkgInfo.toArray(size);
+		}
+	}
+	
+	/**
+	 * The SecPkgInfo structure provides general information about a security package, 
+	 * such as its name and capabilities.
+	 */
+	public static class SecPkgInfo extends Structure {
+
+		/**
+		 * A reference pointer to a SecPkgInfo structure.
+		 */
+		public static class ByReference extends SecPkgInfo implements Structure.ByReference { 
+			
+		}
+    	
+		/**
+		 * Set of bit flags that describes the capabilities of the security package.
+		 */
+		public NativeLong fCapabilities;  
+		/**
+		 * Specifies the version of the package protocol. Must be 1. 
+		 */
+		public short wVersion;
+		/**
+		 * Specifies a DCE RPC identifier, if appropriate. If the package does not implement one of 
+		 * the DCE registered security systems, the reserved value SECPKG_ID_NONE is used. 
+		 */
+		public short wRPCID;
+		/**
+		 * Specifies the maximum size, in bytes, of the token. 
+		 */
+		public NativeLong cbMaxToken;
+		/**
+		 * Pointer to a null-terminated string that contains the name of the security package.
+		 */
+		public WString Name;
+		/**
+		 * Pointer to a null-terminated string. This can be any additional string passed 
+		 * back by the package. 
+		 */
+		public WString Comment;
+		
+		/**
+		 * Create a new package info.
+		 */
+		public SecPkgInfo() {
+			fCapabilities = new NativeLong(0);
+			wVersion = 1;
+			wRPCID = 0;
+			cbMaxToken = new NativeLong(0);
+		}
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/User32.java b/contrib/platform/src/com/sun/jna/platform/win32/User32.java
new file mode 100644
index 0000000..e55bece
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/User32.java
@@ -0,0 +1,735 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ *
+ * 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.
+ * <p/>
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.BaseTSD.LONG_PTR;
+import com.sun.jna.platform.win32.WinDef.HDC;
+import com.sun.jna.platform.win32.WinDef.HICON;
+import com.sun.jna.platform.win32.WinDef.HINSTANCE;
+import com.sun.jna.platform.win32.WinDef.HRGN;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinDef.LPARAM;
+import com.sun.jna.platform.win32.WinDef.LRESULT;
+import com.sun.jna.platform.win32.WinDef.RECT;
+import com.sun.jna.platform.win32.WinDef.WPARAM;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinUser.BLENDFUNCTION;
+import com.sun.jna.platform.win32.WinUser.FLASHWINFO;
+import com.sun.jna.platform.win32.WinUser.GUITHREADINFO;
+import com.sun.jna.platform.win32.WinUser.HHOOK;
+import com.sun.jna.platform.win32.WinUser.HOOKPROC;
+import com.sun.jna.platform.win32.WinUser.MSG;
+import com.sun.jna.platform.win32.WinUser.POINT;
+import com.sun.jna.platform.win32.WinUser.SIZE;
+import com.sun.jna.platform.win32.WinUser.WINDOWINFO;
+import com.sun.jna.platform.win32.WinUser.WNDENUMPROC;
+import com.sun.jna.ptr.ByteByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Provides access to the w32 user32 library. Incomplete implementation to
+ * support demos.
+ * 
+ * @author Todd Fast, todd.fast at sun.com
+ * @author twalljava at dev.java.net
+ */
+public interface User32 extends StdCallLibrary {
+
+	User32 INSTANCE = (User32) Native.loadLibrary("user32", User32.class,
+			W32APIOptions.DEFAULT_OPTIONS);
+
+	/**
+	 * This function retrieves a handle to a display device context (DC) for the
+	 * client area of the specified window. The display device context can be
+	 * used in subsequent graphics display interface (GDI) functions to draw in
+	 * the client area of the window.
+	 * @param hWnd
+	 *  Handle to the window whose device context is to be retrieved.
+	 *  If this value is NULL, GetDC retrieves the device context for
+	 *  the entire screen.
+	 * @return 
+	 *  The handle the device context for the specified window's client
+	 *  area indicates success. NULL indicates failure. To get extended
+	 *  error information, call GetLastError.
+	 */
+	HDC GetDC(HWND hWnd);
+
+	/**
+	 * This function releases a device context (DC), freeing it for use by other
+	 * applications. The effect of ReleaseDC depends on the type of device
+	 * context.
+	 * 
+	 * @param hWnd
+	 *  Handle to the window whose device context is to be released.
+	 * @param hDC
+	 *  Handle to the device context to be released.
+	 * @return 
+	 *  The return value specifies whether the device context is
+	 *  released. 1 indicates that the device context is released. Zero
+	 *  indicates that the device context is not released.
+	 */
+	int ReleaseDC(HWND hWnd, HDC hDC);
+
+	/**
+	 * This function retrieves the handle to the top-level window whose class name and 
+	 * window name match the specified strings. This function does not search child windows.
+	 * @param lpClassName 
+	 *  Long pointer to a null-terminated string that specifies the class name or is an atom 
+	 *  that identifies the class-name string. If this parameter is an atom, it must be a 
+	 *  global atom created by a previous call to the GlobalAddAtom function. The atom, a 
+	 *  16-bit value, must be placed in the low-order word of lpClassName; the high-order 
+	 *  word must be zero. 
+	 * @param lpWindowName
+	 *  Long pointer to a null-terminated string that specifies the window name (the window's 
+	 *  title). If this parameter is NULL, all window names match. 
+	 * @return
+	 *  A handle to the window that has the specified class name and window name indicates 
+	 *  success. NULL indicates failure. To get extended error information, call GetLastError.
+	 */
+	HWND FindWindow(String lpClassName, String lpWindowName);
+
+	/**
+	 * This function retrieves the name of the class to which the specified window belongs. 
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs. 
+	 * @param lpClassName
+	 *  Long pointer to the buffer that is to receive the class name string.
+	 * @param nMaxCount
+	 *  Specifies the length, in characters, of the buffer pointed to by the lpClassName 
+	 *  parameter. The class name string is truncated if it is longer than the buffer.
+	 * @return
+	 *  The number of characters copied to the specified buffer indicates success. Zero 
+	 *  indicates failure. To get extended error information, call GetLastError. 
+	 */
+	int GetClassName(HWND hWnd, char[] lpClassName, int nMaxCount);
+
+	/**
+	 * Retrieves information about the active window or a specified graphical user 
+	 * interface (GUI) thread. 
+	 * @param idThread
+	 *  Identifies the thread for which information is to be retrieved. To retrieve 
+	 *  this value, use the GetWindowThreadProcessId function. If this parameter is NULL,
+	 *  the function returns information for the foreground thread. 
+	 * @param lpgui
+	 *  Pointer to a GUITHREADINFO structure that receives information describing the thread. 
+	 *  Note that you must set GUITHREADINFO.cbSize to sizeof(GUITHREADINFO) before calling this function. 
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 */
+	boolean GetGUIThreadInfo(int idThread, GUITHREADINFO lpgui);
+
+	/**
+	 * The GetWindowInfo function retrieves information about the specified window.
+	 * @param hWnd
+	 *  Handle to the window whose information is to be retrieved.
+	 * @param pwi
+	 *  Pointer to a WINDOWINFO structure to receive the information. Note that you must set WINDOWINFO.cbSize 
+	 *  to sizeof(WINDOWINFO) before calling this function.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. 
+	 */
+	boolean GetWindowInfo(HWND hWnd, WINDOWINFO pwi);
+
+	/**
+	 * This function retrieves the dimensions of the bounding rectangle of the specified window. The 
+	 * dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
+	 * @param hWnd
+	 *  Handle to the window. 
+	 * @param rect
+	 *  Long pointer to a RECT structure that receives the screen coordinates of the upper-left and lower-right 
+	 *  corners of the window. 
+	 * @return
+	 *  Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
+	 */
+	boolean GetWindowRect(HWND hWnd, RECT rect);
+
+	/**
+	 * This function copies the text of the specified window's title bar - if it has one - into a buffer. If 
+	 * the specified window is a control, the text of the control is copied.
+	 * @param hWnd
+	 *  Handle to the window or control containing the text. 
+	 * @param lpString
+	 *  Long pointer to the buffer that will receive the text. 
+	 * @param nMaxCount
+	 *  Specifies the maximum number of characters to copy to the buffer, including the NULL character. 
+	 *  If the text exceeds this limit, it is truncated. 
+	 * @return
+	 *  The length, in characters, of the copied string, not including the terminating null character, 
+	 *  indicates success. Zero indicates that the window has no title bar or text, if the title bar is
+	 *  empty, or if the window or control handle is invalid. To get extended error information, call 
+	 *  GetLastError. This function cannot retrieve the text of an edit control in another application.
+	 */
+	int GetWindowText(HWND hWnd, char[] lpString, int nMaxCount);
+
+	/**
+	 * This function retrieves the length, in characters, of the specified window's title bar text -
+	 * if the window has a title bar. If the specified window is a control, the function retrieves the
+	 * length of the text within the control.
+	 * @param hWnd
+	 *  Handle to the window or control. 
+	 * @return
+	 *  The length, in characters, of the text indicates success. Under certain conditions, this value 
+	 *  may actually be greater than the length of the text. Zero indicates that the window has no text. 
+	 *  To get extended error information, call GetLastError.
+	 */
+	int GetWindowTextLength(HWND hWnd);
+
+	/**
+	 * The GetWindowModuleFileName function retrieves the full path and file name of the module associated
+	 * with the specified window handle.
+	 * @param hWnd
+	 *  Handle to the window whose module file name will be retrieved.
+	 * @param lpszFileName
+	 *  Pointer to a buffer that receives the path and file name.
+	 * @param cchFileNameMax
+	 *  Specifies the maximum number of TCHARs that can be copied into the lpszFileName buffer.
+	 * @return
+	 *  The return value is the total number of TCHARs copied into the buffer.
+	 */
+	int GetWindowModuleFileName(HWND hWnd, char[] lpszFileName,
+			int cchFileNameMax);
+
+	/**
+	 * This function retrieves the identifier of the thread that created the specified window and, optionally,
+	 * the identifier of the process that created the window.
+	 * @param hWnd
+	 *  Handle to the window.
+	 * @param lpdwProcessId
+	 *  Pointer to a 32-bit value that receives the process identifier. If this parameter is not NULL, 
+	 *  GetWindowThreadProcessId copies the identifier of the process to the 32-bit value; otherwise, 
+	 *  it does not. 
+	 * @return
+	 *  The return value is the identifier of the thread that created the window.
+	 */
+	int GetWindowThreadProcessId(HWND hWnd, IntByReference lpdwProcessId);
+
+	/**
+	 * This function enumerates all top-level windows on the screen by passing the handle to each window,
+	 * in turn, to an application-defined callback function. EnumWindows continues until the last top-level
+	 * window is enumerated or the callback function returns FALSE.
+	 * @param lpEnumFunc
+	 *  Long pointer to an application-defined callback function.
+	 * @param data
+	 *  Specifies an application-defined value to be passed to the callback function.
+	 * @return
+	 *  Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
+	 */
+	boolean EnumWindows(WNDENUMPROC lpEnumFunc, Pointer data);
+
+	/**
+	 * The EnumChildWindows function enumerates the child windows that belong to the specified parent window
+	 * by passing the handle to each child window, in turn, to an application-defined callback function. 
+	 * EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE.
+	 * @param hWnd
+	 *  Handle to the parent window whose child windows are to be enumerated. If this parameter is NULL, this 
+	 *  function is equivalent to EnumWindows.
+	 * @param lpEnumFunc
+	 *  Pointer to an application-defined callback function.
+	 * @param data
+	 *  Specifies an application-defined value to be passed to the callback function.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 *  If EnumChildProc returns zero, the return value is also zero. In this case, the callback function 
+	 *  should call SetLastError to obtain a meaningful error code to be returned to the caller of 
+	 *  EnumChildWindows.
+	 */
+	boolean EnumChildWindows(HWND hWnd, WNDENUMPROC lpEnumFunc, Pointer data);
+
+	/**
+	 * The EnumThreadWindows function enumerates all nonchild windows associated with a thread by passing 
+	 * the handle to each window, in turn, to an application-defined callback function. EnumThreadWindows
+	 * continues until the last window is enumerated or the callback function returns FALSE. To enumerate
+	 * child windows of a particular window, use the EnumChildWindows function.
+	 * @param dwThreadId
+	 *  Identifies the thread whose windows are to be enumerated.
+	 * @param lpEnumFunc
+	 *  Pointer to an application-defined callback function. 
+	 * @param data
+	 *  Specifies an application-defined value to be passed to the callback function.
+	 * @return
+	 *  If the callback function returns TRUE for all windows in the thread specified by dwThreadId, the 
+	 *  return value is TRUE. If the callback function returns FALSE on any enumerated window, or if there
+	 *  are no windows found in the thread specified by dwThreadId, the return value is FALSE.
+	 */
+	boolean EnumThreadWindows(int dwThreadId, WNDENUMPROC lpEnumFunc,
+			Pointer data);
+
+	/**
+	 * The FlashWindowEx function flashes the specified window. It does not change the active state of the window.
+	 * @param pfwi
+	 *  Pointer to the FLASHWINFO structure. 
+	 * @return
+	 *  The return value specifies the window's state before the call to the FlashWindowEx function. If the window
+	 *  caption was drawn as active before the call, the return value is nonzero. Otherwise, the return value is zero.
+	 */
+	boolean FlashWindowEx(FLASHWINFO pfwi);
+
+	/**
+	 * This function loads the specified icon resource from the executable (.exe) file associated with an 
+	 * application instance.
+	 * @param hInstance
+	 *  Handle to an instance of the module whose executable file contains the icon to be loaded. 
+	 *  This parameter must be NULL when a standard icon is being loaded.
+	 * @param iconName
+	 *  Long pointer to a null-terminated string that contains the name of the icon resource to be loaded. 
+	 *  Alternatively, this parameter can contain the resource identifier in the low-order word and zero 
+	 *  in the high-order word. Use the MAKEINTRESOURCE macro to create this value.
+	 * @return
+	 *  A handle to the newly loaded icon indicates success. NULL indicates failure. To get extended 
+	 *  error information, call GetLastError. 
+	 */
+	HICON LoadIcon(HINSTANCE hInstance, String iconName);
+
+	/**
+	 * This function loads an icon, cursor, or bitmap.
+	 * @param hinst
+	 *  Handle to an instance of the module that contains the image to be loaded.
+	 * @param name
+	 *  Pointer to a null-terminated string that contains the name of the image resource 
+	 *  in the hinst module that identifies the image to load.
+	 * @param type
+	 *  Specifies the type of image to be loaded.
+	 * @param xDesired
+	 *  Specifies the width, in pixels, of the icon or cursor. If this parameter is zero, the function uses 
+	 *  the SM_CXICON or SM_CXCURSOR system metric value to set the width. If uType is IMAGE_BITMAP, this 
+	 *  parameter must be zero.
+	 * @param yDesired
+	 *  Specifies the height, in pixels, of the icon or cursor. If this parameter is zero, the function uses 
+	 *  the SM_CYICON or SM_CYCURSOR system metric value to set the height. If uType is IMAGE_BITMAP, this 
+	 *  parameter must be zero.
+	 * @param load
+	 *  Set to zero.
+	 * @return
+	 *  The handle of the newly loaded image indicates success. NULL indicates failure. To get extended error information, call GetLastError.
+	 */
+	HANDLE LoadImage(HINSTANCE hinst, String name, int type, int xDesired,
+			int yDesired, int load);
+
+	/**
+	 * This function destroys an icon and frees any memory the icon occupied.
+	 * @param hicon
+	 *  Handle to the icon to be destroyed. The icon must not be in use. 
+	 * @return
+	 *  Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
+	 */
+	boolean DestroyIcon(HICON hicon);
+
+	/**
+	 * This function retrieves information about the specified window. GetWindowLong also retrieves 
+	 * the 32-bit (long) value at the specified offset into the extra window memory of a window. 
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs. 
+	 * @param nIndex
+	 *  Specifies the zero-based offset to the value to be retrieved.
+	 * @return
+	 *  The requested 32-bit value indicates success. Zero indicates failure. To get extended error 
+	 *  information, call GetLastError.
+	 */
+	int GetWindowLong(HWND hWnd, int nIndex);
+
+	/**
+	 * This function changes an attribute of the specified window. SetWindowLong also sets a 32-bit (LONG) 
+	 * value at the specified offset into the extra window memory of a window.
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs. 
+	 * @param nIndex
+	 *  Specifies the zero-based offset to the value to be set.
+	 * @param dwNewLong
+	 *  Specifies the replacement value.
+	 * @return
+	 *  The previous value of the specified 32-bit integer indicates success. Zero indicates failure. 
+	 *  To get extended error information, call GetLastError.
+	 */
+	int SetWindowLong(HWND hWnd, int nIndex, int dwNewLong);
+
+	/**
+	 * This function changes an attribute of the specified window. SetWindowLong also sets a 
+	 * 32-bit (LONG) value at the specified offset into the extra window memory of a window.
+	 * Do not use this version on Windows-64.
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs.
+	 * @param nIndex
+	 *  Specifies the zero-based offset to the value to be set.
+	 * @param dwNewLong
+	 *  Specifies the replacement value. 
+	 * @return
+	 *  The previous value of the specified 32-bit integer indicates success. Zero indicates failure.
+	 *  To get extended error information, call GetLastError. 
+	 */
+	Pointer SetWindowLong(HWND hWnd, int nIndex, Pointer dwNewLong);
+
+	/**
+	 * The GetWindowLongPtr function retrieves information about the specified window. 
+	 * The function also retrieves the value at a specified offset into the extra window memory.
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs.
+	 * @param nIndex
+	 *  Specifies the zero-based offset to the value to be retrieved.
+	 * @return
+	 *  If the function succeeds, the return value is the requested value.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 *  If SetWindowLong or SetWindowLongPtr has not been called previously, GetWindowLongPtr returns zero for
+	 *  values in the extra window or class memory.
+	 */
+	LONG_PTR GetWindowLongPtr(HWND hWnd, int nIndex);
+
+	/**
+	 * The SetWindowLongPtr function changes an attribute of the specified window. The function also
+	 * sets a value at the specified offset in the extra window memory.
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs.
+	 * @param nIndex
+	 *  Specifies the zero-based offset to the value to be set.
+	 * @param dwNewLongPtr
+	 *  Specifies the replacement value.
+	 * @return
+	 *  If the function succeeds, the return value is the previous value of the specified offset.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 *  If the previous value is zero and the function succeeds, the return value is zero, but the function 
+	 *  does not clear the last error information. To determine success or failure, clear the last error 
+	 *  information by calling SetLastError(0), then call SetWindowLongPtr. Function failure will be indicated
+	 *  by a return value of zero and a GetLastError result that is nonzero.
+	 */
+	LONG_PTR SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLongPtr);
+
+	/**
+	 * The SetWindowLongPtr function changes an attribute of the specified window. The function also
+	 * sets a value at the specified offset in the extra window memory.
+	 * @param hWnd
+	 *  Handle to the window and, indirectly, the class to which the window belongs.
+	 * @param nIndex
+	 *  Specifies the zero-based offset to the value to be set.
+	 * @param dwNewLongPtr
+	 *  Specifies the replacement value.
+	 * @return
+	 *  If the function succeeds, the return value is the previous value of the specified offset.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 *  If the previous value is zero and the function succeeds, the return value is zero, but the function 
+	 *  does not clear the last error information. To determine success or failure, clear the last error 
+	 *  information by calling SetLastError(0), then call SetWindowLongPtr. Function failure will be indicated
+	 *  by a return value of zero and a GetLastError result that is nonzero.
+	 */
+	Pointer SetWindowLongPtr(HWND hWnd, int nIndex, Pointer dwNewLongPtr);
+
+	/**
+	 * The SetLayeredWindowAttributes function sets the opacity and transparency color key of a layered window.
+	 * @param hwnd
+	 *  Handle to the layered window.
+	 * @param crKey
+	 *  COLORREF structure that specifies the transparency color key to be used when composing the layered window.
+	 * @param bAlpha
+	 *  Alpha value used to describe the opacity of the layered window. 
+	 * @param dwFlags
+	 *  Specifies an action to take.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero. 
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+	 */
+	boolean SetLayeredWindowAttributes(HWND hwnd, int crKey, byte bAlpha,
+			int dwFlags);
+
+	/**
+	 * The GetLayeredWindowAttributes function retrieves the opacity and transparency color 
+	 * key of a layered window.
+	 * @param hwnd
+	 *  Handle to the layered window. A layered window is created by specifying WS_EX_LAYERED 
+	 *  when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED
+	 *  via SetWindowLong after the window has been created.
+	 * @param pcrKey
+	 *  Pointer to a COLORREF value that receives the transparency color key to be used when 
+	 *  composing the layered window. All pixels painted by the window in this color will be 
+	 *  transparent. This can be NULL if the argument is not needed.
+	 * @param pbAlpha
+	 *  Pointer to a BYTE that receives the Alpha value used to describe the opacity of the 
+	 *  layered window. Similar to the SourceConstantAlpha member of the BLENDFUNCTION structure.
+	 *  When the variable referred to by pbAlpha is 0, the window is completely transparent. 
+	 *  When the variable referred to by pbAlpha is 255, the window is opaque. This can be NULL 
+	 *  if the argument is not needed.
+	 * @param pdwFlags
+	 *  Pointer to a DWORD that receives a layering flag. This can be NULL if the argument is not needed.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 */
+	boolean GetLayeredWindowAttributes(HWND hwnd, IntByReference pcrKey,
+			ByteByReference pbAlpha, IntByReference pdwFlags);
+
+	/**
+	 * The UpdateLayeredWindow function updates the position, size, shape, content, and 
+	 * translucency of a layered window. 
+	 * @param hwnd
+	 *  Handle to a layered window. A layered window is created by specifying WS_EX_LAYERED 
+	 *  when creating the window with the CreateWindowEx function. 
+	 * @param hdcDst
+	 *  Handle to a device context (DC) for the screen. This handle is obtained by specifying NULL 
+	 *  when calling the function. It is used for palette color matching when the window contents 
+	 *  are updated. If hdcDst isNULL, the default palette will be used. If hdcSrc is NULL, hdcDst must be NULL.
+	 * @param pptDst
+	 *  Pointer to a POINT structure that specifies the new screen position of the layered window. 
+	 *  If the current position is not changing, pptDst can be NULL. 
+	 * @param psize
+	 *  Pointer to a SIZE structure that specifies the new size of the layered window. If the size of the window
+	 *  is not changing, psize can be NULL. If hdcSrc is NULL, psize must be NULL. 
+	 * @param hdcSrc
+	 *  Handle to a DC for the surface that defines the layered window. This handle can be obtained by calling 
+	 *  the CreateCompatibleDC function. If the shape and visual context of the window are not changing, hdcSrc 
+	 *  can be NULL. 
+	 * @param pptSrc
+	 *  Pointer to a POINT structure that specifies the location of the layer in the device context. 
+	 *  If hdcSrc is NULL, pptSrc should be NULL.
+	 * @param crKey
+	 *  Pointer to a COLORREF value that specifies the color key to be used when composing the layered window.
+	 *  To generate a COLORREF, use the RGB macro.
+	 * @param pblend
+	 *  Pointer to a BLENDFUNCTION structure that specifies the transparency value to be used when composing 
+	 *  the layered window. 
+	 * @param dwFlags
+	 *  ULW_* flags.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 */
+	boolean UpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT pptDst,
+			SIZE psize, HDC hdcSrc, POINT pptSrc, int crKey,
+			BLENDFUNCTION pblend, int dwFlags);
+
+	/**
+	 * This function sets the window region of a window. The window region determines the area within the 
+	 * window where the system permits drawing. The system does not display any portion of a window that lies
+	 * outside of the window region. 
+	 * @param hWnd
+	 *  Handle to the window whose window region is to be set.
+	 * @param hRgn
+	 *  Handle to a region.  The function sets the window region of the window to this region. 
+	 *  If hRgn is NULL, the function sets the window region to NULL. 
+	 * @param bRedraw
+	 *  Specifies whether the system redraws the window after setting the window region.  
+	 *  If bRedraw is TRUE, the system does so; otherwise, it does not. 
+	 *  Typically, you set bRedraw to TRUE if the window is visible. 
+	 * @return
+	 *  Nonzero indicates success. 
+	 *  Zero indicates failure. 
+	 *  To get extended error information, call GetLastError.
+	 */
+	int SetWindowRgn(HWND hWnd, HRGN hRgn, boolean bRedraw);
+
+	/**
+	 * The GetKeyboardState function copies the status of the 256 virtual keys to the specified buffer. 
+	 * @param lpKeyState
+	 *  Pointer to the 256-byte array that receives the status data for each virtual key.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError. 
+	 */
+	boolean GetKeyboardState(byte[] lpKeyState);
+
+	/**
+	 * This function determines whether a key is up or down at the time the function is called, 
+	 * and whether the key was pressed after a previous call to GetAsyncKeyState.
+	 * @param vKey
+	 *  Specifies one of 256 possible virtual-key codes.
+	 * @return
+	 *  If the function succeeds, the return value specifies whether the key was pressed since the last 
+	 *  call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant 
+	 *  bit is set, the key is down.
+	 */
+	short GetAsyncKeyState(int vKey);
+
+	/**
+	 * The SetWindowsHookEx function installs an application-defined hook procedure into a hook chain. 
+	 * You would install a hook procedure to monitor the system for certain types of events. These 
+	 * events are associated either with a specific thread or with all threads in the same desktop 
+	 * as the calling thread.
+	 * @param idHook
+	 *  Specifies the type of hook procedure to be installed.
+	 * @param lpfn
+	 *  Pointer to the hook procedure.
+	 * @param hMod
+	 *  Handle to the DLL containing the hook procedure pointed to by the lpfn parameter.
+	 * @param dwThreadId
+	 *   Specifies the identifier of the thread with which the hook procedure is to be associated.
+	 * @return
+	 *  If the function succeeds, the return value is the handle to the hook procedure. 
+	 *  If the function fails, the return value is NULL. To get extended error information, call GetLastError.
+	 */
+	HHOOK SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hMod,
+			int dwThreadId);
+
+	/**
+	 * The CallNextHookEx function passes the hook information to the next hook procedure
+	 * in the current hook chain. A hook procedure can call this function either before or
+	 * after processing the hook information.
+	 * @param hhk
+	 *  Ignored.
+	 * @param nCode
+	 *  Specifies the hook code passed to the current hook procedure. The next hook procedure 
+	 *  uses this code to determine how to process the hook information.
+	 * @param wParam
+	 *  Specifies the wParam value passed to the current hook procedure. The meaning of this
+	 *  parameter depends on the type of hook associated with the current hook chain.
+	 * @param lParam
+	 *  Specifies the lParam value passed to the current hook procedure. The meaning of this 
+	 *  parameter depends on the type of hook associated with the current hook chain.
+	 * @return
+	 *  This value is returned by the next hook procedure in the chain. The current hook procedure
+	 *  must also return this value. The meaning of the return value depends on the hook type. 
+	 */
+	LRESULT CallNextHookEx(HHOOK hhk, int nCode, WPARAM wParam, LPARAM lParam);
+
+	/**
+	 * The CallNextHookEx function passes the hook information to the next hook procedure
+	 * in the current hook chain. A hook procedure can call this function either before or
+	 * after processing the hook information.
+	 * @param hhk
+	 *  Ignored.
+	 * @param nCode
+	 *  Specifies the hook code passed to the current hook procedure. The next hook procedure 
+	 *  uses this code to determine how to process the hook information.
+	 * @param wParam
+	 *  Specifies the wParam value passed to the current hook procedure. The meaning of this
+	 *  parameter depends on the type of hook associated with the current hook chain.
+	 * @param lParam
+	 *  Specifies the lParam value passed to the current hook procedure. The meaning of this 
+	 *  parameter depends on the type of hook associated with the current hook chain.
+	 * @return
+	 *  This value is returned by the next hook procedure in the chain. The current hook procedure
+	 *  must also return this value. The meaning of the return value depends on the hook type. 
+	 */
+	LRESULT CallNextHookEx(HHOOK hhk, int nCode, WPARAM wParam, Pointer lParam);
+
+	/**
+	 * The UnhookWindowsHookEx function removes a hook procedure installed in 
+	 * a hook chain by the SetWindowsHookEx function. 
+	 * @param hhk
+	 *  Handle to the hook to be removed. This parameter is a hook handle obtained 
+	 *  by a previous call to SetWindowsHookEx.
+	 * @return
+	 *  If the function succeeds, the return value is nonzero.
+	 *  If the function fails, the return value is zero. To get extended error information, call GetLastError.
+	 */
+	boolean UnhookWindowsHookEx(HHOOK hhk);
+
+	/**
+	 * This function retrieves a message from the calling thread's message queue 
+	 * and places it in the specified structure. 
+	 * @param lpMsg
+	 *  Pointer to an MSG structure that receives message information from the thread's message queue.
+	 * @param hWnd
+	 *  Handle to the window whose messages are to be retrieved. One value has a special meaning.
+	 * @param wMsgFilterMin
+	 *  Specifies the integer value of the lowest message value to be retrieved.
+	 * @param wMsgFilterMax
+	 *  Specifies the integer value of the highest message value to be retrieved.
+	 * @return
+	 *  Nonzero indicates that the function retrieves a message other than WM_QUIT. Zero indicates 
+	 *  that the function retrieves the WM_QUIT message, or that lpMsg is an invalid pointer. To 
+	 *  get extended error information, call GetLastError.
+	 */
+	int GetMessage(MSG lpMsg, HWND hWnd, int wMsgFilterMin, int wMsgFilterMax);
+
+	/**
+	 * This function checks a thread message queue for a message and places the 
+	 * message (if any) in the specified structure.
+	 * @param lpMsg
+	 *  Pointer to an MSG structure that receives message information.
+	 * @param hWnd
+	 *  Handle to the window whose messages are to be examined. 
+	 * @param wMsgFilterMin
+	 *  Specifies the value of the first message in the range of messages to be examined.
+	 * @param wMsgFilterMax
+	 *  Specifies the value of the last message in the range of messages to be examined. 
+	 * @param wRemoveMsg
+	 *  Specifies how messages are handled. This parameter can be one of the following values. 
+	 * @return
+	 *  Nonzero indicates success. Zero indicates failure.
+	 */
+	boolean PeekMessage(MSG lpMsg, HWND hWnd, int wMsgFilterMin,
+			int wMsgFilterMax, int wRemoveMsg);
+
+	/**
+	 * This function translates virtual-key messages into character messages. The character messages 
+	 * are posted to the calling thread's message queue, to be read the next time the thread calls the 
+	 * GetMessage or PeekMessage function. 
+	 * @param lpMsg
+	 *  Pointer to an MSG structure that contains message information retrieved from the calling thread's 
+	 *  message queue by using the GetMessage or PeekMessage function. 
+	 * @return
+	 *  Nonzero indicates that the message is translated, that is, a character message is posted to the 
+	 *  thread's message queue. If the message is WM_KEYDOWN or WM_SYSKEYDOWN, the return value is nonzero, 
+	 *  regardless of the translation. Zero indicates that the message is not translated, that is, a 
+	 *  character message is not posted to the thread's message queue.
+	 */
+	boolean TranslateMessage(MSG lpMsg);
+
+	/**
+	 * This function dispatches a message to a window procedure. It is typically used
+	 * to dispatch a message retrieved by the GetMessage function.
+	 * @param lpMsg
+	 *  Pointer to an MSG structure that contains the message. 
+	 * @return
+	 *  The return value specifies the value returned by the window procedure. Although its meaning 
+	 *  depends on the message being dispatched, the return value generally is ignored. 
+	 */
+	LRESULT DispatchMessage(MSG lpMsg);
+
+	/**
+	 * This function places a message in the message queue associated with the thread that
+	 * created the specified window and then returns without waiting for the thread to process
+	 * the message. Messages in a message queue are retrieved by calls to the GetMessage
+	 * or PeekMessage function.
+	 * @param hWnd
+	 *  Handle to the window whose window procedure is to receive the message.
+	 * @param msg
+	 *  Specifies the message to be posted. 
+	 * @param wParam
+	 *  Specifies additional message-specific information.
+	 * @param lParam
+	 *  Specifies additional message-specific information.
+	 */
+	void PostMessage(HWND hWnd, int msg, WPARAM wParam, LPARAM lParam);
+
+	/**
+	 * This function indicates to Windows that a thread has made a request to terminate (quit). 
+	 * It is typically used in response to a WM_DESTROY message.
+	 * @param nExitCode
+	 *  Specifies an application exit code. This value is used as the wParam parameter of 
+	 *  the WM_QUIT message.
+	 */
+	void PostQuitMessage(int nExitCode);
+
+	/**
+	 * The GetSystemMetrics function retrieves various system metrics (widths
+	 * and heights of display elements) and system configuration settings. All
+	 * dimensions retrieved by GetSystemMetrics are in pixels.
+	 * @param nIndex
+	 *  System metric or configuration setting to retrieve. This
+	 *  parameter can be one of the following values. Note that all
+	 *  SM_CX* values are widths and all SM_CY* values are heights.
+	 *  Also note that all settings designed to return Boolean data
+	 *  represent TRUE as any nonzero value, and FALSE as a zero
+	 *  value.
+	 * @return 
+	 *  If the function succeeds, the return value is the requested
+	 *  system metric or configuration setting. If the function fails,
+	 *  the return value is zero. GetLastError does not provide extended
+	 *  error information.
+	 */
+	public int GetSystemMetrics(int nIndex);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/W32Errors.java b/contrib/platform/src/com/sun/jna/platform/win32/W32Errors.java
new file mode 100644
index 0000000..1c35804
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/W32Errors.java
@@ -0,0 +1,40786 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+
+/**
+ * Error code definitions for the Win32 API functions.
+ * Ported from Windows SDK 6.0A
+ * @author dblock[at]dblock.org
+ */
+public abstract class W32Errors {
+
+	//
+	//  Values are 32 bit values laid out as follows:
+	//
+	//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+	//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+	//  +---+-+-+-----------------------+-------------------------------+
+	//  |Sev|C|R|     Facility          |               Code            |
+	//  +---+-+-+-----------------------+-------------------------------+
+	//
+	//  where
+	//
+	//      Sev - is the severity code
+	//
+	//          00 - Success
+	//          01 - Informational
+	//          10 - Warning
+	//          11 - Error
+	//
+	//      C - is the Customer code flag
+	//
+	//      R - is a reserved bit
+	//
+	//      Facility - is the facility code
+	//
+	//      Code - is the facility's status code
+
+	//
+	// Define the facility codes
+	//
+	public static final short FACILITY_WINRM = 51;
+	public static final short FACILITY_WINDOWSUPDATE = 36;
+	public static final short FACILITY_WINDOWS_DEFENDER = 80;
+	public static final short FACILITY_WINDOWS_CE = 24;
+	public static final short FACILITY_WINDOWS = 8;
+	public static final short FACILITY_URT = 19;
+	public static final short FACILITY_UMI = 22;
+	public static final short FACILITY_TPM_SOFTWARE = 41;
+	public static final short FACILITY_TPM_SERVICES = 40;
+	public static final short FACILITY_SXS = 23;
+	public static final short FACILITY_STORAGE = 3;
+	public static final short FACILITY_STATE_MANAGEMENT = 34;
+	public static final short FACILITY_SSPI = 9;
+	public static final short FACILITY_SCARD = 16;
+	public static final short FACILITY_SHELL = 39;
+	public static final short FACILITY_SETUPAPI = 15;
+	public static final short FACILITY_SECURITY = 9;
+	public static final short FACILITY_RPC = 1;
+	public static final short FACILITY_PLA = 48;
+	public static final short FACILITY_WIN32 = 7;
+	public static final short FACILITY_CONTROL = 10;
+	public static final short FACILITY_NULL = 0;
+	public static final short FACILITY_NDIS = 52;
+	public static final short FACILITY_METADIRECTORY = 35;
+	public static final short FACILITY_MSMQ = 14;
+	public static final short FACILITY_MEDIASERVER = 13;
+	public static final short FACILITY_INTERNET = 12;
+	public static final short FACILITY_ITF = 4;
+	public static final short FACILITY_USERMODE_HYPERVISOR = 53;
+	public static final short FACILITY_HTTP = 25;
+	public static final short FACILITY_GRAPHICS = 38;
+	public static final short FACILITY_FWP = 50;
+	public static final short FACILITY_FVE = 49;
+	public static final short FACILITY_USERMODE_FILTER_MANAGER = 31;
+	public static final short FACILITY_DPLAY = 21;
+	public static final short FACILITY_DISPATCH = 2;
+	public static final short FACILITY_DIRECTORYSERVICE = 37;
+	public static final short FACILITY_CONFIGURATION = 33;
+	public static final short FACILITY_COMPLUS = 17;
+	public static final short FACILITY_USERMODE_COMMONLOG = 26;
+	public static final short FACILITY_CMI = 54;
+	public static final short FACILITY_CERT = 11;
+	public static final short FACILITY_BACKGROUNDCOPY = 32;
+	public static final short FACILITY_ACS = 20;
+	public static final short FACILITY_AAF = 18;
+
+	//
+	// Define the severity codes
+	//
+
+	//
+	// MessageId: ERROR_SUCCESS
+	//
+	// MessageText:
+	//
+	// The operation completed successfully.
+	//
+	public static final int ERROR_SUCCESS = 0;
+
+	public static final int NO_ERROR = 0; // dderror
+	public static final int SEC_E_OK = 0;
+	//
+	// MessageId: ERROR_INVALID_FUNCTION
+	//
+	// MessageText:
+	//
+	// Incorrect function.
+	//
+	public static final int ERROR_INVALID_FUNCTION = 1; // dderror
+
+	//
+	// MessageId: ERROR_FILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system cannot find the file specified.
+	//
+	public static final int ERROR_FILE_NOT_FOUND = 2;
+
+	//
+	// MessageId: ERROR_PATH_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system cannot find the path specified.
+	//
+	public static final int ERROR_PATH_NOT_FOUND = 3;
+
+	//
+	// MessageId: ERROR_TOO_MANY_OPEN_FILES
+	//
+	// MessageText:
+	//
+	// The system cannot open the file.
+	//
+	public static final int ERROR_TOO_MANY_OPEN_FILES = 4;
+
+	//
+	// MessageId: ERROR_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// Access is denied.
+	//
+	public static final int ERROR_ACCESS_DENIED = 5;
+
+	//
+	// MessageId: ERROR_INVALID_HANDLE
+	//
+	// MessageText:
+	//
+	// The handle is invalid.
+	//
+	public static final int ERROR_INVALID_HANDLE = 6;
+
+	//
+	// MessageId: ERROR_ARENA_TRASHED
+	//
+	// MessageText:
+	//
+	// The storage control blocks were destroyed.
+	//
+	public static final int ERROR_ARENA_TRASHED = 7;
+
+	//
+	// MessageId: ERROR_NOT_ENOUGH_MEMORY
+	//
+	// MessageText:
+	//
+	// Not enough storage is available to process this command.
+	//
+	public static final int ERROR_NOT_ENOUGH_MEMORY = 8; // dderror
+
+	//
+	// MessageId: ERROR_INVALID_BLOCK
+	//
+	// MessageText:
+	//
+	// The storage control block address is invalid.
+	//
+	public static final int ERROR_INVALID_BLOCK = 9;
+
+	//
+	// MessageId: ERROR_BAD_ENVIRONMENT
+	//
+	// MessageText:
+	//
+	// The environment is incorrect.
+	//
+	public static final int ERROR_BAD_ENVIRONMENT = 10;
+
+	//
+	// MessageId: ERROR_BAD_FORMAT
+	//
+	// MessageText:
+	//
+	// An attempt was made to load a program with an incorrect format.
+	//
+	public static final int ERROR_BAD_FORMAT = 11;
+
+	//
+	// MessageId: ERROR_INVALID_ACCESS
+	//
+	// MessageText:
+	//
+	// The access code is invalid.
+	//
+	public static final int ERROR_INVALID_ACCESS = 12;
+
+	//
+	// MessageId: ERROR_INVALID_DATA
+	//
+	// MessageText:
+	//
+	// The data is invalid.
+	//
+	public static final int ERROR_INVALID_DATA = 13;
+
+	//
+	// MessageId: ERROR_OUTOFMEMORY
+	//
+	// MessageText:
+	//
+	// Not enough storage is available to complete this operation.
+	//
+	public static final int ERROR_OUTOFMEMORY = 14;
+
+	//
+	// MessageId: ERROR_INVALID_DRIVE
+	//
+	// MessageText:
+	//
+	// The system cannot find the drive specified.
+	//
+	public static final int ERROR_INVALID_DRIVE = 15;
+
+	//
+	// MessageId: ERROR_CURRENT_DIRECTORY
+	//
+	// MessageText:
+	//
+	// The directory cannot be removed.
+	//
+	public static final int ERROR_CURRENT_DIRECTORY = 16;
+
+	//
+	// MessageId: ERROR_NOT_SAME_DEVICE
+	//
+	// MessageText:
+	//
+	// The system cannot move the file to a different disk drive.
+	//
+	public static final int ERROR_NOT_SAME_DEVICE = 17;
+
+	//
+	// MessageId: ERROR_NO_MORE_FILES
+	//
+	// MessageText:
+	//
+	// There are no more files.
+	//
+	public static final int ERROR_NO_MORE_FILES = 18;
+
+	//
+	// MessageId: ERROR_WRITE_PROTECT
+	//
+	// MessageText:
+	//
+	// The media is write protected.
+	//
+	public static final int ERROR_WRITE_PROTECT = 19;
+
+	//
+	// MessageId: ERROR_BAD_UNIT
+	//
+	// MessageText:
+	//
+	// The system cannot find the device specified.
+	//
+	public static final int ERROR_BAD_UNIT = 20;
+
+	//
+	// MessageId: ERROR_NOT_READY
+	//
+	// MessageText:
+	//
+	// The device is not ready.
+	//
+	public static final int ERROR_NOT_READY = 21;
+
+	//
+	// MessageId: ERROR_BAD_COMMAND
+	//
+	// MessageText:
+	//
+	// The device does not recognize the command.
+	//
+	public static final int ERROR_BAD_COMMAND = 22;
+
+	//
+	// MessageId: ERROR_CRC
+	//
+	// MessageText:
+	//
+	// Data error (cyclic redundancy check).
+	//
+	public static final int ERROR_CRC = 23;
+
+	//
+	// MessageId: ERROR_BAD_LENGTH
+	//
+	// MessageText:
+	//
+	// The program issued a command but the command length is incorrect.
+	//
+	public static final int ERROR_BAD_LENGTH = 24;
+
+	//
+	// MessageId: ERROR_SEEK
+	//
+	// MessageText:
+	//
+	// The drive cannot locate a specific area or track on the disk.
+	//
+	public static final int ERROR_SEEK = 25;
+
+	//
+	// MessageId: ERROR_NOT_DOS_DISK
+	//
+	// MessageText:
+	//
+	// The specified disk or diskette cannot be accessed.
+	//
+	public static final int ERROR_NOT_DOS_DISK = 26;
+
+	//
+	// MessageId: ERROR_SECTOR_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The drive cannot find the sector requested.
+	//
+	public static final int ERROR_SECTOR_NOT_FOUND = 27;
+
+	//
+	// MessageId: ERROR_OUT_OF_PAPER
+	//
+	// MessageText:
+	//
+	// The printer is out of paper.
+	//
+	public static final int ERROR_OUT_OF_PAPER = 28;
+
+	//
+	// MessageId: ERROR_WRITE_FAULT
+	//
+	// MessageText:
+	//
+	// The system cannot write to the specified device.
+	//
+	public static final int ERROR_WRITE_FAULT = 29;
+
+	//
+	// MessageId: ERROR_READ_FAULT
+	//
+	// MessageText:
+	//
+	// The system cannot read from the specified device.
+	//
+	public static final int ERROR_READ_FAULT = 30;
+
+	//
+	// MessageId: ERROR_GEN_FAILURE
+	//
+	// MessageText:
+	//
+	// A device attached to the system is not functioning.
+	//
+	public static final int ERROR_GEN_FAILURE = 31;
+
+	//
+	// MessageId: ERROR_SHARING_VIOLATION
+	//
+	// MessageText:
+	//
+	// The process cannot access the file because it is being used by another
+	// process.
+	//
+	public static final int ERROR_SHARING_VIOLATION = 32;
+
+	//
+	// MessageId: ERROR_LOCK_VIOLATION
+	//
+	// MessageText:
+	//
+	// The process cannot access the file because another process has locked a
+	// portion of the file.
+	//
+	public static final int ERROR_LOCK_VIOLATION = 33;
+
+	//
+	// MessageId: ERROR_WRONG_DISK
+	//
+	// MessageText:
+	//
+	// The wrong diskette is in the drive.
+	// Insert %2 (Volume Serial Number: %3) into drive %1.
+	//
+	public static final int ERROR_WRONG_DISK = 34;
+
+	//
+	// MessageId: ERROR_SHARING_BUFFER_EXCEEDED
+	//
+	// MessageText:
+	//
+	// Too many files opened for sharing.
+	//
+	public static final int ERROR_SHARING_BUFFER_EXCEEDED = 36;
+
+	//
+	// MessageId: ERROR_HANDLE_EOF
+	//
+	// MessageText:
+	//
+	// Reached the end of the file.
+	//
+	public static final int ERROR_HANDLE_EOF = 38;
+
+	//
+	// MessageId: ERROR_HANDLE_DISK_FULL
+	//
+	// MessageText:
+	//
+	// The disk is full.
+	//
+	public static final int ERROR_HANDLE_DISK_FULL = 39;
+
+	//
+	// MessageId: ERROR_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The request is not supported.
+	//
+	public static final int ERROR_NOT_SUPPORTED = 50;
+
+	//
+	// MessageId: ERROR_REM_NOT_LIST
+	//
+	// MessageText:
+	//
+	// Windows cannot find the network path. Verify that the network path is
+	// correct and the destination computer is not busy or turned off. If
+	// Windows still cannot find the network path, contact your network
+	// administrator.
+	//
+	public static final int ERROR_REM_NOT_LIST = 51;
+
+	//
+	// MessageId: ERROR_DUP_NAME
+	//
+	// MessageText:
+	//
+	// You were not connected because a duplicate name exists on the network. If
+	// joining a domain, go to System in Control Panel to change the computer
+	// name and try again. If joining a workgroup, choose another workgroup
+	// name.
+	//
+	public static final int ERROR_DUP_NAME = 52;
+
+	//
+	// MessageId: ERROR_BAD_NETPATH
+	//
+	// MessageText:
+	//
+	// The network path was not found.
+	//
+	public static final int ERROR_BAD_NETPATH = 53;
+
+	//
+	// MessageId: ERROR_NETWORK_BUSY
+	//
+	// MessageText:
+	//
+	// The network is busy.
+	//
+	public static final int ERROR_NETWORK_BUSY = 54;
+
+	//
+	// MessageId: ERROR_DEV_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// The specified network resource or device is no longer available.
+	//
+	public static final int ERROR_DEV_NOT_EXIST = 55; // dderror
+
+	//
+	// MessageId: ERROR_TOO_MANY_CMDS
+	//
+	// MessageText:
+	//
+	// The network BIOS command limit has been reached.
+	//
+	public static final int ERROR_TOO_MANY_CMDS = 56;
+
+	//
+	// MessageId: ERROR_ADAP_HDW_ERR
+	//
+	// MessageText:
+	//
+	// A network adapter hardware error occurred.
+	//
+	public static final int ERROR_ADAP_HDW_ERR = 57;
+
+	//
+	// MessageId: ERROR_BAD_NET_RESP
+	//
+	// MessageText:
+	//
+	// The specified server cannot perform the requested operation.
+	//
+	public static final int ERROR_BAD_NET_RESP = 58;
+
+	//
+	// MessageId: ERROR_UNEXP_NET_ERR
+	//
+	// MessageText:
+	//
+	// An unexpected network error occurred.
+	//
+	public static final int ERROR_UNEXP_NET_ERR = 59;
+
+	//
+	// MessageId: ERROR_BAD_REM_ADAP
+	//
+	// MessageText:
+	//
+	// The remote adapter is not compatible.
+	//
+	public static final int ERROR_BAD_REM_ADAP = 60;
+
+	//
+	// MessageId: ERROR_PRINTQ_FULL
+	//
+	// MessageText:
+	//
+	// The printer queue is full.
+	//
+	public static final int ERROR_PRINTQ_FULL = 61;
+
+	//
+	// MessageId: ERROR_NO_SPOOL_SPACE
+	//
+	// MessageText:
+	//
+	// Space to store the file waiting to be printed is not available on the
+	// server.
+	//
+	public static final int ERROR_NO_SPOOL_SPACE = 62;
+
+	//
+	// MessageId: ERROR_PRINT_CANCELLED
+	//
+	// MessageText:
+	//
+	// Your file waiting to be printed was deleted.
+	//
+	public static final int ERROR_PRINT_CANCELLED = 63;
+
+	//
+	// MessageId: ERROR_NETNAME_DELETED
+	//
+	// MessageText:
+	//
+	// The specified network name is no longer available.
+	//
+	public static final int ERROR_NETNAME_DELETED = 64;
+
+	//
+	// MessageId: ERROR_NETWORK_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// Network access is denied.
+	//
+	public static final int ERROR_NETWORK_ACCESS_DENIED = 65;
+
+	//
+	// MessageId: ERROR_BAD_DEV_TYPE
+	//
+	// MessageText:
+	//
+	// The network resource type is not correct.
+	//
+	public static final int ERROR_BAD_DEV_TYPE = 66;
+
+	//
+	// MessageId: ERROR_BAD_NET_NAME
+	//
+	// MessageText:
+	//
+	// The network name cannot be found.
+	//
+	public static final int ERROR_BAD_NET_NAME = 67;
+
+	//
+	// MessageId: ERROR_TOO_MANY_NAMES
+	//
+	// MessageText:
+	//
+	// The name limit for the local computer network adapter card was exceeded.
+	//
+	public static final int ERROR_TOO_MANY_NAMES = 68;
+
+	//
+	// MessageId: ERROR_TOO_MANY_SESS
+	//
+	// MessageText:
+	//
+	// The network BIOS session limit was exceeded.
+	//
+	public static final int ERROR_TOO_MANY_SESS = 69;
+
+	//
+	// MessageId: ERROR_SHARING_PAUSED
+	//
+	// MessageText:
+	//
+	// The remote server has been paused or is in the process of being started.
+	//
+	public static final int ERROR_SHARING_PAUSED = 70;
+
+	//
+	// MessageId: ERROR_REQ_NOT_ACCEP
+	//
+	// MessageText:
+	//
+	// No more connections can be made to this remote computer at this time
+	// because there are already as many connections as the computer can accept.
+	//
+	public static final int ERROR_REQ_NOT_ACCEP = 71;
+
+	//
+	// MessageId: ERROR_REDIR_PAUSED
+	//
+	// MessageText:
+	//
+	// The specified printer or disk device has been paused.
+	//
+	public static final int ERROR_REDIR_PAUSED = 72;
+
+	//
+	// MessageId: ERROR_FILE_EXISTS
+	//
+	// MessageText:
+	//
+	// The file exists.
+	//
+	public static final int ERROR_FILE_EXISTS = 80;
+
+	//
+	// MessageId: ERROR_CANNOT_MAKE
+	//
+	// MessageText:
+	//
+	// The directory or file cannot be created.
+	//
+	public static final int ERROR_CANNOT_MAKE = 82;
+
+	//
+	// MessageId: ERROR_FAIL_I24
+	//
+	// MessageText:
+	//
+	// Fail on INT=24.
+	//
+	public static final int ERROR_FAIL_I24 = 83;
+
+	//
+	// MessageId: ERROR_OUT_OF_STRUCTURES
+	//
+	// MessageText:
+	//
+	// Storage to process this request is not available.
+	//
+	public static final int ERROR_OUT_OF_STRUCTURES = 84;
+
+	//
+	// MessageId: ERROR_ALREADY_ASSIGNED
+	//
+	// MessageText:
+	//
+	// The local device name is already in use.
+	//
+	public static final int ERROR_ALREADY_ASSIGNED = 85;
+
+	//
+	// MessageId: ERROR_INVALID_PASSWORD
+	//
+	// MessageText:
+	//
+	// The specified network password is not correct.
+	//
+	public static final int ERROR_INVALID_PASSWORD = 86;
+
+	//
+	// MessageId: ERROR_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// The parameter is incorrect.
+	//
+	public static final int ERROR_INVALID_PARAMETER = 87; // dderror
+
+	//
+	// MessageId: ERROR_NET_WRITE_FAULT
+	//
+	// MessageText:
+	//
+	// A write fault occurred on the network.
+	//
+	public static final int ERROR_NET_WRITE_FAULT = 88;
+
+	//
+	// MessageId: ERROR_NO_PROC_SLOTS
+	//
+	// MessageText:
+	//
+	// The system cannot start another process at this time.
+	//
+	public static final int ERROR_NO_PROC_SLOTS = 89;
+
+	//
+	// MessageId: ERROR_TOO_MANY_SEMAPHORES
+	//
+	// MessageText:
+	//
+	// Cannot create another system semaphore.
+	//
+	public static final int ERROR_TOO_MANY_SEMAPHORES = 100;
+
+	//
+	// MessageId: ERROR_EXCL_SEM_ALREADY_OWNED
+	//
+	// MessageText:
+	//
+	// The exclusive semaphore is owned by another process.
+	//
+	public static final int ERROR_EXCL_SEM_ALREADY_OWNED = 101;
+
+	//
+	// MessageId: ERROR_SEM_IS_SET
+	//
+	// MessageText:
+	//
+	// The semaphore is set and cannot be closed.
+	//
+	public static final int ERROR_SEM_IS_SET = 102;
+
+	//
+	// MessageId: ERROR_TOO_MANY_SEM_REQUESTS
+	//
+	// MessageText:
+	//
+	// The semaphore cannot be set again.
+	//
+	public static final int ERROR_TOO_MANY_SEM_REQUESTS = 103;
+
+	//
+	// MessageId: ERROR_INVALID_AT_INTERRUPT_TIME
+	//
+	// MessageText:
+	//
+	// Cannot request exclusive semaphores at interrupt time.
+	//
+	public static final int ERROR_INVALID_AT_INTERRUPT_TIME = 104;
+
+	//
+	// MessageId: ERROR_SEM_OWNER_DIED
+	//
+	// MessageText:
+	//
+	// The previous ownership of this semaphore has ended.
+	//
+	public static final int ERROR_SEM_OWNER_DIED = 105;
+
+	//
+	// MessageId: ERROR_SEM_USER_LIMIT
+	//
+	// MessageText:
+	//
+	// Insert the diskette for drive %1.
+	//
+	public static final int ERROR_SEM_USER_LIMIT = 106;
+
+	//
+	// MessageId: ERROR_DISK_CHANGE
+	//
+	// MessageText:
+	//
+	// The program stopped because an alternate diskette was not inserted.
+	//
+	public static final int ERROR_DISK_CHANGE = 107;
+
+	//
+	// MessageId: ERROR_DRIVE_LOCKED
+	//
+	// MessageText:
+	//
+	// The disk is in use or locked by another process.
+	//
+	public static final int ERROR_DRIVE_LOCKED = 108;
+
+	//
+	// MessageId: ERROR_BROKEN_PIPE
+	//
+	// MessageText:
+	//
+	// The pipe has been ended.
+	//
+	public static final int ERROR_BROKEN_PIPE = 109;
+
+	//
+	// MessageId: ERROR_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// The system cannot open the device or file specified.
+	//
+	public static final int ERROR_OPEN_FAILED = 110;
+
+	//
+	// MessageId: ERROR_BUFFER_OVERFLOW
+	//
+	// MessageText:
+	//
+	// The file name is too long.
+	//
+	public static final int ERROR_BUFFER_OVERFLOW = 111;
+
+	//
+	// MessageId: ERROR_DISK_FULL
+	//
+	// MessageText:
+	//
+	// There is not enough space on the disk.
+	//
+	public static final int ERROR_DISK_FULL = 112;
+
+	//
+	// MessageId: ERROR_NO_MORE_SEARCH_HANDLES
+	//
+	// MessageText:
+	//
+	// No more internal file identifiers available.
+	//
+	public static final int ERROR_NO_MORE_SEARCH_HANDLES = 113;
+
+	//
+	// MessageId: ERROR_INVALID_TARGET_HANDLE
+	//
+	// MessageText:
+	//
+	// The target internal file identifier is incorrect.
+	//
+	public static final int ERROR_INVALID_TARGET_HANDLE = 114;
+
+	//
+	// MessageId: ERROR_INVALID_CATEGORY
+	//
+	// MessageText:
+	//
+	// The IOCTL call made by the application program is not correct.
+	//
+	public static final int ERROR_INVALID_CATEGORY = 117;
+
+	//
+	// MessageId: ERROR_INVALID_VERIFY_SWITCH
+	//
+	// MessageText:
+	//
+	// The verify-on-write switch parameter value is not correct.
+	//
+	public static final int ERROR_INVALID_VERIFY_SWITCH = 118;
+
+	//
+	// MessageId: ERROR_BAD_DRIVER_LEVEL
+	//
+	// MessageText:
+	//
+	// The system does not support the command requested.
+	//
+	public static final int ERROR_BAD_DRIVER_LEVEL = 119;
+
+	//
+	// MessageId: ERROR_CALL_NOT_IMPLEMENTED
+	//
+	// MessageText:
+	//
+	// This function is not supported on this system.
+	//
+	public static final int ERROR_CALL_NOT_IMPLEMENTED = 120;
+
+	//
+	// MessageId: ERROR_SEM_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The semaphore timeout period has expired.
+	//
+	public static final int ERROR_SEM_TIMEOUT = 121;
+
+	//
+	// MessageId: ERROR_INSUFFICIENT_BUFFER
+	//
+	// MessageText:
+	//
+	// The data area passed to a system call is too small.
+	//
+	public static final int ERROR_INSUFFICIENT_BUFFER = 122; // dderror
+
+	//
+	// MessageId: ERROR_INVALID_NAME
+	//
+	// MessageText:
+	//
+	// The filename, directory name, or volume label syntax is incorrect.
+	//
+	public static final int ERROR_INVALID_NAME = 123; // dderror
+
+	//
+	// MessageId: ERROR_INVALID_LEVEL
+	//
+	// MessageText:
+	//
+	// The system call level is not correct.
+	//
+	public static final int ERROR_INVALID_LEVEL = 124;
+
+	//
+	// MessageId: ERROR_NO_VOLUME_LABEL
+	//
+	// MessageText:
+	//
+	// The disk has no volume label.
+	//
+	public static final int ERROR_NO_VOLUME_LABEL = 125;
+
+	//
+	// MessageId: ERROR_MOD_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified module could not be found.
+	//
+	public static final int ERROR_MOD_NOT_FOUND = 126;
+
+	//
+	// MessageId: ERROR_PROC_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified procedure could not be found.
+	//
+	public static final int ERROR_PROC_NOT_FOUND = 127;
+
+	//
+	// MessageId: ERROR_WAIT_NO_CHILDREN
+	//
+	// MessageText:
+	//
+	// There are no child processes to wait for.
+	//
+	public static final int ERROR_WAIT_NO_CHILDREN = 128;
+
+	//
+	// MessageId: ERROR_CHILD_NOT_COMPLETE
+	//
+	// MessageText:
+	//
+	// The %1 application cannot be run in Win32 mode.
+	//
+	public static final int ERROR_CHILD_NOT_COMPLETE = 129;
+
+	//
+	// MessageId: ERROR_DIRECT_ACCESS_HANDLE
+	//
+	// MessageText:
+	//
+	// Attempt to use a file handle to an open disk partition for an operation
+	// other than raw disk I/O.
+	//
+	public static final int ERROR_DIRECT_ACCESS_HANDLE = 130;
+
+	//
+	// MessageId: ERROR_NEGATIVE_SEEK
+	//
+	// MessageText:
+	//
+	// An attempt was made to move the file pointer before the beginning of the
+	// file.
+	//
+	public static final int ERROR_NEGATIVE_SEEK = 131;
+
+	//
+	// MessageId: ERROR_SEEK_ON_DEVICE
+	//
+	// MessageText:
+	//
+	// The file pointer cannot be set on the specified device or file.
+	//
+	public static final int ERROR_SEEK_ON_DEVICE = 132;
+
+	//
+	// MessageId: ERROR_IS_JOIN_TARGET
+	//
+	// MessageText:
+	//
+	// A JOIN or SUBST command cannot be used for a drive that contains
+	// previously joined drives.
+	//
+	public static final int ERROR_IS_JOIN_TARGET = 133;
+
+	//
+	// MessageId: ERROR_IS_JOINED
+	//
+	// MessageText:
+	//
+	// An attempt was made to use a JOIN or SUBST command on a drive that has
+	// already been joined.
+	//
+	public static final int ERROR_IS_JOINED = 134;
+
+	//
+	// MessageId: ERROR_IS_SUBSTED
+	//
+	// MessageText:
+	//
+	// An attempt was made to use a JOIN or SUBST command on a drive that has
+	// already been substituted.
+	//
+	public static final int ERROR_IS_SUBSTED = 135;
+
+	//
+	// MessageId: ERROR_NOT_JOINED
+	//
+	// MessageText:
+	//
+	// The system tried to delete the JOIN of a drive that is not joined.
+	//
+	public static final int ERROR_NOT_JOINED = 136;
+
+	//
+	// MessageId: ERROR_NOT_SUBSTED
+	//
+	// MessageText:
+	//
+	// The system tried to delete the substitution of a drive that is not
+	// substituted.
+	//
+	public static final int ERROR_NOT_SUBSTED = 137;
+
+	//
+	// MessageId: ERROR_JOIN_TO_JOIN
+	//
+	// MessageText:
+	//
+	// The system tried to join a drive to a directory on a joined drive.
+	//
+	public static final int ERROR_JOIN_TO_JOIN = 138;
+
+	//
+	// MessageId: ERROR_SUBST_TO_SUBST
+	//
+	// MessageText:
+	//
+	// The system tried to substitute a drive to a directory on a substituted
+	// drive.
+	//
+	public static final int ERROR_SUBST_TO_SUBST = 139;
+
+	//
+	// MessageId: ERROR_JOIN_TO_SUBST
+	//
+	// MessageText:
+	//
+	// The system tried to join a drive to a directory on a substituted drive.
+	//
+	public static final int ERROR_JOIN_TO_SUBST = 140;
+
+	//
+	// MessageId: ERROR_SUBST_TO_JOIN
+	//
+	// MessageText:
+	//
+	// The system tried to SUBST a drive to a directory on a joined drive.
+	//
+	public static final int ERROR_SUBST_TO_JOIN = 141;
+
+	//
+	// MessageId: ERROR_BUSY_DRIVE
+	//
+	// MessageText:
+	//
+	// The system cannot perform a JOIN or SUBST at this time.
+	//
+	public static final int ERROR_BUSY_DRIVE = 142;
+
+	//
+	// MessageId: ERROR_SAME_DRIVE
+	//
+	// MessageText:
+	//
+	// The system cannot join or substitute a drive to or for a directory on the
+	// same drive.
+	//
+	public static final int ERROR_SAME_DRIVE = 143;
+
+	//
+	// MessageId: ERROR_DIR_NOT_ROOT
+	//
+	// MessageText:
+	//
+	// The directory is not a subdirectory of the root directory.
+	//
+	public static final int ERROR_DIR_NOT_ROOT = 144;
+
+	//
+	// MessageId: ERROR_DIR_NOT_EMPTY
+	//
+	// MessageText:
+	//
+	// The directory is not empty.
+	//
+	public static final int ERROR_DIR_NOT_EMPTY = 145;
+
+	//
+	// MessageId: ERROR_IS_SUBST_PATH
+	//
+	// MessageText:
+	//
+	// The path specified is being used in a substitute.
+	//
+	public static final int ERROR_IS_SUBST_PATH = 146;
+
+	//
+	// MessageId: ERROR_IS_JOIN_PATH
+	//
+	// MessageText:
+	//
+	// Not enough resources are available to process this command.
+	//
+	public static final int ERROR_IS_JOIN_PATH = 147;
+
+	//
+	// MessageId: ERROR_PATH_BUSY
+	//
+	// MessageText:
+	//
+	// The path specified cannot be used at this time.
+	//
+	public static final int ERROR_PATH_BUSY = 148;
+
+	//
+	// MessageId: ERROR_IS_SUBST_TARGET
+	//
+	// MessageText:
+	//
+	// An attempt was made to join or substitute a drive for which a directory
+	// on the drive is the target of a previous substitute.
+	//
+	public static final int ERROR_IS_SUBST_TARGET = 149;
+
+	//
+	// MessageId: ERROR_SYSTEM_TRACE
+	//
+	// MessageText:
+	//
+	// System trace information was not specified in your CONFIG.SYS file, or
+	// tracing is disallowed.
+	//
+	public static final int ERROR_SYSTEM_TRACE = 150;
+
+	//
+	// MessageId: ERROR_INVALID_EVENT_COUNT
+	//
+	// MessageText:
+	//
+	// The number of specified semaphore events for DosMuxSemWait is not
+	// correct.
+	//
+	public static final int ERROR_INVALID_EVENT_COUNT = 151;
+
+	//
+	// MessageId: ERROR_TOO_MANY_MUXWAITERS
+	//
+	// MessageText:
+	//
+	// DosMuxSemWait did not execute; too many semaphores are already set.
+	//
+	public static final int ERROR_TOO_MANY_MUXWAITERS = 152;
+
+	//
+	// MessageId: ERROR_INVALID_LIST_FORMAT
+	//
+	// MessageText:
+	//
+	// The DosMuxSemWait list is not correct.
+	//
+	public static final int ERROR_INVALID_LIST_FORMAT = 153;
+
+	//
+	// MessageId: ERROR_LABEL_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The volume label you entered exceeds the label character limit of the
+	// target file system.
+	//
+	public static final int ERROR_LABEL_TOO_LONG = 154;
+
+	//
+	// MessageId: ERROR_TOO_MANY_TCBS
+	//
+	// MessageText:
+	//
+	// Cannot create another thread.
+	//
+	public static final int ERROR_TOO_MANY_TCBS = 155;
+
+	//
+	// MessageId: ERROR_SIGNAL_REFUSED
+	//
+	// MessageText:
+	//
+	// The recipient process has refused the signal.
+	//
+	public static final int ERROR_SIGNAL_REFUSED = 156;
+
+	//
+	// MessageId: ERROR_DISCARDED
+	//
+	// MessageText:
+	//
+	// The segment is already discarded and cannot be locked.
+	//
+	public static final int ERROR_DISCARDED = 157;
+
+	//
+	// MessageId: ERROR_NOT_LOCKED
+	//
+	// MessageText:
+	//
+	// The segment is already unlocked.
+	//
+	public static final int ERROR_NOT_LOCKED = 158;
+
+	//
+	// MessageId: ERROR_BAD_THREADID_ADDR
+	//
+	// MessageText:
+	//
+	// The address for the thread ID is not correct.
+	//
+	public static final int ERROR_BAD_THREADID_ADDR = 159;
+
+	//
+	// MessageId: ERROR_BAD_ARGUMENTS
+	//
+	// MessageText:
+	//
+	// One or more arguments are not correct.
+	//
+	public static final int ERROR_BAD_ARGUMENTS = 160;
+
+	//
+	// MessageId: ERROR_BAD_PATHNAME
+	//
+	// MessageText:
+	//
+	// The specified path is invalid.
+	//
+	public static final int ERROR_BAD_PATHNAME = 161;
+
+	//
+	// MessageId: ERROR_SIGNAL_PENDING
+	//
+	// MessageText:
+	//
+	// A signal is already pending.
+	//
+	public static final int ERROR_SIGNAL_PENDING = 162;
+
+	//
+	// MessageId: ERROR_MAX_THRDS_REACHED
+	//
+	// MessageText:
+	//
+	// No more threads can be created in the system.
+	//
+	public static final int ERROR_MAX_THRDS_REACHED = 164;
+
+	//
+	// MessageId: ERROR_LOCK_FAILED
+	//
+	// MessageText:
+	//
+	// Unable to lock a region of a file.
+	//
+	public static final int ERROR_LOCK_FAILED = 167;
+
+	//
+	// MessageId: ERROR_BUSY
+	//
+	// MessageText:
+	//
+	// The requested resource is in use.
+	//
+	public static final int ERROR_BUSY = 170; // dderror
+
+	//
+	// MessageId: ERROR_CANCEL_VIOLATION
+	//
+	// MessageText:
+	//
+	// A lock request was not outstanding for the supplied cancel region.
+	//
+	public static final int ERROR_CANCEL_VIOLATION = 173;
+
+	//
+	// MessageId: ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The file system does not support atomic changes to the lock type.
+	//
+	public static final int ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174;
+
+	//
+	// MessageId: ERROR_INVALID_SEGMENT_NUMBER
+	//
+	// MessageText:
+	//
+	// The system detected a segment number that was not correct.
+	//
+	public static final int ERROR_INVALID_SEGMENT_NUMBER = 180;
+
+	//
+	// MessageId: ERROR_INVALID_ORDINAL
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INVALID_ORDINAL = 182;
+
+	//
+	// MessageId: ERROR_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// Cannot create a file when that file already exists.
+	//
+	public static final int ERROR_ALREADY_EXISTS = 183;
+
+	//
+	// MessageId: ERROR_INVALID_FLAG_NUMBER
+	//
+	// MessageText:
+	//
+	// The flag passed is not correct.
+	//
+	public static final int ERROR_INVALID_FLAG_NUMBER = 186;
+
+	//
+	// MessageId: ERROR_SEM_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified system semaphore name was not found.
+	//
+	public static final int ERROR_SEM_NOT_FOUND = 187;
+
+	//
+	// MessageId: ERROR_INVALID_STARTING_CODESEG
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INVALID_STARTING_CODESEG = 188;
+
+	//
+	// MessageId: ERROR_INVALID_STACKSEG
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INVALID_STACKSEG = 189;
+
+	//
+	// MessageId: ERROR_INVALID_MODULETYPE
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INVALID_MODULETYPE = 190;
+
+	//
+	// MessageId: ERROR_INVALID_EXE_SIGNATURE
+	//
+	// MessageText:
+	//
+	// Cannot run %1 in Win32 mode.
+	//
+	public static final int ERROR_INVALID_EXE_SIGNATURE = 191;
+
+	//
+	// MessageId: ERROR_EXE_MARKED_INVALID
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_EXE_MARKED_INVALID = 192;
+
+	//
+	// MessageId: ERROR_BAD_EXE_FORMAT
+	//
+	// MessageText:
+	//
+	// %1 is not a valid Win32 application.
+	//
+	public static final int ERROR_BAD_EXE_FORMAT = 193;
+
+	//
+	// MessageId: ERROR_ITERATED_DATA_EXCEEDS_64k
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_ITERATED_DATA_EXCEEDS_64k = 194;
+
+	//
+	// MessageId: ERROR_INVALID_MINALLOCSIZE
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INVALID_MINALLOCSIZE = 195;
+
+	//
+	// MessageId: ERROR_DYNLINK_FROM_INVALID_RING
+	//
+	// MessageText:
+	//
+	// The operating system cannot run this application program.
+	//
+	public static final int ERROR_DYNLINK_FROM_INVALID_RING = 196;
+
+	//
+	// MessageId: ERROR_IOPL_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// The operating system is not presently configured to run this application.
+	//
+	public static final int ERROR_IOPL_NOT_ENABLED = 197;
+
+	//
+	// MessageId: ERROR_INVALID_SEGDPL
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INVALID_SEGDPL = 198;
+
+	//
+	// MessageId: ERROR_AUTODATASEG_EXCEEDS_64k
+	//
+	// MessageText:
+	//
+	// The operating system cannot run this application program.
+	//
+	public static final int ERROR_AUTODATASEG_EXCEEDS_64k = 199;
+
+	//
+	// MessageId: ERROR_RING2SEG_MUST_BE_MOVABLE
+	//
+	// MessageText:
+	//
+	// The code segment cannot be greater than or equal to=64K.
+	//
+	public static final int ERROR_RING2SEG_MUST_BE_MOVABLE = 200;
+
+	//
+	// MessageId: ERROR_RELOC_CHAIN_XEEDS_SEGLIM
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201;
+
+	//
+	// MessageId: ERROR_INFLOOP_IN_RELOC_CHAIN
+	//
+	// MessageText:
+	//
+	// The operating system cannot run %1.
+	//
+	public static final int ERROR_INFLOOP_IN_RELOC_CHAIN = 202;
+
+	//
+	// MessageId: ERROR_ENVVAR_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system could not find the environment option that was entered.
+	//
+	public static final int ERROR_ENVVAR_NOT_FOUND = 203;
+
+	//
+	// MessageId: ERROR_NO_SIGNAL_SENT
+	//
+	// MessageText:
+	//
+	// No process in the command subtree has a signal handler.
+	//
+	public static final int ERROR_NO_SIGNAL_SENT = 205;
+
+	//
+	// MessageId: ERROR_FILENAME_EXCED_RANGE
+	//
+	// MessageText:
+	//
+	// The filename or extension is too long.
+	//
+	public static final int ERROR_FILENAME_EXCED_RANGE = 206;
+
+	//
+	// MessageId: ERROR_RING2_STACK_IN_USE
+	//
+	// MessageText:
+	//
+	// The ring=2 stack is in use.
+	//
+	public static final int ERROR_RING2_STACK_IN_USE = 207;
+
+	//
+	// MessageId: ERROR_META_EXPANSION_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The global filename characters, * or ?, are entered incorrectly or too
+	// many global filename characters are specified.
+	//
+	public static final int ERROR_META_EXPANSION_TOO_LONG = 208;
+
+	//
+	// MessageId: ERROR_INVALID_SIGNAL_NUMBER
+	//
+	// MessageText:
+	//
+	// The signal being posted is not correct.
+	//
+	public static final int ERROR_INVALID_SIGNAL_NUMBER = 209;
+
+	//
+	// MessageId: ERROR_THREAD_1_INACTIVE
+	//
+	// MessageText:
+	//
+	// The signal handler cannot be set.
+	//
+	public static final int ERROR_THREAD_1_INACTIVE = 210;
+
+	//
+	// MessageId: ERROR_LOCKED
+	//
+	// MessageText:
+	//
+	// The segment is locked and cannot be reallocated.
+	//
+	public static final int ERROR_LOCKED = 212;
+
+	//
+	// MessageId: ERROR_TOO_MANY_MODULES
+	//
+	// MessageText:
+	//
+	// Too many dynamic-link modules are attached to this program or
+	// dynamic-link module.
+	//
+	public static final int ERROR_TOO_MANY_MODULES = 214;
+
+	//
+	// MessageId: ERROR_NESTING_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// Cannot nest calls to LoadModule.
+	//
+	public static final int ERROR_NESTING_NOT_ALLOWED = 215;
+
+	//
+	// MessageId: ERROR_EXE_MACHINE_TYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// This version of %1 is not compatible with the version of Windows you're
+	// running. Check your computer's system information to see whether you need
+	// a x86 (32-bit) or x64 (64-bit) version of the program, and then contact
+	// the software publisher.
+	//
+	public static final int ERROR_EXE_MACHINE_TYPE_MISMATCH = 216;
+
+	//
+	// MessageId: ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY
+	//
+	// MessageText:
+	//
+	// The image file %1 is signed, unable to modify.
+	//
+	public static final int ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY = 217;
+
+	//
+	// MessageId: ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY
+	//
+	// MessageText:
+	//
+	// The image file %1 is strong signed, unable to modify.
+	//
+	public static final int ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = 218;
+
+	//
+	// MessageId: ERROR_FILE_CHECKED_OUT
+	//
+	// MessageText:
+	//
+	// This file is checked out or locked for editing by another user.
+	//
+	public static final int ERROR_FILE_CHECKED_OUT = 220;
+
+	//
+	// MessageId: ERROR_CHECKOUT_REQUIRED
+	//
+	// MessageText:
+	//
+	// The file must be checked out before saving changes.
+	//
+	public static final int ERROR_CHECKOUT_REQUIRED = 221;
+
+	//
+	// MessageId: ERROR_BAD_FILE_TYPE
+	//
+	// MessageText:
+	//
+	// The file type being saved or retrieved has been blocked.
+	//
+	public static final int ERROR_BAD_FILE_TYPE = 222;
+
+	//
+	// MessageId: ERROR_FILE_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// The file size exceeds the limit allowed and cannot be saved.
+	//
+	public static final int ERROR_FILE_TOO_LARGE = 223;
+
+	//
+	// MessageId: ERROR_FORMS_AUTH_REQUIRED
+	//
+	// MessageText:
+	//
+	// Access Denied. Before opening files in this location, you must first
+	// browse to the web site and select the option to login automatically.
+	//
+	public static final int ERROR_FORMS_AUTH_REQUIRED = 224;
+
+	//
+	// MessageId: ERROR_VIRUS_INFECTED
+	//
+	// MessageText:
+	//
+	// Operation did not complete successfully because the file contains a
+	// virus.
+	//
+	public static final int ERROR_VIRUS_INFECTED = 225;
+
+	//
+	// MessageId: ERROR_VIRUS_DELETED
+	//
+	// MessageText:
+	//
+	// This file contains a virus and cannot be opened. Due to the nature of
+	// this virus, the file has been removed from this location.
+	//
+	public static final int ERROR_VIRUS_DELETED = 226;
+
+	//
+	// MessageId: ERROR_PIPE_LOCAL
+	//
+	// MessageText:
+	//
+	// The pipe is local.
+	//
+	public static final int ERROR_PIPE_LOCAL = 229;
+
+	//
+	// MessageId: ERROR_BAD_PIPE
+	//
+	// MessageText:
+	//
+	// The pipe state is invalid.
+	//
+	public static final int ERROR_BAD_PIPE = 230;
+
+	//
+	// MessageId: ERROR_PIPE_BUSY
+	//
+	// MessageText:
+	//
+	// All pipe instances are busy.
+	//
+	public static final int ERROR_PIPE_BUSY = 231;
+
+	//
+	// MessageId: ERROR_NO_DATA
+	//
+	// MessageText:
+	//
+	// The pipe is being closed.
+	//
+	public static final int ERROR_NO_DATA = 232;
+
+	//
+	// MessageId: ERROR_PIPE_NOT_CONNECTED
+	//
+	// MessageText:
+	//
+	// No process is on the other end of the pipe.
+	//
+	public static final int ERROR_PIPE_NOT_CONNECTED = 233;
+
+	//
+	// MessageId: ERROR_MORE_DATA
+	//
+	// MessageText:
+	//
+	// More data is available.
+	//
+	public static final int ERROR_MORE_DATA = 234; // dderror
+
+	//
+	// MessageId: ERROR_VC_DISCONNECTED
+	//
+	// MessageText:
+	//
+	// The session was canceled.
+	//
+	public static final int ERROR_VC_DISCONNECTED = 240;
+
+	//
+	// MessageId: ERROR_INVALID_EA_NAME
+	//
+	// MessageText:
+	//
+	// The specified extended attribute name was invalid.
+	//
+	public static final int ERROR_INVALID_EA_NAME = 254;
+
+	//
+	// MessageId: ERROR_EA_LIST_INCONSISTENT
+	//
+	// MessageText:
+	//
+	// The extended attributes are inconsistent.
+	//
+	public static final int ERROR_EA_LIST_INCONSISTENT = 255;
+
+	//
+	// MessageId: WAIT_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The wait operation timed out.
+	//
+	public static final int WAIT_TIMEOUT = 258; // dderror
+
+	//
+	// MessageId: ERROR_NO_MORE_ITEMS
+	//
+	// MessageText:
+	//
+	// No more data is available.
+	//
+	public static final int ERROR_NO_MORE_ITEMS = 259;
+
+	//
+	// MessageId: ERROR_CANNOT_COPY
+	//
+	// MessageText:
+	//
+	// The copy functions cannot be used.
+	//
+	public static final int ERROR_CANNOT_COPY = 266;
+
+	//
+	// MessageId: ERROR_DIRECTORY
+	//
+	// MessageText:
+	//
+	// The directory name is invalid.
+	//
+	public static final int ERROR_DIRECTORY = 267;
+
+	//
+	// MessageId: ERROR_EAS_DIDNT_FIT
+	//
+	// MessageText:
+	//
+	// The extended attributes did not fit in the buffer.
+	//
+	public static final int ERROR_EAS_DIDNT_FIT = 275;
+
+	//
+	// MessageId: ERROR_EA_FILE_CORRUPT
+	//
+	// MessageText:
+	//
+	// The extended attribute file on the mounted file system is corrupt.
+	//
+	public static final int ERROR_EA_FILE_CORRUPT = 276;
+
+	//
+	// MessageId: ERROR_EA_TABLE_FULL
+	//
+	// MessageText:
+	//
+	// The extended attribute table file is full.
+	//
+	public static final int ERROR_EA_TABLE_FULL = 277;
+
+	//
+	// MessageId: ERROR_INVALID_EA_HANDLE
+	//
+	// MessageText:
+	//
+	// The specified extended attribute handle is invalid.
+	//
+	public static final int ERROR_INVALID_EA_HANDLE = 278;
+
+	//
+	// MessageId: ERROR_EAS_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The mounted file system does not support extended attributes.
+	//
+	public static final int ERROR_EAS_NOT_SUPPORTED = 282;
+
+	//
+	// MessageId: ERROR_NOT_OWNER
+	//
+	// MessageText:
+	//
+	// Attempt to release mutex not owned by caller.
+	//
+	public static final int ERROR_NOT_OWNER = 288;
+
+	//
+	// MessageId: ERROR_TOO_MANY_POSTS
+	//
+	// MessageText:
+	//
+	// Too many posts were made to a semaphore.
+	//
+	public static final int ERROR_TOO_MANY_POSTS = 298;
+
+	//
+	// MessageId: ERROR_PARTIAL_COPY
+	//
+	// MessageText:
+	//
+	// Only part of a ReadProcessMemory or WriteProcessMemory request was
+	// completed.
+	//
+	public static final int ERROR_PARTIAL_COPY = 299;
+
+	//
+	// MessageId: ERROR_OPLOCK_NOT_GRANTED
+	//
+	// MessageText:
+	//
+	// The oplock request is denied.
+	//
+	public static final int ERROR_OPLOCK_NOT_GRANTED = 300;
+
+	//
+	// MessageId: ERROR_INVALID_OPLOCK_PROTOCOL
+	//
+	// MessageText:
+	//
+	// An invalid oplock acknowledgment was received by the system.
+	//
+	public static final int ERROR_INVALID_OPLOCK_PROTOCOL = 301;
+
+	//
+	// MessageId: ERROR_DISK_TOO_FRAGMENTED
+	//
+	// MessageText:
+	//
+	// The volume is too fragmented to complete this operation.
+	//
+	public static final int ERROR_DISK_TOO_FRAGMENTED = 302;
+
+	//
+	// MessageId: ERROR_DELETE_PENDING
+	//
+	// MessageText:
+	//
+	// The file cannot be opened because it is in the process of being deleted.
+	//
+	public static final int ERROR_DELETE_PENDING = 303;
+
+	//
+	// MessageId: ERROR_MR_MID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system cannot find message text for message number 0x%1 in the
+	// message file for %2.
+	//
+	public static final int ERROR_MR_MID_NOT_FOUND = 317;
+
+	//
+	// MessageId: ERROR_SCOPE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The scope specified was not found.
+	//
+	public static final int ERROR_SCOPE_NOT_FOUND = 318;
+
+	//
+	// MessageId: ERROR_FAIL_NOACTION_REBOOT
+	//
+	// MessageText:
+	//
+	// No action was taken as a system reboot is required.
+	//
+	public static final int ERROR_FAIL_NOACTION_REBOOT = 350;
+
+	//
+	// MessageId: ERROR_FAIL_SHUTDOWN
+	//
+	// MessageText:
+	//
+	// The shutdown operation failed.
+	//
+	public static final int ERROR_FAIL_SHUTDOWN = 351;
+
+	//
+	// MessageId: ERROR_FAIL_RESTART
+	//
+	// MessageText:
+	//
+	// The restart operation failed.
+	//
+	public static final int ERROR_FAIL_RESTART = 352;
+
+	//
+	// MessageId: ERROR_MAX_SESSIONS_REACHED
+	//
+	// MessageText:
+	//
+	// The maximum number of sessions has been reached.
+	//
+	public static final int ERROR_MAX_SESSIONS_REACHED = 353;
+
+	//
+	// MessageId: ERROR_THREAD_MODE_ALREADY_BACKGROUND
+	//
+	// MessageText:
+	//
+	// The thread is already in background processing mode.
+	//
+	public static final int ERROR_THREAD_MODE_ALREADY_BACKGROUND = 400;
+
+	//
+	// MessageId: ERROR_THREAD_MODE_NOT_BACKGROUND
+	//
+	// MessageText:
+	//
+	// The thread is not in background processing mode.
+	//
+	public static final int ERROR_THREAD_MODE_NOT_BACKGROUND = 401;
+
+	//
+	// MessageId: ERROR_PROCESS_MODE_ALREADY_BACKGROUND
+	//
+	// MessageText:
+	//
+	// The process is already in background processing mode.
+	//
+	public static final int ERROR_PROCESS_MODE_ALREADY_BACKGROUND = 402;
+
+	//
+	// MessageId: ERROR_PROCESS_MODE_NOT_BACKGROUND
+	//
+	// MessageText:
+	//
+	// The process is not in background processing mode.
+	//
+	public static final int ERROR_PROCESS_MODE_NOT_BACKGROUND = 403;
+
+	//
+	// MessageId: ERROR_INVALID_ADDRESS
+	//
+	// MessageText:
+	//
+	// Attempt to access invalid address.
+	//
+	public static final int ERROR_INVALID_ADDRESS = 487;
+
+	//
+	// MessageId: ERROR_USER_PROFILE_LOAD
+	//
+	// MessageText:
+	//
+	// User profile cannot be loaded.
+	//
+	public static final int ERROR_USER_PROFILE_LOAD = 500;
+
+	//
+	// MessageId: ERROR_ARITHMETIC_OVERFLOW
+	//
+	// MessageText:
+	//
+	// Arithmetic result exceeded=32 bits.
+	//
+	public static final int ERROR_ARITHMETIC_OVERFLOW = 534;
+
+	//
+	// MessageId: ERROR_PIPE_CONNECTED
+	//
+	// MessageText:
+	//
+	// There is a process on other end of the pipe.
+	//
+	public static final int ERROR_PIPE_CONNECTED = 535;
+
+	//
+	// MessageId: ERROR_PIPE_LISTENING
+	//
+	// MessageText:
+	//
+	// Waiting for a process to open the other end of the pipe.
+	//
+	public static final int ERROR_PIPE_LISTENING = 536;
+
+	//
+	// MessageId: ERROR_VERIFIER_STOP
+	//
+	// MessageText:
+	//
+	// Application verifier has found an error in the current process.
+	//
+	public static final int ERROR_VERIFIER_STOP = 537;
+
+	//
+	// MessageId: ERROR_ABIOS_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred in the ABIOS subsystem.
+	//
+	public static final int ERROR_ABIOS_ERROR = 538;
+
+	//
+	// MessageId: ERROR_WX86_WARNING
+	//
+	// MessageText:
+	//
+	// A warning occurred in the WX86 subsystem.
+	//
+	public static final int ERROR_WX86_WARNING = 539;
+
+	//
+	// MessageId: ERROR_WX86_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred in the WX86 subsystem.
+	//
+	public static final int ERROR_WX86_ERROR = 540;
+
+	//
+	// MessageId: ERROR_TIMER_NOT_CANCELED
+	//
+	// MessageText:
+	//
+	// An attempt was made to cancel or set a timer that has an associated APC
+	// and the subject thread is not the thread that originally set the timer
+	// with an associated APC routine.
+	//
+	public static final int ERROR_TIMER_NOT_CANCELED = 541;
+
+	//
+	// MessageId: ERROR_UNWIND
+	//
+	// MessageText:
+	//
+	// Unwind exception code.
+	//
+	public static final int ERROR_UNWIND = 542;
+
+	//
+	// MessageId: ERROR_BAD_STACK
+	//
+	// MessageText:
+	//
+	// An invalid or unaligned stack was encountered during an unwind operation.
+	//
+	public static final int ERROR_BAD_STACK = 543;
+
+	//
+	// MessageId: ERROR_INVALID_UNWIND_TARGET
+	//
+	// MessageText:
+	//
+	// An invalid unwind target was encountered during an unwind operation.
+	//
+	public static final int ERROR_INVALID_UNWIND_TARGET = 544;
+
+	//
+	// MessageId: ERROR_INVALID_PORT_ATTRIBUTES
+	//
+	// MessageText:
+	//
+	// Invalid Object Attributes specified to NtCreatePort or invalid Port
+	// Attributes specified to NtConnectPort
+	//
+	public static final int ERROR_INVALID_PORT_ATTRIBUTES = 545;
+
+	//
+	// MessageId: ERROR_PORT_MESSAGE_TOO_LONG
+	//
+	// MessageText:
+	//
+	// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was
+	// longer than the maximum message allowed by the port.
+	//
+	public static final int ERROR_PORT_MESSAGE_TOO_LONG = 546;
+
+	//
+	// MessageId: ERROR_INVALID_QUOTA_LOWER
+	//
+	// MessageText:
+	//
+	// An attempt was made to lower a quota limit below the current usage.
+	//
+	public static final int ERROR_INVALID_QUOTA_LOWER = 547;
+
+	//
+	// MessageId: ERROR_DEVICE_ALREADY_ATTACHED
+	//
+	// MessageText:
+	//
+	// An attempt was made to attach to a device that was already attached to
+	// another device.
+	//
+	public static final int ERROR_DEVICE_ALREADY_ATTACHED = 548;
+
+	//
+	// MessageId: ERROR_INSTRUCTION_MISALIGNMENT
+	//
+	// MessageText:
+	//
+	// An attempt was made to execute an instruction at an unaligned address and
+	// the host system does not support unaligned instruction references.
+	//
+	public static final int ERROR_INSTRUCTION_MISALIGNMENT = 549;
+
+	//
+	// MessageId: ERROR_PROFILING_NOT_STARTED
+	//
+	// MessageText:
+	//
+	// Profiling not started.
+	//
+	public static final int ERROR_PROFILING_NOT_STARTED = 550;
+
+	//
+	// MessageId: ERROR_PROFILING_NOT_STOPPED
+	//
+	// MessageText:
+	//
+	// Profiling not stopped.
+	//
+	public static final int ERROR_PROFILING_NOT_STOPPED = 551;
+
+	//
+	// MessageId: ERROR_COULD_NOT_INTERPRET
+	//
+	// MessageText:
+	//
+	// The passed ACL did not contain the minimum required information.
+	//
+	public static final int ERROR_COULD_NOT_INTERPRET = 552;
+
+	//
+	// MessageId: ERROR_PROFILING_AT_LIMIT
+	//
+	// MessageText:
+	//
+	// The number of active profiling objects is at the maximum and no more may
+	// be started.
+	//
+	public static final int ERROR_PROFILING_AT_LIMIT = 553;
+
+	//
+	// MessageId: ERROR_CANT_WAIT
+	//
+	// MessageText:
+	//
+	// Used to indicate that an operation cannot continue without blocking for
+	// I/O.
+	//
+	public static final int ERROR_CANT_WAIT = 554;
+
+	//
+	// MessageId: ERROR_CANT_TERMINATE_SELF
+	//
+	// MessageText:
+	//
+	// Indicates that a thread attempted to terminate itself by default (called
+	// NtTerminateThread with NUL; and it was the last thread in the current
+	// process.
+	//
+	public static final int ERROR_CANT_TERMINATE_SELF = 555;
+
+	//
+	// MessageId: ERROR_UNEXPECTED_MM_CREATE_ERR
+	//
+	// MessageText:
+	//
+	// If an MM error is returned which is not defined in the standard FsRtl
+	// filter, it is converted to one of the following errors which is
+	// guaranteed to be in the filter.
+	// In this case information is lost, however, the filter correctly handles
+	// the exception.
+	//
+	public static final int ERROR_UNEXPECTED_MM_CREATE_ERR = 556;
+
+	//
+	// MessageId: ERROR_UNEXPECTED_MM_MAP_ERROR
+	//
+	// MessageText:
+	//
+	// If an MM error is returned which is not defined in the standard FsRtl
+	// filter, it is converted to one of the following errors which is
+	// guaranteed to be in the filter.
+	// In this case information is lost, however, the filter correctly handles
+	// the exception.
+	//
+	public static final int ERROR_UNEXPECTED_MM_MAP_ERROR = 557;
+
+	//
+	// MessageId: ERROR_UNEXPECTED_MM_EXTEND_ERR
+	//
+	// MessageText:
+	//
+	// If an MM error is returned which is not defined in the standard FsRtl
+	// filter, it is converted to one of the following errors which is
+	// guaranteed to be in the filter.
+	// In this case information is lost, however, the filter correctly handles
+	// the exception.
+	//
+	public static final int ERROR_UNEXPECTED_MM_EXTEND_ERR = 558;
+
+	//
+	// MessageId: ERROR_BAD_FUNCTION_TABLE
+	//
+	// MessageText:
+	//
+	// A malformed function table was encountered during an unwind operation.
+	//
+	public static final int ERROR_BAD_FUNCTION_TABLE = 559;
+
+	//
+	// MessageId: ERROR_NO_GUID_TRANSLATION
+	//
+	// MessageText:
+	//
+	// Indicates that an attempt was made to assign protection to a file system
+	// file or directory and one of the SIDs in the security descriptor could
+	// not be translated into a GUID that could be stored by the file system.
+	// This causes the protection attempt to fail, which may cause a file
+	// creation attempt to fail.
+	//
+	public static final int ERROR_NO_GUID_TRANSLATION = 560;
+
+	//
+	// MessageId: ERROR_INVALID_LDT_SIZE
+	//
+	// MessageText:
+	//
+	// Indicates that an attempt was made to grow an LDT by setting its size, or
+	// that the size was not an even number of selectors.
+	//
+	public static final int ERROR_INVALID_LDT_SIZE = 561;
+
+	//
+	// MessageId: ERROR_INVALID_LDT_OFFSET
+	//
+	// MessageText:
+	//
+	// Indicates that the starting value for the LDT information was not an
+	// integral multiple of the selector size.
+	//
+	public static final int ERROR_INVALID_LDT_OFFSET = 563;
+
+	//
+	// MessageId: ERROR_INVALID_LDT_DESCRIPTOR
+	//
+	// MessageText:
+	//
+	// Indicates that the user supplied an invalid descriptor when trying to set
+	// up Ldt descriptors.
+	//
+	public static final int ERROR_INVALID_LDT_DESCRIPTOR = 564;
+
+	//
+	// MessageId: ERROR_TOO_MANY_THREADS
+	//
+	// MessageText:
+	//
+	// Indicates a process has too many threads to perform the requested action.
+	// For example, assignment of a primary token may only be performed when a
+	// process has zero or one threads.
+	//
+	public static final int ERROR_TOO_MANY_THREADS = 565;
+
+	//
+	// MessageId: ERROR_THREAD_NOT_IN_PROCESS
+	//
+	// MessageText:
+	//
+	// An attempt was made to operate on a thread within a specific process, but
+	// the thread specified is not in the process specified.
+	//
+	public static final int ERROR_THREAD_NOT_IN_PROCESS = 566;
+
+	//
+	// MessageId: ERROR_PAGEFILE_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// Page file quota was exceeded.
+	//
+	public static final int ERROR_PAGEFILE_QUOTA_EXCEEDED = 567;
+
+	//
+	// MessageId: ERROR_LOGON_SERVER_CONFLICT
+	//
+	// MessageText:
+	//
+	// The Netlogon service cannot start because another Netlogon service
+	// running in the domain conflicts with the specified role.
+	//
+	public static final int ERROR_LOGON_SERVER_CONFLICT = 568;
+
+	//
+	// MessageId: ERROR_SYNCHRONIZATION_REQUIRED
+	//
+	// MessageText:
+	//
+	// The SAM database on a Windows Server is significantly out of
+	// synchronization with the copy on the Domain Controller. A complete
+	// synchronization is required.
+	//
+	public static final int ERROR_SYNCHRONIZATION_REQUIRED = 569;
+
+	//
+	// MessageId: ERROR_NET_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// The NtCreateFile API failed. This error should never be returned to an
+	// application, it is a place holder for the Windows Lan Manager Redirector
+	// to use in its internal error mapping routines.
+	//
+	public static final int ERROR_NET_OPEN_FAILED = 570;
+
+	//
+	// MessageId: ERROR_IO_PRIVILEGE_FAILED
+	//
+	// MessageText:
+	//
+	// {Privilege Failed}
+	// The I/O permissions for the process could not be changed.
+	//
+	public static final int ERROR_IO_PRIVILEGE_FAILED = 571;
+
+	//
+	// MessageId: ERROR_CONTROL_C_EXIT
+	//
+	// MessageText:
+	//
+	// {Application Exit by CTRL+C}
+	// The application terminated as a result of a CTRL+C.
+	//
+	public static final int ERROR_CONTROL_C_EXIT = 572; // winnt
+
+	//
+	// MessageId: ERROR_MISSING_SYSTEMFILE
+	//
+	// MessageText:
+	//
+	// {Missing System File}
+	// The required system file %hs is bad or missing.
+	//
+	public static final int ERROR_MISSING_SYSTEMFILE = 573;
+
+	//
+	// MessageId: ERROR_UNHANDLED_EXCEPTION
+	//
+	// MessageText:
+	//
+	// {Application Error}
+	// The exception %s (0x%08;x) occurred in the application at location
+	// 0x%08;x.
+	//
+	public static final int ERROR_UNHANDLED_EXCEPTION = 574;
+
+	//
+	// MessageId: ERROR_APP_INIT_FAILURE
+	//
+	// MessageText:
+	//
+	// {Application Error}
+	// The application failed to initialize properly (0x%lx). Click OK to
+	// terminate the application.
+	//
+	public static final int ERROR_APP_INIT_FAILURE = 575;
+
+	//
+	// MessageId: ERROR_PAGEFILE_CREATE_FAILED
+	//
+	// MessageText:
+	//
+	// {Unable to Create Paging File}
+	// The creation of the paging file %hs failed (%lx). The requested size was
+	// %ld.
+	//
+	public static final int ERROR_PAGEFILE_CREATE_FAILED = 576;
+
+	//
+	// MessageId: ERROR_INVALID_IMAGE_HASH
+	//
+	// MessageText:
+	//
+	// Windows cannot verify the digital signature for this file. A recent
+	// hardware or software change might have installed a file that is signed
+	// incorrectly or damaged, or that might be malicious software from an
+	// unknown source.
+	//
+	public static final int ERROR_INVALID_IMAGE_HASH = 577;
+
+	//
+	// MessageId: ERROR_NO_PAGEFILE
+	//
+	// MessageText:
+	//
+	// {No Paging File Specified}
+	// No paging file was specified in the system configuration.
+	//
+	public static final int ERROR_NO_PAGEFILE = 578;
+
+	//
+	// MessageId: ERROR_ILLEGAL_FLOAT_CONTEXT
+	//
+	// MessageText:
+	//
+	// {EXCEPTION}
+	// A real-mode application issued a floating-point instruction and
+	// floating-point hardware is not present.
+	//
+	public static final int ERROR_ILLEGAL_FLOAT_CONTEXT = 579;
+
+	//
+	// MessageId: ERROR_NO_EVENT_PAIR
+	//
+	// MessageText:
+	//
+	// An event pair synchronization operation was performed using the thread
+	// specific client/server event pair object, but no event pair object was
+	// associated with the thread.
+	//
+	public static final int ERROR_NO_EVENT_PAIR = 580;
+
+	//
+	// MessageId: ERROR_DOMAIN_CTRLR_CONFIG_ERROR
+	//
+	// MessageText:
+	//
+	// A Windows Server has an incorrect configuration.
+	//
+	public static final int ERROR_DOMAIN_CTRLR_CONFIG_ERROR = 581;
+
+	//
+	// MessageId: ERROR_ILLEGAL_CHARACTER
+	//
+	// MessageText:
+	//
+	// An illegal character was encountered. For a multi-byte character set this
+	// includes a lead byte without a succeeding trail byte. For the Unicode
+	// character set this includes the characters 0xFFFF and 0xFFFE.
+	//
+	public static final int ERROR_ILLEGAL_CHARACTER = 582;
+
+	//
+	// MessageId: ERROR_UNDEFINED_CHARACTER
+	//
+	// MessageText:
+	//
+	// The Unicode character is not defined in the Unicode character set
+	// installed on the system.
+	//
+	public static final int ERROR_UNDEFINED_CHARACTER = 583;
+
+	//
+	// MessageId: ERROR_FLOPPY_VOLUME
+	//
+	// MessageText:
+	//
+	// The paging file cannot be created on a floppy diskette.
+	//
+	public static final int ERROR_FLOPPY_VOLUME = 584;
+
+	//
+	// MessageId: ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT
+	//
+	// MessageText:
+	//
+	// The system BIOS failed to connect a system interrupt to the device or bus
+	// for which the device is connected.
+	//
+	public static final int ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT = 585;
+
+	//
+	// MessageId: ERROR_BACKUP_CONTROLLER
+	//
+	// MessageText:
+	//
+	// This operation is only allowed for the Primary Domain Controller of the
+	// domain.
+	//
+	public static final int ERROR_BACKUP_CONTROLLER = 586;
+
+	//
+	// MessageId: ERROR_MUTANT_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// An attempt was made to acquire a mutant such that its maximum count would
+	// have been exceeded.
+	//
+	public static final int ERROR_MUTANT_LIMIT_EXCEEDED = 587;
+
+	//
+	// MessageId: ERROR_FS_DRIVER_REQUIRED
+	//
+	// MessageText:
+	//
+	// A volume has been accessed for which a file system driver is required
+	// that has not yet been loaded.
+	//
+	public static final int ERROR_FS_DRIVER_REQUIRED = 588;
+
+	//
+	// MessageId: ERROR_CANNOT_LOAD_REGISTRY_FILE
+	//
+	// MessageText:
+	//
+	// {Registry File Failure}
+	// The registry cannot load the hive (file):
+	// %hs
+	// or its log or alternate.
+	// It is corrupt, absent, or not writable.
+	//
+	public static final int ERROR_CANNOT_LOAD_REGISTRY_FILE = 589;
+
+	//
+	// MessageId: ERROR_DEBUG_ATTACH_FAILED
+	//
+	// MessageText:
+	//
+	// {Unexpected Failure in DebugActiveProcess}
+	// An unexpected failure occurred while processing a DebugActiveProcess API
+	// request. You may choose OK to terminate the process, or Cancel to ignore
+	// the error.
+	//
+	public static final int ERROR_DEBUG_ATTACH_FAILED = 590;
+
+	//
+	// MessageId: ERROR_SYSTEM_PROCESS_TERMINATED
+	//
+	// MessageText:
+	//
+	// {Fatal System Error}
+	// The %hs system process terminated unexpectedly with a status of 0x%08x
+	// (0x%08x 0x%08x).
+	// The system has been shut down.
+	//
+	public static final int ERROR_SYSTEM_PROCESS_TERMINATED = 591;
+
+	//
+	// MessageId: ERROR_DATA_NOT_ACCEPTED
+	//
+	// MessageText:
+	//
+	// {Data Not Accepted}
+	// The TDI client could not handle the data received during an indication.
+	//
+	public static final int ERROR_DATA_NOT_ACCEPTED = 592;
+
+	//
+	// MessageId: ERROR_VDM_HARD_ERROR
+	//
+	// MessageText:
+	//
+	// NTVDM encountered a hard error.
+	//
+	public static final int ERROR_VDM_HARD_ERROR = 593;
+
+	//
+	// MessageId: ERROR_DRIVER_CANCEL_TIMEOUT
+	//
+	// MessageText:
+	//
+	// {Cancel Timeout}
+	// The driver %hs failed to complete a cancelled I/O request in the allotted
+	// time.
+	//
+	public static final int ERROR_DRIVER_CANCEL_TIMEOUT = 594;
+
+	//
+	// MessageId: ERROR_REPLY_MESSAGE_MISMATCH
+	//
+	// MessageText:
+	//
+	// {Reply Message Mismatch}
+	// An attempt was made to reply to an LPC message, but the thread specified
+	// by the client ID in the message was not waiting on that message.
+	//
+	public static final int ERROR_REPLY_MESSAGE_MISMATCH = 595;
+
+	//
+	// MessageId: ERROR_LOST_WRITEBEHIND_DATA
+	//
+	// MessageText:
+	//
+	// {Delayed Write Failed}
+	// Windows was unable to save all the data for the file %hs. The data has
+	// been lost.
+	// This error may be caused by a failure of your computer hardware or
+	// network connection. Please try to save this file elsewhere.
+	//
+	public static final int ERROR_LOST_WRITEBEHIND_DATA = 596;
+
+	//
+	// MessageId: ERROR_CLIENT_SERVER_PARAMETERS_INVALID
+	//
+	// MessageText:
+	//
+	// The parameter(s) passed to the server in the client/server shared memory
+	// window were invalid. Too much data may have been put in the shared memory
+	// window.
+	//
+	public static final int ERROR_CLIENT_SERVER_PARAMETERS_INVALID = 597;
+
+	//
+	// MessageId: ERROR_NOT_TINY_STREAM
+	//
+	// MessageText:
+	//
+	// The stream is not a tiny stream.
+	//
+	public static final int ERROR_NOT_TINY_STREAM = 598;
+
+	//
+	// MessageId: ERROR_STACK_OVERFLOW_READ
+	//
+	// MessageText:
+	//
+	// The request must be handled by the stack overflow code.
+	//
+	public static final int ERROR_STACK_OVERFLOW_READ = 599;
+
+	//
+	// MessageId: ERROR_CONVERT_TO_LARGE
+	//
+	// MessageText:
+	//
+	// Internal OFS status codes indicating how an allocation operation is
+	// handled. Either it is retried after the containing onode is moved or the
+	// extent stream is converted to a large stream.
+	//
+	public static final int ERROR_CONVERT_TO_LARGE = 600;
+
+	//
+	// MessageId: ERROR_FOUND_OUT_OF_SCOPE
+	//
+	// MessageText:
+	//
+	// The attempt to find the object found an object matching by ID on the
+	// volume but it is out of the scope of the handle used for the operation.
+	//
+	public static final int ERROR_FOUND_OUT_OF_SCOPE = 601;
+
+	//
+	// MessageId: ERROR_ALLOCATE_BUCKET
+	//
+	// MessageText:
+	//
+	// The bucket array must be grown. Retry transaction after doing so.
+	//
+	public static final int ERROR_ALLOCATE_BUCKET = 602;
+
+	//
+	// MessageId: ERROR_MARSHALL_OVERFLOW
+	//
+	// MessageText:
+	//
+	// The user/kernel marshalling buffer has overflowed.
+	//
+	public static final int ERROR_MARSHALL_OVERFLOW = 603;
+
+	//
+	// MessageId: ERROR_INVALID_VARIANT
+	//
+	// MessageText:
+	//
+	// The supplied variant structure contains invalid data.
+	//
+	public static final int ERROR_INVALID_VARIANT = 604;
+
+	//
+	// MessageId: ERROR_BAD_COMPRESSION_BUFFER
+	//
+	// MessageText:
+	//
+	// The specified buffer contains ill-formed data.
+	//
+	public static final int ERROR_BAD_COMPRESSION_BUFFER = 605;
+
+	//
+	// MessageId: ERROR_AUDIT_FAILED
+	//
+	// MessageText:
+	//
+	// {Audit Failed}
+	// An attempt to generate a security audit failed.
+	//
+	public static final int ERROR_AUDIT_FAILED = 606;
+
+	//
+	// MessageId: ERROR_TIMER_RESOLUTION_NOT_SET
+	//
+	// MessageText:
+	//
+	// The timer resolution was not previously set by the current process.
+	//
+	public static final int ERROR_TIMER_RESOLUTION_NOT_SET = 607;
+
+	//
+	// MessageId: ERROR_INSUFFICIENT_LOGON_INFO
+	//
+	// MessageText:
+	//
+	// There is insufficient account information to log you on.
+	//
+	public static final int ERROR_INSUFFICIENT_LOGON_INFO = 608;
+
+	//
+	// MessageId: ERROR_BAD_DLL_ENTRYPOINT
+	//
+	// MessageText:
+	//
+	// {Invalid DLL Entrypoint}
+	// The dynamic link library %hs is not written correctly. The stack pointer
+	// has been left in an inconsistent state.
+	// The entrypoint should be declared as WINAPI or STDCALL. Select YES to
+	// fail the DLL load. Select NO to continue execution. Selecting NO may
+	// cause the application to operate incorrectly.
+	//
+	public static final int ERROR_BAD_DLL_ENTRYPOINT = 609;
+
+	//
+	// MessageId: ERROR_BAD_SERVICE_ENTRYPOINT
+	//
+	// MessageText:
+	//
+	// {Invalid Service Callback Entrypoint}
+	// The %hs service is not written correctly. The stack pointer has been left
+	// in an inconsistent state.
+	// The callback entrypoint should be declared as WINAPI or STDCALL.
+	// Selecting OK will cause the service to continue operation. However, the
+	// service process may operate incorrectly.
+	//
+	public static final int ERROR_BAD_SERVICE_ENTRYPOINT = 610;
+
+	//
+	// MessageId: ERROR_IP_ADDRESS_CONFLICT1
+	//
+	// MessageText:
+	//
+	// There is an IP address conflict with another system on the network
+	//
+	public static final int ERROR_IP_ADDRESS_CONFLICT1 = 611;
+
+	//
+	// MessageId: ERROR_IP_ADDRESS_CONFLICT2
+	//
+	// MessageText:
+	//
+	// There is an IP address conflict with another system on the network
+	//
+	public static final int ERROR_IP_ADDRESS_CONFLICT2 = 612;
+
+	//
+	// MessageId: ERROR_REGISTRY_QUOTA_LIMIT
+	//
+	// MessageText:
+	//
+	// {Low On Registry Space}
+	// The system has reached the maximum size allowed for the system part of
+	// the registry. Additional storage requests will be ignored.
+	//
+	public static final int ERROR_REGISTRY_QUOTA_LIMIT = 613;
+
+	//
+	// MessageId: ERROR_NO_CALLBACK_ACTIVE
+	//
+	// MessageText:
+	//
+	// A callback return system service cannot be executed when no callback is
+	// active.
+	//
+	public static final int ERROR_NO_CALLBACK_ACTIVE = 614;
+
+	//
+	// MessageId: ERROR_PWD_TOO_SHORT
+	//
+	// MessageText:
+	//
+	// The password provided is too short to meet the policy of your user
+	// account.
+	// Please choose a longer password.
+	//
+	public static final int ERROR_PWD_TOO_SHORT = 615;
+
+	//
+	// MessageId: ERROR_PWD_TOO_RECENT
+	//
+	// MessageText:
+	//
+	// The policy of your user account does not allow you to change passwords
+	// too frequently.
+	// This is done to prevent users from changing back to a familiar, but
+	// potentially discovered, password.
+	// If you feel your password has been compromised then please contact your
+	// administrator immediately to have a new one assigned.
+	//
+	public static final int ERROR_PWD_TOO_RECENT = 616;
+
+	//
+	// MessageId: ERROR_PWD_HISTORY_CONFLICT
+	//
+	// MessageText:
+	//
+	// You have attempted to change your password to one that you have used in
+	// the past.
+	// The policy of your user account does not allow this. Please select a
+	// password that you have not previously used.
+	//
+	public static final int ERROR_PWD_HISTORY_CONFLICT = 617;
+
+	//
+	// MessageId: ERROR_UNSUPPORTED_COMPRESSION
+	//
+	// MessageText:
+	//
+	// The specified compression format is unsupported.
+	//
+	public static final int ERROR_UNSUPPORTED_COMPRESSION = 618;
+
+	//
+	// MessageId: ERROR_INVALID_HW_PROFILE
+	//
+	// MessageText:
+	//
+	// The specified hardware profile configuration is invalid.
+	//
+	public static final int ERROR_INVALID_HW_PROFILE = 619;
+
+	//
+	// MessageId: ERROR_INVALID_PLUGPLAY_DEVICE_PATH
+	//
+	// MessageText:
+	//
+	// The specified Plug and Play registry device path is invalid.
+	//
+	public static final int ERROR_INVALID_PLUGPLAY_DEVICE_PATH = 620;
+
+	//
+	// MessageId: ERROR_QUOTA_LIST_INCONSISTENT
+	//
+	// MessageText:
+	//
+	// The specified quota list is internally inconsistent with its descriptor.
+	//
+	public static final int ERROR_QUOTA_LIST_INCONSISTENT = 621;
+
+	//
+	// MessageId: ERROR_EVALUATION_EXPIRATION
+	//
+	// MessageText:
+	//
+	// {Windows Evaluation Notification}
+	// The evaluation period for this installation of Windows has expired. This
+	// system will shutdown in=1 hour. To restore access to this installation of
+	// Windows, please upgrade this installation using a licensed distribution
+	// of this product.
+	//
+	public static final int ERROR_EVALUATION_EXPIRATION = 622;
+
+	//
+	// MessageId: ERROR_ILLEGAL_DLL_RELOCATION
+	//
+	// MessageText:
+	//
+	// {Illegal System DLL Relocation}
+	// The system DLL %hs was relocated in memory. The application will not run
+	// properly.
+	// The relocation occurred because the DLL %hs occupied an address range
+	// reserved for Windows system DLLs. The vendor supplying the DLL should be
+	// contacted for a new DLL.
+	//
+	public static final int ERROR_ILLEGAL_DLL_RELOCATION = 623;
+
+	//
+	// MessageId: ERROR_DLL_INIT_FAILED_LOGOFF
+	//
+	// MessageText:
+	//
+	// {DLL Initialization Failed}
+	// The application failed to initialize because the window station is
+	// shutting down.
+	//
+	public static final int ERROR_DLL_INIT_FAILED_LOGOFF = 624;
+
+	//
+	// MessageId: ERROR_VALIDATE_CONTINUE
+	//
+	// MessageText:
+	//
+	// The validation process needs to continue on to the next step.
+	//
+	public static final int ERROR_VALIDATE_CONTINUE = 625;
+
+	//
+	// MessageId: ERROR_NO_MORE_MATCHES
+	//
+	// MessageText:
+	//
+	// There are no more matches for the current index enumeration.
+	//
+	public static final int ERROR_NO_MORE_MATCHES = 626;
+
+	//
+	// MessageId: ERROR_RANGE_LIST_CONFLICT
+	//
+	// MessageText:
+	//
+	// The range could not be added to the range list because of a conflict.
+	//
+	public static final int ERROR_RANGE_LIST_CONFLICT = 627;
+
+	//
+	// MessageId: ERROR_SERVER_SID_MISMATCH
+	//
+	// MessageText:
+	//
+	// The server process is running under a SID different than that required by
+	// client.
+	//
+	public static final int ERROR_SERVER_SID_MISMATCH = 628;
+
+	//
+	// MessageId: ERROR_CANT_ENABLE_DENY_ONLY
+	//
+	// MessageText:
+	//
+	// A group marked use for deny only cannot be enabled.
+	//
+	public static final int ERROR_CANT_ENABLE_DENY_ONLY = 629;
+
+	//
+	// MessageId: ERROR_FLOAT_MULTIPLE_FAULTS
+	//
+	// MessageText:
+	//
+	// {EXCEPTION}
+	// Multiple floating point faults.
+	//
+	public static final int ERROR_FLOAT_MULTIPLE_FAULTS = 630; // winnt
+
+	//
+	// MessageId: ERROR_FLOAT_MULTIPLE_TRAPS
+	//
+	// MessageText:
+	//
+	// {EXCEPTION}
+	// Multiple floating point traps.
+	//
+	public static final int ERROR_FLOAT_MULTIPLE_TRAPS = 631; // winnt
+
+	//
+	// MessageId: ERROR_NOINTERFACE
+	//
+	// MessageText:
+	//
+	// The requested interface is not supported.
+	//
+	public static final int ERROR_NOINTERFACE = 632;
+
+	//
+	// MessageId: ERROR_DRIVER_FAILED_SLEEP
+	//
+	// MessageText:
+	//
+	// {System Standby Failed}
+	// The driver %hs does not support standby mode. Updating this driver may
+	// allow the system to go to standby mode.
+	//
+	public static final int ERROR_DRIVER_FAILED_SLEEP = 633;
+
+	//
+	// MessageId: ERROR_CORRUPT_SYSTEM_FILE
+	//
+	// MessageText:
+	//
+	// The system file %1 has become corrupt and has been replaced.
+	//
+	public static final int ERROR_CORRUPT_SYSTEM_FILE = 634;
+
+	//
+	// MessageId: ERROR_COMMITMENT_MINIMUM
+	//
+	// MessageText:
+	//
+	// {Virtual Memory Minimum Too Low}
+	// Your system is low on virtual memory. Windows is increasing the size of
+	// your virtual memory paging file.
+	// During this process, memory requests for some applications may be denied.
+	// For more information, see Help.
+	//
+	public static final int ERROR_COMMITMENT_MINIMUM = 635;
+
+	//
+	// MessageId: ERROR_PNP_RESTART_ENUMERATION
+	//
+	// MessageText:
+	//
+	// A device was removed so enumeration must be restarted.
+	//
+	public static final int ERROR_PNP_RESTART_ENUMERATION = 636;
+
+	//
+	// MessageId: ERROR_SYSTEM_IMAGE_BAD_SIGNATURE
+	//
+	// MessageText:
+	//
+	// {Fatal System Error}
+	// The system image %s is not properly signed.
+	// The file has been replaced with the signed file.
+	// The system has been shut down.
+	//
+	public static final int ERROR_SYSTEM_IMAGE_BAD_SIGNATURE = 637;
+
+	//
+	// MessageId: ERROR_PNP_REBOOT_REQUIRED
+	//
+	// MessageText:
+	//
+	// Device will not start without a reboot.
+	//
+	public static final int ERROR_PNP_REBOOT_REQUIRED = 638;
+
+	//
+	// MessageId: ERROR_INSUFFICIENT_POWER
+	//
+	// MessageText:
+	//
+	// There is not enough power to complete the requested operation.
+	//
+	public static final int ERROR_INSUFFICIENT_POWER = 639;
+
+	//
+	// MessageId: ERROR_MULTIPLE_FAULT_VIOLATION
+	//
+	// MessageText:
+	//
+	// ERROR_MULTIPLE_FAULT_VIOLATION
+	//
+	public static final int ERROR_MULTIPLE_FAULT_VIOLATION = 640;
+
+	//
+	// MessageId: ERROR_SYSTEM_SHUTDOWN
+	//
+	// MessageText:
+	//
+	// The system is in the process of shutting down.
+	//
+	public static final int ERROR_SYSTEM_SHUTDOWN = 641;
+
+	//
+	// MessageId: ERROR_PORT_NOT_SET
+	//
+	// MessageText:
+	//
+	// An attempt to remove a processes DebugPort was made, but a port was not
+	// already associated with the process.
+	//
+	public static final int ERROR_PORT_NOT_SET = 642;
+
+	//
+	// MessageId: ERROR_DS_VERSION_CHECK_FAILURE
+	//
+	// MessageText:
+	//
+	// This version of Windows is not compatible with the behavior version of
+	// directory forest, domain or domain controller.
+	//
+	public static final int ERROR_DS_VERSION_CHECK_FAILURE = 643;
+
+	//
+	// MessageId: ERROR_RANGE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified range could not be found in the range list.
+	//
+	public static final int ERROR_RANGE_NOT_FOUND = 644;
+
+	//
+	// MessageId: ERROR_NOT_SAFE_MODE_DRIVER
+	//
+	// MessageText:
+	//
+	// The driver was not loaded because the system is booting into safe mode.
+	//
+	public static final int ERROR_NOT_SAFE_MODE_DRIVER = 646;
+
+	//
+	// MessageId: ERROR_FAILED_DRIVER_ENTRY
+	//
+	// MessageText:
+	//
+	// The driver was not loaded because it failed it's initialization call.
+	//
+	public static final int ERROR_FAILED_DRIVER_ENTRY = 647;
+
+	//
+	// MessageId: ERROR_DEVICE_ENUMERATION_ERROR
+	//
+	// MessageText:
+	//
+	// The "%hs" encountered an error while applying power or reading the device
+	// configuration.
+	// This may be caused by a failure of your hardware or by a poor connection.
+	//
+	public static final int ERROR_DEVICE_ENUMERATION_ERROR = 648;
+
+	//
+	// MessageId: ERROR_MOUNT_POINT_NOT_RESOLVED
+	//
+	// MessageText:
+	//
+	// The create operation failed because the name contained at least one mount
+	// point which resolves to a volume to which the specified device object is
+	// not attached.
+	//
+	public static final int ERROR_MOUNT_POINT_NOT_RESOLVED = 649;
+
+	//
+	// MessageId: ERROR_INVALID_DEVICE_OBJECT_PARAMETER
+	//
+	// MessageText:
+	//
+	// The device object parameter is either not a valid device object or is not
+	// attached to the volume specified by the file name.
+	//
+	public static final int ERROR_INVALID_DEVICE_OBJECT_PARAMETER = 650;
+
+	//
+	// MessageId: ERROR_MCA_OCCURED
+	//
+	// MessageText:
+	//
+	// A Machine Check Error has occurred. Please check the system eventlog for
+	// additional information.
+	//
+	public static final int ERROR_MCA_OCCURED = 651;
+
+	//
+	// MessageId: ERROR_DRIVER_DATABASE_ERROR
+	//
+	// MessageText:
+	//
+	// There was error [%2] processing the driver database.
+	//
+	public static final int ERROR_DRIVER_DATABASE_ERROR = 652;
+
+	//
+	// MessageId: ERROR_SYSTEM_HIVE_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// System hive size has exceeded its limit.
+	//
+	public static final int ERROR_SYSTEM_HIVE_TOO_LARGE = 653;
+
+	//
+	// MessageId: ERROR_DRIVER_FAILED_PRIOR_UNLOAD
+	//
+	// MessageText:
+	//
+	// The driver could not be loaded because a previous version of the driver
+	// is still in memory.
+	//
+	public static final int ERROR_DRIVER_FAILED_PRIOR_UNLOAD = 654;
+
+	//
+	// MessageId: ERROR_VOLSNAP_PREPARE_HIBERNATE
+	//
+	// MessageText:
+	//
+	// {Volume Shadow Copy Service}
+	// Please wait while the Volume Shadow Copy Service prepares volume %hs for
+	// hibernation.
+	//
+	public static final int ERROR_VOLSNAP_PREPARE_HIBERNATE = 655;
+
+	//
+	// MessageId: ERROR_HIBERNATION_FAILURE
+	//
+	// MessageText:
+	//
+	// The system has failed to hibernate (The error code is %hs). Hibernation
+	// will be disabled until the system is restarted.
+	//
+	public static final int ERROR_HIBERNATION_FAILURE = 656;
+
+	//
+	// MessageId: ERROR_FILE_SYSTEM_LIMITATION
+	//
+	// MessageText:
+	//
+	// The requested operation could not be completed due to a file system
+	// limitation
+	//
+	public static final int ERROR_FILE_SYSTEM_LIMITATION = 665;
+
+	//
+	// MessageId: ERROR_ASSERTION_FAILURE
+	//
+	// MessageText:
+	//
+	// An assertion failure has occurred.
+	//
+	public static final int ERROR_ASSERTION_FAILURE = 668;
+
+	//
+	// MessageId: ERROR_ACPI_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred in the ACPI subsystem.
+	//
+	public static final int ERROR_ACPI_ERROR = 669;
+
+	//
+	// MessageId: ERROR_WOW_ASSERTION
+	//
+	// MessageText:
+	//
+	// WOW Assertion Error.
+	//
+	public static final int ERROR_WOW_ASSERTION = 670;
+
+	//
+	// MessageId: ERROR_PNP_BAD_MPS_TABLE
+	//
+	// MessageText:
+	//
+	// A device is missing in the system BIOS MPS table. This device will not be
+	// used.
+	// Please contact your system vendor for system BIOS update.
+	//
+	public static final int ERROR_PNP_BAD_MPS_TABLE = 671;
+
+	//
+	// MessageId: ERROR_PNP_TRANSLATION_FAILED
+	//
+	// MessageText:
+	//
+	// A translator failed to translate resources.
+	//
+	public static final int ERROR_PNP_TRANSLATION_FAILED = 672;
+
+	//
+	// MessageId: ERROR_PNP_IRQ_TRANSLATION_FAILED
+	//
+	// MessageText:
+	//
+	// A IRQ translator failed to translate resources.
+	//
+	public static final int ERROR_PNP_IRQ_TRANSLATION_FAILED = 673;
+
+	//
+	// MessageId: ERROR_PNP_INVALID_ID
+	//
+	// MessageText:
+	//
+	// Driver %2 returned invalid ID for a child device (%3).
+	//
+	public static final int ERROR_PNP_INVALID_ID = 674;
+
+	//
+	// MessageId: ERROR_WAKE_SYSTEM_DEBUGGER
+	//
+	// MessageText:
+	//
+	// {Kernel Debugger Awakened}
+	// the system debugger was awakened by an interrupt.
+	//
+	public static final int ERROR_WAKE_SYSTEM_DEBUGGER = 675;
+
+	//
+	// MessageId: ERROR_HANDLES_CLOSED
+	//
+	// MessageText:
+	//
+	// {Handles Closed}
+	// Handles to objects have been automatically closed as a result of the
+	// requested operation.
+	//
+	public static final int ERROR_HANDLES_CLOSED = 676;
+
+	//
+	// MessageId: ERROR_EXTRANEOUS_INFORMATION
+	//
+	// MessageText:
+	//
+	// {Too Much Information}
+	// The specified access control list (AC; contained more information than
+	// was expected.
+	//
+	public static final int ERROR_EXTRANEOUS_INFORMATION = 677;
+
+	//
+	// MessageId: ERROR_RXACT_COMMIT_NECESSARY
+	//
+	// MessageText:
+	//
+	// This warning level status indicates that the transaction state already
+	// exists for the registry sub-tree, but that a transaction commit was
+	// previously aborted.
+	// The commit has NOT been completed, but has not been rolled back either
+	// (so it may still be committed if desired).
+	//
+	public static final int ERROR_RXACT_COMMIT_NECESSARY = 678;
+
+	//
+	// MessageId: ERROR_MEDIA_CHECK
+	//
+	// MessageText:
+	//
+	// {Media Changed}
+	// The media may have changed.
+	//
+	public static final int ERROR_MEDIA_CHECK = 679;
+
+	//
+	// MessageId: ERROR_GUID_SUBSTITUTION_MADE
+	//
+	// MessageText:
+	//
+	// {GUID Substitution}
+	// During the translation of a global identifier (GUID) to a Windows
+	// security ID (SID), no administratively-defined GUID prefix was found.
+	// A substitute prefix was used, which will not compromise system security.
+	// However, this may provide a more restrictive access than intended.
+	//
+	public static final int ERROR_GUID_SUBSTITUTION_MADE = 680;
+
+	//
+	// MessageId: ERROR_STOPPED_ON_SYMLINK
+	//
+	// MessageText:
+	//
+	// The create operation stopped after reaching a symbolic link
+	//
+	public static final int ERROR_STOPPED_ON_SYMLINK = 681;
+
+	//
+	// MessageId: ERROR_LONGJUMP
+	//
+	// MessageText:
+	//
+	// A long jump has been executed.
+	//
+	public static final int ERROR_LONGJUMP = 682;
+
+	//
+	// MessageId: ERROR_PLUGPLAY_QUERY_VETOED
+	//
+	// MessageText:
+	//
+	// The Plug and Play query operation was not successful.
+	//
+	public static final int ERROR_PLUGPLAY_QUERY_VETOED = 683;
+
+	//
+	// MessageId: ERROR_UNWIND_CONSOLIDATE
+	//
+	// MessageText:
+	//
+	// A frame consolidation has been executed.
+	//
+	public static final int ERROR_UNWIND_CONSOLIDATE = 684;
+
+	//
+	// MessageId: ERROR_REGISTRY_HIVE_RECOVERED
+	//
+	// MessageText:
+	//
+	// {Registry Hive Recovered}
+	// Registry hive (file):
+	// %hs
+	// was corrupted and it has been recovered. Some data might have been lost.
+	//
+	public static final int ERROR_REGISTRY_HIVE_RECOVERED = 685;
+
+	//
+	// MessageId: ERROR_DLL_MIGHT_BE_INSECURE
+	//
+	// MessageText:
+	//
+	// The application is attempting to run executable code from the module %hs.
+	// This may be insecure. An alternative, %hs, is available. Should the
+	// application use the secure module %hs?
+	//
+	public static final int ERROR_DLL_MIGHT_BE_INSECURE = 686;
+
+	//
+	// MessageId: ERROR_DLL_MIGHT_BE_INCOMPATIBLE
+	//
+	// MessageText:
+	//
+	// The application is loading executable code from the module %hs. This is
+	// secure, but may be incompatible with previous releases of the operating
+	// system. An alternative, %hs, is available. Should the application use the
+	// secure module %hs?
+	//
+	public static final int ERROR_DLL_MIGHT_BE_INCOMPATIBLE = 687;
+
+	//
+	// MessageId: ERROR_DBG_EXCEPTION_NOT_HANDLED
+	//
+	// MessageText:
+	//
+	// Debugger did not handle the exception.
+	//
+	public static final int ERROR_DBG_EXCEPTION_NOT_HANDLED = 688; // winnt
+
+	//
+	// MessageId: ERROR_DBG_REPLY_LATER
+	//
+	// MessageText:
+	//
+	// Debugger will reply later.
+	//
+	public static final int ERROR_DBG_REPLY_LATER = 689;
+
+	//
+	// MessageId: ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE
+	//
+	// MessageText:
+	//
+	// Debugger cannot provide handle.
+	//
+	public static final int ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE = 690;
+
+	//
+	// MessageId: ERROR_DBG_TERMINATE_THREAD
+	//
+	// MessageText:
+	//
+	// Debugger terminated thread.
+	//
+	public static final int ERROR_DBG_TERMINATE_THREAD = 691; // winnt
+
+	//
+	// MessageId: ERROR_DBG_TERMINATE_PROCESS
+	//
+	// MessageText:
+	//
+	// Debugger terminated process.
+	//
+	public static final int ERROR_DBG_TERMINATE_PROCESS = 692; // winnt
+
+	//
+	// MessageId: ERROR_DBG_CONTROL_C
+	//
+	// MessageText:
+	//
+	// Debugger got control C.
+	//
+	public static final int ERROR_DBG_CONTROL_C = 693; // winnt
+
+	//
+	// MessageId: ERROR_DBG_PRINTEXCEPTION_C
+	//
+	// MessageText:
+	//
+	// Debugger printed exception on control C.
+	//
+	public static final int ERROR_DBG_PRINTEXCEPTION_C = 694;
+
+	//
+	// MessageId: ERROR_DBG_RIPEXCEPTION
+	//
+	// MessageText:
+	//
+	// Debugger received RIP exception.
+	//
+	public static final int ERROR_DBG_RIPEXCEPTION = 695;
+
+	//
+	// MessageId: ERROR_DBG_CONTROL_BREAK
+	//
+	// MessageText:
+	//
+	// Debugger received control break.
+	//
+	public static final int ERROR_DBG_CONTROL_BREAK = 696; // winnt
+
+	//
+	// MessageId: ERROR_DBG_COMMAND_EXCEPTION
+	//
+	// MessageText:
+	//
+	// Debugger command communication exception.
+	//
+	public static final int ERROR_DBG_COMMAND_EXCEPTION = 697; // winnt
+
+	//
+	// MessageId: ERROR_OBJECT_NAME_EXISTS
+	//
+	// MessageText:
+	//
+	// {Object Exists}
+	// An attempt was made to create an object and the object name already
+	// existed.
+	//
+	public static final int ERROR_OBJECT_NAME_EXISTS = 698;
+
+	//
+	// MessageId: ERROR_THREAD_WAS_SUSPENDED
+	//
+	// MessageText:
+	//
+	// {Thread Suspended}
+	// A thread termination occurred while the thread was suspended. The thread
+	// was resumed, and termination proceeded.
+	//
+	public static final int ERROR_THREAD_WAS_SUSPENDED = 699;
+
+	//
+	// MessageId: ERROR_IMAGE_NOT_AT_BASE
+	//
+	// MessageText:
+	//
+	// {Image Relocated}
+	// An image file could not be mapped at the address specified in the image
+	// file. Local fixups must be performed on this image.
+	//
+	public static final int ERROR_IMAGE_NOT_AT_BASE = 700;
+
+	//
+	// MessageId: ERROR_RXACT_STATE_CREATED
+	//
+	// MessageText:
+	//
+	// This informational level status indicates that a specified registry
+	// sub-tree transaction state did not yet exist and had to be created.
+	//
+	public static final int ERROR_RXACT_STATE_CREATED = 701;
+
+	//
+	// MessageId: ERROR_SEGMENT_NOTIFICATION
+	//
+	// MessageText:
+	//
+	// {Segment Load}
+	// A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or
+	// Win16 program segment image.
+	// An exception is raised so a debugger can load, unload or track symbols
+	// and breakpoints within these=16-bit segments.
+	//
+	public static final int ERROR_SEGMENT_NOTIFICATION = 702; // winnt
+
+	//
+	// MessageId: ERROR_BAD_CURRENT_DIRECTORY
+	//
+	// MessageText:
+	//
+	// {Invalid Current Directory}
+	// The process cannot switch to the startup current directory %hs.
+	// Select OK to set current directory to %hs, or select CANCEL to exit.
+	//
+	public static final int ERROR_BAD_CURRENT_DIRECTORY = 703;
+
+	//
+	// MessageId: ERROR_FT_READ_RECOVERY_FROM_BACKUP
+	//
+	// MessageText:
+	//
+	// {Redundant Read}
+	// To satisfy a read request, the NT fault-tolerant file system successfully
+	// read the requested data from a redundant copy.
+	// This was done because the file system encountered a failure on a member
+	// of the fault-tolerant volume, but was unable to reassign the failing area
+	// of the device.
+	//
+	public static final int ERROR_FT_READ_RECOVERY_FROM_BACKUP = 704;
+
+	//
+	// MessageId: ERROR_FT_WRITE_RECOVERY
+	//
+	// MessageText:
+	//
+	// {Redundant Write}
+	// To satisfy a write request, the NT fault-tolerant file system
+	// successfully wrote a redundant copy of the information.
+	// This was done because the file system encountered a failure on a member
+	// of the fault-tolerant volume, but was not able to reassign the failing
+	// area of the device.
+	//
+	public static final int ERROR_FT_WRITE_RECOVERY = 705;
+
+	//
+	// MessageId: ERROR_IMAGE_MACHINE_TYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// {Machine Type Mismatch}
+	// The image file %hs is valid, but is for a machine type other than the
+	// current machine. Select OK to continue, or CANCEL to fail the DLL load.
+	//
+	public static final int ERROR_IMAGE_MACHINE_TYPE_MISMATCH = 706;
+
+	//
+	// MessageId: ERROR_RECEIVE_PARTIAL
+	//
+	// MessageText:
+	//
+	// {Partial Data Received}
+	// The network transport returned partial data to its client. The remaining
+	// data will be sent later.
+	//
+	public static final int ERROR_RECEIVE_PARTIAL = 707;
+
+	//
+	// MessageId: ERROR_RECEIVE_EXPEDITED
+	//
+	// MessageText:
+	//
+	// {Expedited Data Received}
+	// The network transport returned data to its client that was marked as
+	// expedited by the remote system.
+	//
+	public static final int ERROR_RECEIVE_EXPEDITED = 708;
+
+	//
+	// MessageId: ERROR_RECEIVE_PARTIAL_EXPEDITED
+	//
+	// MessageText:
+	//
+	// {Partial Expedited Data Received}
+	// The network transport returned partial data to its client and this data
+	// was marked as expedited by the remote system. The remaining data will be
+	// sent later.
+	//
+	public static final int ERROR_RECEIVE_PARTIAL_EXPEDITED = 709;
+
+	//
+	// MessageId: ERROR_EVENT_DONE
+	//
+	// MessageText:
+	//
+	// {TDI Event Done}
+	// The TDI indication has completed successfully.
+	//
+	public static final int ERROR_EVENT_DONE = 710;
+
+	//
+	// MessageId: ERROR_EVENT_PENDING
+	//
+	// MessageText:
+	//
+	// {TDI Event Pending}
+	// The TDI indication has entered the pending state.
+	//
+	public static final int ERROR_EVENT_PENDING = 711;
+
+	//
+	// MessageId: ERROR_CHECKING_FILE_SYSTEM
+	//
+	// MessageText:
+	//
+	// Checking file system on %wZ
+	//
+	public static final int ERROR_CHECKING_FILE_SYSTEM = 712;
+
+	//
+	// MessageId: ERROR_FATAL_APP_EXIT
+	//
+	// MessageText:
+	//
+	// {Fatal Application Exit}
+	// %hs
+	//
+	public static final int ERROR_FATAL_APP_EXIT = 713;
+
+	//
+	// MessageId: ERROR_PREDEFINED_HANDLE
+	//
+	// MessageText:
+	//
+	// The specified registry key is referenced by a predefined handle.
+	//
+	public static final int ERROR_PREDEFINED_HANDLE = 714;
+
+	//
+	// MessageId: ERROR_WAS_UNLOCKED
+	//
+	// MessageText:
+	//
+	// {Page Unlocked}
+	// The page protection of a locked page was changed to 'No Access' and the
+	// page was unlocked from memory and from the process.
+	//
+	public static final int ERROR_WAS_UNLOCKED = 715;
+
+	//
+	// MessageId: ERROR_SERVICE_NOTIFICATION
+	//
+	// MessageText:
+	//
+	// %hs
+	//
+	public static final int ERROR_SERVICE_NOTIFICATION = 716;
+
+	//
+	// MessageId: ERROR_WAS_LOCKED
+	//
+	// MessageText:
+	//
+	// {Page Locked}
+	// One of the pages to lock was already locked.
+	//
+	public static final int ERROR_WAS_LOCKED = 717;
+
+	//
+	// MessageId: ERROR_LOG_HARD_ERROR
+	//
+	// MessageText:
+	//
+	// Application popup: %1 : %2
+	//
+	public static final int ERROR_LOG_HARD_ERROR = 718;
+
+	//
+	// MessageId: ERROR_ALREADY_WIN32
+	//
+	// MessageText:
+	//
+	// ERROR_ALREADY_WIN32
+	//
+	public static final int ERROR_ALREADY_WIN32 = 719;
+
+	//
+	// MessageId: ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE
+	//
+	// MessageText:
+	//
+	// {Machine Type Mismatch}
+	// The image file %hs is valid, but is for a machine type other than the
+	// current machine.
+	//
+	public static final int ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE = 720;
+
+	//
+	// MessageId: ERROR_NO_YIELD_PERFORMED
+	//
+	// MessageText:
+	//
+	// A yield execution was performed and no thread was available to run.
+	//
+	public static final int ERROR_NO_YIELD_PERFORMED = 721;
+
+	//
+	// MessageId: ERROR_TIMER_RESUME_IGNORED
+	//
+	// MessageText:
+	//
+	// The resumable flag to a timer API was ignored.
+	//
+	public static final int ERROR_TIMER_RESUME_IGNORED = 722;
+
+	//
+	// MessageId: ERROR_ARBITRATION_UNHANDLED
+	//
+	// MessageText:
+	//
+	// The arbiter has deferred arbitration of these resources to its parent
+	//
+	public static final int ERROR_ARBITRATION_UNHANDLED = 723;
+
+	//
+	// MessageId: ERROR_CARDBUS_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The inserted CardBus device cannot be started because of a configuration
+	// error on "%hs".
+	//
+	public static final int ERROR_CARDBUS_NOT_SUPPORTED = 724;
+
+	//
+	// MessageId: ERROR_MP_PROCESSOR_MISMATCH
+	//
+	// MessageText:
+	//
+	// The CPUs in this multiprocessor system are not all the same revision
+	// level. To use all processors the operating system restricts itself to the
+	// features of the least capable processor in the system. Should problems
+	// occur with this system, contact the CPU manufacturer to see if this mix
+	// of processors is supported.
+	//
+	public static final int ERROR_MP_PROCESSOR_MISMATCH = 725;
+
+	//
+	// MessageId: ERROR_HIBERNATED
+	//
+	// MessageText:
+	//
+	// The system was put into hibernation.
+	//
+	public static final int ERROR_HIBERNATED = 726;
+
+	//
+	// MessageId: ERROR_RESUME_HIBERNATION
+	//
+	// MessageText:
+	//
+	// The system was resumed from hibernation.
+	//
+	public static final int ERROR_RESUME_HIBERNATION = 727;
+
+	//
+	// MessageId: ERROR_FIRMWARE_UPDATED
+	//
+	// MessageText:
+	//
+	// Windows has detected that the system firmware (BIOS) was updated
+	// [previous firmware date =%2, current firmware date %3].
+	//
+	public static final int ERROR_FIRMWARE_UPDATED = 728;
+
+	//
+	// MessageId: ERROR_DRIVERS_LEAKING_LOCKED_PAGES
+	//
+	// MessageText:
+	//
+	// A device driver is leaking locked I/O pages causing system degradation.
+	// The system has automatically enabled tracking code in order to try and
+	// catch the culprit.
+	//
+	public static final int ERROR_DRIVERS_LEAKING_LOCKED_PAGES = 729;
+
+	//
+	// MessageId: ERROR_WAKE_SYSTEM
+	//
+	// MessageText:
+	//
+	// The system has awoken
+	//
+	public static final int ERROR_WAKE_SYSTEM = 730;
+
+	//
+	// MessageId: ERROR_WAIT_1
+	//
+	// MessageText:
+	//
+	// ERROR_WAIT_1
+	//
+	public static final int ERROR_WAIT_1 = 731;
+
+	//
+	// MessageId: ERROR_WAIT_2
+	//
+	// MessageText:
+	//
+	// ERROR_WAIT_2
+	//
+	public static final int ERROR_WAIT_2 = 732;
+
+	//
+	// MessageId: ERROR_WAIT_3
+	//
+	// MessageText:
+	//
+	// ERROR_WAIT_3
+	//
+	public static final int ERROR_WAIT_3 = 733;
+
+	//
+	// MessageId: ERROR_WAIT_63
+	//
+	// MessageText:
+	//
+	// ERROR_WAIT_63
+	//
+	public static final int ERROR_WAIT_63 = 734;
+
+	//
+	// MessageId: ERROR_ABANDONED_WAIT_0
+	//
+	// MessageText:
+	//
+	// ERROR_ABANDONED_WAIT_0
+	//
+	public static final int ERROR_ABANDONED_WAIT_0 = 735; // winnt
+
+	//
+	// MessageId: ERROR_ABANDONED_WAIT_63
+	//
+	// MessageText:
+	//
+	// ERROR_ABANDONED_WAIT_63
+	//
+	public static final int ERROR_ABANDONED_WAIT_63 = 736;
+
+	//
+	// MessageId: ERROR_USER_APC
+	//
+	// MessageText:
+	//
+	// ERROR_USER_APC
+	//
+	public static final int ERROR_USER_APC = 737; // winnt
+
+	//
+	// MessageId: ERROR_KERNEL_APC
+	//
+	// MessageText:
+	//
+	// ERROR_KERNEL_APC
+	//
+	public static final int ERROR_KERNEL_APC = 738;
+
+	//
+	// MessageId: ERROR_ALERTED
+	//
+	// MessageText:
+	//
+	// ERROR_ALERTED
+	//
+	public static final int ERROR_ALERTED = 739;
+
+	//
+	// MessageId: ERROR_ELEVATION_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation requires elevation.
+	//
+	public static final int ERROR_ELEVATION_REQUIRED = 740;
+
+	//
+	// MessageId: ERROR_REPARSE
+	//
+	// MessageText:
+	//
+	// A reparse should be performed by the Object Manager since the name of the
+	// file resulted in a symbolic link.
+	//
+	public static final int ERROR_REPARSE = 741;
+
+	//
+	// MessageId: ERROR_OPLOCK_BREAK_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// An open/create operation completed while an oplock break is underway.
+	//
+	public static final int ERROR_OPLOCK_BREAK_IN_PROGRESS = 742;
+
+	//
+	// MessageId: ERROR_VOLUME_MOUNTED
+	//
+	// MessageText:
+	//
+	// A new volume has been mounted by a file system.
+	//
+	public static final int ERROR_VOLUME_MOUNTED = 743;
+
+	//
+	// MessageId: ERROR_RXACT_COMMITTED
+	//
+	// MessageText:
+	//
+	// This success level status indicates that the transaction state already
+	// exists for the registry sub-tree, but that a transaction commit was
+	// previously aborted.
+	// The commit has now been completed.
+	//
+	public static final int ERROR_RXACT_COMMITTED = 744;
+
+	//
+	// MessageId: ERROR_NOTIFY_CLEANUP
+	//
+	// MessageText:
+	//
+	// This indicates that a notify change request has been completed due to
+	// closing the handle which made the notify change request.
+	//
+	public static final int ERROR_NOTIFY_CLEANUP = 745;
+
+	//
+	// MessageId: ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED
+	//
+	// MessageText:
+	//
+	// {Connect Failure on Primary Transport}
+	// An attempt was made to connect to the remote server %hs on the primary
+	// transport, but the connection failed.
+	// The computer WAS able to connect on a secondary transport.
+	//
+	public static final int ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED = 746;
+
+	//
+	// MessageId: ERROR_PAGE_FAULT_TRANSITION
+	//
+	// MessageText:
+	//
+	// Page fault was a transition fault.
+	//
+	public static final int ERROR_PAGE_FAULT_TRANSITION = 747;
+
+	//
+	// MessageId: ERROR_PAGE_FAULT_DEMAND_ZERO
+	//
+	// MessageText:
+	//
+	// Page fault was a demand zero fault.
+	//
+	public static final int ERROR_PAGE_FAULT_DEMAND_ZERO = 748;
+
+	//
+	// MessageId: ERROR_PAGE_FAULT_COPY_ON_WRITE
+	//
+	// MessageText:
+	//
+	// Page fault was a demand zero fault.
+	//
+	public static final int ERROR_PAGE_FAULT_COPY_ON_WRITE = 749;
+
+	//
+	// MessageId: ERROR_PAGE_FAULT_GUARD_PAGE
+	//
+	// MessageText:
+	//
+	// Page fault was a demand zero fault.
+	//
+	public static final int ERROR_PAGE_FAULT_GUARD_PAGE = 750;
+
+	//
+	// MessageId: ERROR_PAGE_FAULT_PAGING_FILE
+	//
+	// MessageText:
+	//
+	// Page fault was satisfied by reading from a secondary storage device.
+	//
+	public static final int ERROR_PAGE_FAULT_PAGING_FILE = 751;
+
+	//
+	// MessageId: ERROR_CACHE_PAGE_LOCKED
+	//
+	// MessageText:
+	//
+	// Cached page was locked during operation.
+	//
+	public static final int ERROR_CACHE_PAGE_LOCKED = 752;
+
+	//
+	// MessageId: ERROR_CRASH_DUMP
+	//
+	// MessageText:
+	//
+	// Crash dump exists in paging file.
+	//
+	public static final int ERROR_CRASH_DUMP = 753;
+
+	//
+	// MessageId: ERROR_BUFFER_ALL_ZEROS
+	//
+	// MessageText:
+	//
+	// Specified buffer contains all zeros.
+	//
+	public static final int ERROR_BUFFER_ALL_ZEROS = 754;
+
+	//
+	// MessageId: ERROR_REPARSE_OBJECT
+	//
+	// MessageText:
+	//
+	// A reparse should be performed by the Object Manager since the name of the
+	// file resulted in a symbolic link.
+	//
+	public static final int ERROR_REPARSE_OBJECT = 755;
+
+	//
+	// MessageId: ERROR_RESOURCE_REQUIREMENTS_CHANGED
+	//
+	// MessageText:
+	//
+	// The device has succeeded a query-stop and its resource requirements have
+	// changed.
+	//
+	public static final int ERROR_RESOURCE_REQUIREMENTS_CHANGED = 756;
+
+	//
+	// MessageId: ERROR_TRANSLATION_COMPLETE
+	//
+	// MessageText:
+	//
+	// The translator has translated these resources into the global space and
+	// no further translations should be performed.
+	//
+	public static final int ERROR_TRANSLATION_COMPLETE = 757;
+
+	//
+	// MessageId: ERROR_NOTHING_TO_TERMINATE
+	//
+	// MessageText:
+	//
+	// A process being terminated has no threads to terminate.
+	//
+	public static final int ERROR_NOTHING_TO_TERMINATE = 758;
+
+	//
+	// MessageId: ERROR_PROCESS_NOT_IN_JOB
+	//
+	// MessageText:
+	//
+	// The specified process is not part of a job.
+	//
+	public static final int ERROR_PROCESS_NOT_IN_JOB = 759;
+
+	//
+	// MessageId: ERROR_PROCESS_IN_JOB
+	//
+	// MessageText:
+	//
+	// The specified process is part of a job.
+	//
+	public static final int ERROR_PROCESS_IN_JOB = 760;
+
+	//
+	// MessageId: ERROR_VOLSNAP_HIBERNATE_READY
+	//
+	// MessageText:
+	//
+	// {Volume Shadow Copy Service}
+	// The system is now ready for hibernation.
+	//
+	public static final int ERROR_VOLSNAP_HIBERNATE_READY = 761;
+
+	//
+	// MessageId: ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY
+	//
+	// MessageText:
+	//
+	// A file system or file system filter driver has successfully completed an
+	// FsFilter operation.
+	//
+	public static final int ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY = 762;
+
+	//
+	// MessageId: ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED
+	//
+	// MessageText:
+	//
+	// The specified interrupt vector was already connected.
+	//
+	public static final int ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED = 763;
+
+	//
+	// MessageId: ERROR_INTERRUPT_STILL_CONNECTED
+	//
+	// MessageText:
+	//
+	// The specified interrupt vector is still connected.
+	//
+	public static final int ERROR_INTERRUPT_STILL_CONNECTED = 764;
+
+	//
+	// MessageId: ERROR_WAIT_FOR_OPLOCK
+	//
+	// MessageText:
+	//
+	// An operation is blocked waiting for an oplock.
+	//
+	public static final int ERROR_WAIT_FOR_OPLOCK = 765;
+
+	//
+	// MessageId: ERROR_DBG_EXCEPTION_HANDLED
+	//
+	// MessageText:
+	//
+	// Debugger handled exception
+	//
+	public static final int ERROR_DBG_EXCEPTION_HANDLED = 766; // winnt
+
+	//
+	// MessageId: ERROR_DBG_CONTINUE
+	//
+	// MessageText:
+	//
+	// Debugger continued
+	//
+	public static final int ERROR_DBG_CONTINUE = 767; // winnt
+
+	//
+	// MessageId: ERROR_CALLBACK_POP_STACK
+	//
+	// MessageText:
+	//
+	// An exception occurred in a user mode callback and the kernel callback
+	// frame should be removed.
+	//
+	public static final int ERROR_CALLBACK_POP_STACK = 768;
+
+	//
+	// MessageId: ERROR_COMPRESSION_DISABLED
+	//
+	// MessageText:
+	//
+	// Compression is disabled for this volume.
+	//
+	public static final int ERROR_COMPRESSION_DISABLED = 769;
+
+	//
+	// MessageId: ERROR_CANTFETCHBACKWARDS
+	//
+	// MessageText:
+	//
+	// The data provider cannot fetch backwards through a result set.
+	//
+	public static final int ERROR_CANTFETCHBACKWARDS = 770;
+
+	//
+	// MessageId: ERROR_CANTSCROLLBACKWARDS
+	//
+	// MessageText:
+	//
+	// The data provider cannot scroll backwards through a result set.
+	//
+	public static final int ERROR_CANTSCROLLBACKWARDS = 771;
+
+	//
+	// MessageId: ERROR_ROWSNOTRELEASED
+	//
+	// MessageText:
+	//
+	// The data provider requires that previously fetched data is released
+	// before asking for more data.
+	//
+	public static final int ERROR_ROWSNOTRELEASED = 772;
+
+	//
+	// MessageId: ERROR_BAD_ACCESSOR_FLAGS
+	//
+	// MessageText:
+	//
+	// The data provider was not able to intrepret the flags set for a column
+	// binding in an accessor.
+	//
+	public static final int ERROR_BAD_ACCESSOR_FLAGS = 773;
+
+	//
+	// MessageId: ERROR_ERRORS_ENCOUNTERED
+	//
+	// MessageText:
+	//
+	// One or more errors occurred while processing the request.
+	//
+	public static final int ERROR_ERRORS_ENCOUNTERED = 774;
+
+	//
+	// MessageId: ERROR_NOT_CAPABLE
+	//
+	// MessageText:
+	//
+	// The implementation is not capable of performing the request.
+	//
+	public static final int ERROR_NOT_CAPABLE = 775;
+
+	//
+	// MessageId: ERROR_REQUEST_OUT_OF_SEQUENCE
+	//
+	// MessageText:
+	//
+	// The client of a component requested an operation which is not valid given
+	// the state of the component instance.
+	//
+	public static final int ERROR_REQUEST_OUT_OF_SEQUENCE = 776;
+
+	//
+	// MessageId: ERROR_VERSION_PARSE_ERROR
+	//
+	// MessageText:
+	//
+	// A version number could not be parsed.
+	//
+	public static final int ERROR_VERSION_PARSE_ERROR = 777;
+
+	//
+	// MessageId: ERROR_BADSTARTPOSITION
+	//
+	// MessageText:
+	//
+	// The iterator's start position is invalid.
+	//
+	public static final int ERROR_BADSTARTPOSITION = 778;
+
+	//
+	// MessageId: ERROR_MEMORY_HARDWARE
+	//
+	// MessageText:
+	//
+	// The hardware has reported an uncorrectable memory error.
+	//
+	public static final int ERROR_MEMORY_HARDWARE = 779;
+
+	//
+	// MessageId: ERROR_DISK_REPAIR_DISABLED
+	//
+	// MessageText:
+	//
+	// The attempted operation required self healing to be enabled.
+	//
+	public static final int ERROR_DISK_REPAIR_DISABLED = 780;
+
+	//
+	// MessageId: ERROR_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE
+	//
+	// MessageText:
+	//
+	// The Desktop heap encountered an error while allocating session memory.
+	// There is more information in the system event log.
+	//
+	public static final int ERROR_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 781;
+
+	//
+	// MessageId: ERROR_SYSTEM_POWERSTATE_TRANSITION
+	//
+	// MessageText:
+	//
+	// The system powerstate is transitioning from %2 to %3.
+	//
+	public static final int ERROR_SYSTEM_POWERSTATE_TRANSITION = 782;
+
+	//
+	// MessageId: ERROR_SYSTEM_POWERSTATE_COMPLEX_TRANSITION
+	//
+	// MessageText:
+	//
+	// The system powerstate is transitioning from %2 to %3 but could enter %4.
+	//
+	public static final int ERROR_SYSTEM_POWERSTATE_COMPLEX_TRANSITION = 783;
+
+	//
+	// MessageId: ERROR_MCA_EXCEPTION
+	//
+	// MessageText:
+	//
+	// A thread is getting dispatched with MCA EXCEPTION because of MCA.
+	//
+	public static final int ERROR_MCA_EXCEPTION = 784;
+
+	//
+	// MessageId: ERROR_ACCESS_AUDIT_BY_POLICY
+	//
+	// MessageText:
+	//
+	// Access to %1 is monitored by policy rule %2.
+	//
+	public static final int ERROR_ACCESS_AUDIT_BY_POLICY = 785;
+
+	//
+	// MessageId: ERROR_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY
+	//
+	// MessageText:
+	//
+	// Access to %1 has been restricted by your Administrator by policy rule %2.
+	//
+	public static final int ERROR_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 786;
+
+	//
+	// MessageId: ERROR_ABANDON_HIBERFILE
+	//
+	// MessageText:
+	//
+	// A valid hibernation file has been invalidated and should be abandoned.
+	//
+	public static final int ERROR_ABANDON_HIBERFILE = 787;
+
+	//
+	// MessageId: ERROR_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED
+	//
+	// MessageText:
+	//
+	// {Delayed Write Failed}
+	// Windows was unable to save all the data for the file %hs; the data has
+	// been lost.
+	// This error may be caused by network connectivity issues. Please try to
+	// save this file elsewhere.
+	//
+	public static final int ERROR_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 788;
+
+	//
+	// MessageId: ERROR_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR
+	//
+	// MessageText:
+	//
+	// {Delayed Write Failed}
+	// Windows was unable to save all the data for the file %hs; the data has
+	// been lost.
+	// This error was returned by the server on which the file exists. Please
+	// try to save this file elsewhere.
+	//
+	public static final int ERROR_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 789;
+
+	//
+	// MessageId: ERROR_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR
+	//
+	// MessageText:
+	//
+	// {Delayed Write Failed}
+	// Windows was unable to save all the data for the file %hs; the data has
+	// been lost.
+	// This error may be caused if the device has been removed or the media is
+	// write-protected.
+	//
+	public static final int ERROR_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 790;
+
+	//
+	// MessageId: ERROR_BAD_MCFG_TABLE
+	//
+	// MessageText:
+	//
+	// The resources required for this device conflict with the MCFG table.
+	//
+	public static final int ERROR_BAD_MCFG_TABLE = 791;
+
+	//
+	// MessageId: ERROR_EA_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// Access to the extended attribute was denied.
+	//
+	public static final int ERROR_EA_ACCESS_DENIED = 994;
+
+	//
+	// MessageId: ERROR_OPERATION_ABORTED
+	//
+	// MessageText:
+	//
+	// The I/O operation has been aborted because of either a thread exit or an
+	// application request.
+	//
+	public static final int ERROR_OPERATION_ABORTED = 995;
+
+	//
+	// MessageId: ERROR_IO_INCOMPLETE
+	//
+	// MessageText:
+	//
+	// Overlapped I/O event is not in a signaled state.
+	//
+	public static final int ERROR_IO_INCOMPLETE = 996;
+
+	//
+	// MessageId: ERROR_IO_PENDING
+	//
+	// MessageText:
+	//
+	// Overlapped I/O operation is in progress.
+	//
+	public static final int ERROR_IO_PENDING = 997; // dderror
+
+	//
+	// MessageId: ERROR_NOACCESS
+	//
+	// MessageText:
+	//
+	// Invalid access to memory location.
+	//
+	public static final int ERROR_NOACCESS = 998;
+
+	//
+	// MessageId: ERROR_SWAPERROR
+	//
+	// MessageText:
+	//
+	// Error performing inpage operation.
+	//
+	public static final int ERROR_SWAPERROR = 999;
+
+	//
+	// MessageId: ERROR_STACK_OVERFLOW
+	//
+	// MessageText:
+	//
+	// Recursion too deep; the stack overflowed.
+	//
+	public static final int ERROR_STACK_OVERFLOW = 1001;
+
+	//
+	// MessageId: ERROR_INVALID_MESSAGE
+	//
+	// MessageText:
+	//
+	// The window cannot act on the sent message.
+	//
+	public static final int ERROR_INVALID_MESSAGE = 1002;
+
+	//
+	// MessageId: ERROR_CAN_NOT_COMPLETE
+	//
+	// MessageText:
+	//
+	// Cannot complete this function.
+	//
+	public static final int ERROR_CAN_NOT_COMPLETE = 1003;
+
+	//
+	// MessageId: ERROR_INVALID_FLAGS
+	//
+	// MessageText:
+	//
+	// Invalid flags.
+	//
+	public static final int ERROR_INVALID_FLAGS = 1004;
+
+	//
+	// MessageId: ERROR_UNRECOGNIZED_VOLUME
+	//
+	// MessageText:
+	//
+	// The volume does not contain a recognized file system.
+	// Please make sure that all required file system drivers are loaded and
+	// that the volume is not corrupted.
+	//
+	public static final int ERROR_UNRECOGNIZED_VOLUME = 1005;
+
+	//
+	// MessageId: ERROR_FILE_INVALID
+	//
+	// MessageText:
+	//
+	// The volume for a file has been externally altered so that the opened file
+	// is no longer valid.
+	//
+	public static final int ERROR_FILE_INVALID = 1006;
+
+	//
+	// MessageId: ERROR_FULLSCREEN_MODE
+	//
+	// MessageText:
+	//
+	// The requested operation cannot be performed in full-screen mode.
+	//
+	public static final int ERROR_FULLSCREEN_MODE = 1007;
+
+	//
+	// MessageId: ERROR_NO_TOKEN
+	//
+	// MessageText:
+	//
+	// An attempt was made to reference a token that does not exist.
+	//
+	public static final int ERROR_NO_TOKEN = 1008;
+
+	//
+	// MessageId: ERROR_BADDB
+	//
+	// MessageText:
+	//
+	// The configuration registry database is corrupt.
+	//
+	public static final int ERROR_BADDB = 1009;
+
+	//
+	// MessageId: ERROR_BADKEY
+	//
+	// MessageText:
+	//
+	// The configuration registry key is invalid.
+	//
+	public static final int ERROR_BADKEY = 1010;
+
+	//
+	// MessageId: ERROR_CANTOPEN
+	//
+	// MessageText:
+	//
+	// The configuration registry key could not be opened.
+	//
+	public static final int ERROR_CANTOPEN = 1011;
+
+	//
+	// MessageId: ERROR_CANTREAD
+	//
+	// MessageText:
+	//
+	// The configuration registry key could not be read.
+	//
+	public static final int ERROR_CANTREAD = 1012;
+
+	//
+	// MessageId: ERROR_CANTWRITE
+	//
+	// MessageText:
+	//
+	// The configuration registry key could not be written.
+	//
+	public static final int ERROR_CANTWRITE = 1013;
+
+	//
+	// MessageId: ERROR_REGISTRY_RECOVERED
+	//
+	// MessageText:
+	//
+	// One of the files in the registry database had to be recovered by use of a
+	// log or alternate copy. The recovery was successful.
+	//
+	public static final int ERROR_REGISTRY_RECOVERED = 1014;
+
+	//
+	// MessageId: ERROR_REGISTRY_CORRUPT
+	//
+	// MessageText:
+	//
+	// The registry is corrupted. The structure of one of the files containing
+	// registry data is corrupted, or the system's memory image of the file is
+	// corrupted, or the file could not be recovered because the alternate copy
+	// or log was absent or corrupted.
+	//
+	public static final int ERROR_REGISTRY_CORRUPT = 1015;
+
+	//
+	// MessageId: ERROR_REGISTRY_IO_FAILED
+	//
+	// MessageText:
+	//
+	// An I/O operation initiated by the registry failed unrecoverably. The
+	// registry could not read in, or write out, or flush, one of the files that
+	// contain the system's image of the registry.
+	//
+	public static final int ERROR_REGISTRY_IO_FAILED = 1016;
+
+	//
+	// MessageId: ERROR_NOT_REGISTRY_FILE
+	//
+	// MessageText:
+	//
+	// The system has attempted to load or restore a file into the registry, but
+	// the specified file is not in a registry file format.
+	//
+	public static final int ERROR_NOT_REGISTRY_FILE = 1017;
+
+	//
+	// MessageId: ERROR_KEY_DELETED
+	//
+	// MessageText:
+	//
+	// Illegal operation attempted on a registry key that has been marked for
+	// deletion.
+	//
+	public static final int ERROR_KEY_DELETED = 1018;
+
+	//
+	// MessageId: ERROR_NO_LOG_SPACE
+	//
+	// MessageText:
+	//
+	// System could not allocate the required space in a registry log.
+	//
+	public static final int ERROR_NO_LOG_SPACE = 1019;
+
+	//
+	// MessageId: ERROR_KEY_HAS_CHILDREN
+	//
+	// MessageText:
+	//
+	// Cannot create a symbolic link in a registry key that already has subkeys
+	// or values.
+	//
+	public static final int ERROR_KEY_HAS_CHILDREN = 1020;
+
+	//
+	// MessageId: ERROR_CHILD_MUST_BE_VOLATILE
+	//
+	// MessageText:
+	//
+	// Cannot create a stable subkey under a volatile parent key.
+	//
+	public static final int ERROR_CHILD_MUST_BE_VOLATILE = 1021;
+
+	//
+	// MessageId: ERROR_NOTIFY_ENUM_DIR
+	//
+	// MessageText:
+	//
+	// A notify change request is being completed and the information is not
+	// being returned in the caller's buffer. The caller now needs to enumerate
+	// the files to find the changes.
+	//
+	public static final int ERROR_NOTIFY_ENUM_DIR = 1022;
+
+	//
+	// MessageId: ERROR_DEPENDENT_SERVICES_RUNNING
+	//
+	// MessageText:
+	//
+	// A stop control has been sent to a service that other running services are
+	// dependent on.
+	//
+	public static final int ERROR_DEPENDENT_SERVICES_RUNNING = 1051;
+
+	//
+	// MessageId: ERROR_INVALID_SERVICE_CONTROL
+	//
+	// MessageText:
+	//
+	// The requested control is not valid for this service.
+	//
+	public static final int ERROR_INVALID_SERVICE_CONTROL = 1052;
+
+	//
+	// MessageId: ERROR_SERVICE_REQUEST_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The service did not respond to the start or control request in a timely
+	// fashion.
+	//
+	public static final int ERROR_SERVICE_REQUEST_TIMEOUT = 1053;
+
+	//
+	// MessageId: ERROR_SERVICE_NO_THREAD
+	//
+	// MessageText:
+	//
+	// A thread could not be created for the service.
+	//
+	public static final int ERROR_SERVICE_NO_THREAD = 1054;
+
+	//
+	// MessageId: ERROR_SERVICE_DATABASE_LOCKED
+	//
+	// MessageText:
+	//
+	// The service database is locked.
+	//
+	public static final int ERROR_SERVICE_DATABASE_LOCKED = 1055;
+
+	//
+	// MessageId: ERROR_SERVICE_ALREADY_RUNNING
+	//
+	// MessageText:
+	//
+	// An instance of the service is already running.
+	//
+	public static final int ERROR_SERVICE_ALREADY_RUNNING = 1056;
+
+	//
+	// MessageId: ERROR_INVALID_SERVICE_ACCOUNT
+	//
+	// MessageText:
+	//
+	// The account name is invalid or does not exist, or the password is invalid
+	// for the account name specified.
+	//
+	public static final int ERROR_INVALID_SERVICE_ACCOUNT = 1057;
+
+	//
+	// MessageId: ERROR_SERVICE_DISABLED
+	//
+	// MessageText:
+	//
+	// The service cannot be started, either because it is disabled or because
+	// it has no enabled devices associated with it.
+	//
+	public static final int ERROR_SERVICE_DISABLED = 1058;
+
+	//
+	// MessageId: ERROR_CIRCULAR_DEPENDENCY
+	//
+	// MessageText:
+	//
+	// Circular service dependency was specified.
+	//
+	public static final int ERROR_CIRCULAR_DEPENDENCY = 1059;
+
+	//
+	// MessageId: ERROR_SERVICE_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// The specified service does not exist as an installed service.
+	//
+	public static final int ERROR_SERVICE_DOES_NOT_EXIST = 1060;
+
+	//
+	// MessageId: ERROR_SERVICE_CANNOT_ACCEPT_CTRL
+	//
+	// MessageText:
+	//
+	// The service cannot accept control messages at this time.
+	//
+	public static final int ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061;
+
+	//
+	// MessageId: ERROR_SERVICE_NOT_ACTIVE
+	//
+	// MessageText:
+	//
+	// The service has not been started.
+	//
+	public static final int ERROR_SERVICE_NOT_ACTIVE = 1062;
+
+	//
+	// MessageId: ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
+	//
+	// MessageText:
+	//
+	// The service process could not connect to the service controller.
+	//
+	public static final int ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063;
+
+	//
+	// MessageId: ERROR_EXCEPTION_IN_SERVICE
+	//
+	// MessageText:
+	//
+	// An exception occurred in the service when handling the control request.
+	//
+	public static final int ERROR_EXCEPTION_IN_SERVICE = 1064;
+
+	//
+	// MessageId: ERROR_DATABASE_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// The database specified does not exist.
+	//
+	public static final int ERROR_DATABASE_DOES_NOT_EXIST = 1065;
+
+	//
+	// MessageId: ERROR_SERVICE_SPECIFIC_ERROR
+	//
+	// MessageText:
+	//
+	// The service has returned a service-specific error code.
+	//
+	public static final int ERROR_SERVICE_SPECIFIC_ERROR = 1066;
+
+	//
+	// MessageId: ERROR_PROCESS_ABORTED
+	//
+	// MessageText:
+	//
+	// The process terminated unexpectedly.
+	//
+	public static final int ERROR_PROCESS_ABORTED = 1067;
+
+	//
+	// MessageId: ERROR_SERVICE_DEPENDENCY_FAIL
+	//
+	// MessageText:
+	//
+	// The dependency service or group failed to start.
+	//
+	public static final int ERROR_SERVICE_DEPENDENCY_FAIL = 1068;
+
+	//
+	// MessageId: ERROR_SERVICE_LOGON_FAILED
+	//
+	// MessageText:
+	//
+	// The service did not start due to a logon failure.
+	//
+	public static final int ERROR_SERVICE_LOGON_FAILED = 1069;
+
+	//
+	// MessageId: ERROR_SERVICE_START_HANG
+	//
+	// MessageText:
+	//
+	// After starting, the service hung in a start-pending state.
+	//
+	public static final int ERROR_SERVICE_START_HANG = 1070;
+
+	//
+	// MessageId: ERROR_INVALID_SERVICE_LOCK
+	//
+	// MessageText:
+	//
+	// The specified service database lock is invalid.
+	//
+	public static final int ERROR_INVALID_SERVICE_LOCK = 1071;
+
+	//
+	// MessageId: ERROR_SERVICE_MARKED_FOR_DELETE
+	//
+	// MessageText:
+	//
+	// The specified service has been marked for deletion.
+	//
+	public static final int ERROR_SERVICE_MARKED_FOR_DELETE = 1072;
+
+	//
+	// MessageId: ERROR_SERVICE_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified service already exists.
+	//
+	public static final int ERROR_SERVICE_EXISTS = 1073;
+
+	//
+	// MessageId: ERROR_ALREADY_RUNNING_LKG
+	//
+	// MessageText:
+	//
+	// The system is currently running with the last-known-good configuration.
+	//
+	public static final int ERROR_ALREADY_RUNNING_LKG = 1074;
+
+	//
+	// MessageId: ERROR_SERVICE_DEPENDENCY_DELETED
+	//
+	// MessageText:
+	//
+	// The dependency service does not exist or has been marked for deletion.
+	//
+	public static final int ERROR_SERVICE_DEPENDENCY_DELETED = 1075;
+
+	//
+	// MessageId: ERROR_BOOT_ALREADY_ACCEPTED
+	//
+	// MessageText:
+	//
+	// The current boot has already been accepted for use as the last-known-good
+	// control set.
+	//
+	public static final int ERROR_BOOT_ALREADY_ACCEPTED = 1076;
+
+	//
+	// MessageId: ERROR_SERVICE_NEVER_STARTED
+	//
+	// MessageText:
+	//
+	// No attempts to start the service have been made since the last boot.
+	//
+	public static final int ERROR_SERVICE_NEVER_STARTED = 1077;
+
+	//
+	// MessageId: ERROR_DUPLICATE_SERVICE_NAME
+	//
+	// MessageText:
+	//
+	// The name is already in use as either a service name or a service display
+	// name.
+	//
+	public static final int ERROR_DUPLICATE_SERVICE_NAME = 1078;
+
+	//
+	// MessageId: ERROR_DIFFERENT_SERVICE_ACCOUNT
+	//
+	// MessageText:
+	//
+	// The account specified for this service is different from the account
+	// specified for other services running in the same process.
+	//
+	public static final int ERROR_DIFFERENT_SERVICE_ACCOUNT = 1079;
+
+	//
+	// MessageId: ERROR_CANNOT_DETECT_DRIVER_FAILURE
+	//
+	// MessageText:
+	//
+	// Failure actions can only be set for Win32 services, not for drivers.
+	//
+	public static final int ERROR_CANNOT_DETECT_DRIVER_FAILURE = 1080;
+
+	//
+	// MessageId: ERROR_CANNOT_DETECT_PROCESS_ABORT
+	//
+	// MessageText:
+	//
+	// This service runs in the same process as the service control manager.
+	// Therefore, the service control manager cannot take action if this
+	// service's process terminates unexpectedly.
+	//
+	public static final int ERROR_CANNOT_DETECT_PROCESS_ABORT = 1081;
+
+	//
+	// MessageId: ERROR_NO_RECOVERY_PROGRAM
+	//
+	// MessageText:
+	//
+	// No recovery program has been configured for this service.
+	//
+	public static final int ERROR_NO_RECOVERY_PROGRAM = 1082;
+
+	//
+	// MessageId: ERROR_SERVICE_NOT_IN_EXE
+	//
+	// MessageText:
+	//
+	// The executable program that this service is configured to run in does not
+	// implement the service.
+	//
+	public static final int ERROR_SERVICE_NOT_IN_EXE = 1083;
+
+	//
+	// MessageId: ERROR_NOT_SAFEBOOT_SERVICE
+	//
+	// MessageText:
+	//
+	// This service cannot be started in Safe Mode
+	//
+	public static final int ERROR_NOT_SAFEBOOT_SERVICE = 1084;
+
+	//
+	// MessageId: ERROR_END_OF_MEDIA
+	//
+	// MessageText:
+	//
+	// The physical end of the tape has been reached.
+	//
+	public static final int ERROR_END_OF_MEDIA = 1100;
+
+	//
+	// MessageId: ERROR_FILEMARK_DETECTED
+	//
+	// MessageText:
+	//
+	// A tape access reached a filemark.
+	//
+	public static final int ERROR_FILEMARK_DETECTED = 1101;
+
+	//
+	// MessageId: ERROR_BEGINNING_OF_MEDIA
+	//
+	// MessageText:
+	//
+	// The beginning of the tape or a partition was encountered.
+	//
+	public static final int ERROR_BEGINNING_OF_MEDIA = 1102;
+
+	//
+	// MessageId: ERROR_SETMARK_DETECTED
+	//
+	// MessageText:
+	//
+	// A tape access reached the end of a set of files.
+	//
+	public static final int ERROR_SETMARK_DETECTED = 1103;
+
+	//
+	// MessageId: ERROR_NO_DATA_DETECTED
+	//
+	// MessageText:
+	//
+	// No more data is on the tape.
+	//
+	public static final int ERROR_NO_DATA_DETECTED = 1104;
+
+	//
+	// MessageId: ERROR_PARTITION_FAILURE
+	//
+	// MessageText:
+	//
+	// Tape could not be partitioned.
+	//
+	public static final int ERROR_PARTITION_FAILURE = 1105;
+
+	//
+	// MessageId: ERROR_INVALID_BLOCK_LENGTH
+	//
+	// MessageText:
+	//
+	// When accessing a new tape of a multivolume partition, the current block
+	// size is incorrect.
+	//
+	public static final int ERROR_INVALID_BLOCK_LENGTH = 1106;
+
+	//
+	// MessageId: ERROR_DEVICE_NOT_PARTITIONED
+	//
+	// MessageText:
+	//
+	// Tape partition information could not be found when loading a tape.
+	//
+	public static final int ERROR_DEVICE_NOT_PARTITIONED = 1107;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_LOCK_MEDIA
+	//
+	// MessageText:
+	//
+	// Unable to lock the media eject mechanism.
+	//
+	public static final int ERROR_UNABLE_TO_LOCK_MEDIA = 1108;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_UNLOAD_MEDIA
+	//
+	// MessageText:
+	//
+	// Unable to unload the media.
+	//
+	public static final int ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109;
+
+	//
+	// MessageId: ERROR_MEDIA_CHANGED
+	//
+	// MessageText:
+	//
+	// The media in the drive may have changed.
+	//
+	public static final int ERROR_MEDIA_CHANGED = 1110;
+
+	//
+	// MessageId: ERROR_BUS_RESET
+	//
+	// MessageText:
+	//
+	// The I/O bus was reset.
+	//
+	public static final int ERROR_BUS_RESET = 1111;
+
+	//
+	// MessageId: ERROR_NO_MEDIA_IN_DRIVE
+	//
+	// MessageText:
+	//
+	// No media in drive.
+	//
+	public static final int ERROR_NO_MEDIA_IN_DRIVE = 1112;
+
+	//
+	// MessageId: ERROR_NO_UNICODE_TRANSLATION
+	//
+	// MessageText:
+	//
+	// No mapping for the Unicode character exists in the target multi-byte code
+	// page.
+	//
+	public static final int ERROR_NO_UNICODE_TRANSLATION = 1113;
+
+	//
+	// MessageId: ERROR_DLL_INIT_FAILED
+	//
+	// MessageText:
+	//
+	// A dynamic link library (DL; initialization routine failed.
+	//
+	public static final int ERROR_DLL_INIT_FAILED = 1114;
+
+	//
+	// MessageId: ERROR_SHUTDOWN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// A system shutdown is in progress.
+	//
+	public static final int ERROR_SHUTDOWN_IN_PROGRESS = 1115;
+
+	//
+	// MessageId: ERROR_NO_SHUTDOWN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// Unable to abort the system shutdown because no shutdown was in progress.
+	//
+	public static final int ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116;
+
+	//
+	// MessageId: ERROR_IO_DEVICE
+	//
+	// MessageText:
+	//
+	// The request could not be performed because of an I/O device error.
+	//
+	public static final int ERROR_IO_DEVICE = 1117;
+
+	//
+	// MessageId: ERROR_SERIAL_NO_DEVICE
+	//
+	// MessageText:
+	//
+	// No serial device was successfully initialized. The serial driver will
+	// unload.
+	//
+	public static final int ERROR_SERIAL_NO_DEVICE = 1118;
+
+	//
+	// MessageId: ERROR_IRQ_BUSY
+	//
+	// MessageText:
+	//
+	// Unable to open a device that was sharing an interrupt request (IRQ) with
+	// other devices. At least one other device that uses that IRQ was already
+	// opened.
+	//
+	public static final int ERROR_IRQ_BUSY = 1119;
+
+	//
+	// MessageId: ERROR_MORE_WRITES
+	//
+	// MessageText:
+	//
+	// A serial I/O operation was completed by another write to the serial port.
+	// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
+	//
+	public static final int ERROR_MORE_WRITES = 1120;
+
+	//
+	// MessageId: ERROR_COUNTER_TIMEOUT
+	//
+	// MessageText:
+	//
+	// A serial I/O operation completed because the timeout period expired.
+	// (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)
+	//
+	public static final int ERROR_COUNTER_TIMEOUT = 1121;
+
+	//
+	// MessageId: ERROR_FLOPPY_ID_MARK_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// No ID address mark was found on the floppy disk.
+	//
+	public static final int ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122;
+
+	//
+	// MessageId: ERROR_FLOPPY_WRONG_CYLINDER
+	//
+	// MessageText:
+	//
+	// Mismatch between the floppy disk sector ID field and the floppy disk
+	// controller track address.
+	//
+	public static final int ERROR_FLOPPY_WRONG_CYLINDER = 1123;
+
+	//
+	// MessageId: ERROR_FLOPPY_UNKNOWN_ERROR
+	//
+	// MessageText:
+	//
+	// The floppy disk controller reported an error that is not recognized by
+	// the floppy disk driver.
+	//
+	public static final int ERROR_FLOPPY_UNKNOWN_ERROR = 1124;
+
+	//
+	// MessageId: ERROR_FLOPPY_BAD_REGISTERS
+	//
+	// MessageText:
+	//
+	// The floppy disk controller returned inconsistent results in its
+	// registers.
+	//
+	public static final int ERROR_FLOPPY_BAD_REGISTERS = 1125;
+
+	//
+	// MessageId: ERROR_DISK_RECALIBRATE_FAILED
+	//
+	// MessageText:
+	//
+	// While accessing the hard disk, a recalibrate operation failed, even after
+	// retries.
+	//
+	public static final int ERROR_DISK_RECALIBRATE_FAILED = 1126;
+
+	//
+	// MessageId: ERROR_DISK_OPERATION_FAILED
+	//
+	// MessageText:
+	//
+	// While accessing the hard disk, a disk operation failed even after
+	// retries.
+	//
+	public static final int ERROR_DISK_OPERATION_FAILED = 1127;
+
+	//
+	// MessageId: ERROR_DISK_RESET_FAILED
+	//
+	// MessageText:
+	//
+	// While accessing the hard disk, a disk controller reset was needed, but
+	// even that failed.
+	//
+	public static final int ERROR_DISK_RESET_FAILED = 1128;
+
+	//
+	// MessageId: ERROR_EOM_OVERFLOW
+	//
+	// MessageText:
+	//
+	// Physical end of tape encountered.
+	//
+	public static final int ERROR_EOM_OVERFLOW = 1129;
+
+	//
+	// MessageId: ERROR_NOT_ENOUGH_SERVER_MEMORY
+	//
+	// MessageText:
+	//
+	// Not enough server storage is available to process this command.
+	//
+	public static final int ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130;
+
+	//
+	// MessageId: ERROR_POSSIBLE_DEADLOCK
+	//
+	// MessageText:
+	//
+	// A potential deadlock condition has been detected.
+	//
+	public static final int ERROR_POSSIBLE_DEADLOCK = 1131;
+
+	//
+	// MessageId: ERROR_MAPPED_ALIGNMENT
+	//
+	// MessageText:
+	//
+	// The base address or the file offset specified does not have the proper
+	// alignment.
+	//
+	public static final int ERROR_MAPPED_ALIGNMENT = 1132;
+
+	//
+	// MessageId: ERROR_SET_POWER_STATE_VETOED
+	//
+	// MessageText:
+	//
+	// An attempt to change the system power state was vetoed by another
+	// application or driver.
+	//
+	public static final int ERROR_SET_POWER_STATE_VETOED = 1140;
+
+	//
+	// MessageId: ERROR_SET_POWER_STATE_FAILED
+	//
+	// MessageText:
+	//
+	// The system BIOS failed an attempt to change the system power state.
+	//
+	public static final int ERROR_SET_POWER_STATE_FAILED = 1141;
+
+	//
+	// MessageId: ERROR_TOO_MANY_LINKS
+	//
+	// MessageText:
+	//
+	// An attempt was made to create more links on a file than the file system
+	// supports.
+	//
+	public static final int ERROR_TOO_MANY_LINKS = 1142;
+
+	//
+	// MessageId: ERROR_OLD_WIN_VERSION
+	//
+	// MessageText:
+	//
+	// The specified program requires a newer version of Windows.
+	//
+	public static final int ERROR_OLD_WIN_VERSION = 1150;
+
+	//
+	// MessageId: ERROR_APP_WRONG_OS
+	//
+	// MessageText:
+	//
+	// The specified program is not a Windows or MS-DOS program.
+	//
+	public static final int ERROR_APP_WRONG_OS = 1151;
+
+	//
+	// MessageId: ERROR_SINGLE_INSTANCE_APP
+	//
+	// MessageText:
+	//
+	// Cannot start more than one instance of the specified program.
+	//
+	public static final int ERROR_SINGLE_INSTANCE_APP = 1152;
+
+	//
+	// MessageId: ERROR_RMODE_APP
+	//
+	// MessageText:
+	//
+	// The specified program was written for an earlier version of Windows.
+	//
+	public static final int ERROR_RMODE_APP = 1153;
+
+	//
+	// MessageId: ERROR_INVALID_DLL
+	//
+	// MessageText:
+	//
+	// One of the library files needed to run this application is damaged.
+	//
+	public static final int ERROR_INVALID_DLL = 1154;
+
+	//
+	// MessageId: ERROR_NO_ASSOCIATION
+	//
+	// MessageText:
+	//
+	// No application is associated with the specified file for this operation.
+	//
+	public static final int ERROR_NO_ASSOCIATION = 1155;
+
+	//
+	// MessageId: ERROR_DDE_FAIL
+	//
+	// MessageText:
+	//
+	// An error occurred in sending the command to the application.
+	//
+	public static final int ERROR_DDE_FAIL = 1156;
+
+	//
+	// MessageId: ERROR_DLL_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// One of the library files needed to run this application cannot be found.
+	//
+	public static final int ERROR_DLL_NOT_FOUND = 1157;
+
+	//
+	// MessageId: ERROR_NO_MORE_USER_HANDLES
+	//
+	// MessageText:
+	//
+	// The current process has used all of its system allowance of handles for
+	// Window Manager objects.
+	//
+	public static final int ERROR_NO_MORE_USER_HANDLES = 1158;
+
+	//
+	// MessageId: ERROR_MESSAGE_SYNC_ONLY
+	//
+	// MessageText:
+	//
+	// The message can be used only with synchronous operations.
+	//
+	public static final int ERROR_MESSAGE_SYNC_ONLY = 1159;
+
+	//
+	// MessageId: ERROR_SOURCE_ELEMENT_EMPTY
+	//
+	// MessageText:
+	//
+	// The indicated source element has no media.
+	//
+	public static final int ERROR_SOURCE_ELEMENT_EMPTY = 1160;
+
+	//
+	// MessageId: ERROR_DESTINATION_ELEMENT_FULL
+	//
+	// MessageText:
+	//
+	// The indicated destination element already contains media.
+	//
+	public static final int ERROR_DESTINATION_ELEMENT_FULL = 1161;
+
+	//
+	// MessageId: ERROR_ILLEGAL_ELEMENT_ADDRESS
+	//
+	// MessageText:
+	//
+	// The indicated element does not exist.
+	//
+	public static final int ERROR_ILLEGAL_ELEMENT_ADDRESS = 1162;
+
+	//
+	// MessageId: ERROR_MAGAZINE_NOT_PRESENT
+	//
+	// MessageText:
+	//
+	// The indicated element is part of a magazine that is not present.
+	//
+	public static final int ERROR_MAGAZINE_NOT_PRESENT = 1163;
+
+	//
+	// MessageId: ERROR_DEVICE_REINITIALIZATION_NEEDED
+	//
+	// MessageText:
+	//
+	// The indicated device requires reinitialization due to hardware errors.
+	//
+	public static final int ERROR_DEVICE_REINITIALIZATION_NEEDED = 1164; // dderror
+
+	//
+	// MessageId: ERROR_DEVICE_REQUIRES_CLEANING
+	//
+	// MessageText:
+	//
+	// The device has indicated that cleaning is required before further
+	// operations are attempted.
+	//
+	public static final int ERROR_DEVICE_REQUIRES_CLEANING = 1165;
+
+	//
+	// MessageId: ERROR_DEVICE_DOOR_OPEN
+	//
+	// MessageText:
+	//
+	// The device has indicated that its door is open.
+	//
+	public static final int ERROR_DEVICE_DOOR_OPEN = 1166;
+
+	//
+	// MessageId: ERROR_DEVICE_NOT_CONNECTED
+	//
+	// MessageText:
+	//
+	// The device is not connected.
+	//
+	public static final int ERROR_DEVICE_NOT_CONNECTED = 1167;
+
+	//
+	// MessageId: ERROR_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Element not found.
+	//
+	public static final int ERROR_NOT_FOUND = 1168;
+
+	//
+	// MessageId: ERROR_NO_MATCH
+	//
+	// MessageText:
+	//
+	// There was no match for the specified key in the index.
+	//
+	public static final int ERROR_NO_MATCH = 1169;
+
+	//
+	// MessageId: ERROR_SET_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The property set specified does not exist on the object.
+	//
+	public static final int ERROR_SET_NOT_FOUND = 1170;
+
+	//
+	// MessageId: ERROR_POINT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The point passed to GetMouseMovePoints is not in the buffer.
+	//
+	public static final int ERROR_POINT_NOT_FOUND = 1171;
+
+	//
+	// MessageId: ERROR_NO_TRACKING_SERVICE
+	//
+	// MessageText:
+	//
+	// The tracking (workstation) service is not running.
+	//
+	public static final int ERROR_NO_TRACKING_SERVICE = 1172;
+
+	//
+	// MessageId: ERROR_NO_VOLUME_ID
+	//
+	// MessageText:
+	//
+	// The Volume ID could not be found.
+	//
+	public static final int ERROR_NO_VOLUME_ID = 1173;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_REMOVE_REPLACED
+	//
+	// MessageText:
+	//
+	// Unable to remove the file to be replaced.
+	//
+	public static final int ERROR_UNABLE_TO_REMOVE_REPLACED = 1175;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_MOVE_REPLACEMENT
+	//
+	// MessageText:
+	//
+	// Unable to move the replacement file to the file to be replaced. The file
+	// to be replaced has retained its original name.
+	//
+	public static final int ERROR_UNABLE_TO_MOVE_REPLACEMENT = 1176;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_MOVE_REPLACEMENT_2
+	//
+	// MessageText:
+	//
+	// Unable to move the replacement file to the file to be replaced. The file
+	// to be replaced has been renamed using the backup name.
+	//
+	public static final int ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = 1177;
+
+	//
+	// MessageId: ERROR_JOURNAL_DELETE_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The volume change journal is being deleted.
+	//
+	public static final int ERROR_JOURNAL_DELETE_IN_PROGRESS = 1178;
+
+	//
+	// MessageId: ERROR_JOURNAL_NOT_ACTIVE
+	//
+	// MessageText:
+	//
+	// The volume change journal is not active.
+	//
+	public static final int ERROR_JOURNAL_NOT_ACTIVE = 1179;
+
+	//
+	// MessageId: ERROR_POTENTIAL_FILE_FOUND
+	//
+	// MessageText:
+	//
+	// A file was found, but it may not be the correct file.
+	//
+	public static final int ERROR_POTENTIAL_FILE_FOUND = 1180;
+
+	//
+	// MessageId: ERROR_JOURNAL_ENTRY_DELETED
+	//
+	// MessageText:
+	//
+	// The journal entry has been deleted from the journal.
+	//
+	public static final int ERROR_JOURNAL_ENTRY_DELETED = 1181;
+
+	//
+	// MessageId: ERROR_SHUTDOWN_IS_SCHEDULED
+	//
+	// MessageText:
+	//
+	// A system shutdown has already been scheduled.
+	//
+	public static final int ERROR_SHUTDOWN_IS_SCHEDULED = 1190;
+
+	//
+	// MessageId: ERROR_SHUTDOWN_USERS_LOGGED_ON
+	//
+	// MessageText:
+	//
+	// The system shutdown cannot be initiated because there are other users
+	// logged on to the computer.
+	//
+	public static final int ERROR_SHUTDOWN_USERS_LOGGED_ON = 1191;
+
+	//
+	// MessageId: ERROR_BAD_DEVICE
+	//
+	// MessageText:
+	//
+	// The specified device name is invalid.
+	//
+	public static final int ERROR_BAD_DEVICE = 1200;
+
+	//
+	// MessageId: ERROR_CONNECTION_UNAVAIL
+	//
+	// MessageText:
+	//
+	// The device is not currently connected but it is a remembered connection.
+	//
+	public static final int ERROR_CONNECTION_UNAVAIL = 1201;
+
+	//
+	// MessageId: ERROR_DEVICE_ALREADY_REMEMBERED
+	//
+	// MessageText:
+	//
+	// The local device name has a remembered connection to another network
+	// resource.
+	//
+	public static final int ERROR_DEVICE_ALREADY_REMEMBERED = 1202;
+
+	//
+	// MessageId: ERROR_NO_NET_OR_BAD_PATH
+	//
+	// MessageText:
+	//
+	// The network path was either typed incorrectly, does not exist, or the
+	// network provider is not currently available. Please try retyping the path
+	// or contact your network administrator.
+	//
+	public static final int ERROR_NO_NET_OR_BAD_PATH = 1203;
+
+	//
+	// MessageId: ERROR_BAD_PROVIDER
+	//
+	// MessageText:
+	//
+	// The specified network provider name is invalid.
+	//
+	public static final int ERROR_BAD_PROVIDER = 1204;
+
+	//
+	// MessageId: ERROR_CANNOT_OPEN_PROFILE
+	//
+	// MessageText:
+	//
+	// Unable to open the network connection profile.
+	//
+	public static final int ERROR_CANNOT_OPEN_PROFILE = 1205;
+
+	//
+	// MessageId: ERROR_BAD_PROFILE
+	//
+	// MessageText:
+	//
+	// The network connection profile is corrupted.
+	//
+	public static final int ERROR_BAD_PROFILE = 1206;
+
+	//
+	// MessageId: ERROR_NOT_CONTAINER
+	//
+	// MessageText:
+	//
+	// Cannot enumerate a noncontainer.
+	//
+	public static final int ERROR_NOT_CONTAINER = 1207;
+
+	//
+	// MessageId: ERROR_EXTENDED_ERROR
+	//
+	// MessageText:
+	//
+	// An extended error has occurred.
+	//
+	public static final int ERROR_EXTENDED_ERROR = 1208;
+
+	//
+	// MessageId: ERROR_INVALID_GROUPNAME
+	//
+	// MessageText:
+	//
+	// The format of the specified group name is invalid.
+	//
+	public static final int ERROR_INVALID_GROUPNAME = 1209;
+
+	//
+	// MessageId: ERROR_INVALID_COMPUTERNAME
+	//
+	// MessageText:
+	//
+	// The format of the specified computer name is invalid.
+	//
+	public static final int ERROR_INVALID_COMPUTERNAME = 1210;
+
+	//
+	// MessageId: ERROR_INVALID_EVENTNAME
+	//
+	// MessageText:
+	//
+	// The format of the specified event name is invalid.
+	//
+	public static final int ERROR_INVALID_EVENTNAME = 1211;
+
+	//
+	// MessageId: ERROR_INVALID_DOMAINNAME
+	//
+	// MessageText:
+	//
+	// The format of the specified domain name is invalid.
+	//
+	public static final int ERROR_INVALID_DOMAINNAME = 1212;
+
+	//
+	// MessageId: ERROR_INVALID_SERVICENAME
+	//
+	// MessageText:
+	//
+	// The format of the specified service name is invalid.
+	//
+	public static final int ERROR_INVALID_SERVICENAME = 1213;
+
+	//
+	// MessageId: ERROR_INVALID_NETNAME
+	//
+	// MessageText:
+	//
+	// The format of the specified network name is invalid.
+	//
+	public static final int ERROR_INVALID_NETNAME = 1214;
+
+	//
+	// MessageId: ERROR_INVALID_SHARENAME
+	//
+	// MessageText:
+	//
+	// The format of the specified share name is invalid.
+	//
+	public static final int ERROR_INVALID_SHARENAME = 1215;
+
+	//
+	// MessageId: ERROR_INVALID_PASSWORDNAME
+	//
+	// MessageText:
+	//
+	// The format of the specified password is invalid.
+	//
+	public static final int ERROR_INVALID_PASSWORDNAME = 1216;
+
+	//
+	// MessageId: ERROR_INVALID_MESSAGENAME
+	//
+	// MessageText:
+	//
+	// The format of the specified message name is invalid.
+	//
+	public static final int ERROR_INVALID_MESSAGENAME = 1217;
+
+	//
+	// MessageId: ERROR_INVALID_MESSAGEDEST
+	//
+	// MessageText:
+	//
+	// The format of the specified message destination is invalid.
+	//
+	public static final int ERROR_INVALID_MESSAGEDEST = 1218;
+
+	//
+	// MessageId: ERROR_SESSION_CREDENTIAL_CONFLICT
+	//
+	// MessageText:
+	//
+	// Multiple connections to a server or shared resource by the same user,
+	// using more than one user name, are not allowed. Disconnect all previous
+	// connections to the server or shared resource and try again.
+	//
+	public static final int ERROR_SESSION_CREDENTIAL_CONFLICT = 1219;
+
+	//
+	// MessageId: ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// An attempt was made to establish a session to a network server, but there
+	// are already too many sessions established to that server.
+	//
+	public static final int ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220;
+
+	//
+	// MessageId: ERROR_DUP_DOMAINNAME
+	//
+	// MessageText:
+	//
+	// The workgroup or domain name is already in use by another computer on the
+	// network.
+	//
+	public static final int ERROR_DUP_DOMAINNAME = 1221;
+
+	//
+	// MessageId: ERROR_NO_NETWORK
+	//
+	// MessageText:
+	//
+	// The network is not present or not started.
+	//
+	public static final int ERROR_NO_NETWORK = 1222;
+
+	//
+	// MessageId: ERROR_CANCELLED
+	//
+	// MessageText:
+	//
+	// The operation was canceled by the user.
+	//
+	public static final int ERROR_CANCELLED = 1223;
+
+	//
+	// MessageId: ERROR_USER_MAPPED_FILE
+	//
+	// MessageText:
+	//
+	// The requested operation cannot be performed on a file with a user-mapped
+	// section open.
+	//
+	public static final int ERROR_USER_MAPPED_FILE = 1224;
+
+	//
+	// MessageId: ERROR_CONNECTION_REFUSED
+	//
+	// MessageText:
+	//
+	// The remote computer refused the network connection.
+	//
+	public static final int ERROR_CONNECTION_REFUSED = 1225;
+
+	//
+	// MessageId: ERROR_GRACEFUL_DISCONNECT
+	//
+	// MessageText:
+	//
+	// The network connection was gracefully closed.
+	//
+	public static final int ERROR_GRACEFUL_DISCONNECT = 1226;
+
+	//
+	// MessageId: ERROR_ADDRESS_ALREADY_ASSOCIATED
+	//
+	// MessageText:
+	//
+	// The network transport endpoint already has an address associated with it.
+	//
+	public static final int ERROR_ADDRESS_ALREADY_ASSOCIATED = 1227;
+
+	//
+	// MessageId: ERROR_ADDRESS_NOT_ASSOCIATED
+	//
+	// MessageText:
+	//
+	// An address has not yet been associated with the network endpoint.
+	//
+	public static final int ERROR_ADDRESS_NOT_ASSOCIATED = 1228;
+
+	//
+	// MessageId: ERROR_CONNECTION_INVALID
+	//
+	// MessageText:
+	//
+	// An operation was attempted on a nonexistent network connection.
+	//
+	public static final int ERROR_CONNECTION_INVALID = 1229;
+
+	//
+	// MessageId: ERROR_CONNECTION_ACTIVE
+	//
+	// MessageText:
+	//
+	// An invalid operation was attempted on an active network connection.
+	//
+	public static final int ERROR_CONNECTION_ACTIVE = 1230;
+
+	//
+	// MessageId: ERROR_NETWORK_UNREACHABLE
+	//
+	// MessageText:
+	//
+	// The network location cannot be reached. For information about network
+	// troubleshooting, see Windows Help.
+	//
+	public static final int ERROR_NETWORK_UNREACHABLE = 1231;
+
+	//
+	// MessageId: ERROR_HOST_UNREACHABLE
+	//
+	// MessageText:
+	//
+	// The network location cannot be reached. For information about network
+	// troubleshooting, see Windows Help.
+	//
+	public static final int ERROR_HOST_UNREACHABLE = 1232;
+
+	//
+	// MessageId: ERROR_PROTOCOL_UNREACHABLE
+	//
+	// MessageText:
+	//
+	// The network location cannot be reached. For information about network
+	// troubleshooting, see Windows Help.
+	//
+	public static final int ERROR_PROTOCOL_UNREACHABLE = 1233;
+
+	//
+	// MessageId: ERROR_PORT_UNREACHABLE
+	//
+	// MessageText:
+	//
+	// No service is operating at the destination network endpoint on the remote
+	// system.
+	//
+	public static final int ERROR_PORT_UNREACHABLE = 1234;
+
+	//
+	// MessageId: ERROR_REQUEST_ABORTED
+	//
+	// MessageText:
+	//
+	// The request was aborted.
+	//
+	public static final int ERROR_REQUEST_ABORTED = 1235;
+
+	//
+	// MessageId: ERROR_CONNECTION_ABORTED
+	//
+	// MessageText:
+	//
+	// The network connection was aborted by the local system.
+	//
+	public static final int ERROR_CONNECTION_ABORTED = 1236;
+
+	//
+	// MessageId: ERROR_RETRY
+	//
+	// MessageText:
+	//
+	// The operation could not be completed. A retry should be performed.
+	//
+	public static final int ERROR_RETRY = 1237;
+
+	//
+	// MessageId: ERROR_CONNECTION_COUNT_LIMIT
+	//
+	// MessageText:
+	//
+	// A connection to the server could not be made because the limit on the
+	// number of concurrent connections for this account has been reached.
+	//
+	public static final int ERROR_CONNECTION_COUNT_LIMIT = 1238;
+
+	//
+	// MessageId: ERROR_LOGIN_TIME_RESTRICTION
+	//
+	// MessageText:
+	//
+	// Attempting to log in during an unauthorized time of day for this account.
+	//
+	public static final int ERROR_LOGIN_TIME_RESTRICTION = 1239;
+
+	//
+	// MessageId: ERROR_LOGIN_WKSTA_RESTRICTION
+	//
+	// MessageText:
+	//
+	// The account is not authorized to log in from this station.
+	//
+	public static final int ERROR_LOGIN_WKSTA_RESTRICTION = 1240;
+
+	//
+	// MessageId: ERROR_INCORRECT_ADDRESS
+	//
+	// MessageText:
+	//
+	// The network address could not be used for the operation requested.
+	//
+	public static final int ERROR_INCORRECT_ADDRESS = 1241;
+
+	//
+	// MessageId: ERROR_ALREADY_REGISTERED
+	//
+	// MessageText:
+	//
+	// The service is already registered.
+	//
+	public static final int ERROR_ALREADY_REGISTERED = 1242;
+
+	//
+	// MessageId: ERROR_SERVICE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified service does not exist.
+	//
+	public static final int ERROR_SERVICE_NOT_FOUND = 1243;
+
+	//
+	// MessageId: ERROR_NOT_AUTHENTICATED
+	//
+	// MessageText:
+	//
+	// The operation being requested was not performed because the user has not
+	// been authenticated.
+	//
+	public static final int ERROR_NOT_AUTHENTICATED = 1244;
+
+	//
+	// MessageId: ERROR_NOT_LOGGED_ON
+	//
+	// MessageText:
+	//
+	// The operation being requested was not performed because the user has not
+	// logged on to the network.
+	// The specified service does not exist.
+	//
+	public static final int ERROR_NOT_LOGGED_ON = 1245;
+
+	//
+	// MessageId: ERROR_CONTINUE
+	//
+	// MessageText:
+	//
+	// Continue with work in progress.
+	//
+	public static final int ERROR_CONTINUE = 1246; // dderror
+
+	//
+	// MessageId: ERROR_ALREADY_INITIALIZED
+	//
+	// MessageText:
+	//
+	// An attempt was made to perform an initialization operation when
+	// initialization has already been completed.
+	//
+	public static final int ERROR_ALREADY_INITIALIZED = 1247;
+
+	//
+	// MessageId: ERROR_NO_MORE_DEVICES
+	//
+	// MessageText:
+	//
+	// No more local devices.
+	//
+	public static final int ERROR_NO_MORE_DEVICES = 1248; // dderror
+
+	//
+	// MessageId: ERROR_NO_SUCH_SITE
+	//
+	// MessageText:
+	//
+	// The specified site does not exist.
+	//
+	public static final int ERROR_NO_SUCH_SITE = 1249;
+
+	//
+	// MessageId: ERROR_DOMAIN_CONTROLLER_EXISTS
+	//
+	// MessageText:
+	//
+	// A domain controller with the specified name already exists.
+	//
+	public static final int ERROR_DOMAIN_CONTROLLER_EXISTS = 1250;
+
+	//
+	// MessageId: ERROR_ONLY_IF_CONNECTED
+	//
+	// MessageText:
+	//
+	// This operation is supported only when you are connected to the server.
+	//
+	public static final int ERROR_ONLY_IF_CONNECTED = 1251;
+
+	//
+	// MessageId: ERROR_OVERRIDE_NOCHANGES
+	//
+	// MessageText:
+	//
+	// The group policy framework should call the extension even if there are no
+	// changes.
+	//
+	public static final int ERROR_OVERRIDE_NOCHANGES = 1252;
+
+	//
+	// MessageId: ERROR_BAD_USER_PROFILE
+	//
+	// MessageText:
+	//
+	// The specified user does not have a valid profile.
+	//
+	public static final int ERROR_BAD_USER_PROFILE = 1253;
+
+	//
+	// MessageId: ERROR_NOT_SUPPORTED_ON_SBS
+	//
+	// MessageText:
+	//
+	// This operation is not supported on a computer running Windows Server=2003
+	// for Small Business Server
+	//
+	public static final int ERROR_NOT_SUPPORTED_ON_SBS = 1254;
+
+	//
+	// MessageId: ERROR_SERVER_SHUTDOWN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The server machine is shutting down.
+	//
+	public static final int ERROR_SERVER_SHUTDOWN_IN_PROGRESS = 1255;
+
+	//
+	// MessageId: ERROR_HOST_DOWN
+	//
+	// MessageText:
+	//
+	// The remote system is not available. For information about network
+	// troubleshooting, see Windows Help.
+	//
+	public static final int ERROR_HOST_DOWN = 1256;
+
+	//
+	// MessageId: ERROR_NON_ACCOUNT_SID
+	//
+	// MessageText:
+	//
+	// The security identifier provided is not from an account domain.
+	//
+	public static final int ERROR_NON_ACCOUNT_SID = 1257;
+
+	//
+	// MessageId: ERROR_NON_DOMAIN_SID
+	//
+	// MessageText:
+	//
+	// The security identifier provided does not have a domain component.
+	//
+	public static final int ERROR_NON_DOMAIN_SID = 1258;
+
+	//
+	// MessageId: ERROR_APPHELP_BLOCK
+	//
+	// MessageText:
+	//
+	// AppHelp dialog canceled thus preventing the application from starting.
+	//
+	public static final int ERROR_APPHELP_BLOCK = 1259;
+
+	//
+	// MessageId: ERROR_ACCESS_DISABLED_BY_POLICY
+	//
+	// MessageText:
+	//
+	// This program is blocked by group policy. For more information, contact
+	// your system administrator.
+	//
+	public static final int ERROR_ACCESS_DISABLED_BY_POLICY = 1260;
+
+	//
+	// MessageId: ERROR_REG_NAT_CONSUMPTION
+	//
+	// MessageText:
+	//
+	// A program attempt to use an invalid register value. Normally caused by an
+	// uninitialized register. This error is Itanium specific.
+	//
+	public static final int ERROR_REG_NAT_CONSUMPTION = 1261;
+
+	//
+	// MessageId: ERROR_CSCSHARE_OFFLINE
+	//
+	// MessageText:
+	//
+	// The share is currently offline or does not exist.
+	//
+	public static final int ERROR_CSCSHARE_OFFLINE = 1262;
+
+	//
+	// MessageId: ERROR_PKINIT_FAILURE
+	//
+	// MessageText:
+	//
+	// The kerberos protocol encountered an error while validating the KDC
+	// certificate during smartcard logon. There is more information in the
+	// system event log.
+	//
+	public static final int ERROR_PKINIT_FAILURE = 1263;
+
+	//
+	// MessageId: ERROR_SMARTCARD_SUBSYSTEM_FAILURE
+	//
+	// MessageText:
+	//
+	// The kerberos protocol encountered an error while attempting to utilize
+	// the smartcard subsystem.
+	//
+	public static final int ERROR_SMARTCARD_SUBSYSTEM_FAILURE = 1264;
+
+	//
+	// MessageId: ERROR_DOWNGRADE_DETECTED
+	//
+	// MessageText:
+	//
+	// The system detected a possible attempt to compromise security. Please
+	// ensure that you can contact the server that authenticated you.
+	//
+	public static final int ERROR_DOWNGRADE_DETECTED = 1265;
+
+	//
+	// Do not use ID's=1266 -=1270 as the symbolicNames have been moved to
+	// SEC_E_*
+	//
+	//
+	// MessageId: ERROR_MACHINE_LOCKED
+	//
+	// MessageText:
+	//
+	// The machine is locked and cannot be shut down without the force option.
+	//
+	public static final int ERROR_MACHINE_LOCKED = 1271;
+
+	//
+	// MessageId: ERROR_CALLBACK_SUPPLIED_INVALID_DATA
+	//
+	// MessageText:
+	//
+	// An application-defined callback gave invalid data when called.
+	//
+	public static final int ERROR_CALLBACK_SUPPLIED_INVALID_DATA = 1273;
+
+	//
+	// MessageId: ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED
+	//
+	// MessageText:
+	//
+	// The group policy framework should call the extension in the synchronous
+	// foreground policy refresh.
+	//
+	public static final int ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED = 1274;
+
+	//
+	// MessageId: ERROR_DRIVER_BLOCKED
+	//
+	// MessageText:
+	//
+	// This driver has been blocked from loading
+	//
+	public static final int ERROR_DRIVER_BLOCKED = 1275;
+
+	//
+	// MessageId: ERROR_INVALID_IMPORT_OF_NON_DLL
+	//
+	// MessageText:
+	//
+	// A dynamic link library (DL; referenced a module that was neither a DLL
+	// nor the process's executable image.
+	//
+	public static final int ERROR_INVALID_IMPORT_OF_NON_DLL = 1276;
+
+	//
+	// MessageId: ERROR_ACCESS_DISABLED_WEBBLADE
+	//
+	// MessageText:
+	//
+	// Windows cannot open this program since it has been disabled.
+	//
+	public static final int ERROR_ACCESS_DISABLED_WEBBLADE = 1277;
+
+	//
+	// MessageId: ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER
+	//
+	// MessageText:
+	//
+	// Windows cannot open this program because the license enforcement system
+	// has been tampered with or become corrupted.
+	//
+	public static final int ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER = 1278;
+
+	//
+	// MessageId: ERROR_RECOVERY_FAILURE
+	//
+	// MessageText:
+	//
+	// A transaction recover failed.
+	//
+	public static final int ERROR_RECOVERY_FAILURE = 1279;
+
+	//
+	// MessageId: ERROR_ALREADY_FIBER
+	//
+	// MessageText:
+	//
+	// The current thread has already been converted to a fiber.
+	//
+	public static final int ERROR_ALREADY_FIBER = 1280;
+
+	//
+	// MessageId: ERROR_ALREADY_THREAD
+	//
+	// MessageText:
+	//
+	// The current thread has already been converted from a fiber.
+	//
+	public static final int ERROR_ALREADY_THREAD = 1281;
+
+	//
+	// MessageId: ERROR_STACK_BUFFER_OVERRUN
+	//
+	// MessageText:
+	//
+	// The system detected an overrun of a stack-based buffer in this
+	// application. This overrun could potentially allow a malicious user to
+	// gain control of this application.
+	//
+	public static final int ERROR_STACK_BUFFER_OVERRUN = 1282;
+
+	//
+	// MessageId: ERROR_PARAMETER_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// Data present in one of the parameters is more than the function can
+	// operate on.
+	//
+	public static final int ERROR_PARAMETER_QUOTA_EXCEEDED = 1283;
+
+	//
+	// MessageId: ERROR_DEBUGGER_INACTIVE
+	//
+	// MessageText:
+	//
+	// An attempt to do an operation on a debug object failed because the object
+	// is in the process of being deleted.
+	//
+	public static final int ERROR_DEBUGGER_INACTIVE = 1284;
+
+	//
+	// MessageId: ERROR_DELAY_LOAD_FAILED
+	//
+	// MessageText:
+	//
+	// An attempt to delay-load a .dll or get a function address in a
+	// delay-loaded .dll failed.
+	//
+	public static final int ERROR_DELAY_LOAD_FAILED = 1285;
+
+	//
+	// MessageId: ERROR_VDM_DISALLOWED
+	//
+	// MessageText:
+	//
+	// %1 is a=16-bit application. You do not have permissions to execute=16-bit
+	// applications. Check your permissions with your system administrator.
+	//
+	public static final int ERROR_VDM_DISALLOWED = 1286;
+
+	//
+	// MessageId: ERROR_UNIDENTIFIED_ERROR
+	//
+	// MessageText:
+	//
+	// Insufficient information exists to identify the cause of failure.
+	//
+	public static final int ERROR_UNIDENTIFIED_ERROR = 1287;
+
+	//
+	// MessageId: ERROR_INVALID_CRUNTIME_PARAMETER
+	//
+	// MessageText:
+	//
+	// The parameter passed to a C runtime function is incorrect.
+	//
+	public static final int ERROR_INVALID_CRUNTIME_PARAMETER = 1288;
+
+	//
+	// MessageId: ERROR_BEYOND_VDL
+	//
+	// MessageText:
+	//
+	// The operation occurred beyond the valid data length of the file.
+	//
+	public static final int ERROR_BEYOND_VDL = 1289;
+
+	//
+	// MessageId: ERROR_INCOMPATIBLE_SERVICE_SID_TYPE
+	//
+	// MessageText:
+	//
+	// The service start failed since one or more services in the same process
+	// have an incompatible service SID type setting. A service with restricted
+	// service SID type can only coexist in the same process with other services
+	// with a restricted SID type. If the service SID type for this service was
+	// just configured, the hosting process must be restarted in order to start
+	// this service.
+	//
+	public static final int ERROR_INCOMPATIBLE_SERVICE_SID_TYPE = 1290;
+
+	//
+	// MessageId: ERROR_DRIVER_PROCESS_TERMINATED
+	//
+	// MessageText:
+	//
+	// The process hosting the driver for this device has been terminated.
+	//
+	public static final int ERROR_DRIVER_PROCESS_TERMINATED = 1291;
+
+	//
+	// MessageId: ERROR_IMPLEMENTATION_LIMIT
+	//
+	// MessageText:
+	//
+	// An operation attempted to exceed an implementation-defined limit.
+	//
+	public static final int ERROR_IMPLEMENTATION_LIMIT = 1292;
+
+	//
+	// MessageId: ERROR_PROCESS_IS_PROTECTED
+	//
+	// MessageText:
+	//
+	// Either the target process, or the target thread's containing process, is
+	// a protected process.
+	//
+	public static final int ERROR_PROCESS_IS_PROTECTED = 1293;
+
+	//
+	// MessageId: ERROR_SERVICE_NOTIFY_CLIENT_LAGGING
+	//
+	// MessageText:
+	//
+	// The service notification client is lagging too far behind the current
+	// state of services in the machine.
+	//
+	public static final int ERROR_SERVICE_NOTIFY_CLIENT_LAGGING = 1294;
+
+	//
+	// MessageId: ERROR_DISK_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The requested file operation failed because the storage quota was
+	// exceeded.
+	// To free up disk space, move files to a different location or delete
+	// unnecessary files. For more information, contact your system
+	// administrator.
+	//
+	public static final int ERROR_DISK_QUOTA_EXCEEDED = 1295;
+
+	//
+	// MessageId: ERROR_CONTENT_BLOCKED
+	//
+	// MessageText:
+	//
+	// The requested file operation failed because the storage policy blocks
+	// that type of file. For more information, contact your system
+	// administrator.
+	//
+	public static final int ERROR_CONTENT_BLOCKED = 1296;
+
+	//
+	// MessageId: ERROR_INCOMPATIBLE_SERVICE_PRIVILEGE
+	//
+	// MessageText:
+	//
+	// A privilege that the service requires to function properly does not exist
+	// in the service account configuration.
+	// You may use the Services Microsoft Management Console (MMC) snap-in
+	// (services.msc) and the Local Security Settings MMC snap-in (secpol.msc)
+	// to view the service configuration and the account configuration.
+	//
+	public static final int ERROR_INCOMPATIBLE_SERVICE_PRIVILEGE = 1297;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =SECURITY Error codes=//
+	// =//
+	// =1299 to=1399=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_LABEL
+	//
+	// MessageText:
+	//
+	// Indicates a particular Security ID may not be assigned as the label of an
+	// object.
+	//
+	public static final int ERROR_INVALID_LABEL = 1299;
+
+	//
+	// MessageId: ERROR_NOT_ALL_ASSIGNED
+	//
+	// MessageText:
+	//
+	// Not all privileges or groups referenced are assigned to the caller.
+	//
+	public static final int ERROR_NOT_ALL_ASSIGNED = 1300;
+
+	//
+	// MessageId: ERROR_SOME_NOT_MAPPED
+	//
+	// MessageText:
+	//
+	// Some mapping between account names and security IDs was not done.
+	//
+	public static final int ERROR_SOME_NOT_MAPPED = 1301;
+
+	//
+	// MessageId: ERROR_NO_QUOTAS_FOR_ACCOUNT
+	//
+	// MessageText:
+	//
+	// No system quota limits are specifically set for this account.
+	//
+	public static final int ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302;
+
+	//
+	// MessageId: ERROR_LOCAL_USER_SESSION_KEY
+	//
+	// MessageText:
+	//
+	// No encryption key is available. A well-known encryption key was returned.
+	//
+	public static final int ERROR_LOCAL_USER_SESSION_KEY = 1303;
+
+	//
+	// MessageId: ERROR_NULL_LM_PASSWORD
+	//
+	// MessageText:
+	//
+	// The password is too complex to be converted to a LAN Manager password.
+	// The LAN Manager password returned is a NULL string.
+	//
+	public static final int ERROR_NULL_LM_PASSWORD = 1304;
+
+	//
+	// MessageId: ERROR_UNKNOWN_REVISION
+	//
+	// MessageText:
+	//
+	// The revision level is unknown.
+	//
+	public static final int ERROR_UNKNOWN_REVISION = 1305;
+
+	//
+	// MessageId: ERROR_REVISION_MISMATCH
+	//
+	// MessageText:
+	//
+	// Indicates two revision levels are incompatible.
+	//
+	public static final int ERROR_REVISION_MISMATCH = 1306;
+
+	//
+	// MessageId: ERROR_INVALID_OWNER
+	//
+	// MessageText:
+	//
+	// This security ID may not be assigned as the owner of this object.
+	//
+	public static final int ERROR_INVALID_OWNER = 1307;
+
+	//
+	// MessageId: ERROR_INVALID_PRIMARY_GROUP
+	//
+	// MessageText:
+	//
+	// This security ID may not be assigned as the primary group of an object.
+	//
+	public static final int ERROR_INVALID_PRIMARY_GROUP = 1308;
+
+	//
+	// MessageId: ERROR_NO_IMPERSONATION_TOKEN
+	//
+	// MessageText:
+	//
+	// An attempt has been made to operate on an impersonation token by a thread
+	// that is not currently impersonating a client.
+	//
+	public static final int ERROR_NO_IMPERSONATION_TOKEN = 1309;
+
+	//
+	// MessageId: ERROR_CANT_DISABLE_MANDATORY
+	//
+	// MessageText:
+	//
+	// The group may not be disabled.
+	//
+	public static final int ERROR_CANT_DISABLE_MANDATORY = 1310;
+
+	//
+	// MessageId: ERROR_NO_LOGON_SERVERS
+	//
+	// MessageText:
+	//
+	// There are currently no logon servers available to service the logon
+	// request.
+	//
+	public static final int ERROR_NO_LOGON_SERVERS = 1311;
+
+	//
+	// MessageId: ERROR_NO_SUCH_LOGON_SESSION
+	//
+	// MessageText:
+	//
+	// A specified logon session does not exist. It may already have been
+	// terminated.
+	//
+	public static final int ERROR_NO_SUCH_LOGON_SESSION = 1312;
+
+	//
+	// MessageId: ERROR_NO_SUCH_PRIVILEGE
+	//
+	// MessageText:
+	//
+	// A specified privilege does not exist.
+	//
+	public static final int ERROR_NO_SUCH_PRIVILEGE = 1313;
+
+	//
+	// MessageId: ERROR_PRIVILEGE_NOT_HELD
+	//
+	// MessageText:
+	//
+	// A required privilege is not held by the client.
+	//
+	public static final int ERROR_PRIVILEGE_NOT_HELD = 1314;
+
+	//
+	// MessageId: ERROR_INVALID_ACCOUNT_NAME
+	//
+	// MessageText:
+	//
+	// The name provided is not a properly formed account name.
+	//
+	public static final int ERROR_INVALID_ACCOUNT_NAME = 1315;
+
+	//
+	// MessageId: ERROR_USER_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified account already exists.
+	//
+	public static final int ERROR_USER_EXISTS = 1316;
+
+	//
+	// MessageId: ERROR_NO_SUCH_USER
+	//
+	// MessageText:
+	//
+	// The specified account does not exist.
+	//
+	public static final int ERROR_NO_SUCH_USER = 1317;
+
+	//
+	// MessageId: ERROR_GROUP_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified group already exists.
+	//
+	public static final int ERROR_GROUP_EXISTS = 1318;
+
+	//
+	// MessageId: ERROR_NO_SUCH_GROUP
+	//
+	// MessageText:
+	//
+	// The specified group does not exist.
+	//
+	public static final int ERROR_NO_SUCH_GROUP = 1319;
+
+	//
+	// MessageId: ERROR_MEMBER_IN_GROUP
+	//
+	// MessageText:
+	//
+	// Either the specified user account is already a member of the specified
+	// group, or the specified group cannot be deleted because it contains a
+	// member.
+	//
+	public static final int ERROR_MEMBER_IN_GROUP = 1320;
+
+	//
+	// MessageId: ERROR_MEMBER_NOT_IN_GROUP
+	//
+	// MessageText:
+	//
+	// The specified user account is not a member of the specified group
+	// account.
+	//
+	public static final int ERROR_MEMBER_NOT_IN_GROUP = 1321;
+
+	//
+	// MessageId: ERROR_LAST_ADMIN
+	//
+	// MessageText:
+	//
+	// The last remaining administration account cannot be disabled or deleted.
+	//
+	public static final int ERROR_LAST_ADMIN = 1322;
+
+	//
+	// MessageId: ERROR_WRONG_PASSWORD
+	//
+	// MessageText:
+	//
+	// Unable to update the password. The value provided as the current password
+	// is incorrect.
+	//
+	public static final int ERROR_WRONG_PASSWORD = 1323;
+
+	//
+	// MessageId: ERROR_ILL_FORMED_PASSWORD
+	//
+	// MessageText:
+	//
+	// Unable to update the password. The value provided for the new password
+	// contains values that are not allowed in passwords.
+	//
+	public static final int ERROR_ILL_FORMED_PASSWORD = 1324;
+
+	//
+	// MessageId: ERROR_PASSWORD_RESTRICTION
+	//
+	// MessageText:
+	//
+	// Unable to update the password. The value provided for the new password
+	// does not meet the length, complexity, or history requirements of the
+	// domain.
+	//
+	public static final int ERROR_PASSWORD_RESTRICTION = 1325;
+
+	//
+	// MessageId: ERROR_LOGON_FAILURE
+	//
+	// MessageText:
+	//
+	// Logon failure: unknown user name or bad password.
+	//
+	public static final int ERROR_LOGON_FAILURE = 1326;
+
+	//
+	// MessageId: ERROR_ACCOUNT_RESTRICTION
+	//
+	// MessageText:
+	//
+	// Logon failure: user account restriction. Possible reasons are blank
+	// passwords not allowed, logon hour restrictions, or a policy restriction
+	// has been enforced.
+	//
+	public static final int ERROR_ACCOUNT_RESTRICTION = 1327;
+
+	//
+	// MessageId: ERROR_INVALID_LOGON_HOURS
+	//
+	// MessageText:
+	//
+	// Logon failure: account logon time restriction violation.
+	//
+	public static final int ERROR_INVALID_LOGON_HOURS = 1328;
+
+	//
+	// MessageId: ERROR_INVALID_WORKSTATION
+	//
+	// MessageText:
+	//
+	// Logon failure: user not allowed to log on to this computer.
+	//
+	public static final int ERROR_INVALID_WORKSTATION = 1329;
+
+	//
+	// MessageId: ERROR_PASSWORD_EXPIRED
+	//
+	// MessageText:
+	//
+	// Logon failure: the specified account password has expired.
+	//
+	public static final int ERROR_PASSWORD_EXPIRED = 1330;
+
+	//
+	// MessageId: ERROR_ACCOUNT_DISABLED
+	//
+	// MessageText:
+	//
+	// Logon failure: account currently disabled.
+	//
+	public static final int ERROR_ACCOUNT_DISABLED = 1331;
+
+	//
+	// MessageId: ERROR_NONE_MAPPED
+	//
+	// MessageText:
+	//
+	// No mapping between account names and security IDs was done.
+	//
+	public static final int ERROR_NONE_MAPPED = 1332;
+
+	//
+	// MessageId: ERROR_TOO_MANY_LUIDS_REQUESTED
+	//
+	// MessageText:
+	//
+	// Too many local user identifiers (LUIDs) were requested at one time.
+	//
+	public static final int ERROR_TOO_MANY_LUIDS_REQUESTED = 1333;
+
+	//
+	// MessageId: ERROR_LUIDS_EXHAUSTED
+	//
+	// MessageText:
+	//
+	// No more local user identifiers (LUIDs) are available.
+	//
+	public static final int ERROR_LUIDS_EXHAUSTED = 1334;
+
+	//
+	// MessageId: ERROR_INVALID_SUB_AUTHORITY
+	//
+	// MessageText:
+	//
+	// The subauthority part of a security ID is invalid for this particular
+	// use.
+	//
+	public static final int ERROR_INVALID_SUB_AUTHORITY = 1335;
+
+	//
+	// MessageId: ERROR_INVALID_ACL
+	//
+	// MessageText:
+	//
+	// The access control list (AC; structure is invalid.
+	//
+	public static final int ERROR_INVALID_ACL = 1336;
+
+	//
+	// MessageId: ERROR_INVALID_SID
+	//
+	// MessageText:
+	//
+	// The security ID structure is invalid.
+	//
+	public static final int ERROR_INVALID_SID = 1337;
+
+	//
+	// MessageId: ERROR_INVALID_SECURITY_DESCR
+	//
+	// MessageText:
+	//
+	// The security descriptor structure is invalid.
+	//
+	public static final int ERROR_INVALID_SECURITY_DESCR = 1338;
+
+	//
+	// MessageId: ERROR_BAD_INHERITANCE_ACL
+	//
+	// MessageText:
+	//
+	// The inherited access control list (AC; or access control entry (ACE)
+	// could not be built.
+	//
+	public static final int ERROR_BAD_INHERITANCE_ACL = 1340;
+
+	//
+	// MessageId: ERROR_SERVER_DISABLED
+	//
+	// MessageText:
+	//
+	// The server is currently disabled.
+	//
+	public static final int ERROR_SERVER_DISABLED = 1341;
+
+	//
+	// MessageId: ERROR_SERVER_NOT_DISABLED
+	//
+	// MessageText:
+	//
+	// The server is currently enabled.
+	//
+	public static final int ERROR_SERVER_NOT_DISABLED = 1342;
+
+	//
+	// MessageId: ERROR_INVALID_ID_AUTHORITY
+	//
+	// MessageText:
+	//
+	// The value provided was an invalid value for an identifier authority.
+	//
+	public static final int ERROR_INVALID_ID_AUTHORITY = 1343;
+
+	//
+	// MessageId: ERROR_ALLOTTED_SPACE_EXCEEDED
+	//
+	// MessageText:
+	//
+	// No more memory is available for security information updates.
+	//
+	public static final int ERROR_ALLOTTED_SPACE_EXCEEDED = 1344;
+
+	//
+	// MessageId: ERROR_INVALID_GROUP_ATTRIBUTES
+	//
+	// MessageText:
+	//
+	// The specified attributes are invalid, or incompatible with the attributes
+	// for the group as a whole.
+	//
+	public static final int ERROR_INVALID_GROUP_ATTRIBUTES = 1345;
+
+	//
+	// MessageId: ERROR_BAD_IMPERSONATION_LEVEL
+	//
+	// MessageText:
+	//
+	// Either a required impersonation level was not provided, or the provided
+	// impersonation level is invalid.
+	//
+	public static final int ERROR_BAD_IMPERSONATION_LEVEL = 1346;
+
+	//
+	// MessageId: ERROR_CANT_OPEN_ANONYMOUS
+	//
+	// MessageText:
+	//
+	// Cannot open an anonymous level security token.
+	//
+	public static final int ERROR_CANT_OPEN_ANONYMOUS = 1347;
+
+	//
+	// MessageId: ERROR_BAD_VALIDATION_CLASS
+	//
+	// MessageText:
+	//
+	// The validation information class requested was invalid.
+	//
+	public static final int ERROR_BAD_VALIDATION_CLASS = 1348;
+
+	//
+	// MessageId: ERROR_BAD_TOKEN_TYPE
+	//
+	// MessageText:
+	//
+	// The type of the token is inappropriate for its attempted use.
+	//
+	public static final int ERROR_BAD_TOKEN_TYPE = 1349;
+
+	//
+	// MessageId: ERROR_NO_SECURITY_ON_OBJECT
+	//
+	// MessageText:
+	//
+	// Unable to perform a security operation on an object that has no
+	// associated security.
+	//
+	public static final int ERROR_NO_SECURITY_ON_OBJECT = 1350;
+
+	//
+	// MessageId: ERROR_CANT_ACCESS_DOMAIN_INFO
+	//
+	// MessageText:
+	//
+	// Configuration information could not be read from the domain controller,
+	// either because the machine is unavailable, or access has been denied.
+	//
+	public static final int ERROR_CANT_ACCESS_DOMAIN_INFO = 1351;
+
+	//
+	// MessageId: ERROR_INVALID_SERVER_STATE
+	//
+	// MessageText:
+	//
+	// The security account manager (SAM) or local security authority (LSA)
+	// server was in the wrong state to perform the security operation.
+	//
+	public static final int ERROR_INVALID_SERVER_STATE = 1352;
+
+	//
+	// MessageId: ERROR_INVALID_DOMAIN_STATE
+	//
+	// MessageText:
+	//
+	// The domain was in the wrong state to perform the security operation.
+	//
+	public static final int ERROR_INVALID_DOMAIN_STATE = 1353;
+
+	//
+	// MessageId: ERROR_INVALID_DOMAIN_ROLE
+	//
+	// MessageText:
+	//
+	// This operation is only allowed for the Primary Domain Controller of the
+	// domain.
+	//
+	public static final int ERROR_INVALID_DOMAIN_ROLE = 1354;
+
+	//
+	// MessageId: ERROR_NO_SUCH_DOMAIN
+	//
+	// MessageText:
+	//
+	// The specified domain either does not exist or could not be contacted.
+	//
+	public static final int ERROR_NO_SUCH_DOMAIN = 1355;
+
+	//
+	// MessageId: ERROR_DOMAIN_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified domain already exists.
+	//
+	public static final int ERROR_DOMAIN_EXISTS = 1356;
+
+	//
+	// MessageId: ERROR_DOMAIN_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// An attempt was made to exceed the limit on the number of domains per
+	// server.
+	//
+	public static final int ERROR_DOMAIN_LIMIT_EXCEEDED = 1357;
+
+	//
+	// MessageId: ERROR_INTERNAL_DB_CORRUPTION
+	//
+	// MessageText:
+	//
+	// Unable to complete the requested operation because of either a
+	// catastrophic media failure or a data structure corruption on the disk.
+	//
+	public static final int ERROR_INTERNAL_DB_CORRUPTION = 1358;
+
+	//
+	// MessageId: ERROR_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal error occurred.
+	//
+	public static final int ERROR_INTERNAL_ERROR = 1359;
+
+	//
+	// MessageId: ERROR_GENERIC_NOT_MAPPED
+	//
+	// MessageText:
+	//
+	// Generic access types were contained in an access mask which should
+	// already be mapped to nongeneric types.
+	//
+	public static final int ERROR_GENERIC_NOT_MAPPED = 1360;
+
+	//
+	// MessageId: ERROR_BAD_DESCRIPTOR_FORMAT
+	//
+	// MessageText:
+	//
+	// A security descriptor is not in the right format (absolute or
+	// self-relative).
+	//
+	public static final int ERROR_BAD_DESCRIPTOR_FORMAT = 1361;
+
+	//
+	// MessageId: ERROR_NOT_LOGON_PROCESS
+	//
+	// MessageText:
+	//
+	// The requested action is restricted for use by logon processes only. The
+	// calling process has not registered as a logon process.
+	//
+	public static final int ERROR_NOT_LOGON_PROCESS = 1362;
+
+	//
+	// MessageId: ERROR_LOGON_SESSION_EXISTS
+	//
+	// MessageText:
+	//
+	// Cannot start a new logon session with an ID that is already in use.
+	//
+	public static final int ERROR_LOGON_SESSION_EXISTS = 1363;
+
+	//
+	// MessageId: ERROR_NO_SUCH_PACKAGE
+	//
+	// MessageText:
+	//
+	// A specified authentication package is unknown.
+	//
+	public static final int ERROR_NO_SUCH_PACKAGE = 1364;
+
+	//
+	// MessageId: ERROR_BAD_LOGON_SESSION_STATE
+	//
+	// MessageText:
+	//
+	// The logon session is not in a state that is consistent with the requested
+	// operation.
+	//
+	public static final int ERROR_BAD_LOGON_SESSION_STATE = 1365;
+
+	//
+	// MessageId: ERROR_LOGON_SESSION_COLLISION
+	//
+	// MessageText:
+	//
+	// The logon session ID is already in use.
+	//
+	public static final int ERROR_LOGON_SESSION_COLLISION = 1366;
+
+	//
+	// MessageId: ERROR_INVALID_LOGON_TYPE
+	//
+	// MessageText:
+	//
+	// A logon request contained an invalid logon type value.
+	//
+	public static final int ERROR_INVALID_LOGON_TYPE = 1367;
+
+	//
+	// MessageId: ERROR_CANNOT_IMPERSONATE
+	//
+	// MessageText:
+	//
+	// Unable to impersonate using a named pipe until data has been read from
+	// that pipe.
+	//
+	public static final int ERROR_CANNOT_IMPERSONATE = 1368;
+
+	//
+	// MessageId: ERROR_RXACT_INVALID_STATE
+	//
+	// MessageText:
+	//
+	// The transaction state of a registry subtree is incompatible with the
+	// requested operation.
+	//
+	public static final int ERROR_RXACT_INVALID_STATE = 1369;
+
+	//
+	// MessageId: ERROR_RXACT_COMMIT_FAILURE
+	//
+	// MessageText:
+	//
+	// An internal security database corruption has been encountered.
+	//
+	public static final int ERROR_RXACT_COMMIT_FAILURE = 1370;
+
+	//
+	// MessageId: ERROR_SPECIAL_ACCOUNT
+	//
+	// MessageText:
+	//
+	// Cannot perform this operation on built-in accounts.
+	//
+	public static final int ERROR_SPECIAL_ACCOUNT = 1371;
+
+	//
+	// MessageId: ERROR_SPECIAL_GROUP
+	//
+	// MessageText:
+	//
+	// Cannot perform this operation on this built-in special group.
+	//
+	public static final int ERROR_SPECIAL_GROUP = 1372;
+
+	//
+	// MessageId: ERROR_SPECIAL_USER
+	//
+	// MessageText:
+	//
+	// Cannot perform this operation on this built-in special user.
+	//
+	public static final int ERROR_SPECIAL_USER = 1373;
+
+	//
+	// MessageId: ERROR_MEMBERS_PRIMARY_GROUP
+	//
+	// MessageText:
+	//
+	// The user cannot be removed from a group because the group is currently
+	// the user's primary group.
+	//
+	public static final int ERROR_MEMBERS_PRIMARY_GROUP = 1374;
+
+	//
+	// MessageId: ERROR_TOKEN_ALREADY_IN_USE
+	//
+	// MessageText:
+	//
+	// The token is already in use as a primary token.
+	//
+	public static final int ERROR_TOKEN_ALREADY_IN_USE = 1375;
+
+	//
+	// MessageId: ERROR_NO_SUCH_ALIAS
+	//
+	// MessageText:
+	//
+	// The specified local group does not exist.
+	//
+	public static final int ERROR_NO_SUCH_ALIAS = 1376;
+
+	//
+	// MessageId: ERROR_MEMBER_NOT_IN_ALIAS
+	//
+	// MessageText:
+	//
+	// The specified account name is not a member of the group.
+	//
+	public static final int ERROR_MEMBER_NOT_IN_ALIAS = 1377;
+
+	//
+	// MessageId: ERROR_MEMBER_IN_ALIAS
+	//
+	// MessageText:
+	//
+	// The specified account name is already a member of the group.
+	//
+	public static final int ERROR_MEMBER_IN_ALIAS = 1378;
+
+	//
+	// MessageId: ERROR_ALIAS_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified local group already exists.
+	//
+	public static final int ERROR_ALIAS_EXISTS = 1379;
+
+	//
+	// MessageId: ERROR_LOGON_NOT_GRANTED
+	//
+	// MessageText:
+	//
+	// Logon failure: the user has not been granted the requested logon type at
+	// this computer.
+	//
+	public static final int ERROR_LOGON_NOT_GRANTED = 1380;
+
+	//
+	// MessageId: ERROR_TOO_MANY_SECRETS
+	//
+	// MessageText:
+	//
+	// The maximum number of secrets that may be stored in a single system has
+	// been exceeded.
+	//
+	public static final int ERROR_TOO_MANY_SECRETS = 1381;
+
+	//
+	// MessageId: ERROR_SECRET_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The length of a secret exceeds the maximum length allowed.
+	//
+	public static final int ERROR_SECRET_TOO_LONG = 1382;
+
+	//
+	// MessageId: ERROR_INTERNAL_DB_ERROR
+	//
+	// MessageText:
+	//
+	// The local security authority database contains an internal inconsistency.
+	//
+	public static final int ERROR_INTERNAL_DB_ERROR = 1383;
+
+	//
+	// MessageId: ERROR_TOO_MANY_CONTEXT_IDS
+	//
+	// MessageText:
+	//
+	// During a logon attempt, the user's security context accumulated too many
+	// security IDs.
+	//
+	public static final int ERROR_TOO_MANY_CONTEXT_IDS = 1384;
+
+	//
+	// MessageId: ERROR_LOGON_TYPE_NOT_GRANTED
+	//
+	// MessageText:
+	//
+	// Logon failure: the user has not been granted the requested logon type at
+	// this computer.
+	//
+	public static final int ERROR_LOGON_TYPE_NOT_GRANTED = 1385;
+
+	//
+	// MessageId: ERROR_NT_CROSS_ENCRYPTION_REQUIRED
+	//
+	// MessageText:
+	//
+	// A cross-encrypted password is necessary to change a user password.
+	//
+	public static final int ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386;
+
+	//
+	// MessageId: ERROR_NO_SUCH_MEMBER
+	//
+	// MessageText:
+	//
+	// A member could not be added to or removed from the local group because
+	// the member does not exist.
+	//
+	public static final int ERROR_NO_SUCH_MEMBER = 1387;
+
+	//
+	// MessageId: ERROR_INVALID_MEMBER
+	//
+	// MessageText:
+	//
+	// A new member could not be added to a local group because the member has
+	// the wrong account type.
+	//
+	public static final int ERROR_INVALID_MEMBER = 1388;
+
+	//
+	// MessageId: ERROR_TOO_MANY_SIDS
+	//
+	// MessageText:
+	//
+	// Too many security IDs have been specified.
+	//
+	public static final int ERROR_TOO_MANY_SIDS = 1389;
+
+	//
+	// MessageId: ERROR_LM_CROSS_ENCRYPTION_REQUIRED
+	//
+	// MessageText:
+	//
+	// A cross-encrypted password is necessary to change this user password.
+	//
+	public static final int ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390;
+
+	//
+	// MessageId: ERROR_NO_INHERITANCE
+	//
+	// MessageText:
+	//
+	// Indicates an ACL contains no inheritable components.
+	//
+	public static final int ERROR_NO_INHERITANCE = 1391;
+
+	//
+	// MessageId: ERROR_FILE_CORRUPT
+	//
+	// MessageText:
+	//
+	// The file or directory is corrupted and unreadable.
+	//
+	public static final int ERROR_FILE_CORRUPT = 1392;
+
+	//
+	// MessageId: ERROR_DISK_CORRUPT
+	//
+	// MessageText:
+	//
+	// The disk structure is corrupted and unreadable.
+	//
+	public static final int ERROR_DISK_CORRUPT = 1393;
+
+	//
+	// MessageId: ERROR_NO_USER_SESSION_KEY
+	//
+	// MessageText:
+	//
+	// There is no user session key for the specified logon session.
+	//
+	public static final int ERROR_NO_USER_SESSION_KEY = 1394;
+
+	//
+	// MessageId: ERROR_LICENSE_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The service being accessed is licensed for a particular number of
+	// connections.
+	// No more connections can be made to the service at this time because there
+	// are already as many connections as the service can accept.
+	//
+	public static final int ERROR_LICENSE_QUOTA_EXCEEDED = 1395;
+
+	//
+	// MessageId: ERROR_WRONG_TARGET_NAME
+	//
+	// MessageText:
+	//
+	// Logon Failure: The target account name is incorrect.
+	//
+	public static final int ERROR_WRONG_TARGET_NAME = 1396;
+
+	//
+	// MessageId: ERROR_MUTUAL_AUTH_FAILED
+	//
+	// MessageText:
+	//
+	// Mutual Authentication failed. The server's password is out of date at the
+	// domain controller.
+	//
+	public static final int ERROR_MUTUAL_AUTH_FAILED = 1397;
+
+	//
+	// MessageId: ERROR_TIME_SKEW
+	//
+	// MessageText:
+	//
+	// There is a time and/or date difference between the client and server.
+	//
+	public static final int ERROR_TIME_SKEW = 1398;
+
+	//
+	// MessageId: ERROR_CURRENT_DOMAIN_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// This operation cannot be performed on the current domain.
+	//
+	public static final int ERROR_CURRENT_DOMAIN_NOT_ALLOWED = 1399;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =WinUser Error codes=//
+	// =//
+	// =1400 to=1499=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_WINDOW_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid window handle.
+	//
+	public static final int ERROR_INVALID_WINDOW_HANDLE = 1400;
+
+	//
+	// MessageId: ERROR_INVALID_MENU_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid menu handle.
+	//
+	public static final int ERROR_INVALID_MENU_HANDLE = 1401;
+
+	//
+	// MessageId: ERROR_INVALID_CURSOR_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid cursor handle.
+	//
+	public static final int ERROR_INVALID_CURSOR_HANDLE = 1402;
+
+	//
+	// MessageId: ERROR_INVALID_ACCEL_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid accelerator table handle.
+	//
+	public static final int ERROR_INVALID_ACCEL_HANDLE = 1403;
+
+	//
+	// MessageId: ERROR_INVALID_HOOK_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid hook handle.
+	//
+	public static final int ERROR_INVALID_HOOK_HANDLE = 1404;
+
+	//
+	// MessageId: ERROR_INVALID_DWP_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid handle to a multiple-window position structure.
+	//
+	public static final int ERROR_INVALID_DWP_HANDLE = 1405;
+
+	//
+	// MessageId: ERROR_TLW_WITH_WSCHILD
+	//
+	// MessageText:
+	//
+	// Cannot create a top-level child window.
+	//
+	public static final int ERROR_TLW_WITH_WSCHILD = 1406;
+
+	//
+	// MessageId: ERROR_CANNOT_FIND_WND_CLASS
+	//
+	// MessageText:
+	//
+	// Cannot find window class.
+	//
+	public static final int ERROR_CANNOT_FIND_WND_CLASS = 1407;
+
+	//
+	// MessageId: ERROR_WINDOW_OF_OTHER_THREAD
+	//
+	// MessageText:
+	//
+	// Invalid window; it belongs to other thread.
+	//
+	public static final int ERROR_WINDOW_OF_OTHER_THREAD = 1408;
+
+	//
+	// MessageId: ERROR_HOTKEY_ALREADY_REGISTERED
+	//
+	// MessageText:
+	//
+	// Hot key is already registered.
+	//
+	public static final int ERROR_HOTKEY_ALREADY_REGISTERED = 1409;
+
+	//
+	// MessageId: ERROR_CLASS_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// Class already exists.
+	//
+	public static final int ERROR_CLASS_ALREADY_EXISTS = 1410;
+
+	//
+	// MessageId: ERROR_CLASS_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// Class does not exist.
+	//
+	public static final int ERROR_CLASS_DOES_NOT_EXIST = 1411;
+
+	//
+	// MessageId: ERROR_CLASS_HAS_WINDOWS
+	//
+	// MessageText:
+	//
+	// Class still has open windows.
+	//
+	public static final int ERROR_CLASS_HAS_WINDOWS = 1412;
+
+	//
+	// MessageId: ERROR_INVALID_INDEX
+	//
+	// MessageText:
+	//
+	// Invalid index.
+	//
+	public static final int ERROR_INVALID_INDEX = 1413;
+
+	//
+	// MessageId: ERROR_INVALID_ICON_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid icon handle.
+	//
+	public static final int ERROR_INVALID_ICON_HANDLE = 1414;
+
+	//
+	// MessageId: ERROR_PRIVATE_DIALOG_INDEX
+	//
+	// MessageText:
+	//
+	// Using private DIALOG window words.
+	//
+	public static final int ERROR_PRIVATE_DIALOG_INDEX = 1415;
+
+	//
+	// MessageId: ERROR_LISTBOX_ID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The list box identifier was not found.
+	//
+	public static final int ERROR_LISTBOX_ID_NOT_FOUND = 1416;
+
+	//
+	// MessageId: ERROR_NO_WILDCARD_CHARACTERS
+	//
+	// MessageText:
+	//
+	// No wildcards were found.
+	//
+	public static final int ERROR_NO_WILDCARD_CHARACTERS = 1417;
+
+	//
+	// MessageId: ERROR_CLIPBOARD_NOT_OPEN
+	//
+	// MessageText:
+	//
+	// Thread does not have a clipboard open.
+	//
+	public static final int ERROR_CLIPBOARD_NOT_OPEN = 1418;
+
+	//
+	// MessageId: ERROR_HOTKEY_NOT_REGISTERED
+	//
+	// MessageText:
+	//
+	// Hot key is not registered.
+	//
+	public static final int ERROR_HOTKEY_NOT_REGISTERED = 1419;
+
+	//
+	// MessageId: ERROR_WINDOW_NOT_DIALOG
+	//
+	// MessageText:
+	//
+	// The window is not a valid dialog window.
+	//
+	public static final int ERROR_WINDOW_NOT_DIALOG = 1420;
+
+	//
+	// MessageId: ERROR_CONTROL_ID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Control ID not found.
+	//
+	public static final int ERROR_CONTROL_ID_NOT_FOUND = 1421;
+
+	//
+	// MessageId: ERROR_INVALID_COMBOBOX_MESSAGE
+	//
+	// MessageText:
+	//
+	// Invalid message for a combo box because it does not have an edit control.
+	//
+	public static final int ERROR_INVALID_COMBOBOX_MESSAGE = 1422;
+
+	//
+	// MessageId: ERROR_WINDOW_NOT_COMBOBOX
+	//
+	// MessageText:
+	//
+	// The window is not a combo box.
+	//
+	public static final int ERROR_WINDOW_NOT_COMBOBOX = 1423;
+
+	//
+	// MessageId: ERROR_INVALID_EDIT_HEIGHT
+	//
+	// MessageText:
+	//
+	// Height must be less than=256.
+	//
+	public static final int ERROR_INVALID_EDIT_HEIGHT = 1424;
+
+	//
+	// MessageId: ERROR_DC_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Invalid device context (DC) handle.
+	//
+	public static final int ERROR_DC_NOT_FOUND = 1425;
+
+	//
+	// MessageId: ERROR_INVALID_HOOK_FILTER
+	//
+	// MessageText:
+	//
+	// Invalid hook procedure type.
+	//
+	public static final int ERROR_INVALID_HOOK_FILTER = 1426;
+
+	//
+	// MessageId: ERROR_INVALID_FILTER_PROC
+	//
+	// MessageText:
+	//
+	// Invalid hook procedure.
+	//
+	public static final int ERROR_INVALID_FILTER_PROC = 1427;
+
+	//
+	// MessageId: ERROR_HOOK_NEEDS_HMOD
+	//
+	// MessageText:
+	//
+	// Cannot set nonlocal hook without a module handle.
+	//
+	public static final int ERROR_HOOK_NEEDS_HMOD = 1428;
+
+	//
+	// MessageId: ERROR_GLOBAL_ONLY_HOOK
+	//
+	// MessageText:
+	//
+	// This hook procedure can only be set globally.
+	//
+	public static final int ERROR_GLOBAL_ONLY_HOOK = 1429;
+
+	//
+	// MessageId: ERROR_JOURNAL_HOOK_SET
+	//
+	// MessageText:
+	//
+	// The journal hook procedure is already installed.
+	//
+	public static final int ERROR_JOURNAL_HOOK_SET = 1430;
+
+	//
+	// MessageId: ERROR_HOOK_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// The hook procedure is not installed.
+	//
+	public static final int ERROR_HOOK_NOT_INSTALLED = 1431;
+
+	//
+	// MessageId: ERROR_INVALID_LB_MESSAGE
+	//
+	// MessageText:
+	//
+	// Invalid message for single-selection list box.
+	//
+	public static final int ERROR_INVALID_LB_MESSAGE = 1432;
+
+	//
+	// MessageId: ERROR_SETCOUNT_ON_BAD_LB
+	//
+	// MessageText:
+	//
+	// LB_SETCOUNT sent to non-lazy list box.
+	//
+	public static final int ERROR_SETCOUNT_ON_BAD_LB = 1433;
+
+	//
+	// MessageId: ERROR_LB_WITHOUT_TABSTOPS
+	//
+	// MessageText:
+	//
+	// This list box does not support tab stops.
+	//
+	public static final int ERROR_LB_WITHOUT_TABSTOPS = 1434;
+
+	//
+	// MessageId: ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
+	//
+	// MessageText:
+	//
+	// Cannot destroy object created by another thread.
+	//
+	public static final int ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435;
+
+	//
+	// MessageId: ERROR_CHILD_WINDOW_MENU
+	//
+	// MessageText:
+	//
+	// Child windows cannot have menus.
+	//
+	public static final int ERROR_CHILD_WINDOW_MENU = 1436;
+
+	//
+	// MessageId: ERROR_NO_SYSTEM_MENU
+	//
+	// MessageText:
+	//
+	// The window does not have a system menu.
+	//
+	public static final int ERROR_NO_SYSTEM_MENU = 1437;
+
+	//
+	// MessageId: ERROR_INVALID_MSGBOX_STYLE
+	//
+	// MessageText:
+	//
+	// Invalid message box style.
+	//
+	public static final int ERROR_INVALID_MSGBOX_STYLE = 1438;
+
+	//
+	// MessageId: ERROR_INVALID_SPI_VALUE
+	//
+	// MessageText:
+	//
+	// Invalid system-wide (SPI_*) parameter.
+	//
+	public static final int ERROR_INVALID_SPI_VALUE = 1439;
+
+	//
+	// MessageId: ERROR_SCREEN_ALREADY_LOCKED
+	//
+	// MessageText:
+	//
+	// Screen already locked.
+	//
+	public static final int ERROR_SCREEN_ALREADY_LOCKED = 1440;
+
+	//
+	// MessageId: ERROR_HWNDS_HAVE_DIFF_PARENT
+	//
+	// MessageText:
+	//
+	// All handles to windows in a multiple-window position structure must have
+	// the same parent.
+	//
+	public static final int ERROR_HWNDS_HAVE_DIFF_PARENT = 1441;
+
+	//
+	// MessageId: ERROR_NOT_CHILD_WINDOW
+	//
+	// MessageText:
+	//
+	// The window is not a child window.
+	//
+	public static final int ERROR_NOT_CHILD_WINDOW = 1442;
+
+	//
+	// MessageId: ERROR_INVALID_GW_COMMAND
+	//
+	// MessageText:
+	//
+	// Invalid GW_* command.
+	//
+	public static final int ERROR_INVALID_GW_COMMAND = 1443;
+
+	//
+	// MessageId: ERROR_INVALID_THREAD_ID
+	//
+	// MessageText:
+	//
+	// Invalid thread identifier.
+	//
+	public static final int ERROR_INVALID_THREAD_ID = 1444;
+
+	//
+	// MessageId: ERROR_NON_MDICHILD_WINDOW
+	//
+	// MessageText:
+	//
+	// Cannot process a message from a window that is not a multiple document
+	// interface (MDI) window.
+	//
+	public static final int ERROR_NON_MDICHILD_WINDOW = 1445;
+
+	//
+	// MessageId: ERROR_POPUP_ALREADY_ACTIVE
+	//
+	// MessageText:
+	//
+	// Popup menu already active.
+	//
+	public static final int ERROR_POPUP_ALREADY_ACTIVE = 1446;
+
+	//
+	// MessageId: ERROR_NO_SCROLLBARS
+	//
+	// MessageText:
+	//
+	// The window does not have scroll bars.
+	//
+	public static final int ERROR_NO_SCROLLBARS = 1447;
+
+	//
+	// MessageId: ERROR_INVALID_SCROLLBAR_RANGE
+	//
+	// MessageText:
+	//
+	// Scroll bar range cannot be greater than MAXLONG.
+	//
+	public static final int ERROR_INVALID_SCROLLBAR_RANGE = 1448;
+
+	//
+	// MessageId: ERROR_INVALID_SHOWWIN_COMMAND
+	//
+	// MessageText:
+	//
+	// Cannot show or remove the window in the way specified.
+	//
+	public static final int ERROR_INVALID_SHOWWIN_COMMAND = 1449;
+
+	//
+	// MessageId: ERROR_NO_SYSTEM_RESOURCES
+	//
+	// MessageText:
+	//
+	// Insufficient system resources exist to complete the requested service.
+	//
+	public static final int ERROR_NO_SYSTEM_RESOURCES = 1450;
+
+	//
+	// MessageId: ERROR_NONPAGED_SYSTEM_RESOURCES
+	//
+	// MessageText:
+	//
+	// Insufficient system resources exist to complete the requested service.
+	//
+	public static final int ERROR_NONPAGED_SYSTEM_RESOURCES = 1451;
+
+	//
+	// MessageId: ERROR_PAGED_SYSTEM_RESOURCES
+	//
+	// MessageText:
+	//
+	// Insufficient system resources exist to complete the requested service.
+	//
+	public static final int ERROR_PAGED_SYSTEM_RESOURCES = 1452;
+
+	//
+	// MessageId: ERROR_WORKING_SET_QUOTA
+	//
+	// MessageText:
+	//
+	// Insufficient quota to complete the requested service.
+	//
+	public static final int ERROR_WORKING_SET_QUOTA = 1453;
+
+	//
+	// MessageId: ERROR_PAGEFILE_QUOTA
+	//
+	// MessageText:
+	//
+	// Insufficient quota to complete the requested service.
+	//
+	public static final int ERROR_PAGEFILE_QUOTA = 1454;
+
+	//
+	// MessageId: ERROR_COMMITMENT_LIMIT
+	//
+	// MessageText:
+	//
+	// The paging file is too small for this operation to complete.
+	//
+	public static final int ERROR_COMMITMENT_LIMIT = 1455;
+
+	//
+	// MessageId: ERROR_MENU_ITEM_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// A menu item was not found.
+	//
+	public static final int ERROR_MENU_ITEM_NOT_FOUND = 1456;
+
+	//
+	// MessageId: ERROR_INVALID_KEYBOARD_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid keyboard layout handle.
+	//
+	public static final int ERROR_INVALID_KEYBOARD_HANDLE = 1457;
+
+	//
+	// MessageId: ERROR_HOOK_TYPE_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// Hook type not allowed.
+	//
+	public static final int ERROR_HOOK_TYPE_NOT_ALLOWED = 1458;
+
+	//
+	// MessageId: ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION
+	//
+	// MessageText:
+	//
+	// This operation requires an interactive window station.
+	//
+	public static final int ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = 1459;
+
+	//
+	// MessageId: ERROR_TIMEOUT
+	//
+	// MessageText:
+	//
+	// This operation returned because the timeout period expired.
+	//
+	public static final int ERROR_TIMEOUT = 1460;
+
+	//
+	// MessageId: ERROR_INVALID_MONITOR_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid monitor handle.
+	//
+	public static final int ERROR_INVALID_MONITOR_HANDLE = 1461;
+
+	//
+	// MessageId: ERROR_INCORRECT_SIZE
+	//
+	// MessageText:
+	//
+	// Incorrect size argument.
+	//
+	public static final int ERROR_INCORRECT_SIZE = 1462;
+
+	//
+	// MessageId: ERROR_SYMLINK_CLASS_DISABLED
+	//
+	// MessageText:
+	//
+	// The symbolic link cannot be followed because its type is disabled.
+	//
+	public static final int ERROR_SYMLINK_CLASS_DISABLED = 1463;
+
+	//
+	// MessageId: ERROR_SYMLINK_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// This application does not support the current operation on symbolic
+	// links.
+	//
+	public static final int ERROR_SYMLINK_NOT_SUPPORTED = 1464;
+
+	//
+	// MessageId: ERROR_XML_PARSE_ERROR
+	//
+	// MessageText:
+	//
+	// Windows was unable to parse the requested XML data.
+	//
+	public static final int ERROR_XML_PARSE_ERROR = 1465;
+
+	//
+	// MessageId: ERROR_XMLDSIG_ERROR
+	//
+	// MessageText:
+	//
+	// An error was encountered while processing an XML digital signature.
+	//
+	public static final int ERROR_XMLDSIG_ERROR = 1466;
+
+	//
+	// MessageId: ERROR_RESTART_APPLICATION
+	//
+	// MessageText:
+	//
+	// This application must be restarted.
+	//
+	public static final int ERROR_RESTART_APPLICATION = 1467;
+
+	//
+	// MessageId: ERROR_WRONG_COMPARTMENT
+	//
+	// MessageText:
+	//
+	// The caller made the connection request in the wrong routing compartment.
+	//
+	public static final int ERROR_WRONG_COMPARTMENT = 1468;
+
+	//
+	// MessageId: ERROR_AUTHIP_FAILURE
+	//
+	// MessageText:
+	//
+	// There was an AuthIP failure when attempting to connect to the remote
+	// host.
+	//
+	public static final int ERROR_AUTHIP_FAILURE = 1469;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =EventLog Error codes=//
+	// =//
+	// =1500 to=1549=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_EVENTLOG_FILE_CORRUPT
+	//
+	// MessageText:
+	//
+	// The event log file is corrupted.
+	//
+	public static final int ERROR_EVENTLOG_FILE_CORRUPT = 1500;
+
+	//
+	// MessageId: ERROR_EVENTLOG_CANT_START
+	//
+	// MessageText:
+	//
+	// No event log file could be opened, so the event logging service did not
+	// start.
+	//
+	public static final int ERROR_EVENTLOG_CANT_START = 1501;
+
+	//
+	// MessageId: ERROR_LOG_FILE_FULL
+	//
+	// MessageText:
+	//
+	// The event log file is full.
+	//
+	public static final int ERROR_LOG_FILE_FULL = 1502;
+
+	//
+	// MessageId: ERROR_EVENTLOG_FILE_CHANGED
+	//
+	// MessageText:
+	//
+	// The event log file has changed between read operations.
+	//
+	public static final int ERROR_EVENTLOG_FILE_CHANGED = 1503;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Class Scheduler Error codes=//
+	// =//
+	// =1550 to=1599=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_TASK_NAME
+	//
+	// MessageText:
+	//
+	// The specified task name is invalid.
+	//
+	public static final int ERROR_INVALID_TASK_NAME = 1550;
+
+	//
+	// MessageId: ERROR_INVALID_TASK_INDEX
+	//
+	// MessageText:
+	//
+	// The specified task index is invalid.
+	//
+	public static final int ERROR_INVALID_TASK_INDEX = 1551;
+
+	//
+	// MessageId: ERROR_THREAD_ALREADY_IN_TASK
+	//
+	// MessageText:
+	//
+	// The specified thread is already joining a task.
+	//
+	public static final int ERROR_THREAD_ALREADY_IN_TASK = 1552;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =MSI Error codes=//
+	// =//
+	// =1600 to=1699=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INSTALL_SERVICE_FAILURE
+	//
+	// MessageText:
+	//
+	// The Windows Installer Service could not be accessed. This can occur if
+	// the Windows Installer is not correctly installed. Contact your support
+	// personnel for assistance.
+	//
+	public static final int ERROR_INSTALL_SERVICE_FAILURE = 1601;
+
+	//
+	// MessageId: ERROR_INSTALL_USEREXIT
+	//
+	// MessageText:
+	//
+	// User cancelled installation.
+	//
+	public static final int ERROR_INSTALL_USEREXIT = 1602;
+
+	//
+	// MessageId: ERROR_INSTALL_FAILURE
+	//
+	// MessageText:
+	//
+	// Fatal error during installation.
+	//
+	public static final int ERROR_INSTALL_FAILURE = 1603;
+
+	//
+	// MessageId: ERROR_INSTALL_SUSPEND
+	//
+	// MessageText:
+	//
+	// Installation suspended, incomplete.
+	//
+	public static final int ERROR_INSTALL_SUSPEND = 1604;
+
+	//
+	// MessageId: ERROR_UNKNOWN_PRODUCT
+	//
+	// MessageText:
+	//
+	// This action is only valid for products that are currently installed.
+	//
+	public static final int ERROR_UNKNOWN_PRODUCT = 1605;
+
+	//
+	// MessageId: ERROR_UNKNOWN_FEATURE
+	//
+	// MessageText:
+	//
+	// Feature ID not registered.
+	//
+	public static final int ERROR_UNKNOWN_FEATURE = 1606;
+
+	//
+	// MessageId: ERROR_UNKNOWN_COMPONENT
+	//
+	// MessageText:
+	//
+	// Component ID not registered.
+	//
+	public static final int ERROR_UNKNOWN_COMPONENT = 1607;
+
+	//
+	// MessageId: ERROR_UNKNOWN_PROPERTY
+	//
+	// MessageText:
+	//
+	// Unknown property.
+	//
+	public static final int ERROR_UNKNOWN_PROPERTY = 1608;
+
+	//
+	// MessageId: ERROR_INVALID_HANDLE_STATE
+	//
+	// MessageText:
+	//
+	// Handle is in an invalid state.
+	//
+	public static final int ERROR_INVALID_HANDLE_STATE = 1609;
+
+	//
+	// MessageId: ERROR_BAD_CONFIGURATION
+	//
+	// MessageText:
+	//
+	// The configuration data for this product is corrupt. Contact your support
+	// personnel.
+	//
+	public static final int ERROR_BAD_CONFIGURATION = 1610;
+
+	//
+	// MessageId: ERROR_INDEX_ABSENT
+	//
+	// MessageText:
+	//
+	// Component qualifier not present.
+	//
+	public static final int ERROR_INDEX_ABSENT = 1611;
+
+	//
+	// MessageId: ERROR_INSTALL_SOURCE_ABSENT
+	//
+	// MessageText:
+	//
+	// The installation source for this product is not available. Verify that
+	// the source exists and that you can access it.
+	//
+	public static final int ERROR_INSTALL_SOURCE_ABSENT = 1612;
+
+	//
+	// MessageId: ERROR_INSTALL_PACKAGE_VERSION
+	//
+	// MessageText:
+	//
+	// This installation package cannot be installed by the Windows Installer
+	// service. You must install a Windows service pack that contains a newer
+	// version of the Windows Installer service.
+	//
+	public static final int ERROR_INSTALL_PACKAGE_VERSION = 1613;
+
+	//
+	// MessageId: ERROR_PRODUCT_UNINSTALLED
+	//
+	// MessageText:
+	//
+	// Product is uninstalled.
+	//
+	public static final int ERROR_PRODUCT_UNINSTALLED = 1614;
+
+	//
+	// MessageId: ERROR_BAD_QUERY_SYNTAX
+	//
+	// MessageText:
+	//
+	// SQL query syntax invalid or unsupported.
+	//
+	public static final int ERROR_BAD_QUERY_SYNTAX = 1615;
+
+	//
+	// MessageId: ERROR_INVALID_FIELD
+	//
+	// MessageText:
+	//
+	// Record field does not exist.
+	//
+	public static final int ERROR_INVALID_FIELD = 1616;
+
+	//
+	// MessageId: ERROR_DEVICE_REMOVED
+	//
+	// MessageText:
+	//
+	// The device has been removed.
+	//
+	public static final int ERROR_DEVICE_REMOVED = 1617;
+
+	//
+	// MessageId: ERROR_INSTALL_ALREADY_RUNNING
+	//
+	// MessageText:
+	//
+	// Another installation is already in progress. Complete that installation
+	// before proceeding with this install.
+	//
+	public static final int ERROR_INSTALL_ALREADY_RUNNING = 1618;
+
+	//
+	// MessageId: ERROR_INSTALL_PACKAGE_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// This installation package could not be opened. Verify that the package
+	// exists and that you can access it, or contact the application vendor to
+	// verify that this is a valid Windows Installer package.
+	//
+	public static final int ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619;
+
+	//
+	// MessageId: ERROR_INSTALL_PACKAGE_INVALID
+	//
+	// MessageText:
+	//
+	// This installation package could not be opened. Contact the application
+	// vendor to verify that this is a valid Windows Installer package.
+	//
+	public static final int ERROR_INSTALL_PACKAGE_INVALID = 1620;
+
+	//
+	// MessageId: ERROR_INSTALL_UI_FAILURE
+	//
+	// MessageText:
+	//
+	// There was an error starting the Windows Installer service user interface.
+	// Contact your support personnel.
+	//
+	public static final int ERROR_INSTALL_UI_FAILURE = 1621;
+
+	//
+	// MessageId: ERROR_INSTALL_LOG_FAILURE
+	//
+	// MessageText:
+	//
+	// Error opening installation log file. Verify that the specified log file
+	// location exists and that you can write to it.
+	//
+	public static final int ERROR_INSTALL_LOG_FAILURE = 1622;
+
+	//
+	// MessageId: ERROR_INSTALL_LANGUAGE_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// The language of this installation package is not supported by your
+	// system.
+	//
+	public static final int ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623;
+
+	//
+	// MessageId: ERROR_INSTALL_TRANSFORM_FAILURE
+	//
+	// MessageText:
+	//
+	// Error applying transforms. Verify that the specified transform paths are
+	// valid.
+	//
+	public static final int ERROR_INSTALL_TRANSFORM_FAILURE = 1624;
+
+	//
+	// MessageId: ERROR_INSTALL_PACKAGE_REJECTED
+	//
+	// MessageText:
+	//
+	// This installation is forbidden by system policy. Contact your system
+	// administrator.
+	//
+	public static final int ERROR_INSTALL_PACKAGE_REJECTED = 1625;
+
+	//
+	// MessageId: ERROR_FUNCTION_NOT_CALLED
+	//
+	// MessageText:
+	//
+	// Function could not be executed.
+	//
+	public static final int ERROR_FUNCTION_NOT_CALLED = 1626;
+
+	//
+	// MessageId: ERROR_FUNCTION_FAILED
+	//
+	// MessageText:
+	//
+	// Function failed during execution.
+	//
+	public static final int ERROR_FUNCTION_FAILED = 1627;
+
+	//
+	// MessageId: ERROR_INVALID_TABLE
+	//
+	// MessageText:
+	//
+	// Invalid or unknown table specified.
+	//
+	public static final int ERROR_INVALID_TABLE = 1628;
+
+	//
+	// MessageId: ERROR_DATATYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// Data supplied is of wrong type.
+	//
+	public static final int ERROR_DATATYPE_MISMATCH = 1629;
+
+	//
+	// MessageId: ERROR_UNSUPPORTED_TYPE
+	//
+	// MessageText:
+	//
+	// Data of this type is not supported.
+	//
+	public static final int ERROR_UNSUPPORTED_TYPE = 1630;
+
+	//
+	// MessageId: ERROR_CREATE_FAILED
+	//
+	// MessageText:
+	//
+	// The Windows Installer service failed to start. Contact your support
+	// personnel.
+	//
+	public static final int ERROR_CREATE_FAILED = 1631;
+
+	//
+	// MessageId: ERROR_INSTALL_TEMP_UNWRITABLE
+	//
+	// MessageText:
+	//
+	// The Temp folder is on a drive that is full or is inaccessible. Free up
+	// space on the drive or verify that you have write permission on the Temp
+	// folder.
+	//
+	public static final int ERROR_INSTALL_TEMP_UNWRITABLE = 1632;
+
+	//
+	// MessageId: ERROR_INSTALL_PLATFORM_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// This installation package is not supported by this processor type.
+	// Contact your product vendor.
+	//
+	public static final int ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633;
+
+	//
+	// MessageId: ERROR_INSTALL_NOTUSED
+	//
+	// MessageText:
+	//
+	// Component not used on this computer.
+	//
+	public static final int ERROR_INSTALL_NOTUSED = 1634;
+
+	//
+	// MessageId: ERROR_PATCH_PACKAGE_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// This update package could not be opened. Verify that the update package
+	// exists and that you can access it, or contact the application vendor to
+	// verify that this is a valid Windows Installer update package.
+	//
+	public static final int ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635;
+
+	//
+	// MessageId: ERROR_PATCH_PACKAGE_INVALID
+	//
+	// MessageText:
+	//
+	// This update package could not be opened. Contact the application vendor
+	// to verify that this is a valid Windows Installer update package.
+	//
+	public static final int ERROR_PATCH_PACKAGE_INVALID = 1636;
+
+	//
+	// MessageId: ERROR_PATCH_PACKAGE_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// This update package cannot be processed by the Windows Installer service.
+	// You must install a Windows service pack that contains a newer version of
+	// the Windows Installer service.
+	//
+	public static final int ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637;
+
+	//
+	// MessageId: ERROR_PRODUCT_VERSION
+	//
+	// MessageText:
+	//
+	// Another version of this product is already installed. Installation of
+	// this version cannot continue. To configure or remove the existing version
+	// of this product, use Add/Remove Programs on the Control Panel.
+	//
+	public static final int ERROR_PRODUCT_VERSION = 1638;
+
+	//
+	// MessageId: ERROR_INVALID_COMMAND_LINE
+	//
+	// MessageText:
+	//
+	// Invalid command line argument. Consult the Windows Installer SDK for
+	// detailed command line help.
+	//
+	public static final int ERROR_INVALID_COMMAND_LINE = 1639;
+
+	//
+	// MessageId: ERROR_INSTALL_REMOTE_DISALLOWED
+	//
+	// MessageText:
+	//
+	// Only administrators have permission to add, remove, or configure server
+	// software during a Terminal services remote session. If you want to
+	// install or configure software on the server, contact your network
+	// administrator.
+	//
+	public static final int ERROR_INSTALL_REMOTE_DISALLOWED = 1640;
+
+	//
+	// MessageId: ERROR_SUCCESS_REBOOT_INITIATED
+	//
+	// MessageText:
+	//
+	// The requested operation completed successfully. The system will be
+	// restarted so the changes can take effect.
+	//
+	public static final int ERROR_SUCCESS_REBOOT_INITIATED = 1641;
+
+	//
+	// MessageId: ERROR_PATCH_TARGET_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The upgrade cannot be installed by the Windows Installer service because
+	// the program to be upgraded may be missing, or the upgrade may update a
+	// different version of the program. Verify that the program to be upgraded
+	// exists on your computer and that you have the correct upgrade.
+	//
+	public static final int ERROR_PATCH_TARGET_NOT_FOUND = 1642;
+
+	//
+	// MessageId: ERROR_PATCH_PACKAGE_REJECTED
+	//
+	// MessageText:
+	//
+	// The update package is not permitted by software restriction policy.
+	//
+	public static final int ERROR_PATCH_PACKAGE_REJECTED = 1643;
+
+	//
+	// MessageId: ERROR_INSTALL_TRANSFORM_REJECTED
+	//
+	// MessageText:
+	//
+	// One or more customizations are not permitted by software restriction
+	// policy.
+	//
+	public static final int ERROR_INSTALL_TRANSFORM_REJECTED = 1644;
+
+	//
+	// MessageId: ERROR_INSTALL_REMOTE_PROHIBITED
+	//
+	// MessageText:
+	//
+	// The Windows Installer does not permit installation from a Remote Desktop
+	// Connection.
+	//
+	public static final int ERROR_INSTALL_REMOTE_PROHIBITED = 1645;
+
+	//
+	// MessageId: ERROR_PATCH_REMOVAL_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// Uninstallation of the update package is not supported.
+	//
+	public static final int ERROR_PATCH_REMOVAL_UNSUPPORTED = 1646;
+
+	//
+	// MessageId: ERROR_UNKNOWN_PATCH
+	//
+	// MessageText:
+	//
+	// The update is not applied to this product.
+	//
+	public static final int ERROR_UNKNOWN_PATCH = 1647;
+
+	//
+	// MessageId: ERROR_PATCH_NO_SEQUENCE
+	//
+	// MessageText:
+	//
+	// No valid sequence could be found for the set of updates.
+	//
+	public static final int ERROR_PATCH_NO_SEQUENCE = 1648;
+
+	//
+	// MessageId: ERROR_PATCH_REMOVAL_DISALLOWED
+	//
+	// MessageText:
+	//
+	// Update removal was disallowed by policy.
+	//
+	public static final int ERROR_PATCH_REMOVAL_DISALLOWED = 1649;
+
+	//
+	// MessageId: ERROR_INVALID_PATCH_XML
+	//
+	// MessageText:
+	//
+	// The XML update data is invalid.
+	//
+	public static final int ERROR_INVALID_PATCH_XML = 1650;
+
+	//
+	// MessageId: ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT
+	//
+	// MessageText:
+	//
+	// Windows Installer does not permit updating of managed advertised
+	// products. At least one feature of the product must be installed before
+	// applying the update.
+	//
+	public static final int ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT = 1651;
+
+	//
+	// MessageId: ERROR_INSTALL_SERVICE_SAFEBOOT
+	//
+	// MessageText:
+	//
+	// The Windows Installer service is not accessible in Safe Mode. Please try
+	// again when your computer is not in Safe Mode or you can use System
+	// Restore to return your machine to a previous good state.
+	//
+	public static final int ERROR_INSTALL_SERVICE_SAFEBOOT = 1652;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =RPC Error codes=//
+	// =//
+	// =1700 to=1999=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: RPC_S_INVALID_STRING_BINDING
+	//
+	// MessageText:
+	//
+	// The string binding is invalid.
+	//
+	public static final int RPC_S_INVALID_STRING_BINDING = 1700;
+
+	//
+	// MessageId: RPC_S_WRONG_KIND_OF_BINDING
+	//
+	// MessageText:
+	//
+	// The binding handle is not the correct type.
+	//
+	public static final int RPC_S_WRONG_KIND_OF_BINDING = 1701;
+
+	//
+	// MessageId: RPC_S_INVALID_BINDING
+	//
+	// MessageText:
+	//
+	// The binding handle is invalid.
+	//
+	public static final int RPC_S_INVALID_BINDING = 1702;
+
+	//
+	// MessageId: RPC_S_PROTSEQ_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The RPC protocol sequence is not supported.
+	//
+	public static final int RPC_S_PROTSEQ_NOT_SUPPORTED = 1703;
+
+	//
+	// MessageId: RPC_S_INVALID_RPC_PROTSEQ
+	//
+	// MessageText:
+	//
+	// The RPC protocol sequence is invalid.
+	//
+	public static final int RPC_S_INVALID_RPC_PROTSEQ = 1704;
+
+	//
+	// MessageId: RPC_S_INVALID_STRING_UUID
+	//
+	// MessageText:
+	//
+	// The string universal unique identifier (UUID) is invalid.
+	//
+	public static final int RPC_S_INVALID_STRING_UUID = 1705;
+
+	//
+	// MessageId: RPC_S_INVALID_ENDPOINT_FORMAT
+	//
+	// MessageText:
+	//
+	// The endpoint format is invalid.
+	//
+	public static final int RPC_S_INVALID_ENDPOINT_FORMAT = 1706;
+
+	//
+	// MessageId: RPC_S_INVALID_NET_ADDR
+	//
+	// MessageText:
+	//
+	// The network address is invalid.
+	//
+	public static final int RPC_S_INVALID_NET_ADDR = 1707;
+
+	//
+	// MessageId: RPC_S_NO_ENDPOINT_FOUND
+	//
+	// MessageText:
+	//
+	// No endpoint was found.
+	//
+	public static final int RPC_S_NO_ENDPOINT_FOUND = 1708;
+
+	//
+	// MessageId: RPC_S_INVALID_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The timeout value is invalid.
+	//
+	public static final int RPC_S_INVALID_TIMEOUT = 1709;
+
+	//
+	// MessageId: RPC_S_OBJECT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The object universal unique identifier (UUID) was not found.
+	//
+	public static final int RPC_S_OBJECT_NOT_FOUND = 1710;
+
+	//
+	// MessageId: RPC_S_ALREADY_REGISTERED
+	//
+	// MessageText:
+	//
+	// The object universal unique identifier (UUID) has already been
+	// registered.
+	//
+	public static final int RPC_S_ALREADY_REGISTERED = 1711;
+
+	//
+	// MessageId: RPC_S_TYPE_ALREADY_REGISTERED
+	//
+	// MessageText:
+	//
+	// The type universal unique identifier (UUID) has already been registered.
+	//
+	public static final int RPC_S_TYPE_ALREADY_REGISTERED = 1712;
+
+	//
+	// MessageId: RPC_S_ALREADY_LISTENING
+	//
+	// MessageText:
+	//
+	// The RPC server is already listening.
+	//
+	public static final int RPC_S_ALREADY_LISTENING = 1713;
+
+	//
+	// MessageId: RPC_S_NO_PROTSEQS_REGISTERED
+	//
+	// MessageText:
+	//
+	// No protocol sequences have been registered.
+	//
+	public static final int RPC_S_NO_PROTSEQS_REGISTERED = 1714;
+
+	//
+	// MessageId: RPC_S_NOT_LISTENING
+	//
+	// MessageText:
+	//
+	// The RPC server is not listening.
+	//
+	public static final int RPC_S_NOT_LISTENING = 1715;
+
+	//
+	// MessageId: RPC_S_UNKNOWN_MGR_TYPE
+	//
+	// MessageText:
+	//
+	// The manager type is unknown.
+	//
+	public static final int RPC_S_UNKNOWN_MGR_TYPE = 1716;
+
+	//
+	// MessageId: RPC_S_UNKNOWN_IF
+	//
+	// MessageText:
+	//
+	// The interface is unknown.
+	//
+	public static final int RPC_S_UNKNOWN_IF = 1717;
+
+	//
+	// MessageId: RPC_S_NO_BINDINGS
+	//
+	// MessageText:
+	//
+	// There are no bindings.
+	//
+	public static final int RPC_S_NO_BINDINGS = 1718;
+
+	//
+	// MessageId: RPC_S_NO_PROTSEQS
+	//
+	// MessageText:
+	//
+	// There are no protocol sequences.
+	//
+	public static final int RPC_S_NO_PROTSEQS = 1719;
+
+	//
+	// MessageId: RPC_S_CANT_CREATE_ENDPOINT
+	//
+	// MessageText:
+	//
+	// The endpoint cannot be created.
+	//
+	public static final int RPC_S_CANT_CREATE_ENDPOINT = 1720;
+
+	//
+	// MessageId: RPC_S_OUT_OF_RESOURCES
+	//
+	// MessageText:
+	//
+	// Not enough resources are available to complete this operation.
+	//
+	public static final int RPC_S_OUT_OF_RESOURCES = 1721;
+
+	//
+	// MessageId: RPC_S_SERVER_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The RPC server is unavailable.
+	//
+	public static final int RPC_S_SERVER_UNAVAILABLE = 1722;
+
+	//
+	// MessageId: RPC_S_SERVER_TOO_BUSY
+	//
+	// MessageText:
+	//
+	// The RPC server is too busy to complete this operation.
+	//
+	public static final int RPC_S_SERVER_TOO_BUSY = 1723;
+
+	//
+	// MessageId: RPC_S_INVALID_NETWORK_OPTIONS
+	//
+	// MessageText:
+	//
+	// The network options are invalid.
+	//
+	public static final int RPC_S_INVALID_NETWORK_OPTIONS = 1724;
+
+	//
+	// MessageId: RPC_S_NO_CALL_ACTIVE
+	//
+	// MessageText:
+	//
+	// There are no remote procedure calls active on this thread.
+	//
+	public static final int RPC_S_NO_CALL_ACTIVE = 1725;
+
+	//
+	// MessageId: RPC_S_CALL_FAILED
+	//
+	// MessageText:
+	//
+	// The remote procedure call failed.
+	//
+	public static final int RPC_S_CALL_FAILED = 1726;
+
+	//
+	// MessageId: RPC_S_CALL_FAILED_DNE
+	//
+	// MessageText:
+	//
+	// The remote procedure call failed and did not execute.
+	//
+	public static final int RPC_S_CALL_FAILED_DNE = 1727;
+
+	//
+	// MessageId: RPC_S_PROTOCOL_ERROR
+	//
+	// MessageText:
+	//
+	// A remote procedure call (RPC) protocol error occurred.
+	//
+	public static final int RPC_S_PROTOCOL_ERROR = 1728;
+
+	//
+	// MessageId: RPC_S_PROXY_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// Access to the HTTP proxy is denied.
+	//
+	public static final int RPC_S_PROXY_ACCESS_DENIED = 1729;
+
+	//
+	// MessageId: RPC_S_UNSUPPORTED_TRANS_SYN
+	//
+	// MessageText:
+	//
+	// The transfer syntax is not supported by the RPC server.
+	//
+	public static final int RPC_S_UNSUPPORTED_TRANS_SYN = 1730;
+
+	//
+	// MessageId: RPC_S_UNSUPPORTED_TYPE
+	//
+	// MessageText:
+	//
+	// The universal unique identifier (UUID) type is not supported.
+	//
+	public static final int RPC_S_UNSUPPORTED_TYPE = 1732;
+
+	//
+	// MessageId: RPC_S_INVALID_TAG
+	//
+	// MessageText:
+	//
+	// The tag is invalid.
+	//
+	public static final int RPC_S_INVALID_TAG = 1733;
+
+	//
+	// MessageId: RPC_S_INVALID_BOUND
+	//
+	// MessageText:
+	//
+	// The array bounds are invalid.
+	//
+	public static final int RPC_S_INVALID_BOUND = 1734;
+
+	//
+	// MessageId: RPC_S_NO_ENTRY_NAME
+	//
+	// MessageText:
+	//
+	// The binding does not contain an entry name.
+	//
+	public static final int RPC_S_NO_ENTRY_NAME = 1735;
+
+	//
+	// MessageId: RPC_S_INVALID_NAME_SYNTAX
+	//
+	// MessageText:
+	//
+	// The name syntax is invalid.
+	//
+	public static final int RPC_S_INVALID_NAME_SYNTAX = 1736;
+
+	//
+	// MessageId: RPC_S_UNSUPPORTED_NAME_SYNTAX
+	//
+	// MessageText:
+	//
+	// The name syntax is not supported.
+	//
+	public static final int RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737;
+
+	//
+	// MessageId: RPC_S_UUID_NO_ADDRESS
+	//
+	// MessageText:
+	//
+	// No network address is available to use to construct a universal unique
+	// identifier (UUID).
+	//
+	public static final int RPC_S_UUID_NO_ADDRESS = 1739;
+
+	//
+	// MessageId: RPC_S_DUPLICATE_ENDPOINT
+	//
+	// MessageText:
+	//
+	// The endpoint is a duplicate.
+	//
+	public static final int RPC_S_DUPLICATE_ENDPOINT = 1740;
+
+	//
+	// MessageId: RPC_S_UNKNOWN_AUTHN_TYPE
+	//
+	// MessageText:
+	//
+	// The authentication type is unknown.
+	//
+	public static final int RPC_S_UNKNOWN_AUTHN_TYPE = 1741;
+
+	//
+	// MessageId: RPC_S_MAX_CALLS_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The maximum number of calls is too small.
+	//
+	public static final int RPC_S_MAX_CALLS_TOO_SMALL = 1742;
+
+	//
+	// MessageId: RPC_S_STRING_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The string is too long.
+	//
+	public static final int RPC_S_STRING_TOO_LONG = 1743;
+
+	//
+	// MessageId: RPC_S_PROTSEQ_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The RPC protocol sequence was not found.
+	//
+	public static final int RPC_S_PROTSEQ_NOT_FOUND = 1744;
+
+	//
+	// MessageId: RPC_S_PROCNUM_OUT_OF_RANGE
+	//
+	// MessageText:
+	//
+	// The procedure number is out of range.
+	//
+	public static final int RPC_S_PROCNUM_OUT_OF_RANGE = 1745;
+
+	//
+	// MessageId: RPC_S_BINDING_HAS_NO_AUTH
+	//
+	// MessageText:
+	//
+	// The binding does not contain any authentication information.
+	//
+	public static final int RPC_S_BINDING_HAS_NO_AUTH = 1746;
+
+	//
+	// MessageId: RPC_S_UNKNOWN_AUTHN_SERVICE
+	//
+	// MessageText:
+	//
+	// The authentication service is unknown.
+	//
+	public static final int RPC_S_UNKNOWN_AUTHN_SERVICE = 1747;
+
+	//
+	// MessageId: RPC_S_UNKNOWN_AUTHN_LEVEL
+	//
+	// MessageText:
+	//
+	// The authentication level is unknown.
+	//
+	public static final int RPC_S_UNKNOWN_AUTHN_LEVEL = 1748;
+
+	//
+	// MessageId: RPC_S_INVALID_AUTH_IDENTITY
+	//
+	// MessageText:
+	//
+	// The security context is invalid.
+	//
+	public static final int RPC_S_INVALID_AUTH_IDENTITY = 1749;
+
+	//
+	// MessageId: RPC_S_UNKNOWN_AUTHZ_SERVICE
+	//
+	// MessageText:
+	//
+	// The authorization service is unknown.
+	//
+	public static final int RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750;
+
+	//
+	// MessageId: EPT_S_INVALID_ENTRY
+	//
+	// MessageText:
+	//
+	// The entry is invalid.
+	//
+	public static final int EPT_S_INVALID_ENTRY = 1751;
+
+	//
+	// MessageId: EPT_S_CANT_PERFORM_OP
+	//
+	// MessageText:
+	//
+	// The server endpoint cannot perform the operation.
+	//
+	public static final int EPT_S_CANT_PERFORM_OP = 1752;
+
+	//
+	// MessageId: EPT_S_NOT_REGISTERED
+	//
+	// MessageText:
+	//
+	// There are no more endpoints available from the endpoint mapper.
+	//
+	public static final int EPT_S_NOT_REGISTERED = 1753;
+
+	//
+	// MessageId: RPC_S_NOTHING_TO_EXPORT
+	//
+	// MessageText:
+	//
+	// No interfaces have been exported.
+	//
+	public static final int RPC_S_NOTHING_TO_EXPORT = 1754;
+
+	//
+	// MessageId: RPC_S_INCOMPLETE_NAME
+	//
+	// MessageText:
+	//
+	// The entry name is incomplete.
+	//
+	public static final int RPC_S_INCOMPLETE_NAME = 1755;
+
+	//
+	// MessageId: RPC_S_INVALID_VERS_OPTION
+	//
+	// MessageText:
+	//
+	// The version option is invalid.
+	//
+	public static final int RPC_S_INVALID_VERS_OPTION = 1756;
+
+	//
+	// MessageId: RPC_S_NO_MORE_MEMBERS
+	//
+	// MessageText:
+	//
+	// There are no more members.
+	//
+	public static final int RPC_S_NO_MORE_MEMBERS = 1757;
+
+	//
+	// MessageId: RPC_S_NOT_ALL_OBJS_UNEXPORTED
+	//
+	// MessageText:
+	//
+	// There is nothing to unexport.
+	//
+	public static final int RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758;
+
+	//
+	// MessageId: RPC_S_INTERFACE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The interface was not found.
+	//
+	public static final int RPC_S_INTERFACE_NOT_FOUND = 1759;
+
+	//
+	// MessageId: RPC_S_ENTRY_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The entry already exists.
+	//
+	public static final int RPC_S_ENTRY_ALREADY_EXISTS = 1760;
+
+	//
+	// MessageId: RPC_S_ENTRY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The entry is not found.
+	//
+	public static final int RPC_S_ENTRY_NOT_FOUND = 1761;
+
+	//
+	// MessageId: RPC_S_NAME_SERVICE_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The name service is unavailable.
+	//
+	public static final int RPC_S_NAME_SERVICE_UNAVAILABLE = 1762;
+
+	//
+	// MessageId: RPC_S_INVALID_NAF_ID
+	//
+	// MessageText:
+	//
+	// The network address family is invalid.
+	//
+	public static final int RPC_S_INVALID_NAF_ID = 1763;
+
+	//
+	// MessageId: RPC_S_CANNOT_SUPPORT
+	//
+	// MessageText:
+	//
+	// The requested operation is not supported.
+	//
+	public static final int RPC_S_CANNOT_SUPPORT = 1764;
+
+	//
+	// MessageId: RPC_S_NO_CONTEXT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// No security context is available to allow impersonation.
+	//
+	public static final int RPC_S_NO_CONTEXT_AVAILABLE = 1765;
+
+	//
+	// MessageId: RPC_S_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal error occurred in a remote procedure call (RPC).
+	//
+	public static final int RPC_S_INTERNAL_ERROR = 1766;
+
+	//
+	// MessageId: RPC_S_ZERO_DIVIDE
+	//
+	// MessageText:
+	//
+	// The RPC server attempted an integer division by zero.
+	//
+	public static final int RPC_S_ZERO_DIVIDE = 1767;
+
+	//
+	// MessageId: RPC_S_ADDRESS_ERROR
+	//
+	// MessageText:
+	//
+	// An addressing error occurred in the RPC server.
+	//
+	public static final int RPC_S_ADDRESS_ERROR = 1768;
+
+	//
+	// MessageId: RPC_S_FP_DIV_ZERO
+	//
+	// MessageText:
+	//
+	// A floating-point operation at the RPC server caused a division by zero.
+	//
+	public static final int RPC_S_FP_DIV_ZERO = 1769;
+
+	//
+	// MessageId: RPC_S_FP_UNDERFLOW
+	//
+	// MessageText:
+	//
+	// A floating-point underflow occurred at the RPC server.
+	//
+	public static final int RPC_S_FP_UNDERFLOW = 1770;
+
+	//
+	// MessageId: RPC_S_FP_OVERFLOW
+	//
+	// MessageText:
+	//
+	// A floating-point overflow occurred at the RPC server.
+	//
+	public static final int RPC_S_FP_OVERFLOW = 1771;
+
+	//
+	// MessageId: RPC_X_NO_MORE_ENTRIES
+	//
+	// MessageText:
+	//
+	// The list of RPC servers available for the binding of auto handles has
+	// been exhausted.
+	//
+	public static final int RPC_X_NO_MORE_ENTRIES = 1772;
+
+	//
+	// MessageId: RPC_X_SS_CHAR_TRANS_OPEN_FAIL
+	//
+	// MessageText:
+	//
+	// Unable to open the character translation table file.
+	//
+	public static final int RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773;
+
+	//
+	// MessageId: RPC_X_SS_CHAR_TRANS_SHORT_FILE
+	//
+	// MessageText:
+	//
+	// The file containing the character translation table has fewer than=512
+	// bytes.
+	//
+	public static final int RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774;
+
+	//
+	// MessageId: RPC_X_SS_IN_NULL_CONTEXT
+	//
+	// MessageText:
+	//
+	// A null context handle was passed from the client to the host during a
+	// remote procedure call.
+	//
+	public static final int RPC_X_SS_IN_NULL_CONTEXT = 1775;
+
+	//
+	// MessageId: RPC_X_SS_CONTEXT_DAMAGED
+	//
+	// MessageText:
+	//
+	// The context handle changed during a remote procedure call.
+	//
+	public static final int RPC_X_SS_CONTEXT_DAMAGED = 1777;
+
+	//
+	// MessageId: RPC_X_SS_HANDLES_MISMATCH
+	//
+	// MessageText:
+	//
+	// The binding handles passed to a remote procedure call do not match.
+	//
+	public static final int RPC_X_SS_HANDLES_MISMATCH = 1778;
+
+	//
+	// MessageId: RPC_X_SS_CANNOT_GET_CALL_HANDLE
+	//
+	// MessageText:
+	//
+	// The stub is unable to get the remote procedure call handle.
+	//
+	public static final int RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779;
+
+	//
+	// MessageId: RPC_X_NULL_REF_POINTER
+	//
+	// MessageText:
+	//
+	// A null reference pointer was passed to the stub.
+	//
+	public static final int RPC_X_NULL_REF_POINTER = 1780;
+
+	//
+	// MessageId: RPC_X_ENUM_VALUE_OUT_OF_RANGE
+	//
+	// MessageText:
+	//
+	// The enumeration value is out of range.
+	//
+	public static final int RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781;
+
+	//
+	// MessageId: RPC_X_BYTE_COUNT_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The byte count is too small.
+	//
+	public static final int RPC_X_BYTE_COUNT_TOO_SMALL = 1782;
+
+	//
+	// MessageId: RPC_X_BAD_STUB_DATA
+	//
+	// MessageText:
+	//
+	// The stub received bad data.
+	//
+	public static final int RPC_X_BAD_STUB_DATA = 1783;
+
+	//
+	// MessageId: ERROR_INVALID_USER_BUFFER
+	//
+	// MessageText:
+	//
+	// The supplied user buffer is not valid for the requested operation.
+	//
+	public static final int ERROR_INVALID_USER_BUFFER = 1784;
+
+	//
+	// MessageId: ERROR_UNRECOGNIZED_MEDIA
+	//
+	// MessageText:
+	//
+	// The disk media is not recognized. It may not be formatted.
+	//
+	public static final int ERROR_UNRECOGNIZED_MEDIA = 1785;
+
+	//
+	// MessageId: ERROR_NO_TRUST_LSA_SECRET
+	//
+	// MessageText:
+	//
+	// The workstation does not have a trust secret.
+	//
+	public static final int ERROR_NO_TRUST_LSA_SECRET = 1786;
+
+	//
+	// MessageId: ERROR_NO_TRUST_SAM_ACCOUNT
+	//
+	// MessageText:
+	//
+	// The security database on the server does not have a computer account for
+	// this workstation trust relationship.
+	//
+	public static final int ERROR_NO_TRUST_SAM_ACCOUNT = 1787;
+
+	//
+	// MessageId: ERROR_TRUSTED_DOMAIN_FAILURE
+	//
+	// MessageText:
+	//
+	// The trust relationship between the primary domain and the trusted domain
+	// failed.
+	//
+	public static final int ERROR_TRUSTED_DOMAIN_FAILURE = 1788;
+
+	//
+	// MessageId: ERROR_TRUSTED_RELATIONSHIP_FAILURE
+	//
+	// MessageText:
+	//
+	// The trust relationship between this workstation and the primary domain
+	// failed.
+	//
+	public static final int ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789;
+
+	//
+	// MessageId: ERROR_TRUST_FAILURE
+	//
+	// MessageText:
+	//
+	// The network logon failed.
+	//
+	public static final int ERROR_TRUST_FAILURE = 1790;
+
+	//
+	// MessageId: RPC_S_CALL_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// A remote procedure call is already in progress for this thread.
+	//
+	public static final int RPC_S_CALL_IN_PROGRESS = 1791;
+
+	//
+	// MessageId: ERROR_NETLOGON_NOT_STARTED
+	//
+	// MessageText:
+	//
+	// An attempt was made to logon, but the network logon service was not
+	// started.
+	//
+	public static final int ERROR_NETLOGON_NOT_STARTED = 1792;
+
+	//
+	// MessageId: ERROR_ACCOUNT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The user's account has expired.
+	//
+	public static final int ERROR_ACCOUNT_EXPIRED = 1793;
+
+	//
+	// MessageId: ERROR_REDIRECTOR_HAS_OPEN_HANDLES
+	//
+	// MessageText:
+	//
+	// The redirector is in use and cannot be unloaded.
+	//
+	public static final int ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794;
+
+	//
+	// MessageId: ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
+	//
+	// MessageText:
+	//
+	// The specified printer driver is already installed.
+	//
+	public static final int ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795;
+
+	//
+	// MessageId: ERROR_UNKNOWN_PORT
+	//
+	// MessageText:
+	//
+	// The specified port is unknown.
+	//
+	public static final int ERROR_UNKNOWN_PORT = 1796;
+
+	//
+	// MessageId: ERROR_UNKNOWN_PRINTER_DRIVER
+	//
+	// MessageText:
+	//
+	// The printer driver is unknown.
+	//
+	public static final int ERROR_UNKNOWN_PRINTER_DRIVER = 1797;
+
+	//
+	// MessageId: ERROR_UNKNOWN_PRINTPROCESSOR
+	//
+	// MessageText:
+	//
+	// The print processor is unknown.
+	//
+	public static final int ERROR_UNKNOWN_PRINTPROCESSOR = 1798;
+
+	//
+	// MessageId: ERROR_INVALID_SEPARATOR_FILE
+	//
+	// MessageText:
+	//
+	// The specified separator file is invalid.
+	//
+	public static final int ERROR_INVALID_SEPARATOR_FILE = 1799;
+
+	//
+	// MessageId: ERROR_INVALID_PRIORITY
+	//
+	// MessageText:
+	//
+	// The specified priority is invalid.
+	//
+	public static final int ERROR_INVALID_PRIORITY = 1800;
+
+	//
+	// MessageId: ERROR_INVALID_PRINTER_NAME
+	//
+	// MessageText:
+	//
+	// The printer name is invalid.
+	//
+	public static final int ERROR_INVALID_PRINTER_NAME = 1801;
+
+	//
+	// MessageId: ERROR_PRINTER_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The printer already exists.
+	//
+	public static final int ERROR_PRINTER_ALREADY_EXISTS = 1802;
+
+	//
+	// MessageId: ERROR_INVALID_PRINTER_COMMAND
+	//
+	// MessageText:
+	//
+	// The printer command is invalid.
+	//
+	public static final int ERROR_INVALID_PRINTER_COMMAND = 1803;
+
+	//
+	// MessageId: ERROR_INVALID_DATATYPE
+	//
+	// MessageText:
+	//
+	// The specified datatype is invalid.
+	//
+	public static final int ERROR_INVALID_DATATYPE = 1804;
+
+	//
+	// MessageId: ERROR_INVALID_ENVIRONMENT
+	//
+	// MessageText:
+	//
+	// The environment specified is invalid.
+	//
+	public static final int ERROR_INVALID_ENVIRONMENT = 1805;
+
+	//
+	// MessageId: RPC_S_NO_MORE_BINDINGS
+	//
+	// MessageText:
+	//
+	// There are no more bindings.
+	//
+	public static final int RPC_S_NO_MORE_BINDINGS = 1806;
+
+	//
+	// MessageId: ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
+	//
+	// MessageText:
+	//
+	// The account used is an interdomain trust account. Use your global user
+	// account or local user account to access this server.
+	//
+	public static final int ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807;
+
+	//
+	// MessageId: ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
+	//
+	// MessageText:
+	//
+	// The account used is a computer account. Use your global user account or
+	// local user account to access this server.
+	//
+	public static final int ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808;
+
+	//
+	// MessageId: ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
+	//
+	// MessageText:
+	//
+	// The account used is a server trust account. Use your global user account
+	// or local user account to access this server.
+	//
+	public static final int ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809;
+
+	//
+	// MessageId: ERROR_DOMAIN_TRUST_INCONSISTENT
+	//
+	// MessageText:
+	//
+	// The name or security ID (SID) of the domain specified is inconsistent
+	// with the trust information for that domain.
+	//
+	public static final int ERROR_DOMAIN_TRUST_INCONSISTENT = 1810;
+
+	//
+	// MessageId: ERROR_SERVER_HAS_OPEN_HANDLES
+	//
+	// MessageText:
+	//
+	// The server is in use and cannot be unloaded.
+	//
+	public static final int ERROR_SERVER_HAS_OPEN_HANDLES = 1811;
+
+	//
+	// MessageId: ERROR_RESOURCE_DATA_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified image file did not contain a resource section.
+	//
+	public static final int ERROR_RESOURCE_DATA_NOT_FOUND = 1812;
+
+	//
+	// MessageId: ERROR_RESOURCE_TYPE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified resource type cannot be found in the image file.
+	//
+	public static final int ERROR_RESOURCE_TYPE_NOT_FOUND = 1813;
+
+	//
+	// MessageId: ERROR_RESOURCE_NAME_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified resource name cannot be found in the image file.
+	//
+	public static final int ERROR_RESOURCE_NAME_NOT_FOUND = 1814;
+
+	//
+	// MessageId: ERROR_RESOURCE_LANG_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified resource language ID cannot be found in the image file.
+	//
+	public static final int ERROR_RESOURCE_LANG_NOT_FOUND = 1815;
+
+	//
+	// MessageId: ERROR_NOT_ENOUGH_QUOTA
+	//
+	// MessageText:
+	//
+	// Not enough quota is available to process this command.
+	//
+	public static final int ERROR_NOT_ENOUGH_QUOTA = 1816;
+
+	//
+	// MessageId: RPC_S_NO_INTERFACES
+	//
+	// MessageText:
+	//
+	// No interfaces have been registered.
+	//
+	public static final int RPC_S_NO_INTERFACES = 1817;
+
+	//
+	// MessageId: RPC_S_CALL_CANCELLED
+	//
+	// MessageText:
+	//
+	// The remote procedure call was cancelled.
+	//
+	public static final int RPC_S_CALL_CANCELLED = 1818;
+
+	//
+	// MessageId: RPC_S_BINDING_INCOMPLETE
+	//
+	// MessageText:
+	//
+	// The binding handle does not contain all required information.
+	//
+	public static final int RPC_S_BINDING_INCOMPLETE = 1819;
+
+	//
+	// MessageId: RPC_S_COMM_FAILURE
+	//
+	// MessageText:
+	//
+	// A communications failure occurred during a remote procedure call.
+	//
+	public static final int RPC_S_COMM_FAILURE = 1820;
+
+	//
+	// MessageId: RPC_S_UNSUPPORTED_AUTHN_LEVEL
+	//
+	// MessageText:
+	//
+	// The requested authentication level is not supported.
+	//
+	public static final int RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821;
+
+	//
+	// MessageId: RPC_S_NO_PRINC_NAME
+	//
+	// MessageText:
+	//
+	// No principal name registered.
+	//
+	public static final int RPC_S_NO_PRINC_NAME = 1822;
+
+	//
+	// MessageId: RPC_S_NOT_RPC_ERROR
+	//
+	// MessageText:
+	//
+	// The error specified is not a valid Windows RPC error code.
+	//
+	public static final int RPC_S_NOT_RPC_ERROR = 1823;
+
+	//
+	// MessageId: RPC_S_UUID_LOCAL_ONLY
+	//
+	// MessageText:
+	//
+	// A UUID that is valid only on this computer has been allocated.
+	//
+	public static final int RPC_S_UUID_LOCAL_ONLY = 1824;
+
+	//
+	// MessageId: RPC_S_SEC_PKG_ERROR
+	//
+	// MessageText:
+	//
+	// A security package specific error occurred.
+	//
+	public static final int RPC_S_SEC_PKG_ERROR = 1825;
+
+	//
+	// MessageId: RPC_S_NOT_CANCELLED
+	//
+	// MessageText:
+	//
+	// Thread is not canceled.
+	//
+	public static final int RPC_S_NOT_CANCELLED = 1826;
+
+	//
+	// MessageId: RPC_X_INVALID_ES_ACTION
+	//
+	// MessageText:
+	//
+	// Invalid operation on the encoding/decoding handle.
+	//
+	public static final int RPC_X_INVALID_ES_ACTION = 1827;
+
+	//
+	// MessageId: RPC_X_WRONG_ES_VERSION
+	//
+	// MessageText:
+	//
+	// Incompatible version of the serializing package.
+	//
+	public static final int RPC_X_WRONG_ES_VERSION = 1828;
+
+	//
+	// MessageId: RPC_X_WRONG_STUB_VERSION
+	//
+	// MessageText:
+	//
+	// Incompatible version of the RPC stub.
+	//
+	public static final int RPC_X_WRONG_STUB_VERSION = 1829;
+
+	//
+	// MessageId: RPC_X_INVALID_PIPE_OBJECT
+	//
+	// MessageText:
+	//
+	// The RPC pipe object is invalid or corrupted.
+	//
+	public static final int RPC_X_INVALID_PIPE_OBJECT = 1830;
+
+	//
+	// MessageId: RPC_X_WRONG_PIPE_ORDER
+	//
+	// MessageText:
+	//
+	// An invalid operation was attempted on an RPC pipe object.
+	//
+	public static final int RPC_X_WRONG_PIPE_ORDER = 1831;
+
+	//
+	// MessageId: RPC_X_WRONG_PIPE_VERSION
+	//
+	// MessageText:
+	//
+	// Unsupported RPC pipe version.
+	//
+	public static final int RPC_X_WRONG_PIPE_VERSION = 1832;
+
+	//
+	// MessageId: RPC_S_GROUP_MEMBER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The group member was not found.
+	//
+	public static final int RPC_S_GROUP_MEMBER_NOT_FOUND = 1898;
+
+	//
+	// MessageId: EPT_S_CANT_CREATE
+	//
+	// MessageText:
+	//
+	// The endpoint mapper database entry could not be created.
+	//
+	public static final int EPT_S_CANT_CREATE = 1899;
+
+	//
+	// MessageId: RPC_S_INVALID_OBJECT
+	//
+	// MessageText:
+	//
+	// The object universal unique identifier (UUID) is the nil UUID.
+	//
+	public static final int RPC_S_INVALID_OBJECT = 1900;
+
+	//
+	// MessageId: ERROR_INVALID_TIME
+	//
+	// MessageText:
+	//
+	// The specified time is invalid.
+	//
+	public static final int ERROR_INVALID_TIME = 1901;
+
+	//
+	// MessageId: ERROR_INVALID_FORM_NAME
+	//
+	// MessageText:
+	//
+	// The specified form name is invalid.
+	//
+	public static final int ERROR_INVALID_FORM_NAME = 1902;
+
+	//
+	// MessageId: ERROR_INVALID_FORM_SIZE
+	//
+	// MessageText:
+	//
+	// The specified form size is invalid.
+	//
+	public static final int ERROR_INVALID_FORM_SIZE = 1903;
+
+	//
+	// MessageId: ERROR_ALREADY_WAITING
+	//
+	// MessageText:
+	//
+	// The specified printer handle is already being waited on
+	//
+	public static final int ERROR_ALREADY_WAITING = 1904;
+
+	//
+	// MessageId: ERROR_PRINTER_DELETED
+	//
+	// MessageText:
+	//
+	// The specified printer has been deleted.
+	//
+	public static final int ERROR_PRINTER_DELETED = 1905;
+
+	//
+	// MessageId: ERROR_INVALID_PRINTER_STATE
+	//
+	// MessageText:
+	//
+	// The state of the printer is invalid.
+	//
+	public static final int ERROR_INVALID_PRINTER_STATE = 1906;
+
+	//
+	// MessageId: ERROR_PASSWORD_MUST_CHANGE
+	//
+	// MessageText:
+	//
+	// The user's password must be changed before logging on the first time.
+	//
+	public static final int ERROR_PASSWORD_MUST_CHANGE = 1907;
+
+	//
+	// MessageId: ERROR_DOMAIN_CONTROLLER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Could not find the domain controller for this domain.
+	//
+	public static final int ERROR_DOMAIN_CONTROLLER_NOT_FOUND = 1908;
+
+	//
+	// MessageId: ERROR_ACCOUNT_LOCKED_OUT
+	//
+	// MessageText:
+	//
+	// The referenced account is currently locked out and may not be logged on
+	// to.
+	//
+	public static final int ERROR_ACCOUNT_LOCKED_OUT = 1909;
+
+	//
+	// MessageId: OR_INVALID_OXID
+	//
+	// MessageText:
+	//
+	// The object exporter specified was not found.
+	//
+	public static final int OR_INVALID_OXID = 1910;
+
+	//
+	// MessageId: OR_INVALID_OID
+	//
+	// MessageText:
+	//
+	// The object specified was not found.
+	//
+	public static final int OR_INVALID_OID = 1911;
+
+	//
+	// MessageId: OR_INVALID_SET
+	//
+	// MessageText:
+	//
+	// The object resolver set specified was not found.
+	//
+	public static final int OR_INVALID_SET = 1912;
+
+	//
+	// MessageId: RPC_S_SEND_INCOMPLETE
+	//
+	// MessageText:
+	//
+	// Some data remains to be sent in the request buffer.
+	//
+	public static final int RPC_S_SEND_INCOMPLETE = 1913;
+
+	//
+	// MessageId: RPC_S_INVALID_ASYNC_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid asynchronous remote procedure call handle.
+	//
+	public static final int RPC_S_INVALID_ASYNC_HANDLE = 1914;
+
+	//
+	// MessageId: RPC_S_INVALID_ASYNC_CALL
+	//
+	// MessageText:
+	//
+	// Invalid asynchronous RPC call handle for this operation.
+	//
+	public static final int RPC_S_INVALID_ASYNC_CALL = 1915;
+
+	//
+	// MessageId: RPC_X_PIPE_CLOSED
+	//
+	// MessageText:
+	//
+	// The RPC pipe object has already been closed.
+	//
+	public static final int RPC_X_PIPE_CLOSED = 1916;
+
+	//
+	// MessageId: RPC_X_PIPE_DISCIPLINE_ERROR
+	//
+	// MessageText:
+	//
+	// The RPC call completed before all pipes were processed.
+	//
+	public static final int RPC_X_PIPE_DISCIPLINE_ERROR = 1917;
+
+	//
+	// MessageId: RPC_X_PIPE_EMPTY
+	//
+	// MessageText:
+	//
+	// No more data is available from the RPC pipe.
+	//
+	public static final int RPC_X_PIPE_EMPTY = 1918;
+
+	//
+	// MessageId: ERROR_NO_SITENAME
+	//
+	// MessageText:
+	//
+	// No site name is available for this machine.
+	//
+	public static final int ERROR_NO_SITENAME = 1919;
+
+	//
+	// MessageId: ERROR_CANT_ACCESS_FILE
+	//
+	// MessageText:
+	//
+	// The file cannot be accessed by the system.
+	//
+	public static final int ERROR_CANT_ACCESS_FILE = 1920;
+
+	//
+	// MessageId: ERROR_CANT_RESOLVE_FILENAME
+	//
+	// MessageText:
+	//
+	// The name of the file cannot be resolved by the system.
+	//
+	public static final int ERROR_CANT_RESOLVE_FILENAME = 1921;
+
+	//
+	// MessageId: RPC_S_ENTRY_TYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// The entry is not of the expected type.
+	//
+	public static final int RPC_S_ENTRY_TYPE_MISMATCH = 1922;
+
+	//
+	// MessageId: RPC_S_NOT_ALL_OBJS_EXPORTED
+	//
+	// MessageText:
+	//
+	// Not all object UUIDs could be exported to the specified entry.
+	//
+	public static final int RPC_S_NOT_ALL_OBJS_EXPORTED = 1923;
+
+	//
+	// MessageId: RPC_S_INTERFACE_NOT_EXPORTED
+	//
+	// MessageText:
+	//
+	// Interface could not be exported to the specified entry.
+	//
+	public static final int RPC_S_INTERFACE_NOT_EXPORTED = 1924;
+
+	//
+	// MessageId: RPC_S_PROFILE_NOT_ADDED
+	//
+	// MessageText:
+	//
+	// The specified profile entry could not be added.
+	//
+	public static final int RPC_S_PROFILE_NOT_ADDED = 1925;
+
+	//
+	// MessageId: RPC_S_PRF_ELT_NOT_ADDED
+	//
+	// MessageText:
+	//
+	// The specified profile element could not be added.
+	//
+	public static final int RPC_S_PRF_ELT_NOT_ADDED = 1926;
+
+	//
+	// MessageId: RPC_S_PRF_ELT_NOT_REMOVED
+	//
+	// MessageText:
+	//
+	// The specified profile element could not be removed.
+	//
+	public static final int RPC_S_PRF_ELT_NOT_REMOVED = 1927;
+
+	//
+	// MessageId: RPC_S_GRP_ELT_NOT_ADDED
+	//
+	// MessageText:
+	//
+	// The group element could not be added.
+	//
+	public static final int RPC_S_GRP_ELT_NOT_ADDED = 1928;
+
+	//
+	// MessageId: RPC_S_GRP_ELT_NOT_REMOVED
+	//
+	// MessageText:
+	//
+	// The group element could not be removed.
+	//
+	public static final int RPC_S_GRP_ELT_NOT_REMOVED = 1929;
+
+	//
+	// MessageId: ERROR_KM_DRIVER_BLOCKED
+	//
+	// MessageText:
+	//
+	// The printer driver is not compatible with a policy enabled on your
+	// computer that blocks NT=4.0 drivers.
+	//
+	public static final int ERROR_KM_DRIVER_BLOCKED = 1930;
+
+	//
+	// MessageId: ERROR_CONTEXT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The context has expired and can no longer be used.
+	//
+	public static final int ERROR_CONTEXT_EXPIRED = 1931;
+
+	//
+	// MessageId: ERROR_PER_USER_TRUST_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The current user's delegated trust creation quota has been exceeded.
+	//
+	public static final int ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = 1932;
+
+	//
+	// MessageId: ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The total delegated trust creation quota has been exceeded.
+	//
+	public static final int ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = 1933;
+
+	//
+	// MessageId: ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The current user's delegated trust deletion quota has been exceeded.
+	//
+	public static final int ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED = 1934;
+
+	//
+	// MessageId: ERROR_AUTHENTICATION_FIREWALL_FAILED
+	//
+	// MessageText:
+	//
+	// Logon Failure: The machine you are logging onto is protected by an
+	// authentication firewall. The specified account is not allowed to
+	// authenticate to the machine.
+	//
+	public static final int ERROR_AUTHENTICATION_FIREWALL_FAILED = 1935;
+
+	//
+	// MessageId: ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED
+	//
+	// MessageText:
+	//
+	// Remote connections to the Print Spooler are blocked by a policy set on
+	// your machine.
+	//
+	public static final int ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED = 1936;
+
+	//
+	// MessageId: ERROR_NTLM_BLOCKED
+	//
+	// MessageText:
+	//
+	// Logon Failure: Authentication failed because NTLM authentication has been
+	// disabled.
+	//
+	public static final int ERROR_NTLM_BLOCKED = 1937;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =OpenGL Error codes=//
+	// =//
+	// =2000 to=2009=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_PIXEL_FORMAT
+	//
+	// MessageText:
+	//
+	// The pixel format is invalid.
+	//
+	public static final int ERROR_INVALID_PIXEL_FORMAT = 2000;
+
+	//
+	// MessageId: ERROR_BAD_DRIVER
+	//
+	// MessageText:
+	//
+	// The specified driver is invalid.
+	//
+	public static final int ERROR_BAD_DRIVER = 2001;
+
+	//
+	// MessageId: ERROR_INVALID_WINDOW_STYLE
+	//
+	// MessageText:
+	//
+	// The window style or class attribute is invalid for this operation.
+	//
+	public static final int ERROR_INVALID_WINDOW_STYLE = 2002;
+
+	//
+	// MessageId: ERROR_METAFILE_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested metafile operation is not supported.
+	//
+	public static final int ERROR_METAFILE_NOT_SUPPORTED = 2003;
+
+	//
+	// MessageId: ERROR_TRANSFORM_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested transformation operation is not supported.
+	//
+	public static final int ERROR_TRANSFORM_NOT_SUPPORTED = 2004;
+
+	//
+	// MessageId: ERROR_CLIPPING_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested clipping operation is not supported.
+	//
+	public static final int ERROR_CLIPPING_NOT_SUPPORTED = 2005;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// Image Color Management Error codes //
+	// =//
+	// =2010 to=2049=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_CMM
+	//
+	// MessageText:
+	//
+	// The specified color management module is invalid.
+	//
+	public static final int ERROR_INVALID_CMM = 2010;
+
+	//
+	// MessageId: ERROR_INVALID_PROFILE
+	//
+	// MessageText:
+	//
+	// The specified color profile is invalid.
+	//
+	public static final int ERROR_INVALID_PROFILE = 2011;
+
+	//
+	// MessageId: ERROR_TAG_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified tag was not found.
+	//
+	public static final int ERROR_TAG_NOT_FOUND = 2012;
+
+	//
+	// MessageId: ERROR_TAG_NOT_PRESENT
+	//
+	// MessageText:
+	//
+	// A required tag is not present.
+	//
+	public static final int ERROR_TAG_NOT_PRESENT = 2013;
+
+	//
+	// MessageId: ERROR_DUPLICATE_TAG
+	//
+	// MessageText:
+	//
+	// The specified tag is already present.
+	//
+	public static final int ERROR_DUPLICATE_TAG = 2014;
+
+	//
+	// MessageId: ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE
+	//
+	// MessageText:
+	//
+	// The specified color profile is not associated with the specified device.
+	//
+	public static final int ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015;
+
+	//
+	// MessageId: ERROR_PROFILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified color profile was not found.
+	//
+	public static final int ERROR_PROFILE_NOT_FOUND = 2016;
+
+	//
+	// MessageId: ERROR_INVALID_COLORSPACE
+	//
+	// MessageText:
+	//
+	// The specified color space is invalid.
+	//
+	public static final int ERROR_INVALID_COLORSPACE = 2017;
+
+	//
+	// MessageId: ERROR_ICM_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// Image Color Management is not enabled.
+	//
+	public static final int ERROR_ICM_NOT_ENABLED = 2018;
+
+	//
+	// MessageId: ERROR_DELETING_ICM_XFORM
+	//
+	// MessageText:
+	//
+	// There was an error while deleting the color transform.
+	//
+	public static final int ERROR_DELETING_ICM_XFORM = 2019;
+
+	//
+	// MessageId: ERROR_INVALID_TRANSFORM
+	//
+	// MessageText:
+	//
+	// The specified color transform is invalid.
+	//
+	public static final int ERROR_INVALID_TRANSFORM = 2020;
+
+	//
+	// MessageId: ERROR_COLORSPACE_MISMATCH
+	//
+	// MessageText:
+	//
+	// The specified transform does not match the bitmap's color space.
+	//
+	public static final int ERROR_COLORSPACE_MISMATCH = 2021;
+
+	//
+	// MessageId: ERROR_INVALID_COLORINDEX
+	//
+	// MessageText:
+	//
+	// The specified named color index is not present in the profile.
+	//
+	public static final int ERROR_INVALID_COLORINDEX = 2022;
+
+	//
+	// MessageId: ERROR_PROFILE_DOES_NOT_MATCH_DEVICE
+	//
+	// MessageText:
+	//
+	// The specified profile is intended for a device of a different type than
+	// the specified device.
+	//
+	public static final int ERROR_PROFILE_DOES_NOT_MATCH_DEVICE = 2023;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Winnet32 Error codes=//
+	// =//
+	// =2100 to=2999=//
+	// =//
+	// The range=2100 through=2999 is reserved for //
+	// network status codes. See lmerr.h for a //
+	// complete listing=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_CONNECTED_OTHER_PASSWORD
+	//
+	// MessageText:
+	//
+	// The network connection was made successfully, but the user had to be
+	// prompted for a password other than the one originally specified.
+	//
+	public static final int ERROR_CONNECTED_OTHER_PASSWORD = 2108;
+
+	//
+	// MessageId: ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
+	//
+	// MessageText:
+	//
+	// The network connection was made successfully using default credentials.
+	//
+	public static final int ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT = 2109;
+
+	//
+	// MessageId: ERROR_BAD_USERNAME
+	//
+	// MessageText:
+	//
+	// The specified username is invalid.
+	//
+	public static final int ERROR_BAD_USERNAME = 2202;
+
+	//
+	// MessageId: ERROR_NOT_CONNECTED
+	//
+	// MessageText:
+	//
+	// This network connection does not exist.
+	//
+	public static final int ERROR_NOT_CONNECTED = 2250;
+
+	//
+	// MessageId: ERROR_OPEN_FILES
+	//
+	// MessageText:
+	//
+	// This network connection has files open or requests pending.
+	//
+	public static final int ERROR_OPEN_FILES = 2401;
+
+	//
+	// MessageId: ERROR_ACTIVE_CONNECTIONS
+	//
+	// MessageText:
+	//
+	// Active connections still exist.
+	//
+	public static final int ERROR_ACTIVE_CONNECTIONS = 2402;
+
+	//
+	// MessageId: ERROR_DEVICE_IN_USE
+	//
+	// MessageText:
+	//
+	// The device is in use by an active process and cannot be disconnected.
+	//
+	public static final int ERROR_DEVICE_IN_USE = 2404;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Win32 Spooler Error codes=//
+	// =//
+	// =3000 to=3049=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_UNKNOWN_PRINT_MONITOR
+	//
+	// MessageText:
+	//
+	// The specified print monitor is unknown.
+	//
+	public static final int ERROR_UNKNOWN_PRINT_MONITOR = 3000;
+
+	//
+	// MessageId: ERROR_PRINTER_DRIVER_IN_USE
+	//
+	// MessageText:
+	//
+	// The specified printer driver is currently in use.
+	//
+	public static final int ERROR_PRINTER_DRIVER_IN_USE = 3001;
+
+	//
+	// MessageId: ERROR_SPOOL_FILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The spool file was not found.
+	//
+	public static final int ERROR_SPOOL_FILE_NOT_FOUND = 3002;
+
+	//
+	// MessageId: ERROR_SPL_NO_STARTDOC
+	//
+	// MessageText:
+	//
+	// A StartDocPrinter call was not issued.
+	//
+	public static final int ERROR_SPL_NO_STARTDOC = 3003;
+
+	//
+	// MessageId: ERROR_SPL_NO_ADDJOB
+	//
+	// MessageText:
+	//
+	// An AddJob call was not issued.
+	//
+	public static final int ERROR_SPL_NO_ADDJOB = 3004;
+
+	//
+	// MessageId: ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED
+	//
+	// MessageText:
+	//
+	// The specified print processor has already been installed.
+	//
+	public static final int ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005;
+
+	//
+	// MessageId: ERROR_PRINT_MONITOR_ALREADY_INSTALLED
+	//
+	// MessageText:
+	//
+	// The specified print monitor has already been installed.
+	//
+	public static final int ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006;
+
+	//
+	// MessageId: ERROR_INVALID_PRINT_MONITOR
+	//
+	// MessageText:
+	//
+	// The specified print monitor does not have the required functions.
+	//
+	public static final int ERROR_INVALID_PRINT_MONITOR = 3007;
+
+	//
+	// MessageId: ERROR_PRINT_MONITOR_IN_USE
+	//
+	// MessageText:
+	//
+	// The specified print monitor is currently in use.
+	//
+	public static final int ERROR_PRINT_MONITOR_IN_USE = 3008;
+
+	//
+	// MessageId: ERROR_PRINTER_HAS_JOBS_QUEUED
+	//
+	// MessageText:
+	//
+	// The requested operation is not allowed when there are jobs queued to the
+	// printer.
+	//
+	public static final int ERROR_PRINTER_HAS_JOBS_QUEUED = 3009;
+
+	//
+	// MessageId: ERROR_SUCCESS_REBOOT_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation is successful. Changes will not be effective
+	// until the system is rebooted.
+	//
+	public static final int ERROR_SUCCESS_REBOOT_REQUIRED = 3010;
+
+	//
+	// MessageId: ERROR_SUCCESS_RESTART_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation is successful. Changes will not be effective
+	// until the service is restarted.
+	//
+	public static final int ERROR_SUCCESS_RESTART_REQUIRED = 3011;
+
+	//
+	// MessageId: ERROR_PRINTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// No printers were found.
+	//
+	public static final int ERROR_PRINTER_NOT_FOUND = 3012;
+
+	//
+	// MessageId: ERROR_PRINTER_DRIVER_WARNED
+	//
+	// MessageText:
+	//
+	// The printer driver is known to be unreliable.
+	//
+	public static final int ERROR_PRINTER_DRIVER_WARNED = 3013;
+
+	//
+	// MessageId: ERROR_PRINTER_DRIVER_BLOCKED
+	//
+	// MessageText:
+	//
+	// The printer driver is known to harm the system.
+	//
+	public static final int ERROR_PRINTER_DRIVER_BLOCKED = 3014;
+
+	//
+	// MessageId: ERROR_PRINTER_DRIVER_PACKAGE_IN_USE
+	//
+	// MessageText:
+	//
+	// The specified printer driver package is currently in use.
+	//
+	public static final int ERROR_PRINTER_DRIVER_PACKAGE_IN_USE = 3015;
+
+	//
+	// MessageId: ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Unable to find a core driver package that is required by the printer
+	// driver package.
+	//
+	public static final int ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND = 3016;
+
+	//
+	// MessageId: ERROR_FAIL_REBOOT_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation failed. A system reboot is required to roll back
+	// changes made.
+	//
+	public static final int ERROR_FAIL_REBOOT_REQUIRED = 3017;
+
+	//
+	// MessageId: ERROR_FAIL_REBOOT_INITIATED
+	//
+	// MessageText:
+	//
+	// The requested operation failed. A system reboot has been initiated to
+	// roll back changes made.
+	//
+	public static final int ERROR_FAIL_REBOOT_INITIATED = 3018;
+
+	//
+	// MessageId: ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED
+	//
+	// MessageText:
+	//
+	// The specified printer driver was not found on the system and needs to be
+	// downloaded.
+	//
+	public static final int ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED = 3019;
+
+	//
+	// MessageId: ERROR_PRINT_JOB_RESTART_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested print job has failed to print. A print system update
+	// requires the job to be resubmitted.
+	//
+	public static final int ERROR_PRINT_JOB_RESTART_REQUIRED = 3020;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =3050 to=3899=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =IO Error Codes=//
+	// =//
+	// =3900 to=3999=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_IO_REISSUE_AS_CACHED
+	//
+	// MessageText:
+	//
+	// Reissue the given operation as a cached IO operation
+	//
+	public static final int ERROR_IO_REISSUE_AS_CACHED = 3950;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Wins Error codes=//
+	// =//
+	// =4000 to=4049=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_WINS_INTERNAL
+	//
+	// MessageText:
+	//
+	// WINS encountered an error while processing the command.
+	//
+	public static final int ERROR_WINS_INTERNAL = 4000;
+
+	//
+	// MessageId: ERROR_CAN_NOT_DEL_LOCAL_WINS
+	//
+	// MessageText:
+	//
+	// The local WINS cannot be deleted.
+	//
+	public static final int ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001;
+
+	//
+	// MessageId: ERROR_STATIC_INIT
+	//
+	// MessageText:
+	//
+	// The importation from the file failed.
+	//
+	public static final int ERROR_STATIC_INIT = 4002;
+
+	//
+	// MessageId: ERROR_INC_BACKUP
+	//
+	// MessageText:
+	//
+	// The backup failed. Was a full backup done before?
+	//
+	public static final int ERROR_INC_BACKUP = 4003;
+
+	//
+	// MessageId: ERROR_FULL_BACKUP
+	//
+	// MessageText:
+	//
+	// The backup failed. Check the directory to which you are backing the
+	// database.
+	//
+	public static final int ERROR_FULL_BACKUP = 4004;
+
+	//
+	// MessageId: ERROR_REC_NON_EXISTENT
+	//
+	// MessageText:
+	//
+	// The name does not exist in the WINS database.
+	//
+	public static final int ERROR_REC_NON_EXISTENT = 4005;
+
+	//
+	// MessageId: ERROR_RPL_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// Replication with a nonconfigured partner is not allowed.
+	//
+	public static final int ERROR_RPL_NOT_ALLOWED = 4006;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =4050 to=4099=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =DHCP Error codes=//
+	// =//
+	// =4100 to=4149=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_DHCP_ADDRESS_CONFLICT
+	//
+	// MessageText:
+	//
+	// The DHCP client has obtained an IP address that is already in use on the
+	// network. The local interface will be disabled until the DHCP client can
+	// obtain a new address.
+	//
+	public static final int ERROR_DHCP_ADDRESS_CONFLICT = 4100;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =4150 to=4199=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =WMI Error codes=//
+	// =//
+	// =4200 to=4249=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_WMI_GUID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The GUID passed was not recognized as valid by a WMI data provider.
+	//
+	public static final int ERROR_WMI_GUID_NOT_FOUND = 4200;
+
+	//
+	// MessageId: ERROR_WMI_INSTANCE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The instance name passed was not recognized as valid by a WMI data
+	// provider.
+	//
+	public static final int ERROR_WMI_INSTANCE_NOT_FOUND = 4201;
+
+	//
+	// MessageId: ERROR_WMI_ITEMID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The data item ID passed was not recognized as valid by a WMI data
+	// provider.
+	//
+	public static final int ERROR_WMI_ITEMID_NOT_FOUND = 4202;
+
+	//
+	// MessageId: ERROR_WMI_TRY_AGAIN
+	//
+	// MessageText:
+	//
+	// The WMI request could not be completed and should be retried.
+	//
+	public static final int ERROR_WMI_TRY_AGAIN = 4203;
+
+	//
+	// MessageId: ERROR_WMI_DP_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The WMI data provider could not be located.
+	//
+	public static final int ERROR_WMI_DP_NOT_FOUND = 4204;
+
+	//
+	// MessageId: ERROR_WMI_UNRESOLVED_INSTANCE_REF
+	//
+	// MessageText:
+	//
+	// The WMI data provider references an instance set that has not been
+	// registered.
+	//
+	public static final int ERROR_WMI_UNRESOLVED_INSTANCE_REF = 4205;
+
+	//
+	// MessageId: ERROR_WMI_ALREADY_ENABLED
+	//
+	// MessageText:
+	//
+	// The WMI data block or event notification has already been enabled.
+	//
+	public static final int ERROR_WMI_ALREADY_ENABLED = 4206;
+
+	//
+	// MessageId: ERROR_WMI_GUID_DISCONNECTED
+	//
+	// MessageText:
+	//
+	// The WMI data block is no longer available.
+	//
+	public static final int ERROR_WMI_GUID_DISCONNECTED = 4207;
+
+	//
+	// MessageId: ERROR_WMI_SERVER_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The WMI data service is not available.
+	//
+	public static final int ERROR_WMI_SERVER_UNAVAILABLE = 4208;
+
+	//
+	// MessageId: ERROR_WMI_DP_FAILED
+	//
+	// MessageText:
+	//
+	// The WMI data provider failed to carry out the request.
+	//
+	public static final int ERROR_WMI_DP_FAILED = 4209;
+
+	//
+	// MessageId: ERROR_WMI_INVALID_MOF
+	//
+	// MessageText:
+	//
+	// The WMI MOF information is not valid.
+	//
+	public static final int ERROR_WMI_INVALID_MOF = 4210;
+
+	//
+	// MessageId: ERROR_WMI_INVALID_REGINFO
+	//
+	// MessageText:
+	//
+	// The WMI registration information is not valid.
+	//
+	public static final int ERROR_WMI_INVALID_REGINFO = 4211;
+
+	//
+	// MessageId: ERROR_WMI_ALREADY_DISABLED
+	//
+	// MessageText:
+	//
+	// The WMI data block or event notification has already been disabled.
+	//
+	public static final int ERROR_WMI_ALREADY_DISABLED = 4212;
+
+	//
+	// MessageId: ERROR_WMI_READ_ONLY
+	//
+	// MessageText:
+	//
+	// The WMI data item or data block is read only.
+	//
+	public static final int ERROR_WMI_READ_ONLY = 4213;
+
+	//
+	// MessageId: ERROR_WMI_SET_FAILURE
+	//
+	// MessageText:
+	//
+	// The WMI data item or data block could not be changed.
+	//
+	public static final int ERROR_WMI_SET_FAILURE = 4214;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =4250 to=4299=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =RSM (Media Services) Error codes //
+	// =//
+	// =4300 to=4349=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_MEDIA
+	//
+	// MessageText:
+	//
+	// The media identifier does not represent a valid medium.
+	//
+	public static final int ERROR_INVALID_MEDIA = 4300;
+
+	//
+	// MessageId: ERROR_INVALID_LIBRARY
+	//
+	// MessageText:
+	//
+	// The library identifier does not represent a valid library.
+	//
+	public static final int ERROR_INVALID_LIBRARY = 4301;
+
+	//
+	// MessageId: ERROR_INVALID_MEDIA_POOL
+	//
+	// MessageText:
+	//
+	// The media pool identifier does not represent a valid media pool.
+	//
+	public static final int ERROR_INVALID_MEDIA_POOL = 4302;
+
+	//
+	// MessageId: ERROR_DRIVE_MEDIA_MISMATCH
+	//
+	// MessageText:
+	//
+	// The drive and medium are not compatible or exist in different libraries.
+	//
+	public static final int ERROR_DRIVE_MEDIA_MISMATCH = 4303;
+
+	//
+	// MessageId: ERROR_MEDIA_OFFLINE
+	//
+	// MessageText:
+	//
+	// The medium currently exists in an offline library and must be online to
+	// perform this operation.
+	//
+	public static final int ERROR_MEDIA_OFFLINE = 4304;
+
+	//
+	// MessageId: ERROR_LIBRARY_OFFLINE
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed on an offline library.
+	//
+	public static final int ERROR_LIBRARY_OFFLINE = 4305;
+
+	//
+	// MessageId: ERROR_EMPTY
+	//
+	// MessageText:
+	//
+	// The library, drive, or media pool is empty.
+	//
+	public static final int ERROR_EMPTY = 4306;
+
+	//
+	// MessageId: ERROR_NOT_EMPTY
+	//
+	// MessageText:
+	//
+	// The library, drive, or media pool must be empty to perform this
+	// operation.
+	//
+	public static final int ERROR_NOT_EMPTY = 4307;
+
+	//
+	// MessageId: ERROR_MEDIA_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// No media is currently available in this media pool or library.
+	//
+	public static final int ERROR_MEDIA_UNAVAILABLE = 4308;
+
+	//
+	// MessageId: ERROR_RESOURCE_DISABLED
+	//
+	// MessageText:
+	//
+	// A resource required for this operation is disabled.
+	//
+	public static final int ERROR_RESOURCE_DISABLED = 4309;
+
+	//
+	// MessageId: ERROR_INVALID_CLEANER
+	//
+	// MessageText:
+	//
+	// The media identifier does not represent a valid cleaner.
+	//
+	public static final int ERROR_INVALID_CLEANER = 4310;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_CLEAN
+	//
+	// MessageText:
+	//
+	// The drive cannot be cleaned or does not support cleaning.
+	//
+	public static final int ERROR_UNABLE_TO_CLEAN = 4311;
+
+	//
+	// MessageId: ERROR_OBJECT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The object identifier does not represent a valid object.
+	//
+	public static final int ERROR_OBJECT_NOT_FOUND = 4312;
+
+	//
+	// MessageId: ERROR_DATABASE_FAILURE
+	//
+	// MessageText:
+	//
+	// Unable to read from or write to the database.
+	//
+	public static final int ERROR_DATABASE_FAILURE = 4313;
+
+	//
+	// MessageId: ERROR_DATABASE_FULL
+	//
+	// MessageText:
+	//
+	// The database is full.
+	//
+	public static final int ERROR_DATABASE_FULL = 4314;
+
+	//
+	// MessageId: ERROR_MEDIA_INCOMPATIBLE
+	//
+	// MessageText:
+	//
+	// The medium is not compatible with the device or media pool.
+	//
+	public static final int ERROR_MEDIA_INCOMPATIBLE = 4315;
+
+	//
+	// MessageId: ERROR_RESOURCE_NOT_PRESENT
+	//
+	// MessageText:
+	//
+	// The resource required for this operation does not exist.
+	//
+	public static final int ERROR_RESOURCE_NOT_PRESENT = 4316;
+
+	//
+	// MessageId: ERROR_INVALID_OPERATION
+	//
+	// MessageText:
+	//
+	// The operation identifier is not valid.
+	//
+	public static final int ERROR_INVALID_OPERATION = 4317;
+
+	//
+	// MessageId: ERROR_MEDIA_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The media is not mounted or ready for use.
+	//
+	public static final int ERROR_MEDIA_NOT_AVAILABLE = 4318;
+
+	//
+	// MessageId: ERROR_DEVICE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The device is not ready for use.
+	//
+	public static final int ERROR_DEVICE_NOT_AVAILABLE = 4319;
+
+	//
+	// MessageId: ERROR_REQUEST_REFUSED
+	//
+	// MessageText:
+	//
+	// The operator or administrator has refused the request.
+	//
+	public static final int ERROR_REQUEST_REFUSED = 4320;
+
+	//
+	// MessageId: ERROR_INVALID_DRIVE_OBJECT
+	//
+	// MessageText:
+	//
+	// The drive identifier does not represent a valid drive.
+	//
+	public static final int ERROR_INVALID_DRIVE_OBJECT = 4321;
+
+	//
+	// MessageId: ERROR_LIBRARY_FULL
+	//
+	// MessageText:
+	//
+	// Library is full. No slot is available for use.
+	//
+	public static final int ERROR_LIBRARY_FULL = 4322;
+
+	//
+	// MessageId: ERROR_MEDIUM_NOT_ACCESSIBLE
+	//
+	// MessageText:
+	//
+	// The transport cannot access the medium.
+	//
+	public static final int ERROR_MEDIUM_NOT_ACCESSIBLE = 4323;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_LOAD_MEDIUM
+	//
+	// MessageText:
+	//
+	// Unable to load the medium into the drive.
+	//
+	public static final int ERROR_UNABLE_TO_LOAD_MEDIUM = 4324;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_INVENTORY_DRIVE
+	//
+	// MessageText:
+	//
+	// Unable to retrieve the drive status.
+	//
+	public static final int ERROR_UNABLE_TO_INVENTORY_DRIVE = 4325;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_INVENTORY_SLOT
+	//
+	// MessageText:
+	//
+	// Unable to retrieve the slot status.
+	//
+	public static final int ERROR_UNABLE_TO_INVENTORY_SLOT = 4326;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_INVENTORY_TRANSPORT
+	//
+	// MessageText:
+	//
+	// Unable to retrieve status about the transport.
+	//
+	public static final int ERROR_UNABLE_TO_INVENTORY_TRANSPORT = 4327;
+
+	//
+	// MessageId: ERROR_TRANSPORT_FULL
+	//
+	// MessageText:
+	//
+	// Cannot use the transport because it is already in use.
+	//
+	public static final int ERROR_TRANSPORT_FULL = 4328;
+
+	//
+	// MessageId: ERROR_CONTROLLING_IEPORT
+	//
+	// MessageText:
+	//
+	// Unable to open or close the inject/eject port.
+	//
+	public static final int ERROR_CONTROLLING_IEPORT = 4329;
+
+	//
+	// MessageId: ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA
+	//
+	// MessageText:
+	//
+	// Unable to eject the medium because it is in a drive.
+	//
+	public static final int ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA = 4330;
+
+	//
+	// MessageId: ERROR_CLEANER_SLOT_SET
+	//
+	// MessageText:
+	//
+	// A cleaner slot is already reserved.
+	//
+	public static final int ERROR_CLEANER_SLOT_SET = 4331;
+
+	//
+	// MessageId: ERROR_CLEANER_SLOT_NOT_SET
+	//
+	// MessageText:
+	//
+	// A cleaner slot is not reserved.
+	//
+	public static final int ERROR_CLEANER_SLOT_NOT_SET = 4332;
+
+	//
+	// MessageId: ERROR_CLEANER_CARTRIDGE_SPENT
+	//
+	// MessageText:
+	//
+	// The cleaner cartridge has performed the maximum number of drive
+	// cleanings.
+	//
+	public static final int ERROR_CLEANER_CARTRIDGE_SPENT = 4333;
+
+	//
+	// MessageId: ERROR_UNEXPECTED_OMID
+	//
+	// MessageText:
+	//
+	// Unexpected on-medium identifier.
+	//
+	public static final int ERROR_UNEXPECTED_OMID = 4334;
+
+	//
+	// MessageId: ERROR_CANT_DELETE_LAST_ITEM
+	//
+	// MessageText:
+	//
+	// The last remaining item in this group or resource cannot be deleted.
+	//
+	public static final int ERROR_CANT_DELETE_LAST_ITEM = 4335;
+
+	//
+	// MessageId: ERROR_MESSAGE_EXCEEDS_MAX_SIZE
+	//
+	// MessageText:
+	//
+	// The message provided exceeds the maximum size allowed for this parameter.
+	//
+	public static final int ERROR_MESSAGE_EXCEEDS_MAX_SIZE = 4336;
+
+	//
+	// MessageId: ERROR_VOLUME_CONTAINS_SYS_FILES
+	//
+	// MessageText:
+	//
+	// The volume contains system or paging files.
+	//
+	public static final int ERROR_VOLUME_CONTAINS_SYS_FILES = 4337;
+
+	//
+	// MessageId: ERROR_INDIGENOUS_TYPE
+	//
+	// MessageText:
+	//
+	// The media type cannot be removed from this library since at least one
+	// drive in the library reports it can support this media type.
+	//
+	public static final int ERROR_INDIGENOUS_TYPE = 4338;
+
+	//
+	// MessageId: ERROR_NO_SUPPORTING_DRIVES
+	//
+	// MessageText:
+	//
+	// This offline media cannot be mounted on this system since no enabled
+	// drives are present which can be used.
+	//
+	public static final int ERROR_NO_SUPPORTING_DRIVES = 4339;
+
+	//
+	// MessageId: ERROR_CLEANER_CARTRIDGE_INSTALLED
+	//
+	// MessageText:
+	//
+	// A cleaner cartridge is present in the tape library.
+	//
+	public static final int ERROR_CLEANER_CARTRIDGE_INSTALLED = 4340;
+
+	//
+	// MessageId: ERROR_IEPORT_FULL
+	//
+	// MessageText:
+	//
+	// Cannot use the ieport because it is not empty.
+	//
+	public static final int ERROR_IEPORT_FULL = 4341;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// Remote Storage Service Error codes //
+	// =//
+	// =4350 to=4389=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_FILE_OFFLINE
+	//
+	// MessageText:
+	//
+	// This file is currently not available for use on this computer.
+	//
+	public static final int ERROR_FILE_OFFLINE = 4350;
+
+	//
+	// MessageId: ERROR_REMOTE_STORAGE_NOT_ACTIVE
+	//
+	// MessageText:
+	//
+	// The remote storage service is not operational at this time.
+	//
+	public static final int ERROR_REMOTE_STORAGE_NOT_ACTIVE = 4351;
+
+	//
+	// MessageId: ERROR_REMOTE_STORAGE_MEDIA_ERROR
+	//
+	// MessageText:
+	//
+	// The remote storage service encountered a media error.
+	//
+	public static final int ERROR_REMOTE_STORAGE_MEDIA_ERROR = 4352;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Reparse Point Error codes=//
+	// =//
+	// =4390 to=4399=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_NOT_A_REPARSE_POINT
+	//
+	// MessageText:
+	//
+	// The file or directory is not a reparse point.
+	//
+	public static final int ERROR_NOT_A_REPARSE_POINT = 4390;
+
+	//
+	// MessageId: ERROR_REPARSE_ATTRIBUTE_CONFLICT
+	//
+	// MessageText:
+	//
+	// The reparse point attribute cannot be set because it conflicts with an
+	// existing attribute.
+	//
+	public static final int ERROR_REPARSE_ATTRIBUTE_CONFLICT = 4391;
+
+	//
+	// MessageId: ERROR_INVALID_REPARSE_DATA
+	//
+	// MessageText:
+	//
+	// The data present in the reparse point buffer is invalid.
+	//
+	public static final int ERROR_INVALID_REPARSE_DATA = 4392;
+
+	//
+	// MessageId: ERROR_REPARSE_TAG_INVALID
+	//
+	// MessageText:
+	//
+	// The tag present in the reparse point buffer is invalid.
+	//
+	public static final int ERROR_REPARSE_TAG_INVALID = 4393;
+
+	//
+	// MessageId: ERROR_REPARSE_TAG_MISMATCH
+	//
+	// MessageText:
+	//
+	// There is a mismatch between the tag specified in the request and the tag
+	// present in the reparse point.
+	// 
+	//
+	public static final int ERROR_REPARSE_TAG_MISMATCH = 4394;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =4400 to=4499=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// Single Instance Store (SIS) Error codes //
+	// =//
+	// =4500 to=4549=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_VOLUME_NOT_SIS_ENABLED
+	//
+	// MessageText:
+	//
+	// Single Instance Storage is not available on this volume.
+	//
+	public static final int ERROR_VOLUME_NOT_SIS_ENABLED = 4500;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =4550 to=4599=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Cluster Error codes=//
+	// =//
+	// =5000 to=5999=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_DEPENDENT_RESOURCE_EXISTS
+	//
+	// MessageText:
+	//
+	// The operation cannot be completed because other resources are dependent
+	// on this resource.
+	//
+	public static final int ERROR_DEPENDENT_RESOURCE_EXISTS = 5001;
+
+	//
+	// MessageId: ERROR_DEPENDENCY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster resource dependency cannot be found.
+	//
+	public static final int ERROR_DEPENDENCY_NOT_FOUND = 5002;
+
+	//
+	// MessageId: ERROR_DEPENDENCY_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The cluster resource cannot be made dependent on the specified resource
+	// because it is already dependent.
+	//
+	public static final int ERROR_DEPENDENCY_ALREADY_EXISTS = 5003;
+
+	//
+	// MessageId: ERROR_RESOURCE_NOT_ONLINE
+	//
+	// MessageText:
+	//
+	// The cluster resource is not online.
+	//
+	public static final int ERROR_RESOURCE_NOT_ONLINE = 5004;
+
+	//
+	// MessageId: ERROR_HOST_NODE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// A cluster node is not available for this operation.
+	//
+	public static final int ERROR_HOST_NODE_NOT_AVAILABLE = 5005;
+
+	//
+	// MessageId: ERROR_RESOURCE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The cluster resource is not available.
+	//
+	public static final int ERROR_RESOURCE_NOT_AVAILABLE = 5006;
+
+	//
+	// MessageId: ERROR_RESOURCE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster resource could not be found.
+	//
+	public static final int ERROR_RESOURCE_NOT_FOUND = 5007;
+
+	//
+	// MessageId: ERROR_SHUTDOWN_CLUSTER
+	//
+	// MessageText:
+	//
+	// The cluster is being shut down.
+	//
+	public static final int ERROR_SHUTDOWN_CLUSTER = 5008;
+
+	//
+	// MessageId: ERROR_CANT_EVICT_ACTIVE_NODE
+	//
+	// MessageText:
+	//
+	// A cluster node cannot be evicted from the cluster unless the node is down
+	// or it is the last node.
+	//
+	public static final int ERROR_CANT_EVICT_ACTIVE_NODE = 5009;
+
+	//
+	// MessageId: ERROR_OBJECT_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The object already exists.
+	//
+	public static final int ERROR_OBJECT_ALREADY_EXISTS = 5010;
+
+	//
+	// MessageId: ERROR_OBJECT_IN_LIST
+	//
+	// MessageText:
+	//
+	// The object is already in the list.
+	//
+	public static final int ERROR_OBJECT_IN_LIST = 5011;
+
+	//
+	// MessageId: ERROR_GROUP_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The cluster group is not available for any new requests.
+	//
+	public static final int ERROR_GROUP_NOT_AVAILABLE = 5012;
+
+	//
+	// MessageId: ERROR_GROUP_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster group could not be found.
+	//
+	public static final int ERROR_GROUP_NOT_FOUND = 5013;
+
+	//
+	// MessageId: ERROR_GROUP_NOT_ONLINE
+	//
+	// MessageText:
+	//
+	// The operation could not be completed because the cluster group is not
+	// online.
+	//
+	public static final int ERROR_GROUP_NOT_ONLINE = 5014;
+
+	//
+	// MessageId: ERROR_HOST_NODE_NOT_RESOURCE_OWNER
+	//
+	// MessageText:
+	//
+	// The operation failed because either the specified cluster node is not the
+	// owner of the resource, or the node
+	// is not a possible owner of the resource.
+	//
+	public static final int ERROR_HOST_NODE_NOT_RESOURCE_OWNER = 5015;
+
+	//
+	// MessageId: ERROR_HOST_NODE_NOT_GROUP_OWNER
+	//
+	// MessageText:
+	//
+	// The operation failed because either the specified cluster node is not the
+	// owner of the group, or the node
+	// is not a possible owner of the group.
+	//
+	public static final int ERROR_HOST_NODE_NOT_GROUP_OWNER = 5016;
+
+	//
+	// MessageId: ERROR_RESMON_CREATE_FAILED
+	//
+	// MessageText:
+	//
+	// The cluster resource could not be created in the specified resource
+	// monitor.
+	//
+	public static final int ERROR_RESMON_CREATE_FAILED = 5017;
+
+	//
+	// MessageId: ERROR_RESMON_ONLINE_FAILED
+	//
+	// MessageText:
+	//
+	// The cluster resource could not be brought online by the resource monitor.
+	//
+	public static final int ERROR_RESMON_ONLINE_FAILED = 5018;
+
+	//
+	// MessageId: ERROR_RESOURCE_ONLINE
+	//
+	// MessageText:
+	//
+	// The operation could not be completed because the cluster resource is
+	// online.
+	//
+	public static final int ERROR_RESOURCE_ONLINE = 5019;
+
+	//
+	// MessageId: ERROR_QUORUM_RESOURCE
+	//
+	// MessageText:
+	//
+	// The cluster resource could not be deleted or brought offline because it
+	// is the quorum resource.
+	//
+	public static final int ERROR_QUORUM_RESOURCE = 5020;
+
+	//
+	// MessageId: ERROR_NOT_QUORUM_CAPABLE
+	//
+	// MessageText:
+	//
+	// The cluster could not make the specified resource a quorum resource
+	// because it is not capable of being a quorum resource.
+	//
+	public static final int ERROR_NOT_QUORUM_CAPABLE = 5021;
+
+	//
+	// MessageId: ERROR_CLUSTER_SHUTTING_DOWN
+	//
+	// MessageText:
+	//
+	// The cluster software is shutting down.
+	//
+	public static final int ERROR_CLUSTER_SHUTTING_DOWN = 5022;
+
+	//
+	// MessageId: ERROR_INVALID_STATE
+	//
+	// MessageText:
+	//
+	// The group or resource is not in the correct state to perform the
+	// requested operation.
+	//
+	public static final int ERROR_INVALID_STATE = 5023;
+
+	//
+	// MessageId: ERROR_RESOURCE_PROPERTIES_STORED
+	//
+	// MessageText:
+	//
+	// The properties were stored but not all changes will take effect until the
+	// next time the resource is brought online.
+	//
+	public static final int ERROR_RESOURCE_PROPERTIES_STORED = 5024;
+
+	//
+	// MessageId: ERROR_NOT_QUORUM_CLASS
+	//
+	// MessageText:
+	//
+	// The cluster could not make the specified resource a quorum resource
+	// because it does not belong to a shared storage class.
+	//
+	public static final int ERROR_NOT_QUORUM_CLASS = 5025;
+
+	//
+	// MessageId: ERROR_CORE_RESOURCE
+	//
+	// MessageText:
+	//
+	// The cluster resource could not be deleted since it is a core resource.
+	//
+	public static final int ERROR_CORE_RESOURCE = 5026;
+
+	//
+	// MessageId: ERROR_QUORUM_RESOURCE_ONLINE_FAILED
+	//
+	// MessageText:
+	//
+	// The quorum resource failed to come online.
+	//
+	public static final int ERROR_QUORUM_RESOURCE_ONLINE_FAILED = 5027;
+
+	//
+	// MessageId: ERROR_QUORUMLOG_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// The quorum log could not be created or mounted successfully.
+	//
+	public static final int ERROR_QUORUMLOG_OPEN_FAILED = 5028;
+
+	//
+	// MessageId: ERROR_CLUSTERLOG_CORRUPT
+	//
+	// MessageText:
+	//
+	// The cluster log is corrupt.
+	//
+	public static final int ERROR_CLUSTERLOG_CORRUPT = 5029;
+
+	//
+	// MessageId: ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE
+	//
+	// MessageText:
+	//
+	// The record could not be written to the cluster log since it exceeds the
+	// maximum size.
+	//
+	public static final int ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE = 5030;
+
+	//
+	// MessageId: ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE
+	//
+	// MessageText:
+	//
+	// The cluster log exceeds its maximum size.
+	//
+	public static final int ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE = 5031;
+
+	//
+	// MessageId: ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// No checkpoint record was found in the cluster log.
+	//
+	public static final int ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND = 5032;
+
+	//
+	// MessageId: ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE
+	//
+	// MessageText:
+	//
+	// The minimum required disk space needed for logging is not available.
+	//
+	public static final int ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE = 5033;
+
+	//
+	// MessageId: ERROR_QUORUM_OWNER_ALIVE
+	//
+	// MessageText:
+	//
+	// The cluster node failed to take control of the quorum resource because
+	// the resource is owned by another active node.
+	//
+	public static final int ERROR_QUORUM_OWNER_ALIVE = 5034;
+
+	//
+	// MessageId: ERROR_NETWORK_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// A cluster network is not available for this operation.
+	//
+	public static final int ERROR_NETWORK_NOT_AVAILABLE = 5035;
+
+	//
+	// MessageId: ERROR_NODE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// A cluster node is not available for this operation.
+	//
+	public static final int ERROR_NODE_NOT_AVAILABLE = 5036;
+
+	//
+	// MessageId: ERROR_ALL_NODES_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// All cluster nodes must be running to perform this operation.
+	//
+	public static final int ERROR_ALL_NODES_NOT_AVAILABLE = 5037;
+
+	//
+	// MessageId: ERROR_RESOURCE_FAILED
+	//
+	// MessageText:
+	//
+	// A cluster resource failed.
+	//
+	public static final int ERROR_RESOURCE_FAILED = 5038;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_NODE
+	//
+	// MessageText:
+	//
+	// The cluster node is not valid.
+	//
+	public static final int ERROR_CLUSTER_INVALID_NODE = 5039;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_EXISTS
+	//
+	// MessageText:
+	//
+	// The cluster node already exists.
+	//
+	public static final int ERROR_CLUSTER_NODE_EXISTS = 5040;
+
+	//
+	// MessageId: ERROR_CLUSTER_JOIN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// A node is in the process of joining the cluster.
+	//
+	public static final int ERROR_CLUSTER_JOIN_IN_PROGRESS = 5041;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster node was not found.
+	//
+	public static final int ERROR_CLUSTER_NODE_NOT_FOUND = 5042;
+
+	//
+	// MessageId: ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster local node information was not found.
+	//
+	public static final int ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND = 5043;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_EXISTS
+	//
+	// MessageText:
+	//
+	// The cluster network already exists.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_EXISTS = 5044;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster network was not found.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_NOT_FOUND = 5045;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETINTERFACE_EXISTS
+	//
+	// MessageText:
+	//
+	// The cluster network interface already exists.
+	//
+	public static final int ERROR_CLUSTER_NETINTERFACE_EXISTS = 5046;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETINTERFACE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The cluster network interface was not found.
+	//
+	public static final int ERROR_CLUSTER_NETINTERFACE_NOT_FOUND = 5047;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_REQUEST
+	//
+	// MessageText:
+	//
+	// The cluster request is not valid for this object.
+	//
+	public static final int ERROR_CLUSTER_INVALID_REQUEST = 5048;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_NETWORK_PROVIDER
+	//
+	// MessageText:
+	//
+	// The cluster network provider is not valid.
+	//
+	public static final int ERROR_CLUSTER_INVALID_NETWORK_PROVIDER = 5049;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_DOWN
+	//
+	// MessageText:
+	//
+	// The cluster node is down.
+	//
+	public static final int ERROR_CLUSTER_NODE_DOWN = 5050;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_UNREACHABLE
+	//
+	// MessageText:
+	//
+	// The cluster node is not reachable.
+	//
+	public static final int ERROR_CLUSTER_NODE_UNREACHABLE = 5051;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_NOT_MEMBER
+	//
+	// MessageText:
+	//
+	// The cluster node is not a member of the cluster.
+	//
+	public static final int ERROR_CLUSTER_NODE_NOT_MEMBER = 5052;
+
+	//
+	// MessageId: ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// A cluster join operation is not in progress.
+	//
+	public static final int ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS = 5053;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_NETWORK
+	//
+	// MessageText:
+	//
+	// The cluster network is not valid.
+	//
+	public static final int ERROR_CLUSTER_INVALID_NETWORK = 5054;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_UP
+	//
+	// MessageText:
+	//
+	// The cluster node is up.
+	//
+	public static final int ERROR_CLUSTER_NODE_UP = 5056;
+
+	//
+	// MessageId: ERROR_CLUSTER_IPADDR_IN_USE
+	//
+	// MessageText:
+	//
+	// The cluster IP address is already in use.
+	//
+	public static final int ERROR_CLUSTER_IPADDR_IN_USE = 5057;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_NOT_PAUSED
+	//
+	// MessageText:
+	//
+	// The cluster node is not paused.
+	//
+	public static final int ERROR_CLUSTER_NODE_NOT_PAUSED = 5058;
+
+	//
+	// MessageId: ERROR_CLUSTER_NO_SECURITY_CONTEXT
+	//
+	// MessageText:
+	//
+	// No cluster security context is available.
+	//
+	public static final int ERROR_CLUSTER_NO_SECURITY_CONTEXT = 5059;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_NOT_INTERNAL
+	//
+	// MessageText:
+	//
+	// The cluster network is not configured for internal cluster communication.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_NOT_INTERNAL = 5060;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_ALREADY_UP
+	//
+	// MessageText:
+	//
+	// The cluster node is already up.
+	//
+	public static final int ERROR_CLUSTER_NODE_ALREADY_UP = 5061;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_ALREADY_DOWN
+	//
+	// MessageText:
+	//
+	// The cluster node is already down.
+	//
+	public static final int ERROR_CLUSTER_NODE_ALREADY_DOWN = 5062;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_ALREADY_ONLINE
+	//
+	// MessageText:
+	//
+	// The cluster network is already online.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_ALREADY_ONLINE = 5063;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE
+	//
+	// MessageText:
+	//
+	// The cluster network is already offline.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE = 5064;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_ALREADY_MEMBER
+	//
+	// MessageText:
+	//
+	// The cluster node is already a member of the cluster.
+	//
+	public static final int ERROR_CLUSTER_NODE_ALREADY_MEMBER = 5065;
+
+	//
+	// MessageId: ERROR_CLUSTER_LAST_INTERNAL_NETWORK
+	//
+	// MessageText:
+	//
+	// The cluster network is the only one configured for internal cluster
+	// communication between two or more active cluster nodes. The internal
+	// communication capability cannot be removed from the network.
+	//
+	public static final int ERROR_CLUSTER_LAST_INTERNAL_NETWORK = 5066;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS
+	//
+	// MessageText:
+	//
+	// One or more cluster resources depend on the network to provide service to
+	// clients. The client access capability cannot be removed from the network.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS = 5067;
+
+	//
+	// MessageId: ERROR_INVALID_OPERATION_ON_QUORUM
+	//
+	// MessageText:
+	//
+	// This operation cannot be performed on the cluster resource as it the
+	// quorum resource. You may not bring the quorum resource offline or modify
+	// its possible owners list.
+	//
+	public static final int ERROR_INVALID_OPERATION_ON_QUORUM = 5068;
+
+	//
+	// MessageId: ERROR_DEPENDENCY_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// The cluster quorum resource is not allowed to have any dependencies.
+	//
+	public static final int ERROR_DEPENDENCY_NOT_ALLOWED = 5069;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_PAUSED
+	//
+	// MessageText:
+	//
+	// The cluster node is paused.
+	//
+	public static final int ERROR_CLUSTER_NODE_PAUSED = 5070;
+
+	//
+	// MessageId: ERROR_NODE_CANT_HOST_RESOURCE
+	//
+	// MessageText:
+	//
+	// The cluster resource cannot be brought online. The owner node cannot run
+	// this resource.
+	//
+	public static final int ERROR_NODE_CANT_HOST_RESOURCE = 5071;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_NOT_READY
+	//
+	// MessageText:
+	//
+	// The cluster node is not ready to perform the requested operation.
+	//
+	public static final int ERROR_CLUSTER_NODE_NOT_READY = 5072;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_SHUTTING_DOWN
+	//
+	// MessageText:
+	//
+	// The cluster node is shutting down.
+	//
+	public static final int ERROR_CLUSTER_NODE_SHUTTING_DOWN = 5073;
+
+	//
+	// MessageId: ERROR_CLUSTER_JOIN_ABORTED
+	//
+	// MessageText:
+	//
+	// The cluster join operation was aborted.
+	//
+	public static final int ERROR_CLUSTER_JOIN_ABORTED = 5074;
+
+	//
+	// MessageId: ERROR_CLUSTER_INCOMPATIBLE_VERSIONS
+	//
+	// MessageText:
+	//
+	// The cluster join operation failed due to incompatible software versions
+	// between the joining node and its sponsor.
+	//
+	public static final int ERROR_CLUSTER_INCOMPATIBLE_VERSIONS = 5075;
+
+	//
+	// MessageId: ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED
+	//
+	// MessageText:
+	//
+	// This resource cannot be created because the cluster has reached the limit
+	// on the number of resources it can monitor.
+	//
+	public static final int ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED = 5076;
+
+	//
+	// MessageId: ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED
+	//
+	// MessageText:
+	//
+	// The system configuration changed during the cluster join or form
+	// operation. The join or form operation was aborted.
+	//
+	public static final int ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED = 5077;
+
+	//
+	// MessageId: ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified resource type was not found.
+	//
+	public static final int ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND = 5078;
+
+	//
+	// MessageId: ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The specified node does not support a resource of this type. This may be
+	// due to version inconsistencies or due to the absence of the resource DLL
+	// on this node.
+	//
+	public static final int ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED = 5079;
+
+	//
+	// MessageId: ERROR_CLUSTER_RESNAME_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified resource name is not supported by this resource DLL. This
+	// may be due to a bad (or changed) name supplied to the resource DLL.
+	//
+	public static final int ERROR_CLUSTER_RESNAME_NOT_FOUND = 5080;
+
+	//
+	// MessageId: ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED
+	//
+	// MessageText:
+	//
+	// No authentication package could be registered with the RPC server.
+	//
+	public static final int ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED = 5081;
+
+	//
+	// MessageId: ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST
+	//
+	// MessageText:
+	//
+	// You cannot bring the group online because the owner of the group is not
+	// in the preferred list for the group. To change the owner node for the
+	// group, move the group.
+	//
+	public static final int ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST = 5082;
+
+	//
+	// MessageId: ERROR_CLUSTER_DATABASE_SEQMISMATCH
+	//
+	// MessageText:
+	//
+	// The join operation failed because the cluster database sequence number
+	// has changed or is incompatible with the locker node. This may happen
+	// during a join operation if the cluster database was changing during the
+	// join.
+	//
+	public static final int ERROR_CLUSTER_DATABASE_SEQMISMATCH = 5083;
+
+	//
+	// MessageId: ERROR_RESMON_INVALID_STATE
+	//
+	// MessageText:
+	//
+	// The resource monitor will not allow the fail operation to be performed
+	// while the resource is in its current state. This may happen if the
+	// resource is in a pending state.
+	//
+	public static final int ERROR_RESMON_INVALID_STATE = 5084;
+
+	//
+	// MessageId: ERROR_CLUSTER_GUM_NOT_LOCKER
+	//
+	// MessageText:
+	//
+	// A non locker code got a request to reserve the lock for making global
+	// updates.
+	//
+	public static final int ERROR_CLUSTER_GUM_NOT_LOCKER = 5085;
+
+	//
+	// MessageId: ERROR_QUORUM_DISK_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The quorum disk could not be located by the cluster service.
+	//
+	public static final int ERROR_QUORUM_DISK_NOT_FOUND = 5086;
+
+	//
+	// MessageId: ERROR_DATABASE_BACKUP_CORRUPT
+	//
+	// MessageText:
+	//
+	// The backed up cluster database is possibly corrupt.
+	//
+	public static final int ERROR_DATABASE_BACKUP_CORRUPT = 5087;
+
+	//
+	// MessageId: ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT
+	//
+	// MessageText:
+	//
+	// A DFS root already exists in this cluster node.
+	//
+	public static final int ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT = 5088;
+
+	//
+	// MessageId: ERROR_RESOURCE_PROPERTY_UNCHANGEABLE
+	//
+	// MessageText:
+	//
+	// An attempt to modify a resource property failed because it conflicts with
+	// another existing property.
+	//
+	public static final int ERROR_RESOURCE_PROPERTY_UNCHANGEABLE = 5089;
+
+	/*
+	 * Codes from=4300 through=5889 overlap with codes in
+	 * ds\published\inc\apperr2.w. Do not add any more error codes in that
+	 * range.
+	 */
+	//
+	// MessageId: ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE
+	//
+	// MessageText:
+	//
+	// An operation was attempted that is incompatible with the current
+	// membership state of the node.
+	//
+	public static final int ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = 5890;
+
+	//
+	// MessageId: ERROR_CLUSTER_QUORUMLOG_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The quorum resource does not contain the quorum log.
+	//
+	public static final int ERROR_CLUSTER_QUORUMLOG_NOT_FOUND = 5891;
+
+	//
+	// MessageId: ERROR_CLUSTER_MEMBERSHIP_HALT
+	//
+	// MessageText:
+	//
+	// The membership engine requested shutdown of the cluster service on this
+	// node.
+	//
+	public static final int ERROR_CLUSTER_MEMBERSHIP_HALT = 5892;
+
+	//
+	// MessageId: ERROR_CLUSTER_INSTANCE_ID_MISMATCH
+	//
+	// MessageText:
+	//
+	// The join operation failed because the cluster instance ID of the joining
+	// node does not match the cluster instance ID of the sponsor node.
+	//
+	public static final int ERROR_CLUSTER_INSTANCE_ID_MISMATCH = 5893;
+
+	//
+	// MessageId: ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP
+	//
+	// MessageText:
+	//
+	// A matching cluster network for the specified IP address could not be
+	// found.
+	//
+	public static final int ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP = 5894;
+
+	//
+	// MessageId: ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// The actual data type of the property did not match the expected data type
+	// of the property.
+	//
+	public static final int ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH = 5895;
+
+	//
+	// MessageId: ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP
+	//
+	// MessageText:
+	//
+	// The cluster node was evicted from the cluster successfully, but the node
+	// was not cleaned up. To determine what cleanup steps failed and how to
+	// recover, see the Failover Clustering application event log using Event
+	// Viewer.
+	//
+	public static final int ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP = 5896;
+
+	//
+	// MessageId: ERROR_CLUSTER_PARAMETER_MISMATCH
+	//
+	// MessageText:
+	//
+	// Two or more parameter values specified for a resource's properties are in
+	// conflict.
+	//
+	public static final int ERROR_CLUSTER_PARAMETER_MISMATCH = 5897;
+
+	//
+	// MessageId: ERROR_NODE_CANNOT_BE_CLUSTERED
+	//
+	// MessageText:
+	//
+	// This computer cannot be made a member of a cluster.
+	//
+	public static final int ERROR_NODE_CANNOT_BE_CLUSTERED = 5898;
+
+	//
+	// MessageId: ERROR_CLUSTER_WRONG_OS_VERSION
+	//
+	// MessageText:
+	//
+	// This computer cannot be made a member of a cluster because it does not
+	// have the correct version of Windows installed.
+	//
+	public static final int ERROR_CLUSTER_WRONG_OS_VERSION = 5899;
+
+	//
+	// MessageId: ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME
+	//
+	// MessageText:
+	//
+	// A cluster cannot be created with the specified cluster name because that
+	// cluster name is already in use. Specify a different name for the cluster.
+	//
+	public static final int ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME = 5900;
+
+	//
+	// MessageId: ERROR_CLUSCFG_ALREADY_COMMITTED
+	//
+	// MessageText:
+	//
+	// The cluster configuration action has already been committed.
+	//
+	public static final int ERROR_CLUSCFG_ALREADY_COMMITTED = 5901;
+
+	//
+	// MessageId: ERROR_CLUSCFG_ROLLBACK_FAILED
+	//
+	// MessageText:
+	//
+	// The cluster configuration action could not be rolled back.
+	//
+	public static final int ERROR_CLUSCFG_ROLLBACK_FAILED = 5902;
+
+	//
+	// MessageId: ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT
+	//
+	// MessageText:
+	//
+	// The drive letter assigned to a system disk on one node conflicted with
+	// the drive letter assigned to a disk on another node.
+	//
+	public static final int ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT = 5903;
+
+	//
+	// MessageId: ERROR_CLUSTER_OLD_VERSION
+	//
+	// MessageText:
+	//
+	// One or more nodes in the cluster are running a version of Windows that
+	// does not support this operation.
+	//
+	public static final int ERROR_CLUSTER_OLD_VERSION = 5904;
+
+	//
+	// MessageId: ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME
+	//
+	// MessageText:
+	//
+	// The name of the corresponding computer account doesn't match the Network
+	// Name for this resource.
+	//
+	public static final int ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME = 5905;
+
+	//
+	// MessageId: ERROR_CLUSTER_NO_NET_ADAPTERS
+	//
+	// MessageText:
+	//
+	// No network adapters are available.
+	//
+	public static final int ERROR_CLUSTER_NO_NET_ADAPTERS = 5906;
+
+	//
+	// MessageId: ERROR_CLUSTER_POISONED
+	//
+	// MessageText:
+	//
+	// The cluster node has been poisoned.
+	//
+	public static final int ERROR_CLUSTER_POISONED = 5907;
+
+	//
+	// MessageId: ERROR_CLUSTER_GROUP_MOVING
+	//
+	// MessageText:
+	//
+	// The group is unable to accept the request since it is moving to another
+	// node.
+	//
+	public static final int ERROR_CLUSTER_GROUP_MOVING = 5908;
+
+	//
+	// MessageId: ERROR_CLUSTER_RESOURCE_TYPE_BUSY
+	//
+	// MessageText:
+	//
+	// The resource type cannot accept the request since is too busy performing
+	// another operation.
+	//
+	public static final int ERROR_CLUSTER_RESOURCE_TYPE_BUSY = 5909;
+
+	//
+	// MessageId: ERROR_RESOURCE_CALL_TIMED_OUT
+	//
+	// MessageText:
+	//
+	// The call to the cluster resource DLL timed out.
+	//
+	public static final int ERROR_RESOURCE_CALL_TIMED_OUT = 5910;
+
+	//
+	// MessageId: ERROR_INVALID_CLUSTER_IPV6_ADDRESS
+	//
+	// MessageText:
+	//
+	// The address is not valid for an IPv6 Address resource. A global IPv6
+	// address is required, and it must match a cluster network. Compatibility
+	// addresses are not permitted.
+	//
+	public static final int ERROR_INVALID_CLUSTER_IPV6_ADDRESS = 5911;
+
+	//
+	// MessageId: ERROR_CLUSTER_INTERNAL_INVALID_FUNCTION
+	//
+	// MessageText:
+	//
+	// An internal cluster error occurred. A call to an invalid function was
+	// attempted.
+	//
+	public static final int ERROR_CLUSTER_INTERNAL_INVALID_FUNCTION = 5912;
+
+	//
+	// MessageId: ERROR_CLUSTER_PARAMETER_OUT_OF_BOUNDS
+	//
+	// MessageText:
+	//
+	// A parameter value is out of acceptable range.
+	//
+	public static final int ERROR_CLUSTER_PARAMETER_OUT_OF_BOUNDS = 5913;
+
+	//
+	// MessageId: ERROR_CLUSTER_PARTIAL_SEND
+	//
+	// MessageText:
+	//
+	// A network error occurred while sending data to another node in the
+	// cluster. The number of bytes transmitted was less than required.
+	//
+	public static final int ERROR_CLUSTER_PARTIAL_SEND = 5914;
+
+	//
+	// MessageId: ERROR_CLUSTER_REGISTRY_INVALID_FUNCTION
+	//
+	// MessageText:
+	//
+	// An invalid cluster registry operation was attempted.
+	//
+	public static final int ERROR_CLUSTER_REGISTRY_INVALID_FUNCTION = 5915;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_STRING_TERMINATION
+	//
+	// MessageText:
+	//
+	// An input string of characters is not properly terminated.
+	//
+	public static final int ERROR_CLUSTER_INVALID_STRING_TERMINATION = 5916;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_STRING_FORMAT
+	//
+	// MessageText:
+	//
+	// An input string of characters is not in a valid format for the data it
+	// represents.
+	//
+	public static final int ERROR_CLUSTER_INVALID_STRING_FORMAT = 5917;
+
+	//
+	// MessageId: ERROR_CLUSTER_DATABASE_TRANSACTION_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// An internal cluster error occurred. A cluster database transaction was
+	// attempted while a transaction was already in progress.
+	//
+	public static final int ERROR_CLUSTER_DATABASE_TRANSACTION_IN_PROGRESS = 5918;
+
+	//
+	// MessageId: ERROR_CLUSTER_DATABASE_TRANSACTION_NOT_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// An internal cluster error occurred. There was an attempt to commit a
+	// cluster database transaction while no transaction was in progress.
+	//
+	public static final int ERROR_CLUSTER_DATABASE_TRANSACTION_NOT_IN_PROGRESS = 5919;
+
+	//
+	// MessageId: ERROR_CLUSTER_NULL_DATA
+	//
+	// MessageText:
+	//
+	// An internal cluster error occurred. Data was not properly initialized.
+	//
+	public static final int ERROR_CLUSTER_NULL_DATA = 5920;
+
+	//
+	// MessageId: ERROR_CLUSTER_PARTIAL_READ
+	//
+	// MessageText:
+	//
+	// An error occurred while reading from a stream of data. An unexpected
+	// number of bytes was returned.
+	//
+	public static final int ERROR_CLUSTER_PARTIAL_READ = 5921;
+
+	//
+	// MessageId: ERROR_CLUSTER_PARTIAL_WRITE
+	//
+	// MessageText:
+	//
+	// An error occurred while writing to a stream of data. The required number
+	// of bytes could not be written.
+	//
+	public static final int ERROR_CLUSTER_PARTIAL_WRITE = 5922;
+
+	//
+	// MessageId: ERROR_CLUSTER_CANT_DESERIALIZE_DATA
+	//
+	// MessageText:
+	//
+	// An error occurred while deserializing a stream of cluster data.
+	//
+	public static final int ERROR_CLUSTER_CANT_DESERIALIZE_DATA = 5923;
+
+	//
+	// MessageId: ERROR_DEPENDENT_RESOURCE_PROPERTY_CONFLICT
+	//
+	// MessageText:
+	//
+	// One or more property values for this resource are in conflict with one or
+	// more property values associated with its dependent resource(s).
+	//
+	public static final int ERROR_DEPENDENT_RESOURCE_PROPERTY_CONFLICT = 5924;
+
+	//
+	// MessageId: ERROR_CLUSTER_NO_QUORUM
+	//
+	// MessageText:
+	//
+	// A quorum of cluster nodes was not present to form a cluster.
+	//
+	public static final int ERROR_CLUSTER_NO_QUORUM = 5925;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_IPV6_NETWORK
+	//
+	// MessageText:
+	//
+	// The cluster network is not valid for an IPv6 Address resource, or it does
+	// not match the configured address.
+	//
+	public static final int ERROR_CLUSTER_INVALID_IPV6_NETWORK = 5926;
+
+	//
+	// MessageId: ERROR_CLUSTER_INVALID_IPV6_TUNNEL_NETWORK
+	//
+	// MessageText:
+	//
+	// The cluster network is not valid for an IPv6 Tunnel resource. Check the
+	// configuration of the IP Address resource on which the IPv6 Tunnel
+	// resource depends.
+	//
+	public static final int ERROR_CLUSTER_INVALID_IPV6_TUNNEL_NETWORK = 5927;
+
+	//
+	// MessageId: ERROR_QUORUM_NOT_ALLOWED_IN_THIS_GROUP
+	//
+	// MessageText:
+	//
+	// Quorum resource cannot reside in the Available Storage group.
+	//
+	public static final int ERROR_QUORUM_NOT_ALLOWED_IN_THIS_GROUP = 5928;
+
+	//
+	// MessageId: ERROR_DEPENDENCY_TREE_TOO_COMPLEX
+	//
+	// MessageText:
+	//
+	// The dependencies for this resource are nested too deeply.
+	//
+	public static final int ERROR_DEPENDENCY_TREE_TOO_COMPLEX = 5929;
+
+	//
+	// MessageId: ERROR_EXCEPTION_IN_RESOURCE_CALL
+	//
+	// MessageText:
+	//
+	// The call into the resource DLL raised an unhandled exception.
+	//
+	public static final int ERROR_EXCEPTION_IN_RESOURCE_CALL = 5930;
+
+	//
+	// MessageId: ERROR_CLUSTER_RHS_FAILED_INITIALIZATION
+	//
+	// MessageText:
+	//
+	// The RHS process failed to initialize.
+	//
+	public static final int ERROR_CLUSTER_RHS_FAILED_INITIALIZATION = 5931;
+
+	//
+	// MessageId: ERROR_CLUSTER_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// The Failover Clustering feature is not installed on this node.
+	//
+	public static final int ERROR_CLUSTER_NOT_INSTALLED = 5932;
+
+	//
+	// MessageId: ERROR_CLUSTER_RESOURCES_MUST_BE_ONLINE_ON_THE_SAME_NODE
+	//
+	// MessageText:
+	//
+	// The resources must be online on the same node for this operation
+	//
+	public static final int ERROR_CLUSTER_RESOURCES_MUST_BE_ONLINE_ON_THE_SAME_NODE = 5933;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =EFS Error codes=//
+	// =//
+	// =6000 to=6099=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_ENCRYPTION_FAILED
+	//
+	// MessageText:
+	//
+	// The specified file could not be encrypted.
+	//
+	public static final int ERROR_ENCRYPTION_FAILED = 6000;
+
+	//
+	// MessageId: ERROR_DECRYPTION_FAILED
+	//
+	// MessageText:
+	//
+	// The specified file could not be decrypted.
+	//
+	public static final int ERROR_DECRYPTION_FAILED = 6001;
+
+	//
+	// MessageId: ERROR_FILE_ENCRYPTED
+	//
+	// MessageText:
+	//
+	// The specified file is encrypted and the user does not have the ability to
+	// decrypt it.
+	//
+	public static final int ERROR_FILE_ENCRYPTED = 6002;
+
+	//
+	// MessageId: ERROR_NO_RECOVERY_POLICY
+	//
+	// MessageText:
+	//
+	// There is no valid encryption recovery policy configured for this system.
+	//
+	public static final int ERROR_NO_RECOVERY_POLICY = 6003;
+
+	//
+	// MessageId: ERROR_NO_EFS
+	//
+	// MessageText:
+	//
+	// The required encryption driver is not loaded for this system.
+	//
+	public static final int ERROR_NO_EFS = 6004;
+
+	//
+	// MessageId: ERROR_WRONG_EFS
+	//
+	// MessageText:
+	//
+	// The file was encrypted with a different encryption driver than is
+	// currently loaded.
+	//
+	public static final int ERROR_WRONG_EFS = 6005;
+
+	//
+	// MessageId: ERROR_NO_USER_KEYS
+	//
+	// MessageText:
+	//
+	// There are no EFS keys defined for the user.
+	//
+	public static final int ERROR_NO_USER_KEYS = 6006;
+
+	//
+	// MessageId: ERROR_FILE_NOT_ENCRYPTED
+	//
+	// MessageText:
+	//
+	// The specified file is not encrypted.
+	//
+	public static final int ERROR_FILE_NOT_ENCRYPTED = 6007;
+
+	//
+	// MessageId: ERROR_NOT_EXPORT_FORMAT
+	//
+	// MessageText:
+	//
+	// The specified file is not in the defined EFS export format.
+	//
+	public static final int ERROR_NOT_EXPORT_FORMAT = 6008;
+
+	//
+	// MessageId: ERROR_FILE_READ_ONLY
+	//
+	// MessageText:
+	//
+	// The specified file is read only.
+	//
+	public static final int ERROR_FILE_READ_ONLY = 6009;
+
+	//
+	// MessageId: ERROR_DIR_EFS_DISALLOWED
+	//
+	// MessageText:
+	//
+	// The directory has been disabled for encryption.
+	//
+	public static final int ERROR_DIR_EFS_DISALLOWED = 6010;
+
+	//
+	// MessageId: ERROR_EFS_SERVER_NOT_TRUSTED
+	//
+	// MessageText:
+	//
+	// The server is not trusted for remote encryption operation.
+	//
+	public static final int ERROR_EFS_SERVER_NOT_TRUSTED = 6011;
+
+	//
+	// MessageId: ERROR_BAD_RECOVERY_POLICY
+	//
+	// MessageText:
+	//
+	// Recovery policy configured for this system contains invalid recovery
+	// certificate.
+	//
+	public static final int ERROR_BAD_RECOVERY_POLICY = 6012;
+
+	//
+	// MessageId: ERROR_EFS_ALG_BLOB_TOO_BIG
+	//
+	// MessageText:
+	//
+	// The encryption algorithm used on the source file needs a bigger key
+	// buffer than the one on the destination file.
+	//
+	public static final int ERROR_EFS_ALG_BLOB_TOO_BIG = 6013;
+
+	//
+	// MessageId: ERROR_VOLUME_NOT_SUPPORT_EFS
+	//
+	// MessageText:
+	//
+	// The disk partition does not support file encryption.
+	//
+	public static final int ERROR_VOLUME_NOT_SUPPORT_EFS = 6014;
+
+	//
+	// MessageId: ERROR_EFS_DISABLED
+	//
+	// MessageText:
+	//
+	// This machine is disabled for file encryption.
+	//
+	public static final int ERROR_EFS_DISABLED = 6015;
+
+	//
+	// MessageId: ERROR_EFS_VERSION_NOT_SUPPORT
+	//
+	// MessageText:
+	//
+	// A newer system is required to decrypt this encrypted file.
+	//
+	public static final int ERROR_EFS_VERSION_NOT_SUPPORT = 6016;
+
+	//
+	// MessageId: ERROR_CS_ENCRYPTION_INVALID_SERVER_RESPONSE
+	//
+	// MessageText:
+	//
+	// The remote server sent an invalid response for a file being opened with
+	// Client Side Encryption.
+	//
+	public static final int ERROR_CS_ENCRYPTION_INVALID_SERVER_RESPONSE = 6017;
+
+	//
+	// MessageId: ERROR_CS_ENCRYPTION_UNSUPPORTED_SERVER
+	//
+	// MessageText:
+	//
+	// Client Side Encryption is not supported by the remote server even though
+	// it claims to support it.
+	//
+	public static final int ERROR_CS_ENCRYPTION_UNSUPPORTED_SERVER = 6018;
+
+	//
+	// MessageId: ERROR_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE
+	//
+	// MessageText:
+	//
+	// File is encrypted and should be opened in Client Side Encryption mode.
+	//
+	public static final int ERROR_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE = 6019;
+
+	//
+	// MessageId: ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE
+	//
+	// MessageText:
+	//
+	// A new encrypted file is being created and a $EFS needs to be provided.
+	//
+	public static final int ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE = 6020;
+
+	//
+	// MessageId: ERROR_CS_ENCRYPTION_FILE_NOT_CSE
+	//
+	// MessageText:
+	//
+	// The SMB client requested a CSE FSCTL on a non-CSE file.
+	//
+	public static final int ERROR_CS_ENCRYPTION_FILE_NOT_CSE = 6021;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =BROWSER Error codes=//
+	// =//
+	// =6100 to=6199=//
+	// /////////////////////////////////////////////////
+
+	// This message number is for historical purposes and cannot be changed or
+	// re-used.
+	//
+	// MessageId: ERROR_NO_BROWSER_SERVERS_FOUND
+	//
+	// MessageText:
+	//
+	// The list of servers for this workgroup is not currently available
+	//
+	public static final int ERROR_NO_BROWSER_SERVERS_FOUND = 6118;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Task Scheduler Error codes=//
+	// =NET START must understand=//
+	// =//
+	// =6200 to=6249=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: SCHED_E_SERVICE_NOT_LOCALSYSTEM
+	//
+	// MessageText:
+	//
+	// The Task Scheduler service must be configured to run in the System
+	// account to function properly. Individual tasks may be configured to run
+	// in other accounts.
+	//
+	public static final int SCHED_E_SERVICE_NOT_LOCALSYSTEM = 6200;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =6250 to=6599=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Common Log (CLFS) Error codes=//
+	// =//
+	// =6600 to=6699=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_LOG_SECTOR_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered an invalid log sector.
+	//
+	public static final int ERROR_LOG_SECTOR_INVALID = 6600;
+
+	//
+	// MessageId: ERROR_LOG_SECTOR_PARITY_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered a log sector with invalid block parity.
+	//
+	public static final int ERROR_LOG_SECTOR_PARITY_INVALID = 6601;
+
+	//
+	// MessageId: ERROR_LOG_SECTOR_REMAPPED
+	//
+	// MessageText:
+	//
+	// Log service encountered a remapped log sector.
+	//
+	public static final int ERROR_LOG_SECTOR_REMAPPED = 6602;
+
+	//
+	// MessageId: ERROR_LOG_BLOCK_INCOMPLETE
+	//
+	// MessageText:
+	//
+	// Log service encountered a partial or incomplete log block.
+	//
+	public static final int ERROR_LOG_BLOCK_INCOMPLETE = 6603;
+
+	//
+	// MessageId: ERROR_LOG_INVALID_RANGE
+	//
+	// MessageText:
+	//
+	// Log service encountered an attempt access data outside the active log
+	// range.
+	//
+	public static final int ERROR_LOG_INVALID_RANGE = 6604;
+
+	//
+	// MessageId: ERROR_LOG_BLOCKS_EXHAUSTED
+	//
+	// MessageText:
+	//
+	// Log service user marshalling buffers are exhausted.
+	//
+	public static final int ERROR_LOG_BLOCKS_EXHAUSTED = 6605;
+
+	//
+	// MessageId: ERROR_LOG_READ_CONTEXT_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered an attempt read from a marshalling area with an
+	// invalid read context.
+	//
+	public static final int ERROR_LOG_READ_CONTEXT_INVALID = 6606;
+
+	//
+	// MessageId: ERROR_LOG_RESTART_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered an invalid log restart area.
+	//
+	public static final int ERROR_LOG_RESTART_INVALID = 6607;
+
+	//
+	// MessageId: ERROR_LOG_BLOCK_VERSION
+	//
+	// MessageText:
+	//
+	// Log service encountered an invalid log block version.
+	//
+	public static final int ERROR_LOG_BLOCK_VERSION = 6608;
+
+	//
+	// MessageId: ERROR_LOG_BLOCK_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered an invalid log block.
+	//
+	public static final int ERROR_LOG_BLOCK_INVALID = 6609;
+
+	//
+	// MessageId: ERROR_LOG_READ_MODE_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered an attempt to read the log with an invalid read
+	// mode.
+	//
+	public static final int ERROR_LOG_READ_MODE_INVALID = 6610;
+
+	//
+	// MessageId: ERROR_LOG_NO_RESTART
+	//
+	// MessageText:
+	//
+	// Log service encountered a log stream with no restart area.
+	//
+	public static final int ERROR_LOG_NO_RESTART = 6611;
+
+	//
+	// MessageId: ERROR_LOG_METADATA_CORRUPT
+	//
+	// MessageText:
+	//
+	// Log service encountered a corrupted metadata file.
+	//
+	public static final int ERROR_LOG_METADATA_CORRUPT = 6612;
+
+	//
+	// MessageId: ERROR_LOG_METADATA_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered a metadata file that could not be created by the
+	// log file system.
+	//
+	public static final int ERROR_LOG_METADATA_INVALID = 6613;
+
+	//
+	// MessageId: ERROR_LOG_METADATA_INCONSISTENT
+	//
+	// MessageText:
+	//
+	// Log service encountered a metadata file with inconsistent data.
+	//
+	public static final int ERROR_LOG_METADATA_INCONSISTENT = 6614;
+
+	//
+	// MessageId: ERROR_LOG_RESERVATION_INVALID
+	//
+	// MessageText:
+	//
+	// Log service encountered an attempt to erroneous allocate or dispose
+	// reservation space.
+	//
+	public static final int ERROR_LOG_RESERVATION_INVALID = 6615;
+
+	//
+	// MessageId: ERROR_LOG_CANT_DELETE
+	//
+	// MessageText:
+	//
+	// Log service cannot delete log file or file system container.
+	//
+	public static final int ERROR_LOG_CANT_DELETE = 6616;
+
+	//
+	// MessageId: ERROR_LOG_CONTAINER_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// Log service has reached the maximum allowable containers allocated to a
+	// log file.
+	//
+	public static final int ERROR_LOG_CONTAINER_LIMIT_EXCEEDED = 6617;
+
+	//
+	// MessageId: ERROR_LOG_START_OF_LOG
+	//
+	// MessageText:
+	//
+	// Log service has attempted to read or write backward past the start of the
+	// log.
+	//
+	public static final int ERROR_LOG_START_OF_LOG = 6618;
+
+	//
+	// MessageId: ERROR_LOG_POLICY_ALREADY_INSTALLED
+	//
+	// MessageText:
+	//
+	// Log policy could not be installed because a policy of the same type is
+	// already present.
+	//
+	public static final int ERROR_LOG_POLICY_ALREADY_INSTALLED = 6619;
+
+	//
+	// MessageId: ERROR_LOG_POLICY_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// Log policy in question was not installed at the time of the request.
+	//
+	public static final int ERROR_LOG_POLICY_NOT_INSTALLED = 6620;
+
+	//
+	// MessageId: ERROR_LOG_POLICY_INVALID
+	//
+	// MessageText:
+	//
+	// The installed set of policies on the log is invalid.
+	//
+	public static final int ERROR_LOG_POLICY_INVALID = 6621;
+
+	//
+	// MessageId: ERROR_LOG_POLICY_CONFLICT
+	//
+	// MessageText:
+	//
+	// A policy on the log in question prevented the operation from completing.
+	//
+	public static final int ERROR_LOG_POLICY_CONFLICT = 6622;
+
+	//
+	// MessageId: ERROR_LOG_PINNED_ARCHIVE_TAIL
+	//
+	// MessageText:
+	//
+	// Log space cannot be reclaimed because the log is pinned by the archive
+	// tail.
+	//
+	public static final int ERROR_LOG_PINNED_ARCHIVE_TAIL = 6623;
+
+	//
+	// MessageId: ERROR_LOG_RECORD_NONEXISTENT
+	//
+	// MessageText:
+	//
+	// Log record is not a record in the log file.
+	//
+	public static final int ERROR_LOG_RECORD_NONEXISTENT = 6624;
+
+	//
+	// MessageId: ERROR_LOG_RECORDS_RESERVED_INVALID
+	//
+	// MessageText:
+	//
+	// Number of reserved log records or the adjustment of the number of
+	// reserved log records is invalid.
+	//
+	public static final int ERROR_LOG_RECORDS_RESERVED_INVALID = 6625;
+
+	//
+	// MessageId: ERROR_LOG_SPACE_RESERVED_INVALID
+	//
+	// MessageText:
+	//
+	// Reserved log space or the adjustment of the log space is invalid.
+	//
+	public static final int ERROR_LOG_SPACE_RESERVED_INVALID = 6626;
+
+	//
+	// MessageId: ERROR_LOG_TAIL_INVALID
+	//
+	// MessageText:
+	//
+	// An new or existing archive tail or base of the active log is invalid.
+	//
+	public static final int ERROR_LOG_TAIL_INVALID = 6627;
+
+	//
+	// MessageId: ERROR_LOG_FULL
+	//
+	// MessageText:
+	//
+	// Log space is exhausted.
+	//
+	public static final int ERROR_LOG_FULL = 6628;
+
+	//
+	// MessageId: ERROR_COULD_NOT_RESIZE_LOG
+	//
+	// MessageText:
+	//
+	// The log could not be set to the requested size.
+	//
+	public static final int ERROR_COULD_NOT_RESIZE_LOG = 6629;
+
+	//
+	// MessageId: ERROR_LOG_MULTIPLEXED
+	//
+	// MessageText:
+	//
+	// Log is multiplexed, no direct writes to the physical log is allowed.
+	//
+	public static final int ERROR_LOG_MULTIPLEXED = 6630;
+
+	//
+	// MessageId: ERROR_LOG_DEDICATED
+	//
+	// MessageText:
+	//
+	// The operation failed because the log is a dedicated log.
+	//
+	public static final int ERROR_LOG_DEDICATED = 6631;
+
+	//
+	// MessageId: ERROR_LOG_ARCHIVE_NOT_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The operation requires an archive context.
+	//
+	public static final int ERROR_LOG_ARCHIVE_NOT_IN_PROGRESS = 6632;
+
+	//
+	// MessageId: ERROR_LOG_ARCHIVE_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// Log archival is in progress.
+	//
+	public static final int ERROR_LOG_ARCHIVE_IN_PROGRESS = 6633;
+
+	//
+	// MessageId: ERROR_LOG_EPHEMERAL
+	//
+	// MessageText:
+	//
+	// The operation requires a non-ephemeral log, but the log is ephemeral.
+	//
+	public static final int ERROR_LOG_EPHEMERAL = 6634;
+
+	//
+	// MessageId: ERROR_LOG_NOT_ENOUGH_CONTAINERS
+	//
+	// MessageText:
+	//
+	// The log must have at least two containers before it can be read from or
+	// written to.
+	//
+	public static final int ERROR_LOG_NOT_ENOUGH_CONTAINERS = 6635;
+
+	//
+	// MessageId: ERROR_LOG_CLIENT_ALREADY_REGISTERED
+	//
+	// MessageText:
+	//
+	// A log client has already registered on the stream.
+	//
+	public static final int ERROR_LOG_CLIENT_ALREADY_REGISTERED = 6636;
+
+	//
+	// MessageId: ERROR_LOG_CLIENT_NOT_REGISTERED
+	//
+	// MessageText:
+	//
+	// A log client has not been registered on the stream.
+	//
+	public static final int ERROR_LOG_CLIENT_NOT_REGISTERED = 6637;
+
+	//
+	// MessageId: ERROR_LOG_FULL_HANDLER_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// A request has already been made to handle the log full condition.
+	//
+	public static final int ERROR_LOG_FULL_HANDLER_IN_PROGRESS = 6638;
+
+	//
+	// MessageId: ERROR_LOG_CONTAINER_READ_FAILED
+	//
+	// MessageText:
+	//
+	// Log service enountered an error when attempting to read from a log
+	// container.
+	//
+	public static final int ERROR_LOG_CONTAINER_READ_FAILED = 6639;
+
+	//
+	// MessageId: ERROR_LOG_CONTAINER_WRITE_FAILED
+	//
+	// MessageText:
+	//
+	// Log service enountered an error when attempting to write to a log
+	// container.
+	//
+	public static final int ERROR_LOG_CONTAINER_WRITE_FAILED = 6640;
+
+	//
+	// MessageId: ERROR_LOG_CONTAINER_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// Log service enountered an error when attempting open a log container.
+	//
+	public static final int ERROR_LOG_CONTAINER_OPEN_FAILED = 6641;
+
+	//
+	// MessageId: ERROR_LOG_CONTAINER_STATE_INVALID
+	//
+	// MessageText:
+	//
+	// Log service enountered an invalid container state when attempting a
+	// requested action.
+	//
+	public static final int ERROR_LOG_CONTAINER_STATE_INVALID = 6642;
+
+	//
+	// MessageId: ERROR_LOG_STATE_INVALID
+	//
+	// MessageText:
+	//
+	// Log service is not in the correct state to perform a requested action.
+	//
+	public static final int ERROR_LOG_STATE_INVALID = 6643;
+
+	//
+	// MessageId: ERROR_LOG_PINNED
+	//
+	// MessageText:
+	//
+	// Log space cannot be reclaimed because the log is pinned.
+	//
+	public static final int ERROR_LOG_PINNED = 6644;
+
+	//
+	// MessageId: ERROR_LOG_METADATA_FLUSH_FAILED
+	//
+	// MessageText:
+	//
+	// Log metadata flush failed.
+	//
+	public static final int ERROR_LOG_METADATA_FLUSH_FAILED = 6645;
+
+	//
+	// MessageId: ERROR_LOG_INCONSISTENT_SECURITY
+	//
+	// MessageText:
+	//
+	// Security on the log and its containers is inconsistent.
+	//
+	public static final int ERROR_LOG_INCONSISTENT_SECURITY = 6646;
+
+	//
+	// MessageId: ERROR_LOG_APPENDED_FLUSH_FAILED
+	//
+	// MessageText:
+	//
+	// Records were appended to the log or reservation changes were made, but
+	// the log could not be flushed.
+	//
+	public static final int ERROR_LOG_APPENDED_FLUSH_FAILED = 6647;
+
+	//
+	// MessageId: ERROR_LOG_PINNED_RESERVATION
+	//
+	// MessageText:
+	//
+	// The log is pinned due to reservation consuming most of the log space.
+	// Free some reserved records to make space available.
+	//
+	public static final int ERROR_LOG_PINNED_RESERVATION = 6648;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Transaction (KTM) Error codes //
+	// =//
+	// =6700 to=6799=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_INVALID_TRANSACTION
+	//
+	// MessageText:
+	//
+	// The transaction handle associated with this operation is not valid.
+	//
+	public static final int ERROR_INVALID_TRANSACTION = 6700;
+
+	//
+	// MessageId: ERROR_TRANSACTION_NOT_ACTIVE
+	//
+	// MessageText:
+	//
+	// The requested operation was made in the context of a transaction that is
+	// no longer active.
+	//
+	public static final int ERROR_TRANSACTION_NOT_ACTIVE = 6701;
+
+	//
+	// MessageId: ERROR_TRANSACTION_REQUEST_NOT_VALID
+	//
+	// MessageText:
+	//
+	// The requested operation is not valid on the Transaction object in its
+	// current state.
+	//
+	public static final int ERROR_TRANSACTION_REQUEST_NOT_VALID = 6702;
+
+	//
+	// MessageId: ERROR_TRANSACTION_NOT_REQUESTED
+	//
+	// MessageText:
+	//
+	// The caller has called a response API, but the response is not expected
+	// because the TM did not issue the corresponding request to the caller.
+	//
+	public static final int ERROR_TRANSACTION_NOT_REQUESTED = 6703;
+
+	//
+	// MessageId: ERROR_TRANSACTION_ALREADY_ABORTED
+	//
+	// MessageText:
+	//
+	// It is too late to perform the requested operation, since the Transaction
+	// has already been aborted.
+	//
+	public static final int ERROR_TRANSACTION_ALREADY_ABORTED = 6704;
+
+	//
+	// MessageId: ERROR_TRANSACTION_ALREADY_COMMITTED
+	//
+	// MessageText:
+	//
+	// It is too late to perform the requested operation, since the Transaction
+	// has already been committed.
+	//
+	public static final int ERROR_TRANSACTION_ALREADY_COMMITTED = 6705;
+
+	//
+	// MessageId: ERROR_TM_INITIALIZATION_FAILED
+	//
+	// MessageText:
+	//
+	// The Transaction Manager was unable to be successfully initialized.
+	// Transacted operations are not supported.
+	//
+	public static final int ERROR_TM_INITIALIZATION_FAILED = 6706;
+
+	//
+	// MessageId: ERROR_RESOURCEMANAGER_READ_ONLY
+	//
+	// MessageText:
+	//
+	// The specified ResourceManager made no changes or updates to the resource
+	// under this transaction.
+	//
+	public static final int ERROR_RESOURCEMANAGER_READ_ONLY = 6707;
+
+	//
+	// MessageId: ERROR_TRANSACTION_NOT_JOINED
+	//
+	// MessageText:
+	//
+	// The resource manager has attempted to prepare a transaction that it has
+	// not successfully joined.
+	//
+	public static final int ERROR_TRANSACTION_NOT_JOINED = 6708;
+
+	//
+	// MessageId: ERROR_TRANSACTION_SUPERIOR_EXISTS
+	//
+	// MessageText:
+	//
+	// The Transaction object already has a superior enlistment, and the caller
+	// attempted an operation that would have created a new superior. Only a
+	// single superior enlistment is allow.
+	//
+	public static final int ERROR_TRANSACTION_SUPERIOR_EXISTS = 6709;
+
+	//
+	// MessageId: ERROR_CRM_PROTOCOL_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The RM tried to register a protocol that already exists.
+	//
+	public static final int ERROR_CRM_PROTOCOL_ALREADY_EXISTS = 6710;
+
+	//
+	// MessageId: ERROR_TRANSACTION_PROPAGATION_FAILED
+	//
+	// MessageText:
+	//
+	// The attempt to propagate the Transaction failed.
+	//
+	public static final int ERROR_TRANSACTION_PROPAGATION_FAILED = 6711;
+
+	//
+	// MessageId: ERROR_CRM_PROTOCOL_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The requested propagation protocol was not registered as a CRM.
+	//
+	public static final int ERROR_CRM_PROTOCOL_NOT_FOUND = 6712;
+
+	//
+	// MessageId: ERROR_TRANSACTION_INVALID_MARSHALL_BUFFER
+	//
+	// MessageText:
+	//
+	// The buffer passed in to PushTransaction or PullTransaction is not in a
+	// valid format.
+	//
+	public static final int ERROR_TRANSACTION_INVALID_MARSHALL_BUFFER = 6713;
+
+	//
+	// MessageId: ERROR_CURRENT_TRANSACTION_NOT_VALID
+	//
+	// MessageText:
+	//
+	// The current transaction context associated with the thread is not a valid
+	// handle to a transaction object.
+	//
+	public static final int ERROR_CURRENT_TRANSACTION_NOT_VALID = 6714;
+
+	//
+	// MessageId: ERROR_TRANSACTION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified Transaction object could not be opened, because it was not
+	// found.
+	//
+	public static final int ERROR_TRANSACTION_NOT_FOUND = 6715;
+
+	//
+	// MessageId: ERROR_RESOURCEMANAGER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified ResourceManager object could not be opened, because it was
+	// not found.
+	//
+	public static final int ERROR_RESOURCEMANAGER_NOT_FOUND = 6716;
+
+	//
+	// MessageId: ERROR_ENLISTMENT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified Enlistment object could not be opened, because it was not
+	// found.
+	//
+	public static final int ERROR_ENLISTMENT_NOT_FOUND = 6717;
+
+	//
+	// MessageId: ERROR_TRANSACTIONMANAGER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified TransactionManager object could not be opened, because it
+	// was not found.
+	//
+	public static final int ERROR_TRANSACTIONMANAGER_NOT_FOUND = 6718;
+
+	//
+	// MessageId: ERROR_TRANSACTIONMANAGER_NOT_ONLINE
+	//
+	// MessageText:
+	//
+	// The specified ResourceManager was unable to create an enlistment, because
+	// its associated TransactionManager is not online.
+	//
+	public static final int ERROR_TRANSACTIONMANAGER_NOT_ONLINE = 6719;
+
+	//
+	// MessageId: ERROR_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION
+	//
+	// MessageText:
+	//
+	// The specified TransactionManager was unable to create the objects
+	// contained in its logfile in the Ob namespace. Therefore, the
+	// TransactionManager was unable to recover.
+	//
+	public static final int ERROR_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION = 6720;
+
+	//
+	// MessageId: ERROR_TRANSACTION_NOT_ROOT
+	//
+	// MessageText:
+	//
+	// The call to create a superior Enlistment on this Transaction object could
+	// not be completed, because the Transaction object specified for the
+	// enlistment is a subordinate branch of the Transaction. Only the root of
+	// the Transactoin can be enlisted on as a superior.
+	//
+	public static final int ERROR_TRANSACTION_NOT_ROOT = 6721;
+
+	//
+	// MessageId: ERROR_TRANSACTION_OBJECT_EXPIRED
+	//
+	// MessageText:
+	//
+	// Because the associated transaction manager or resource manager has been
+	// closed, the handle is no longer valid.
+	//
+	public static final int ERROR_TRANSACTION_OBJECT_EXPIRED = 6722;
+
+	//
+	// MessageId: ERROR_TRANSACTION_RESPONSE_NOT_ENLISTED
+	//
+	// MessageText:
+	//
+	// The specified operation could not be performed on this Superior
+	// enlistment, because the enlistment was not created with the corresponding
+	// completion response in the NotificationMask.
+	//
+	public static final int ERROR_TRANSACTION_RESPONSE_NOT_ENLISTED = 6723;
+
+	//
+	// MessageId: ERROR_TRANSACTION_RECORD_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The specified operation could not be performed, because the record that
+	// would be logged was too long. This can occur because of two conditions:
+	// either there are too many Enlistments on this Transaction, or the
+	// combined RecoveryInformation being logged on behalf of those Enlistments
+	// is too long.
+	//
+	public static final int ERROR_TRANSACTION_RECORD_TOO_LONG = 6724;
+
+	//
+	// MessageId: ERROR_IMPLICIT_TRANSACTION_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Implicit transaction are not supported.
+	//
+	public static final int ERROR_IMPLICIT_TRANSACTION_NOT_SUPPORTED = 6725;
+
+	//
+	// MessageId: ERROR_TRANSACTION_INTEGRITY_VIOLATED
+	//
+	// MessageText:
+	//
+	// The kernel transaction manager had to abort or forget the transaction
+	// because it blocked forward progress.
+	//
+	public static final int ERROR_TRANSACTION_INTEGRITY_VIOLATED = 6726;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Transactional File Services (TxF) //
+	// =Error codes=//
+	// =//
+	// =6800 to=6899=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_TRANSACTIONAL_CONFLICT
+	//
+	// MessageText:
+	//
+	// The function attempted to use a name that is reserved for use by another
+	// transaction.
+	//
+	public static final int ERROR_TRANSACTIONAL_CONFLICT = 6800;
+
+	//
+	// MessageId: ERROR_RM_NOT_ACTIVE
+	//
+	// MessageText:
+	//
+	// Transaction support within the specified file system resource manager is
+	// not started or was shutdown due to an error.
+	//
+	public static final int ERROR_RM_NOT_ACTIVE = 6801;
+
+	//
+	// MessageId: ERROR_RM_METADATA_CORRUPT
+	//
+	// MessageText:
+	//
+	// The metadata of the RM has been corrupted. The RM will not function.
+	//
+	public static final int ERROR_RM_METADATA_CORRUPT = 6802;
+
+	//
+	// MessageId: ERROR_DIRECTORY_NOT_RM
+	//
+	// MessageText:
+	//
+	// The specified directory does not contain a resource manager.
+	//
+	public static final int ERROR_DIRECTORY_NOT_RM = 6803;
+
+	//
+	// MessageId: ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE
+	//
+	// MessageText:
+	//
+	// The remote server or share does not support transacted file operations.
+	//
+	public static final int ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE = 6805;
+
+	//
+	// MessageId: ERROR_LOG_RESIZE_INVALID_SIZE
+	//
+	// MessageText:
+	//
+	// The requested log size is invalid.
+	//
+	public static final int ERROR_LOG_RESIZE_INVALID_SIZE = 6806;
+
+	//
+	// MessageId: ERROR_OBJECT_NO_LONGER_EXISTS
+	//
+	// MessageText:
+	//
+	// The object (file, stream, link) corresponding to the handle has been
+	// deleted by a Transaction Savepoint Rollback.
+	//
+	public static final int ERROR_OBJECT_NO_LONGER_EXISTS = 6807;
+
+	//
+	// MessageId: ERROR_STREAM_MINIVERSION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified file miniversion was not found for this transacted file
+	// open.
+	//
+	public static final int ERROR_STREAM_MINIVERSION_NOT_FOUND = 6808;
+
+	//
+	// MessageId: ERROR_STREAM_MINIVERSION_NOT_VALID
+	//
+	// MessageText:
+	//
+	// The specified file miniversion was found but has been invalidated. Most
+	// likely cause is a transaction savepoint rollback.
+	//
+	public static final int ERROR_STREAM_MINIVERSION_NOT_VALID = 6809;
+
+	//
+	// MessageId: ERROR_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION
+	//
+	// MessageText:
+	//
+	// A miniversion may only be opened in the context of the transaction that
+	// created it.
+	//
+	public static final int ERROR_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION = 6810;
+
+	//
+	// MessageId: ERROR_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT
+	//
+	// MessageText:
+	//
+	// It is not possible to open a miniversion with modify access.
+	//
+	public static final int ERROR_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT = 6811;
+
+	//
+	// MessageId: ERROR_CANT_CREATE_MORE_STREAM_MINIVERSIONS
+	//
+	// MessageText:
+	//
+	// It is not possible to create any more miniversions for this stream.
+	//
+	public static final int ERROR_CANT_CREATE_MORE_STREAM_MINIVERSIONS = 6812;
+
+	//
+	// MessageId: ERROR_REMOTE_FILE_VERSION_MISMATCH
+	//
+	// MessageText:
+	//
+	// The remote server sent mismatching version number or Fid for a file
+	// opened with transactions.
+	//
+	public static final int ERROR_REMOTE_FILE_VERSION_MISMATCH = 6814;
+
+	//
+	// MessageId: ERROR_HANDLE_NO_LONGER_VALID
+	//
+	// MessageText:
+	//
+	// The handle has been invalidated by a transaction. The most likely cause
+	// is the presence of memory mapping on a file or an open handle when the
+	// transaction ended or rolled back to savepoint.
+	//
+	public static final int ERROR_HANDLE_NO_LONGER_VALID = 6815;
+
+	//
+	// MessageId: ERROR_NO_TXF_METADATA
+	//
+	// MessageText:
+	//
+	// There is no transaction metadata on the file.
+	//
+	public static final int ERROR_NO_TXF_METADATA = 6816;
+
+	//
+	// MessageId: ERROR_LOG_CORRUPTION_DETECTED
+	//
+	// MessageText:
+	//
+	// The log data is corrupt.
+	//
+	public static final int ERROR_LOG_CORRUPTION_DETECTED = 6817;
+
+	//
+	// MessageId: ERROR_CANT_RECOVER_WITH_HANDLE_OPEN
+	//
+	// MessageText:
+	//
+	// The file can't be recovered because there is a handle still open on it.
+	//
+	public static final int ERROR_CANT_RECOVER_WITH_HANDLE_OPEN = 6818;
+
+	//
+	// MessageId: ERROR_RM_DISCONNECTED
+	//
+	// MessageText:
+	//
+	// The transaction outcome is unavailable because the resource manager
+	// responsible for it has disconnected.
+	//
+	public static final int ERROR_RM_DISCONNECTED = 6819;
+
+	//
+	// MessageId: ERROR_ENLISTMENT_NOT_SUPERIOR
+	//
+	// MessageText:
+	//
+	// The request was rejected because the enlistment in question is not a
+	// superior enlistment.
+	//
+	public static final int ERROR_ENLISTMENT_NOT_SUPERIOR = 6820;
+
+	//
+	// MessageId: ERROR_RECOVERY_NOT_NEEDED
+	//
+	// MessageText:
+	//
+	// The transactional resource manager is already consistent. Recovery is not
+	// needed.
+	//
+	public static final int ERROR_RECOVERY_NOT_NEEDED = 6821;
+
+	//
+	// MessageId: ERROR_RM_ALREADY_STARTED
+	//
+	// MessageText:
+	//
+	// The transactional resource manager has already been started.
+	//
+	public static final int ERROR_RM_ALREADY_STARTED = 6822;
+
+	//
+	// MessageId: ERROR_FILE_IDENTITY_NOT_PERSISTENT
+	//
+	// MessageText:
+	//
+	// The file cannot be opened transactionally, because its identity depends
+	// on the outcome of an unresolved transaction.
+	//
+	public static final int ERROR_FILE_IDENTITY_NOT_PERSISTENT = 6823;
+
+	//
+	// MessageId: ERROR_CANT_BREAK_TRANSACTIONAL_DEPENDENCY
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because another transaction is
+	// depending on the fact that this property will not change.
+	//
+	public static final int ERROR_CANT_BREAK_TRANSACTIONAL_DEPENDENCY = 6824;
+
+	//
+	// MessageId: ERROR_CANT_CROSS_RM_BOUNDARY
+	//
+	// MessageText:
+	//
+	// The operation would involve a single file with two transactional resource
+	// managers and is therefore not allowed.
+	//
+	public static final int ERROR_CANT_CROSS_RM_BOUNDARY = 6825;
+
+	//
+	// MessageId: ERROR_TXF_DIR_NOT_EMPTY
+	//
+	// MessageText:
+	//
+	// The $Txf directory must be empty for this operation to succeed.
+	//
+	public static final int ERROR_TXF_DIR_NOT_EMPTY = 6826;
+
+	//
+	// MessageId: ERROR_INDOUBT_TRANSACTIONS_EXIST
+	//
+	// MessageText:
+	//
+	// The operation would leave a transactional resource manager in an
+	// inconsistent state and is therefore not allowed.
+	//
+	public static final int ERROR_INDOUBT_TRANSACTIONS_EXIST = 6827;
+
+	//
+	// MessageId: ERROR_TM_VOLATILE
+	//
+	// MessageText:
+	//
+	// The operation could not be completed because the transaction manager does
+	// not have a log.
+	//
+	public static final int ERROR_TM_VOLATILE = 6828;
+
+	//
+	// MessageId: ERROR_ROLLBACK_TIMER_EXPIRED
+	//
+	// MessageText:
+	//
+	// A rollback could not be scheduled because a previously scheduled rollback
+	// has already executed or been queued for execution.
+	//
+	public static final int ERROR_ROLLBACK_TIMER_EXPIRED = 6829;
+
+	//
+	// MessageId: ERROR_TXF_ATTRIBUTE_CORRUPT
+	//
+	// MessageText:
+	//
+	// The transactional metadata attribute on the file or directory is corrupt
+	// and unreadable.
+	//
+	public static final int ERROR_TXF_ATTRIBUTE_CORRUPT = 6830;
+
+	//
+	// MessageId: ERROR_EFS_NOT_ALLOWED_IN_TRANSACTION
+	//
+	// MessageText:
+	//
+	// The encryption operation could not be completed because a transaction is
+	// active.
+	//
+	public static final int ERROR_EFS_NOT_ALLOWED_IN_TRANSACTION = 6831;
+
+	//
+	// MessageId: ERROR_TRANSACTIONAL_OPEN_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// This object is not allowed to be opened in a transaction.
+	//
+	public static final int ERROR_TRANSACTIONAL_OPEN_NOT_ALLOWED = 6832;
+
+	//
+	// MessageId: ERROR_LOG_GROWTH_FAILED
+	//
+	// MessageText:
+	//
+	// An attempt to create space in the transactional resource manager's log
+	// failed. The failure status has been recorded in the event log.
+	//
+	public static final int ERROR_LOG_GROWTH_FAILED = 6833;
+
+	//
+	// MessageId: ERROR_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE
+	//
+	// MessageText:
+	//
+	// Memory mapping (creating a mapped section) a remote file under a
+	// transaction is not supported.
+	//
+	public static final int ERROR_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE = 6834;
+
+	//
+	// MessageId: ERROR_TXF_METADATA_ALREADY_PRESENT
+	//
+	// MessageText:
+	//
+	// Transaction metadata is already present on this file and cannot be
+	// superseded.
+	//
+	public static final int ERROR_TXF_METADATA_ALREADY_PRESENT = 6835;
+
+	//
+	// MessageId: ERROR_TRANSACTION_SCOPE_CALLBACKS_NOT_SET
+	//
+	// MessageText:
+	//
+	// A transaction scope could not be entered because the scope handler has
+	// not been initialized.
+	//
+	public static final int ERROR_TRANSACTION_SCOPE_CALLBACKS_NOT_SET = 6836;
+
+	//
+	// MessageId: ERROR_TRANSACTION_REQUIRED_PROMOTION
+	//
+	// MessageText:
+	//
+	// Promotion was required in order to allow the resource manager to enlist,
+	// but the transaction was set to disallow it.
+	//
+	public static final int ERROR_TRANSACTION_REQUIRED_PROMOTION = 6837;
+
+	//
+	// MessageId: ERROR_CANNOT_EXECUTE_FILE_IN_TRANSACTION
+	//
+	// MessageText:
+	//
+	// This file is open for modification in an unresolved transaction and may
+	// be opened for execute only by a transacted reader.
+	//
+	public static final int ERROR_CANNOT_EXECUTE_FILE_IN_TRANSACTION = 6838;
+
+	//
+	// MessageId: ERROR_TRANSACTIONS_NOT_FROZEN
+	//
+	// MessageText:
+	//
+	// The request to thaw frozen transactions was ignored because transactions
+	// had not previously been frozen.
+	//
+	public static final int ERROR_TRANSACTIONS_NOT_FROZEN = 6839;
+
+	//
+	// MessageId: ERROR_TRANSACTION_FREEZE_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// Transactions cannot be frozen because a freeze is already in progress.
+	//
+	public static final int ERROR_TRANSACTION_FREEZE_IN_PROGRESS = 6840;
+
+	//
+	// MessageId: ERROR_NOT_SNAPSHOT_VOLUME
+	//
+	// MessageText:
+	//
+	// The target volume is not a snapshot volume. This operation is only valid
+	// on a volume mounted as a snapshot.
+	//
+	public static final int ERROR_NOT_SNAPSHOT_VOLUME = 6841;
+
+	//
+	// MessageId: ERROR_NO_SAVEPOINT_WITH_OPEN_FILES
+	//
+	// MessageText:
+	//
+	// The savepoint operation failed because files are open on the transaction.
+	// This is not permitted.
+	//
+	public static final int ERROR_NO_SAVEPOINT_WITH_OPEN_FILES = 6842;
+
+	//
+	// MessageId: ERROR_DATA_LOST_REPAIR
+	//
+	// MessageText:
+	//
+	// Windows has discovered corruption in a file, and that file has since been
+	// repaired. Data loss may have occurred.
+	//
+	public static final int ERROR_DATA_LOST_REPAIR = 6843;
+
+	//
+	// MessageId: ERROR_SPARSE_NOT_ALLOWED_IN_TRANSACTION
+	//
+	// MessageText:
+	//
+	// The sparse operation could not be completed because a transaction is
+	// active on the file.
+	//
+	public static final int ERROR_SPARSE_NOT_ALLOWED_IN_TRANSACTION = 6844;
+
+	//
+	// MessageId: ERROR_TM_IDENTITY_MISMATCH
+	//
+	// MessageText:
+	//
+	// The call to create a TransactionManager object failed because the Tm
+	// Identity stored in the logfile does not match the Tm Identity that was
+	// passed in as an argument.
+	//
+	public static final int ERROR_TM_IDENTITY_MISMATCH = 6845;
+
+	//
+	// MessageId: ERROR_FLOATED_SECTION
+	//
+	// MessageText:
+	//
+	// I/O was attempted on a section object that has been floated as a result
+	// of a transaction ending. There is no valid data.
+	//
+	public static final int ERROR_FLOATED_SECTION = 6846;
+
+	//
+	// MessageId: ERROR_CANNOT_ACCEPT_TRANSACTED_WORK
+	//
+	// MessageText:
+	//
+	// The transactional resource manager cannot currently accept transacted
+	// work due to a transient condition such as low resources.
+	//
+	public static final int ERROR_CANNOT_ACCEPT_TRANSACTED_WORK = 6847;
+
+	//
+	// MessageId: ERROR_CANNOT_ABORT_TRANSACTIONS
+	//
+	// MessageText:
+	//
+	// The transactional resource manager had too many tranactions outstanding
+	// that could not be aborted. The transactional resource manger has been
+	// shut down.
+	//
+	public static final int ERROR_CANNOT_ABORT_TRANSACTIONS = 6848;
+
+	//
+	// MessageId: ERROR_BAD_CLUSTERS
+	//
+	// MessageText:
+	//
+	// The operation could not be completed due to bad clusters on disk.
+	//
+	public static final int ERROR_BAD_CLUSTERS = 6849;
+
+	//
+	// MessageId: ERROR_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION
+	//
+	// MessageText:
+	//
+	// The compression operation could not be completed because a transaction is
+	// active on the file.
+	//
+	public static final int ERROR_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION = 6850;
+
+	//
+	// MessageId: ERROR_VOLUME_DIRTY
+	//
+	// MessageText:
+	//
+	// The operation could not be completed because the volume is dirty. Please
+	// run chkdsk and try again.
+	//
+	public static final int ERROR_VOLUME_DIRTY = 6851;
+
+	//
+	// MessageId: ERROR_NO_LINK_TRACKING_IN_TRANSACTION
+	//
+	// MessageText:
+	//
+	// The link tracking operation could not be completed because a transaction
+	// is active.
+	//
+	public static final int ERROR_NO_LINK_TRACKING_IN_TRANSACTION = 6852;
+
+	//
+	// MessageId: ERROR_OPERATION_NOT_SUPPORTED_IN_TRANSACTION
+	//
+	// MessageText:
+	//
+	// This operation cannot be performed in a transaction.
+	//
+	public static final int ERROR_OPERATION_NOT_SUPPORTED_IN_TRANSACTION = 6853;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =6900 to=6999=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Terminal Server Error codes=//
+	// =//
+	// =7000 to=7099=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_CTX_WINSTATION_NAME_INVALID
+	//
+	// MessageText:
+	//
+	// The specified session name is invalid.
+	//
+	public static final int ERROR_CTX_WINSTATION_NAME_INVALID = 7001;
+
+	//
+	// MessageId: ERROR_CTX_INVALID_PD
+	//
+	// MessageText:
+	//
+	// The specified protocol driver is invalid.
+	//
+	public static final int ERROR_CTX_INVALID_PD = 7002;
+
+	//
+	// MessageId: ERROR_CTX_PD_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified protocol driver was not found in the system path.
+	//
+	public static final int ERROR_CTX_PD_NOT_FOUND = 7003;
+
+	//
+	// MessageId: ERROR_CTX_WD_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified terminal connection driver was not found in the system
+	// path.
+	//
+	public static final int ERROR_CTX_WD_NOT_FOUND = 7004;
+
+	//
+	// MessageId: ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY
+	//
+	// MessageText:
+	//
+	// A registry key for event logging could not be created for this session.
+	//
+	public static final int ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY = 7005;
+
+	//
+	// MessageId: ERROR_CTX_SERVICE_NAME_COLLISION
+	//
+	// MessageText:
+	//
+	// A service with the same name already exists on the system.
+	//
+	public static final int ERROR_CTX_SERVICE_NAME_COLLISION = 7006;
+
+	//
+	// MessageId: ERROR_CTX_CLOSE_PENDING
+	//
+	// MessageText:
+	//
+	// A close operation is pending on the session.
+	//
+	public static final int ERROR_CTX_CLOSE_PENDING = 7007;
+
+	//
+	// MessageId: ERROR_CTX_NO_OUTBUF
+	//
+	// MessageText:
+	//
+	// There are no free output buffers available.
+	//
+	public static final int ERROR_CTX_NO_OUTBUF = 7008;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_INF_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The MODEM.INF file was not found.
+	//
+	public static final int ERROR_CTX_MODEM_INF_NOT_FOUND = 7009;
+
+	//
+	// MessageId: ERROR_CTX_INVALID_MODEMNAME
+	//
+	// MessageText:
+	//
+	// The modem name was not found in MODEM.INF.
+	//
+	public static final int ERROR_CTX_INVALID_MODEMNAME = 7010;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_RESPONSE_ERROR
+	//
+	// MessageText:
+	//
+	// The modem did not accept the command sent to it. Verify that the
+	// configured modem name matches the attached modem.
+	//
+	public static final int ERROR_CTX_MODEM_RESPONSE_ERROR = 7011;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_RESPONSE_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The modem did not respond to the command sent to it. Verify that the
+	// modem is properly cabled and powered on.
+	//
+	public static final int ERROR_CTX_MODEM_RESPONSE_TIMEOUT = 7012;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_RESPONSE_NO_CARRIER
+	//
+	// MessageText:
+	//
+	// Carrier detect has failed or carrier has been dropped due to disconnect.
+	//
+	public static final int ERROR_CTX_MODEM_RESPONSE_NO_CARRIER = 7013;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE
+	//
+	// MessageText:
+	//
+	// Dial tone not detected within the required time. Verify that the phone
+	// cable is properly attached and functional.
+	//
+	public static final int ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE = 7014;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_RESPONSE_BUSY
+	//
+	// MessageText:
+	//
+	// Busy signal detected at remote site on callback.
+	//
+	public static final int ERROR_CTX_MODEM_RESPONSE_BUSY = 7015;
+
+	//
+	// MessageId: ERROR_CTX_MODEM_RESPONSE_VOICE
+	//
+	// MessageText:
+	//
+	// Voice detected at remote site on callback.
+	//
+	public static final int ERROR_CTX_MODEM_RESPONSE_VOICE = 7016;
+
+	//
+	// MessageId: ERROR_CTX_TD_ERROR
+	//
+	// MessageText:
+	//
+	// Transport driver error
+	//
+	public static final int ERROR_CTX_TD_ERROR = 7017;
+
+	//
+	// MessageId: ERROR_CTX_WINSTATION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified session cannot be found.
+	//
+	public static final int ERROR_CTX_WINSTATION_NOT_FOUND = 7022;
+
+	//
+	// MessageId: ERROR_CTX_WINSTATION_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified session name is already in use.
+	//
+	public static final int ERROR_CTX_WINSTATION_ALREADY_EXISTS = 7023;
+
+	//
+	// MessageId: ERROR_CTX_WINSTATION_BUSY
+	//
+	// MessageText:
+	//
+	// The requested operation cannot be completed because the terminal
+	// connection is currently busy processing a connect, disconnect, reset, or
+	// delete operation.
+	//
+	public static final int ERROR_CTX_WINSTATION_BUSY = 7024;
+
+	//
+	// MessageId: ERROR_CTX_BAD_VIDEO_MODE
+	//
+	// MessageText:
+	//
+	// An attempt has been made to connect to a session whose video mode is not
+	// supported by the current client.
+	//
+	public static final int ERROR_CTX_BAD_VIDEO_MODE = 7025;
+
+	//
+	// MessageId: ERROR_CTX_GRAPHICS_INVALID
+	//
+	// MessageText:
+	//
+	// The application attempted to enable DOS graphics mode.
+	// DOS graphics mode is not supported.
+	//
+	public static final int ERROR_CTX_GRAPHICS_INVALID = 7035;
+
+	//
+	// MessageId: ERROR_CTX_LOGON_DISABLED
+	//
+	// MessageText:
+	//
+	// Your interactive logon privilege has been disabled.
+	// Please contact your administrator.
+	//
+	public static final int ERROR_CTX_LOGON_DISABLED = 7037;
+
+	//
+	// MessageId: ERROR_CTX_NOT_CONSOLE
+	//
+	// MessageText:
+	//
+	// The requested operation can be performed only on the system console.
+	// This is most often the result of a driver or system DLL requiring direct
+	// console access.
+	//
+	public static final int ERROR_CTX_NOT_CONSOLE = 7038;
+
+	//
+	// MessageId: ERROR_CTX_CLIENT_QUERY_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The client failed to respond to the server connect message.
+	//
+	public static final int ERROR_CTX_CLIENT_QUERY_TIMEOUT = 7040;
+
+	//
+	// MessageId: ERROR_CTX_CONSOLE_DISCONNECT
+	//
+	// MessageText:
+	//
+	// Disconnecting the console session is not supported.
+	//
+	public static final int ERROR_CTX_CONSOLE_DISCONNECT = 7041;
+
+	//
+	// MessageId: ERROR_CTX_CONSOLE_CONNECT
+	//
+	// MessageText:
+	//
+	// Reconnecting a disconnected session to the console is not supported.
+	//
+	public static final int ERROR_CTX_CONSOLE_CONNECT = 7042;
+
+	//
+	// MessageId: ERROR_CTX_SHADOW_DENIED
+	//
+	// MessageText:
+	//
+	// The request to control another session remotely was denied.
+	//
+	public static final int ERROR_CTX_SHADOW_DENIED = 7044;
+
+	//
+	// MessageId: ERROR_CTX_WINSTATION_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// The requested session access is denied.
+	//
+	public static final int ERROR_CTX_WINSTATION_ACCESS_DENIED = 7045;
+
+	//
+	// MessageId: ERROR_CTX_INVALID_WD
+	//
+	// MessageText:
+	//
+	// The specified terminal connection driver is invalid.
+	//
+	public static final int ERROR_CTX_INVALID_WD = 7049;
+
+	//
+	// MessageId: ERROR_CTX_SHADOW_INVALID
+	//
+	// MessageText:
+	//
+	// The requested session cannot be controlled remotely.
+	// This may be because the session is disconnected or does not currently
+	// have a user logged on.
+	//
+	public static final int ERROR_CTX_SHADOW_INVALID = 7050;
+
+	//
+	// MessageId: ERROR_CTX_SHADOW_DISABLED
+	//
+	// MessageText:
+	//
+	// The requested session is not configured to allow remote control.
+	//
+	public static final int ERROR_CTX_SHADOW_DISABLED = 7051;
+
+	//
+	// MessageId: ERROR_CTX_CLIENT_LICENSE_IN_USE
+	//
+	// MessageText:
+	//
+	// Your request to connect to this Terminal Server has been rejected. Your
+	// Terminal Server client license number is currently being used by another
+	// user.
+	// Please call your system administrator to obtain a unique license number.
+	//
+	public static final int ERROR_CTX_CLIENT_LICENSE_IN_USE = 7052;
+
+	//
+	// MessageId: ERROR_CTX_CLIENT_LICENSE_NOT_SET
+	//
+	// MessageText:
+	//
+	// Your request to connect to this Terminal Server has been rejected. Your
+	// Terminal Server client license number has not been entered for this copy
+	// of the Terminal Server client.
+	// Please contact your system administrator.
+	//
+	public static final int ERROR_CTX_CLIENT_LICENSE_NOT_SET = 7053;
+
+	//
+	// MessageId: ERROR_CTX_LICENSE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The number of connections to this computer is limited and all connections
+	// are in use right now.
+	// Try connecting later or contact your system administrator.
+	//
+	public static final int ERROR_CTX_LICENSE_NOT_AVAILABLE = 7054;
+
+	//
+	// MessageId: ERROR_CTX_LICENSE_CLIENT_INVALID
+	//
+	// MessageText:
+	//
+	// The client you are using is not licensed to use this system. Your logon
+	// request is denied.
+	//
+	public static final int ERROR_CTX_LICENSE_CLIENT_INVALID = 7055;
+
+	//
+	// MessageId: ERROR_CTX_LICENSE_EXPIRED
+	//
+	// MessageText:
+	//
+	// The system license has expired. Your logon request is denied.
+	//
+	public static final int ERROR_CTX_LICENSE_EXPIRED = 7056;
+
+	//
+	// MessageId: ERROR_CTX_SHADOW_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// Remote control could not be terminated because the specified session is
+	// not currently being remotely controlled.
+	//
+	public static final int ERROR_CTX_SHADOW_NOT_RUNNING = 7057;
+
+	//
+	// MessageId: ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE
+	//
+	// MessageText:
+	//
+	// The remote control of the console was terminated because the display mode
+	// was changed. Changing the display mode in a remote control session is not
+	// supported.
+	//
+	public static final int ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 7058;
+
+	//
+	// MessageId: ERROR_ACTIVATION_COUNT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// Activation has already been reset the maximum number of times for this
+	// installation. Your activation timer will not be cleared.
+	//
+	public static final int ERROR_ACTIVATION_COUNT_EXCEEDED = 7059;
+
+	//
+	// MessageId: ERROR_CTX_WINSTATIONS_DISABLED
+	//
+	// MessageText:
+	//
+	// Remote logins are currently disabled.
+	//
+	public static final int ERROR_CTX_WINSTATIONS_DISABLED = 7060;
+
+	//
+	// MessageId: ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED
+	//
+	// MessageText:
+	//
+	// You do not have the proper encryption level to access this Session.
+	//
+	public static final int ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED = 7061;
+
+	//
+	// MessageId: ERROR_CTX_SESSION_IN_USE
+	//
+	// MessageText:
+	//
+	// The user %s\\%s is currently logged on to this computer. Only the current
+	// user or an administrator can log on to this computer.
+	//
+	public static final int ERROR_CTX_SESSION_IN_USE = 7062;
+
+	//
+	// MessageId: ERROR_CTX_NO_FORCE_LOGOFF
+	//
+	// MessageText:
+	//
+	// The user %s\\%s is already logged on to the console of this computer. You
+	// do not have permission to log in at this time. To resolve this issue,
+	// contact %s\\%s and have them log off.
+	//
+	public static final int ERROR_CTX_NO_FORCE_LOGOFF = 7063;
+
+	//
+	// MessageId: ERROR_CTX_ACCOUNT_RESTRICTION
+	//
+	// MessageText:
+	//
+	// Unable to log you on because of an account restriction.
+	//
+	public static final int ERROR_CTX_ACCOUNT_RESTRICTION = 7064;
+
+	//
+	// MessageId: ERROR_RDP_PROTOCOL_ERROR
+	//
+	// MessageText:
+	//
+	// The RDP protocol component %2 detected an error in the protocol stream
+	// and has disconnected the client.
+	//
+	public static final int ERROR_RDP_PROTOCOL_ERROR = 7065;
+
+	//
+	// MessageId: ERROR_CTX_CDM_CONNECT
+	//
+	// MessageText:
+	//
+	// The Client Drive Mapping Service Has Connected on Terminal Connection.
+	//
+	public static final int ERROR_CTX_CDM_CONNECT = 7066;
+
+	//
+	// MessageId: ERROR_CTX_CDM_DISCONNECT
+	//
+	// MessageText:
+	//
+	// The Client Drive Mapping Service Has Disconnected on Terminal Connection.
+	//
+	public static final int ERROR_CTX_CDM_DISCONNECT = 7067;
+
+	//
+	// MessageId: ERROR_CTX_SECURITY_LAYER_ERROR
+	//
+	// MessageText:
+	//
+	// The Terminal Server security layer detected an error in the protocol
+	// stream and has disconnected the client.
+	//
+	public static final int ERROR_CTX_SECURITY_LAYER_ERROR = 7068;
+
+	//
+	// MessageId: ERROR_TS_INCOMPATIBLE_SESSIONS
+	//
+	// MessageText:
+	//
+	// The target session is incompatible with the current session.
+	//
+	public static final int ERROR_TS_INCOMPATIBLE_SESSIONS = 7069;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =7100 to=7499=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =/
+	// =Traffic Control Error Codes=/
+	// =/
+	// =7500 to=7999=/
+	// =/
+	// =defined in: tcerror.h=/
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Active Directory Error codes=//
+	// =//
+	// =8000 to=8999=//
+	// /////////////////////////////////////////////////
+
+	// *****************
+	// FACILITY_FILE_REPLICATION_SERVICE
+	// *****************
+	//
+	// MessageId: FRS_ERR_INVALID_API_SEQUENCE
+	//
+	// MessageText:
+	//
+	// The file replication service API was called incorrectly.
+	//
+	public static final int FRS_ERR_INVALID_API_SEQUENCE = 8001;
+
+	//
+	// MessageId: FRS_ERR_STARTING_SERVICE
+	//
+	// MessageText:
+	//
+	// The file replication service cannot be started.
+	//
+	public static final int FRS_ERR_STARTING_SERVICE = 8002;
+
+	//
+	// MessageId: FRS_ERR_STOPPING_SERVICE
+	//
+	// MessageText:
+	//
+	// The file replication service cannot be stopped.
+	//
+	public static final int FRS_ERR_STOPPING_SERVICE = 8003;
+
+	//
+	// MessageId: FRS_ERR_INTERNAL_API
+	//
+	// MessageText:
+	//
+	// The file replication service API terminated the request.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_INTERNAL_API = 8004;
+
+	//
+	// MessageId: FRS_ERR_INTERNAL
+	//
+	// MessageText:
+	//
+	// The file replication service terminated the request.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_INTERNAL = 8005;
+
+	//
+	// MessageId: FRS_ERR_SERVICE_COMM
+	//
+	// MessageText:
+	//
+	// The file replication service cannot be contacted.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_SERVICE_COMM = 8006;
+
+	//
+	// MessageId: FRS_ERR_INSUFFICIENT_PRIV
+	//
+	// MessageText:
+	//
+	// The file replication service cannot satisfy the request because the user
+	// has insufficient privileges.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_INSUFFICIENT_PRIV = 8007;
+
+	//
+	// MessageId: FRS_ERR_AUTHENTICATION
+	//
+	// MessageText:
+	//
+	// The file replication service cannot satisfy the request because
+	// authenticated RPC is not available.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_AUTHENTICATION = 8008;
+
+	//
+	// MessageId: FRS_ERR_PARENT_INSUFFICIENT_PRIV
+	//
+	// MessageText:
+	//
+	// The file replication service cannot satisfy the request because the user
+	// has insufficient privileges on the domain controller.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_PARENT_INSUFFICIENT_PRIV = 8009;
+
+	//
+	// MessageId: FRS_ERR_PARENT_AUTHENTICATION
+	//
+	// MessageText:
+	//
+	// The file replication service cannot satisfy the request because
+	// authenticated RPC is not available on the domain controller.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_PARENT_AUTHENTICATION = 8010;
+
+	//
+	// MessageId: FRS_ERR_CHILD_TO_PARENT_COMM
+	//
+	// MessageText:
+	//
+	// The file replication service cannot communicate with the file replication
+	// service on the domain controller.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_CHILD_TO_PARENT_COMM = 8011;
+
+	//
+	// MessageId: FRS_ERR_PARENT_TO_CHILD_COMM
+	//
+	// MessageText:
+	//
+	// The file replication service on the domain controller cannot communicate
+	// with the file replication service on this computer.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_PARENT_TO_CHILD_COMM = 8012;
+
+	//
+	// MessageId: FRS_ERR_SYSVOL_POPULATE
+	//
+	// MessageText:
+	//
+	// The file replication service cannot populate the system volume because of
+	// an internal error.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_SYSVOL_POPULATE = 8013;
+
+	//
+	// MessageId: FRS_ERR_SYSVOL_POPULATE_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The file replication service cannot populate the system volume because of
+	// an internal timeout.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_SYSVOL_POPULATE_TIMEOUT = 8014;
+
+	//
+	// MessageId: FRS_ERR_SYSVOL_IS_BUSY
+	//
+	// MessageText:
+	//
+	// The file replication service cannot process the request. The system
+	// volume is busy with a previous request.
+	//
+	public static final int FRS_ERR_SYSVOL_IS_BUSY = 8015;
+
+	//
+	// MessageId: FRS_ERR_SYSVOL_DEMOTE
+	//
+	// MessageText:
+	//
+	// The file replication service cannot stop replicating the system volume
+	// because of an internal error.
+	// The event log may have more information.
+	//
+	public static final int FRS_ERR_SYSVOL_DEMOTE = 8016;
+
+	//
+	// MessageId: FRS_ERR_INVALID_SERVICE_PARAMETER
+	//
+	// MessageText:
+	//
+	// The file replication service detected an invalid parameter.
+	//
+	public static final int FRS_ERR_INVALID_SERVICE_PARAMETER = 8017;
+
+	// *****************
+	// FACILITY DIRECTORY SERVICE
+	// *****************
+	public static final int DS_S_SUCCESS = NO_ERROR;
+	//
+	// MessageId: ERROR_DS_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// An error occurred while installing the directory service. For more
+	// information, see the event log.
+	//
+	public static final int ERROR_DS_NOT_INSTALLED = 8200;
+
+	//
+	// MessageId: ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY
+	//
+	// MessageText:
+	//
+	// The directory service evaluated group memberships locally.
+	//
+	public static final int ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = 8201;
+
+	//
+	// MessageId: ERROR_DS_NO_ATTRIBUTE_OR_VALUE
+	//
+	// MessageText:
+	//
+	// The specified directory service attribute or value does not exist.
+	//
+	public static final int ERROR_DS_NO_ATTRIBUTE_OR_VALUE = 8202;
+
+	//
+	// MessageId: ERROR_DS_INVALID_ATTRIBUTE_SYNTAX
+	//
+	// MessageText:
+	//
+	// The attribute syntax specified to the directory service is invalid.
+	//
+	public static final int ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = 8203;
+
+	//
+	// MessageId: ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED
+	//
+	// MessageText:
+	//
+	// The attribute type specified to the directory service is not defined.
+	//
+	public static final int ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = 8204;
+
+	//
+	// MessageId: ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified directory service attribute or value already exists.
+	//
+	public static final int ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = 8205;
+
+	//
+	// MessageId: ERROR_DS_BUSY
+	//
+	// MessageText:
+	//
+	// The directory service is busy.
+	//
+	public static final int ERROR_DS_BUSY = 8206;
+
+	//
+	// MessageId: ERROR_DS_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The directory service is unavailable.
+	//
+	public static final int ERROR_DS_UNAVAILABLE = 8207;
+
+	//
+	// MessageId: ERROR_DS_NO_RIDS_ALLOCATED
+	//
+	// MessageText:
+	//
+	// The directory service was unable to allocate a relative identifier.
+	//
+	public static final int ERROR_DS_NO_RIDS_ALLOCATED = 8208;
+
+	//
+	// MessageId: ERROR_DS_NO_MORE_RIDS
+	//
+	// MessageText:
+	//
+	// The directory service has exhausted the pool of relative identifiers.
+	//
+	public static final int ERROR_DS_NO_MORE_RIDS = 8209;
+
+	//
+	// MessageId: ERROR_DS_INCORRECT_ROLE_OWNER
+	//
+	// MessageText:
+	//
+	// The requested operation could not be performed because the directory
+	// service is not the master for that type of operation.
+	//
+	public static final int ERROR_DS_INCORRECT_ROLE_OWNER = 8210;
+
+	//
+	// MessageId: ERROR_DS_RIDMGR_INIT_ERROR
+	//
+	// MessageText:
+	//
+	// The directory service was unable to initialize the subsystem that
+	// allocates relative identifiers.
+	//
+	public static final int ERROR_DS_RIDMGR_INIT_ERROR = 8211;
+
+	//
+	// MessageId: ERROR_DS_OBJ_CLASS_VIOLATION
+	//
+	// MessageText:
+	//
+	// The requested operation did not satisfy one or more constraints
+	// associated with the class of the object.
+	//
+	public static final int ERROR_DS_OBJ_CLASS_VIOLATION = 8212;
+
+	//
+	// MessageId: ERROR_DS_CANT_ON_NON_LEAF
+	//
+	// MessageText:
+	//
+	// The directory service can perform the requested operation only on a leaf
+	// object.
+	//
+	public static final int ERROR_DS_CANT_ON_NON_LEAF = 8213;
+
+	//
+	// MessageId: ERROR_DS_CANT_ON_RDN
+	//
+	// MessageText:
+	//
+	// The directory service cannot perform the requested operation on the RDN
+	// attribute of an object.
+	//
+	public static final int ERROR_DS_CANT_ON_RDN = 8214;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOD_OBJ_CLASS
+	//
+	// MessageText:
+	//
+	// The directory service detected an attempt to modify the object class of
+	// an object.
+	//
+	public static final int ERROR_DS_CANT_MOD_OBJ_CLASS = 8215;
+
+	//
+	// MessageId: ERROR_DS_CROSS_DOM_MOVE_ERROR
+	//
+	// MessageText:
+	//
+	// The requested cross-domain move operation could not be performed.
+	//
+	public static final int ERROR_DS_CROSS_DOM_MOVE_ERROR = 8216;
+
+	//
+	// MessageId: ERROR_DS_GC_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// Unable to contact the global catalog server.
+	//
+	public static final int ERROR_DS_GC_NOT_AVAILABLE = 8217;
+
+	//
+	// MessageId: ERROR_SHARED_POLICY
+	//
+	// MessageText:
+	//
+	// The policy object is shared and can only be modified at the root.
+	//
+	public static final int ERROR_SHARED_POLICY = 8218;
+
+	//
+	// MessageId: ERROR_POLICY_OBJECT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The policy object does not exist.
+	//
+	public static final int ERROR_POLICY_OBJECT_NOT_FOUND = 8219;
+
+	//
+	// MessageId: ERROR_POLICY_ONLY_IN_DS
+	//
+	// MessageText:
+	//
+	// The requested policy information is only in the directory service.
+	//
+	public static final int ERROR_POLICY_ONLY_IN_DS = 8220;
+
+	//
+	// MessageId: ERROR_PROMOTION_ACTIVE
+	//
+	// MessageText:
+	//
+	// A domain controller promotion is currently active.
+	//
+	public static final int ERROR_PROMOTION_ACTIVE = 8221;
+
+	//
+	// MessageId: ERROR_NO_PROMOTION_ACTIVE
+	//
+	// MessageText:
+	//
+	// A domain controller promotion is not currently active
+	//
+	public static final int ERROR_NO_PROMOTION_ACTIVE = 8222;
+
+	// =8223 unused
+	//
+	// MessageId: ERROR_DS_OPERATIONS_ERROR
+	//
+	// MessageText:
+	//
+	// An operations error occurred.
+	//
+	public static final int ERROR_DS_OPERATIONS_ERROR = 8224;
+
+	//
+	// MessageId: ERROR_DS_PROTOCOL_ERROR
+	//
+	// MessageText:
+	//
+	// A protocol error occurred.
+	//
+	public static final int ERROR_DS_PROTOCOL_ERROR = 8225;
+
+	//
+	// MessageId: ERROR_DS_TIMELIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The time limit for this request was exceeded.
+	//
+	public static final int ERROR_DS_TIMELIMIT_EXCEEDED = 8226;
+
+	//
+	// MessageId: ERROR_DS_SIZELIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The size limit for this request was exceeded.
+	//
+	public static final int ERROR_DS_SIZELIMIT_EXCEEDED = 8227;
+
+	//
+	// MessageId: ERROR_DS_ADMIN_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The administrative limit for this request was exceeded.
+	//
+	public static final int ERROR_DS_ADMIN_LIMIT_EXCEEDED = 8228;
+
+	//
+	// MessageId: ERROR_DS_COMPARE_FALSE
+	//
+	// MessageText:
+	//
+	// The compare response was false.
+	//
+	public static final int ERROR_DS_COMPARE_FALSE = 8229;
+
+	//
+	// MessageId: ERROR_DS_COMPARE_TRUE
+	//
+	// MessageText:
+	//
+	// The compare response was true.
+	//
+	public static final int ERROR_DS_COMPARE_TRUE = 8230;
+
+	//
+	// MessageId: ERROR_DS_AUTH_METHOD_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested authentication method is not supported by the server.
+	//
+	public static final int ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = 8231;
+
+	//
+	// MessageId: ERROR_DS_STRONG_AUTH_REQUIRED
+	//
+	// MessageText:
+	//
+	// A more secure authentication method is required for this server.
+	//
+	public static final int ERROR_DS_STRONG_AUTH_REQUIRED = 8232;
+
+	//
+	// MessageId: ERROR_DS_INAPPROPRIATE_AUTH
+	//
+	// MessageText:
+	//
+	// Inappropriate authentication.
+	//
+	public static final int ERROR_DS_INAPPROPRIATE_AUTH = 8233;
+
+	//
+	// MessageId: ERROR_DS_AUTH_UNKNOWN
+	//
+	// MessageText:
+	//
+	// The authentication mechanism is unknown.
+	//
+	public static final int ERROR_DS_AUTH_UNKNOWN = 8234;
+
+	//
+	// MessageId: ERROR_DS_REFERRAL
+	//
+	// MessageText:
+	//
+	// A referral was returned from the server.
+	//
+	public static final int ERROR_DS_REFERRAL = 8235;
+
+	//
+	// MessageId: ERROR_DS_UNAVAILABLE_CRIT_EXTENSION
+	//
+	// MessageText:
+	//
+	// The server does not support the requested critical extension.
+	//
+	public static final int ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = 8236;
+
+	//
+	// MessageId: ERROR_DS_CONFIDENTIALITY_REQUIRED
+	//
+	// MessageText:
+	//
+	// This request requires a secure connection.
+	//
+	public static final int ERROR_DS_CONFIDENTIALITY_REQUIRED = 8237;
+
+	//
+	// MessageId: ERROR_DS_INAPPROPRIATE_MATCHING
+	//
+	// MessageText:
+	//
+	// Inappropriate matching.
+	//
+	public static final int ERROR_DS_INAPPROPRIATE_MATCHING = 8238;
+
+	//
+	// MessageId: ERROR_DS_CONSTRAINT_VIOLATION
+	//
+	// MessageText:
+	//
+	// A constraint violation occurred.
+	//
+	public static final int ERROR_DS_CONSTRAINT_VIOLATION = 8239;
+
+	//
+	// MessageId: ERROR_DS_NO_SUCH_OBJECT
+	//
+	// MessageText:
+	//
+	// There is no such object on the server.
+	//
+	public static final int ERROR_DS_NO_SUCH_OBJECT = 8240;
+
+	//
+	// MessageId: ERROR_DS_ALIAS_PROBLEM
+	//
+	// MessageText:
+	//
+	// There is an alias problem.
+	//
+	public static final int ERROR_DS_ALIAS_PROBLEM = 8241;
+
+	//
+	// MessageId: ERROR_DS_INVALID_DN_SYNTAX
+	//
+	// MessageText:
+	//
+	// An invalid dn syntax has been specified.
+	//
+	public static final int ERROR_DS_INVALID_DN_SYNTAX = 8242;
+
+	//
+	// MessageId: ERROR_DS_IS_LEAF
+	//
+	// MessageText:
+	//
+	// The object is a leaf object.
+	//
+	public static final int ERROR_DS_IS_LEAF = 8243;
+
+	//
+	// MessageId: ERROR_DS_ALIAS_DEREF_PROBLEM
+	//
+	// MessageText:
+	//
+	// There is an alias dereferencing problem.
+	//
+	public static final int ERROR_DS_ALIAS_DEREF_PROBLEM = 8244;
+
+	//
+	// MessageId: ERROR_DS_UNWILLING_TO_PERFORM
+	//
+	// MessageText:
+	//
+	// The server is unwilling to process the request.
+	//
+	public static final int ERROR_DS_UNWILLING_TO_PERFORM = 8245;
+
+	//
+	// MessageId: ERROR_DS_LOOP_DETECT
+	//
+	// MessageText:
+	//
+	// A loop has been detected.
+	//
+	public static final int ERROR_DS_LOOP_DETECT = 8246;
+
+	//
+	// MessageId: ERROR_DS_NAMING_VIOLATION
+	//
+	// MessageText:
+	//
+	// There is a naming violation.
+	//
+	public static final int ERROR_DS_NAMING_VIOLATION = 8247;
+
+	//
+	// MessageId: ERROR_DS_OBJECT_RESULTS_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// The result set is too large.
+	//
+	public static final int ERROR_DS_OBJECT_RESULTS_TOO_LARGE = 8248;
+
+	//
+	// MessageId: ERROR_DS_AFFECTS_MULTIPLE_DSAS
+	//
+	// MessageText:
+	//
+	// The operation affects multiple DSAs
+	//
+	public static final int ERROR_DS_AFFECTS_MULTIPLE_DSAS = 8249;
+
+	//
+	// MessageId: ERROR_DS_SERVER_DOWN
+	//
+	// MessageText:
+	//
+	// The server is not operational.
+	//
+	public static final int ERROR_DS_SERVER_DOWN = 8250;
+
+	//
+	// MessageId: ERROR_DS_LOCAL_ERROR
+	//
+	// MessageText:
+	//
+	// A local error has occurred.
+	//
+	public static final int ERROR_DS_LOCAL_ERROR = 8251;
+
+	//
+	// MessageId: ERROR_DS_ENCODING_ERROR
+	//
+	// MessageText:
+	//
+	// An encoding error has occurred.
+	//
+	public static final int ERROR_DS_ENCODING_ERROR = 8252;
+
+	//
+	// MessageId: ERROR_DS_DECODING_ERROR
+	//
+	// MessageText:
+	//
+	// A decoding error has occurred.
+	//
+	public static final int ERROR_DS_DECODING_ERROR = 8253;
+
+	//
+	// MessageId: ERROR_DS_FILTER_UNKNOWN
+	//
+	// MessageText:
+	//
+	// The search filter cannot be recognized.
+	//
+	public static final int ERROR_DS_FILTER_UNKNOWN = 8254;
+
+	//
+	// MessageId: ERROR_DS_PARAM_ERROR
+	//
+	// MessageText:
+	//
+	// One or more parameters are illegal.
+	//
+	public static final int ERROR_DS_PARAM_ERROR = 8255;
+
+	//
+	// MessageId: ERROR_DS_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The specified method is not supported.
+	//
+	public static final int ERROR_DS_NOT_SUPPORTED = 8256;
+
+	//
+	// MessageId: ERROR_DS_NO_RESULTS_RETURNED
+	//
+	// MessageText:
+	//
+	// No results were returned.
+	//
+	public static final int ERROR_DS_NO_RESULTS_RETURNED = 8257;
+
+	//
+	// MessageId: ERROR_DS_CONTROL_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified control is not supported by the server.
+	//
+	public static final int ERROR_DS_CONTROL_NOT_FOUND = 8258;
+
+	//
+	// MessageId: ERROR_DS_CLIENT_LOOP
+	//
+	// MessageText:
+	//
+	// A referral loop was detected by the client.
+	//
+	public static final int ERROR_DS_CLIENT_LOOP = 8259;
+
+	//
+	// MessageId: ERROR_DS_REFERRAL_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The preset referral limit was exceeded.
+	//
+	public static final int ERROR_DS_REFERRAL_LIMIT_EXCEEDED = 8260;
+
+	//
+	// MessageId: ERROR_DS_SORT_CONTROL_MISSING
+	//
+	// MessageText:
+	//
+	// The search requires a SORT control.
+	//
+	public static final int ERROR_DS_SORT_CONTROL_MISSING = 8261;
+
+	//
+	// MessageId: ERROR_DS_OFFSET_RANGE_ERROR
+	//
+	// MessageText:
+	//
+	// The search results exceed the offset range specified.
+	//
+	public static final int ERROR_DS_OFFSET_RANGE_ERROR = 8262;
+
+	//
+	// MessageId: ERROR_DS_ROOT_MUST_BE_NC
+	//
+	// MessageText:
+	//
+	// The root object must be the head of a naming context. The root object
+	// cannot have an instantiated parent.
+	//
+	public static final int ERROR_DS_ROOT_MUST_BE_NC = 8301;
+
+	//
+	// MessageId: ERROR_DS_ADD_REPLICA_INHIBITED
+	//
+	// MessageText:
+	//
+	// The add replica operation cannot be performed. The naming context must be
+	// writeable in order to create the replica.
+	//
+	public static final int ERROR_DS_ADD_REPLICA_INHIBITED = 8302;
+
+	//
+	// MessageId: ERROR_DS_ATT_NOT_DEF_IN_SCHEMA
+	//
+	// MessageText:
+	//
+	// A reference to an attribute that is not defined in the schema occurred.
+	//
+	public static final int ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = 8303;
+
+	//
+	// MessageId: ERROR_DS_MAX_OBJ_SIZE_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The maximum size of an object has been exceeded.
+	//
+	public static final int ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = 8304;
+
+	//
+	// MessageId: ERROR_DS_OBJ_STRING_NAME_EXISTS
+	//
+	// MessageText:
+	//
+	// An attempt was made to add an object to the directory with a name that is
+	// already in use.
+	//
+	public static final int ERROR_DS_OBJ_STRING_NAME_EXISTS = 8305;
+
+	//
+	// MessageId: ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA
+	//
+	// MessageText:
+	//
+	// An attempt was made to add an object of a class that does not have an RDN
+	// defined in the schema.
+	//
+	public static final int ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = 8306;
+
+	//
+	// MessageId: ERROR_DS_RDN_DOESNT_MATCH_SCHEMA
+	//
+	// MessageText:
+	//
+	// An attempt was made to add an object using an RDN that is not the RDN
+	// defined in the schema.
+	//
+	public static final int ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = 8307;
+
+	//
+	// MessageId: ERROR_DS_NO_REQUESTED_ATTS_FOUND
+	//
+	// MessageText:
+	//
+	// None of the requested attributes were found on the objects.
+	//
+	public static final int ERROR_DS_NO_REQUESTED_ATTS_FOUND = 8308;
+
+	//
+	// MessageId: ERROR_DS_USER_BUFFER_TO_SMALL
+	//
+	// MessageText:
+	//
+	// The user buffer is too small.
+	//
+	public static final int ERROR_DS_USER_BUFFER_TO_SMALL = 8309;
+
+	//
+	// MessageId: ERROR_DS_ATT_IS_NOT_ON_OBJ
+	//
+	// MessageText:
+	//
+	// The attribute specified in the operation is not present on the object.
+	//
+	public static final int ERROR_DS_ATT_IS_NOT_ON_OBJ = 8310;
+
+	//
+	// MessageId: ERROR_DS_ILLEGAL_MOD_OPERATION
+	//
+	// MessageText:
+	//
+	// Illegal modify operation. Some aspect of the modification is not
+	// permitted.
+	//
+	public static final int ERROR_DS_ILLEGAL_MOD_OPERATION = 8311;
+
+	//
+	// MessageId: ERROR_DS_OBJ_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// The specified object is too large.
+	//
+	public static final int ERROR_DS_OBJ_TOO_LARGE = 8312;
+
+	//
+	// MessageId: ERROR_DS_BAD_INSTANCE_TYPE
+	//
+	// MessageText:
+	//
+	// The specified instance type is not valid.
+	//
+	public static final int ERROR_DS_BAD_INSTANCE_TYPE = 8313;
+
+	//
+	// MessageId: ERROR_DS_MASTERDSA_REQUIRED
+	//
+	// MessageText:
+	//
+	// The operation must be performed at a master DSA.
+	//
+	public static final int ERROR_DS_MASTERDSA_REQUIRED = 8314;
+
+	//
+	// MessageId: ERROR_DS_OBJECT_CLASS_REQUIRED
+	//
+	// MessageText:
+	//
+	// The object class attribute must be specified.
+	//
+	public static final int ERROR_DS_OBJECT_CLASS_REQUIRED = 8315;
+
+	//
+	// MessageId: ERROR_DS_MISSING_REQUIRED_ATT
+	//
+	// MessageText:
+	//
+	// A required attribute is missing.
+	//
+	public static final int ERROR_DS_MISSING_REQUIRED_ATT = 8316;
+
+	//
+	// MessageId: ERROR_DS_ATT_NOT_DEF_FOR_CLASS
+	//
+	// MessageText:
+	//
+	// An attempt was made to modify an object to include an attribute that is
+	// not legal for its class.
+	//
+	public static final int ERROR_DS_ATT_NOT_DEF_FOR_CLASS = 8317;
+
+	//
+	// MessageId: ERROR_DS_ATT_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified attribute is already present on the object.
+	//
+	public static final int ERROR_DS_ATT_ALREADY_EXISTS = 8318;
+
+	// =8319 unused
+	//
+	// MessageId: ERROR_DS_CANT_ADD_ATT_VALUES
+	//
+	// MessageText:
+	//
+	// The specified attribute is not present, or has no values.
+	//
+	public static final int ERROR_DS_CANT_ADD_ATT_VALUES = 8320;
+
+	//
+	// MessageId: ERROR_DS_SINGLE_VALUE_CONSTRAINT
+	//
+	// MessageText:
+	//
+	// Multiple values were specified for an attribute that can have only one
+	// value.
+	//
+	public static final int ERROR_DS_SINGLE_VALUE_CONSTRAINT = 8321;
+
+	//
+	// MessageId: ERROR_DS_RANGE_CONSTRAINT
+	//
+	// MessageText:
+	//
+	// A value for the attribute was not in the acceptable range of values.
+	//
+	public static final int ERROR_DS_RANGE_CONSTRAINT = 8322;
+
+	//
+	// MessageId: ERROR_DS_ATT_VAL_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified value already exists.
+	//
+	public static final int ERROR_DS_ATT_VAL_ALREADY_EXISTS = 8323;
+
+	//
+	// MessageId: ERROR_DS_CANT_REM_MISSING_ATT
+	//
+	// MessageText:
+	//
+	// The attribute cannot be removed because it is not present on the object.
+	//
+	public static final int ERROR_DS_CANT_REM_MISSING_ATT = 8324;
+
+	//
+	// MessageId: ERROR_DS_CANT_REM_MISSING_ATT_VAL
+	//
+	// MessageText:
+	//
+	// The attribute value cannot be removed because it is not present on the
+	// object.
+	//
+	public static final int ERROR_DS_CANT_REM_MISSING_ATT_VAL = 8325;
+
+	//
+	// MessageId: ERROR_DS_ROOT_CANT_BE_SUBREF
+	//
+	// MessageText:
+	//
+	// The specified root object cannot be a subref.
+	//
+	public static final int ERROR_DS_ROOT_CANT_BE_SUBREF = 8326;
+
+	//
+	// MessageId: ERROR_DS_NO_CHAINING
+	//
+	// MessageText:
+	//
+	// Chaining is not permitted.
+	//
+	public static final int ERROR_DS_NO_CHAINING = 8327;
+
+	//
+	// MessageId: ERROR_DS_NO_CHAINED_EVAL
+	//
+	// MessageText:
+	//
+	// Chained evaluation is not permitted.
+	//
+	public static final int ERROR_DS_NO_CHAINED_EVAL = 8328;
+
+	//
+	// MessageId: ERROR_DS_NO_PARENT_OBJECT
+	//
+	// MessageText:
+	//
+	// The operation could not be performed because the object's parent is
+	// either uninstantiated or deleted.
+	//
+	public static final int ERROR_DS_NO_PARENT_OBJECT = 8329;
+
+	//
+	// MessageId: ERROR_DS_PARENT_IS_AN_ALIAS
+	//
+	// MessageText:
+	//
+	// Having a parent that is an alias is not permitted. Aliases are leaf
+	// objects.
+	//
+	public static final int ERROR_DS_PARENT_IS_AN_ALIAS = 8330;
+
+	//
+	// MessageId: ERROR_DS_CANT_MIX_MASTER_AND_REPS
+	//
+	// MessageText:
+	//
+	// The object and parent must be of the same type, either both masters or
+	// both replicas.
+	//
+	public static final int ERROR_DS_CANT_MIX_MASTER_AND_REPS = 8331;
+
+	//
+	// MessageId: ERROR_DS_CHILDREN_EXIST
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because child objects exist. This
+	// operation can only be performed on a leaf object.
+	//
+	public static final int ERROR_DS_CHILDREN_EXIST = 8332;
+
+	//
+	// MessageId: ERROR_DS_OBJ_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Directory object not found.
+	//
+	public static final int ERROR_DS_OBJ_NOT_FOUND = 8333;
+
+	//
+	// MessageId: ERROR_DS_ALIASED_OBJ_MISSING
+	//
+	// MessageText:
+	//
+	// The aliased object is missing.
+	//
+	public static final int ERROR_DS_ALIASED_OBJ_MISSING = 8334;
+
+	//
+	// MessageId: ERROR_DS_BAD_NAME_SYNTAX
+	//
+	// MessageText:
+	//
+	// The object name has bad syntax.
+	//
+	public static final int ERROR_DS_BAD_NAME_SYNTAX = 8335;
+
+	//
+	// MessageId: ERROR_DS_ALIAS_POINTS_TO_ALIAS
+	//
+	// MessageText:
+	//
+	// It is not permitted for an alias to refer to another alias.
+	//
+	public static final int ERROR_DS_ALIAS_POINTS_TO_ALIAS = 8336;
+
+	//
+	// MessageId: ERROR_DS_CANT_DEREF_ALIAS
+	//
+	// MessageText:
+	//
+	// The alias cannot be dereferenced.
+	//
+	public static final int ERROR_DS_CANT_DEREF_ALIAS = 8337;
+
+	//
+	// MessageId: ERROR_DS_OUT_OF_SCOPE
+	//
+	// MessageText:
+	//
+	// The operation is out of scope.
+	//
+	public static final int ERROR_DS_OUT_OF_SCOPE = 8338;
+
+	//
+	// MessageId: ERROR_DS_OBJECT_BEING_REMOVED
+	//
+	// MessageText:
+	//
+	// The operation cannot continue because the object is in the process of
+	// being removed.
+	//
+	public static final int ERROR_DS_OBJECT_BEING_REMOVED = 8339;
+
+	//
+	// MessageId: ERROR_DS_CANT_DELETE_DSA_OBJ
+	//
+	// MessageText:
+	//
+	// The DSA object cannot be deleted.
+	//
+	public static final int ERROR_DS_CANT_DELETE_DSA_OBJ = 8340;
+
+	//
+	// MessageId: ERROR_DS_GENERIC_ERROR
+	//
+	// MessageText:
+	//
+	// A directory service error has occurred.
+	//
+	public static final int ERROR_DS_GENERIC_ERROR = 8341;
+
+	//
+	// MessageId: ERROR_DS_DSA_MUST_BE_INT_MASTER
+	//
+	// MessageText:
+	//
+	// The operation can only be performed on an internal master DSA object.
+	//
+	public static final int ERROR_DS_DSA_MUST_BE_INT_MASTER = 8342;
+
+	//
+	// MessageId: ERROR_DS_CLASS_NOT_DSA
+	//
+	// MessageText:
+	//
+	// The object must be of class DSA.
+	//
+	public static final int ERROR_DS_CLASS_NOT_DSA = 8343;
+
+	//
+	// MessageId: ERROR_DS_INSUFF_ACCESS_RIGHTS
+	//
+	// MessageText:
+	//
+	// Insufficient access rights to perform the operation.
+	//
+	public static final int ERROR_DS_INSUFF_ACCESS_RIGHTS = 8344;
+
+	//
+	// MessageId: ERROR_DS_ILLEGAL_SUPERIOR
+	//
+	// MessageText:
+	//
+	// The object cannot be added because the parent is not on the list of
+	// possible superiors.
+	//
+	public static final int ERROR_DS_ILLEGAL_SUPERIOR = 8345;
+
+	//
+	// MessageId: ERROR_DS_ATTRIBUTE_OWNED_BY_SAM
+	//
+	// MessageText:
+	//
+	// Access to the attribute is not permitted because the attribute is owned
+	// by the Security Accounts Manager (SAM).
+	//
+	public static final int ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = 8346;
+
+	//
+	// MessageId: ERROR_DS_NAME_TOO_MANY_PARTS
+	//
+	// MessageText:
+	//
+	// The name has too many parts.
+	//
+	public static final int ERROR_DS_NAME_TOO_MANY_PARTS = 8347;
+
+	//
+	// MessageId: ERROR_DS_NAME_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The name is too long.
+	//
+	public static final int ERROR_DS_NAME_TOO_LONG = 8348;
+
+	//
+	// MessageId: ERROR_DS_NAME_VALUE_TOO_LONG
+	//
+	// MessageText:
+	//
+	// The name value is too long.
+	//
+	public static final int ERROR_DS_NAME_VALUE_TOO_LONG = 8349;
+
+	//
+	// MessageId: ERROR_DS_NAME_UNPARSEABLE
+	//
+	// MessageText:
+	//
+	// The directory service encountered an error parsing a name.
+	//
+	public static final int ERROR_DS_NAME_UNPARSEABLE = 8350;
+
+	//
+	// MessageId: ERROR_DS_NAME_TYPE_UNKNOWN
+	//
+	// MessageText:
+	//
+	// The directory service cannot get the attribute type for a name.
+	//
+	public static final int ERROR_DS_NAME_TYPE_UNKNOWN = 8351;
+
+	//
+	// MessageId: ERROR_DS_NOT_AN_OBJECT
+	//
+	// MessageText:
+	//
+	// The name does not identify an object; the name identifies a phantom.
+	//
+	public static final int ERROR_DS_NOT_AN_OBJECT = 8352;
+
+	//
+	// MessageId: ERROR_DS_SEC_DESC_TOO_SHORT
+	//
+	// MessageText:
+	//
+	// The security descriptor is too short.
+	//
+	public static final int ERROR_DS_SEC_DESC_TOO_SHORT = 8353;
+
+	//
+	// MessageId: ERROR_DS_SEC_DESC_INVALID
+	//
+	// MessageText:
+	//
+	// The security descriptor is invalid.
+	//
+	public static final int ERROR_DS_SEC_DESC_INVALID = 8354;
+
+	//
+	// MessageId: ERROR_DS_NO_DELETED_NAME
+	//
+	// MessageText:
+	//
+	// Failed to create name for deleted object.
+	//
+	public static final int ERROR_DS_NO_DELETED_NAME = 8355;
+
+	//
+	// MessageId: ERROR_DS_SUBREF_MUST_HAVE_PARENT
+	//
+	// MessageText:
+	//
+	// The parent of a new subref must exist.
+	//
+	public static final int ERROR_DS_SUBREF_MUST_HAVE_PARENT = 8356;
+
+	//
+	// MessageId: ERROR_DS_NCNAME_MUST_BE_NC
+	//
+	// MessageText:
+	//
+	// The object must be a naming context.
+	//
+	public static final int ERROR_DS_NCNAME_MUST_BE_NC = 8357;
+
+	//
+	// MessageId: ERROR_DS_CANT_ADD_SYSTEM_ONLY
+	//
+	// MessageText:
+	//
+	// It is not permitted to add an attribute which is owned by the system.
+	//
+	public static final int ERROR_DS_CANT_ADD_SYSTEM_ONLY = 8358;
+
+	//
+	// MessageId: ERROR_DS_CLASS_MUST_BE_CONCRETE
+	//
+	// MessageText:
+	//
+	// The class of the object must be structural; you cannot instantiate an
+	// abstract class.
+	//
+	public static final int ERROR_DS_CLASS_MUST_BE_CONCRETE = 8359;
+
+	//
+	// MessageId: ERROR_DS_INVALID_DMD
+	//
+	// MessageText:
+	//
+	// The schema object could not be found.
+	//
+	public static final int ERROR_DS_INVALID_DMD = 8360;
+
+	//
+	// MessageId: ERROR_DS_OBJ_GUID_EXISTS
+	//
+	// MessageText:
+	//
+	// A local object with this GUID (dead or alive) already exists.
+	//
+	public static final int ERROR_DS_OBJ_GUID_EXISTS = 8361;
+
+	//
+	// MessageId: ERROR_DS_NOT_ON_BACKLINK
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed on a back link.
+	//
+	public static final int ERROR_DS_NOT_ON_BACKLINK = 8362;
+
+	//
+	// MessageId: ERROR_DS_NO_CROSSREF_FOR_NC
+	//
+	// MessageText:
+	//
+	// The cross reference for the specified naming context could not be found.
+	//
+	public static final int ERROR_DS_NO_CROSSREF_FOR_NC = 8363;
+
+	//
+	// MessageId: ERROR_DS_SHUTTING_DOWN
+	//
+	// MessageText:
+	//
+	// The operation could not be performed because the directory service is
+	// shutting down.
+	//
+	public static final int ERROR_DS_SHUTTING_DOWN = 8364;
+
+	//
+	// MessageId: ERROR_DS_UNKNOWN_OPERATION
+	//
+	// MessageText:
+	//
+	// The directory service request is invalid.
+	//
+	public static final int ERROR_DS_UNKNOWN_OPERATION = 8365;
+
+	//
+	// MessageId: ERROR_DS_INVALID_ROLE_OWNER
+	//
+	// MessageText:
+	//
+	// The role owner attribute could not be read.
+	//
+	public static final int ERROR_DS_INVALID_ROLE_OWNER = 8366;
+
+	//
+	// MessageId: ERROR_DS_COULDNT_CONTACT_FSMO
+	//
+	// MessageText:
+	//
+	// The requested FSMO operation failed. The current FSMO holder could not be
+	// contacted.
+	//
+	public static final int ERROR_DS_COULDNT_CONTACT_FSMO = 8367;
+
+	//
+	// MessageId: ERROR_DS_CROSS_NC_DN_RENAME
+	//
+	// MessageText:
+	//
+	// Modification of a DN across a naming context is not permitted.
+	//
+	public static final int ERROR_DS_CROSS_NC_DN_RENAME = 8368;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOD_SYSTEM_ONLY
+	//
+	// MessageText:
+	//
+	// The attribute cannot be modified because it is owned by the system.
+	//
+	public static final int ERROR_DS_CANT_MOD_SYSTEM_ONLY = 8369;
+
+	//
+	// MessageId: ERROR_DS_REPLICATOR_ONLY
+	//
+	// MessageText:
+	//
+	// Only the replicator can perform this function.
+	//
+	public static final int ERROR_DS_REPLICATOR_ONLY = 8370;
+
+	//
+	// MessageId: ERROR_DS_OBJ_CLASS_NOT_DEFINED
+	//
+	// MessageText:
+	//
+	// The specified class is not defined.
+	//
+	public static final int ERROR_DS_OBJ_CLASS_NOT_DEFINED = 8371;
+
+	//
+	// MessageId: ERROR_DS_OBJ_CLASS_NOT_SUBCLASS
+	//
+	// MessageText:
+	//
+	// The specified class is not a subclass.
+	//
+	public static final int ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = 8372;
+
+	//
+	// MessageId: ERROR_DS_NAME_REFERENCE_INVALID
+	//
+	// MessageText:
+	//
+	// The name reference is invalid.
+	//
+	public static final int ERROR_DS_NAME_REFERENCE_INVALID = 8373;
+
+	//
+	// MessageId: ERROR_DS_CROSS_REF_EXISTS
+	//
+	// MessageText:
+	//
+	// A cross reference already exists.
+	//
+	public static final int ERROR_DS_CROSS_REF_EXISTS = 8374;
+
+	//
+	// MessageId: ERROR_DS_CANT_DEL_MASTER_CROSSREF
+	//
+	// MessageText:
+	//
+	// It is not permitted to delete a master cross reference.
+	//
+	public static final int ERROR_DS_CANT_DEL_MASTER_CROSSREF = 8375;
+
+	//
+	// MessageId: ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD
+	//
+	// MessageText:
+	//
+	// Subtree notifications are only supported on NC heads.
+	//
+	public static final int ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = 8376;
+
+	//
+	// MessageId: ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX
+	//
+	// MessageText:
+	//
+	// Notification filter is too complex.
+	//
+	public static final int ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = 8377;
+
+	//
+	// MessageId: ERROR_DS_DUP_RDN
+	//
+	// MessageText:
+	//
+	// Schema update failed: duplicate RDN.
+	//
+	public static final int ERROR_DS_DUP_RDN = 8378;
+
+	//
+	// MessageId: ERROR_DS_DUP_OID
+	//
+	// MessageText:
+	//
+	// Schema update failed: duplicate OID.
+	//
+	public static final int ERROR_DS_DUP_OID = 8379;
+
+	//
+	// MessageId: ERROR_DS_DUP_MAPI_ID
+	//
+	// MessageText:
+	//
+	// Schema update failed: duplicate MAPI identifier.
+	//
+	public static final int ERROR_DS_DUP_MAPI_ID = 8380;
+
+	//
+	// MessageId: ERROR_DS_DUP_SCHEMA_ID_GUID
+	//
+	// MessageText:
+	//
+	// Schema update failed: duplicate schema-id GUID.
+	//
+	public static final int ERROR_DS_DUP_SCHEMA_ID_GUID = 8381;
+
+	//
+	// MessageId: ERROR_DS_DUP_LDAP_DISPLAY_NAME
+	//
+	// MessageText:
+	//
+	// Schema update failed: duplicate LDAP display name.
+	//
+	public static final int ERROR_DS_DUP_LDAP_DISPLAY_NAME = 8382;
+
+	//
+	// MessageId: ERROR_DS_SEMANTIC_ATT_TEST
+	//
+	// MessageText:
+	//
+	// Schema update failed: range-lower less than range upper.
+	//
+	public static final int ERROR_DS_SEMANTIC_ATT_TEST = 8383;
+
+	//
+	// MessageId: ERROR_DS_SYNTAX_MISMATCH
+	//
+	// MessageText:
+	//
+	// Schema update failed: syntax mismatch.
+	//
+	public static final int ERROR_DS_SYNTAX_MISMATCH = 8384;
+
+	//
+	// MessageId: ERROR_DS_EXISTS_IN_MUST_HAVE
+	//
+	// MessageText:
+	//
+	// Schema deletion failed: attribute is used in must-contain.
+	//
+	public static final int ERROR_DS_EXISTS_IN_MUST_HAVE = 8385;
+
+	//
+	// MessageId: ERROR_DS_EXISTS_IN_MAY_HAVE
+	//
+	// MessageText:
+	//
+	// Schema deletion failed: attribute is used in may-contain.
+	//
+	public static final int ERROR_DS_EXISTS_IN_MAY_HAVE = 8386;
+
+	//
+	// MessageId: ERROR_DS_NONEXISTENT_MAY_HAVE
+	//
+	// MessageText:
+	//
+	// Schema update failed: attribute in may-contain does not exist.
+	//
+	public static final int ERROR_DS_NONEXISTENT_MAY_HAVE = 8387;
+
+	//
+	// MessageId: ERROR_DS_NONEXISTENT_MUST_HAVE
+	//
+	// MessageText:
+	//
+	// Schema update failed: attribute in must-contain does not exist.
+	//
+	public static final int ERROR_DS_NONEXISTENT_MUST_HAVE = 8388;
+
+	//
+	// MessageId: ERROR_DS_AUX_CLS_TEST_FAIL
+	//
+	// MessageText:
+	//
+	// Schema update failed: class in aux-class list does not exist or is not an
+	// auxiliary class.
+	//
+	public static final int ERROR_DS_AUX_CLS_TEST_FAIL = 8389;
+
+	//
+	// MessageId: ERROR_DS_NONEXISTENT_POSS_SUP
+	//
+	// MessageText:
+	//
+	// Schema update failed: class in poss-superiors does not exist.
+	//
+	public static final int ERROR_DS_NONEXISTENT_POSS_SUP = 8390;
+
+	//
+	// MessageId: ERROR_DS_SUB_CLS_TEST_FAIL
+	//
+	// MessageText:
+	//
+	// Schema update failed: class in subclassof list does not exist or does not
+	// satisfy hierarchy rules.
+	//
+	public static final int ERROR_DS_SUB_CLS_TEST_FAIL = 8391;
+
+	//
+	// MessageId: ERROR_DS_BAD_RDN_ATT_ID_SYNTAX
+	//
+	// MessageText:
+	//
+	// Schema update failed: Rdn-Att-Id has wrong syntax.
+	//
+	public static final int ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = 8392;
+
+	//
+	// MessageId: ERROR_DS_EXISTS_IN_AUX_CLS
+	//
+	// MessageText:
+	//
+	// Schema deletion failed: class is used as auxiliary class.
+	//
+	public static final int ERROR_DS_EXISTS_IN_AUX_CLS = 8393;
+
+	//
+	// MessageId: ERROR_DS_EXISTS_IN_SUB_CLS
+	//
+	// MessageText:
+	//
+	// Schema deletion failed: class is used as sub class.
+	//
+	public static final int ERROR_DS_EXISTS_IN_SUB_CLS = 8394;
+
+	//
+	// MessageId: ERROR_DS_EXISTS_IN_POSS_SUP
+	//
+	// MessageText:
+	//
+	// Schema deletion failed: class is used as poss superior.
+	//
+	public static final int ERROR_DS_EXISTS_IN_POSS_SUP = 8395;
+
+	//
+	// MessageId: ERROR_DS_RECALCSCHEMA_FAILED
+	//
+	// MessageText:
+	//
+	// Schema update failed in recalculating validation cache.
+	//
+	public static final int ERROR_DS_RECALCSCHEMA_FAILED = 8396;
+
+	//
+	// MessageId: ERROR_DS_TREE_DELETE_NOT_FINISHED
+	//
+	// MessageText:
+	//
+	// The tree deletion is not finished. The request must be made again to
+	// continue deleting the tree.
+	//
+	public static final int ERROR_DS_TREE_DELETE_NOT_FINISHED = 8397;
+
+	//
+	// MessageId: ERROR_DS_CANT_DELETE
+	//
+	// MessageText:
+	//
+	// The requested delete operation could not be performed.
+	//
+	public static final int ERROR_DS_CANT_DELETE = 8398;
+
+	//
+	// MessageId: ERROR_DS_ATT_SCHEMA_REQ_ID
+	//
+	// MessageText:
+	//
+	// Cannot read the governs class identifier for the schema record.
+	//
+	public static final int ERROR_DS_ATT_SCHEMA_REQ_ID = 8399;
+
+	//
+	// MessageId: ERROR_DS_BAD_ATT_SCHEMA_SYNTAX
+	//
+	// MessageText:
+	//
+	// The attribute schema has bad syntax.
+	//
+	public static final int ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = 8400;
+
+	//
+	// MessageId: ERROR_DS_CANT_CACHE_ATT
+	//
+	// MessageText:
+	//
+	// The attribute could not be cached.
+	//
+	public static final int ERROR_DS_CANT_CACHE_ATT = 8401;
+
+	//
+	// MessageId: ERROR_DS_CANT_CACHE_CLASS
+	//
+	// MessageText:
+	//
+	// The class could not be cached.
+	//
+	public static final int ERROR_DS_CANT_CACHE_CLASS = 8402;
+
+	//
+	// MessageId: ERROR_DS_CANT_REMOVE_ATT_CACHE
+	//
+	// MessageText:
+	//
+	// The attribute could not be removed from the cache.
+	//
+	public static final int ERROR_DS_CANT_REMOVE_ATT_CACHE = 8403;
+
+	//
+	// MessageId: ERROR_DS_CANT_REMOVE_CLASS_CACHE
+	//
+	// MessageText:
+	//
+	// The class could not be removed from the cache.
+	//
+	public static final int ERROR_DS_CANT_REMOVE_CLASS_CACHE = 8404;
+
+	//
+	// MessageId: ERROR_DS_CANT_RETRIEVE_DN
+	//
+	// MessageText:
+	//
+	// The distinguished name attribute could not be read.
+	//
+	public static final int ERROR_DS_CANT_RETRIEVE_DN = 8405;
+
+	//
+	// MessageId: ERROR_DS_MISSING_SUPREF
+	//
+	// MessageText:
+	//
+	// No superior reference has been configured for the directory service. The
+	// directory service is therefore unable to issue referrals to objects
+	// outside this forest.
+	//
+	public static final int ERROR_DS_MISSING_SUPREF = 8406;
+
+	//
+	// MessageId: ERROR_DS_CANT_RETRIEVE_INSTANCE
+	//
+	// MessageText:
+	//
+	// The instance type attribute could not be retrieved.
+	//
+	public static final int ERROR_DS_CANT_RETRIEVE_INSTANCE = 8407;
+
+	//
+	// MessageId: ERROR_DS_CODE_INCONSISTENCY
+	//
+	// MessageText:
+	//
+	// An internal error has occurred.
+	//
+	public static final int ERROR_DS_CODE_INCONSISTENCY = 8408;
+
+	//
+	// MessageId: ERROR_DS_DATABASE_ERROR
+	//
+	// MessageText:
+	//
+	// A database error has occurred.
+	//
+	public static final int ERROR_DS_DATABASE_ERROR = 8409;
+
+	//
+	// MessageId: ERROR_DS_GOVERNSID_MISSING
+	//
+	// MessageText:
+	//
+	// The attribute GOVERNSID is missing.
+	//
+	public static final int ERROR_DS_GOVERNSID_MISSING = 8410;
+
+	//
+	// MessageId: ERROR_DS_MISSING_EXPECTED_ATT
+	//
+	// MessageText:
+	//
+	// An expected attribute is missing.
+	//
+	public static final int ERROR_DS_MISSING_EXPECTED_ATT = 8411;
+
+	//
+	// MessageId: ERROR_DS_NCNAME_MISSING_CR_REF
+	//
+	// MessageText:
+	//
+	// The specified naming context is missing a cross reference.
+	//
+	public static final int ERROR_DS_NCNAME_MISSING_CR_REF = 8412;
+
+	//
+	// MessageId: ERROR_DS_SECURITY_CHECKING_ERROR
+	//
+	// MessageText:
+	//
+	// A security checking error has occurred.
+	//
+	public static final int ERROR_DS_SECURITY_CHECKING_ERROR = 8413;
+
+	//
+	// MessageId: ERROR_DS_SCHEMA_NOT_LOADED
+	//
+	// MessageText:
+	//
+	// The schema is not loaded.
+	//
+	public static final int ERROR_DS_SCHEMA_NOT_LOADED = 8414;
+
+	//
+	// MessageId: ERROR_DS_SCHEMA_ALLOC_FAILED
+	//
+	// MessageText:
+	//
+	// Schema allocation failed. Please check if the machine is running low on
+	// memory.
+	//
+	public static final int ERROR_DS_SCHEMA_ALLOC_FAILED = 8415;
+
+	//
+	// MessageId: ERROR_DS_ATT_SCHEMA_REQ_SYNTAX
+	//
+	// MessageText:
+	//
+	// Failed to obtain the required syntax for the attribute schema.
+	//
+	public static final int ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = 8416;
+
+	//
+	// MessageId: ERROR_DS_GCVERIFY_ERROR
+	//
+	// MessageText:
+	//
+	// The global catalog verification failed. The global catalog is not
+	// available or does not support the operation. Some part of the directory
+	// is currently not available.
+	//
+	public static final int ERROR_DS_GCVERIFY_ERROR = 8417;
+
+	//
+	// MessageId: ERROR_DS_DRA_SCHEMA_MISMATCH
+	//
+	// MessageText:
+	//
+	// The replication operation failed because of a schema mismatch between the
+	// servers involved.
+	//
+	public static final int ERROR_DS_DRA_SCHEMA_MISMATCH = 8418;
+
+	//
+	// MessageId: ERROR_DS_CANT_FIND_DSA_OBJ
+	//
+	// MessageText:
+	//
+	// The DSA object could not be found.
+	//
+	public static final int ERROR_DS_CANT_FIND_DSA_OBJ = 8419;
+
+	//
+	// MessageId: ERROR_DS_CANT_FIND_EXPECTED_NC
+	//
+	// MessageText:
+	//
+	// The naming context could not be found.
+	//
+	public static final int ERROR_DS_CANT_FIND_EXPECTED_NC = 8420;
+
+	//
+	// MessageId: ERROR_DS_CANT_FIND_NC_IN_CACHE
+	//
+	// MessageText:
+	//
+	// The naming context could not be found in the cache.
+	//
+	public static final int ERROR_DS_CANT_FIND_NC_IN_CACHE = 8421;
+
+	//
+	// MessageId: ERROR_DS_CANT_RETRIEVE_CHILD
+	//
+	// MessageText:
+	//
+	// The child object could not be retrieved.
+	//
+	public static final int ERROR_DS_CANT_RETRIEVE_CHILD = 8422;
+
+	//
+	// MessageId: ERROR_DS_SECURITY_ILLEGAL_MODIFY
+	//
+	// MessageText:
+	//
+	// The modification was not permitted for security reasons.
+	//
+	public static final int ERROR_DS_SECURITY_ILLEGAL_MODIFY = 8423;
+
+	//
+	// MessageId: ERROR_DS_CANT_REPLACE_HIDDEN_REC
+	//
+	// MessageText:
+	//
+	// The operation cannot replace the hidden record.
+	//
+	public static final int ERROR_DS_CANT_REPLACE_HIDDEN_REC = 8424;
+
+	//
+	// MessageId: ERROR_DS_BAD_HIERARCHY_FILE
+	//
+	// MessageText:
+	//
+	// The hierarchy file is invalid.
+	//
+	public static final int ERROR_DS_BAD_HIERARCHY_FILE = 8425;
+
+	//
+	// MessageId: ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED
+	//
+	// MessageText:
+	//
+	// The attempt to build the hierarchy table failed.
+	//
+	public static final int ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = 8426;
+
+	//
+	// MessageId: ERROR_DS_CONFIG_PARAM_MISSING
+	//
+	// MessageText:
+	//
+	// The directory configuration parameter is missing from the registry.
+	//
+	public static final int ERROR_DS_CONFIG_PARAM_MISSING = 8427;
+
+	//
+	// MessageId: ERROR_DS_COUNTING_AB_INDICES_FAILED
+	//
+	// MessageText:
+	//
+	// The attempt to count the address book indices failed.
+	//
+	public static final int ERROR_DS_COUNTING_AB_INDICES_FAILED = 8428;
+
+	//
+	// MessageId: ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED
+	//
+	// MessageText:
+	//
+	// The allocation of the hierarchy table failed.
+	//
+	public static final int ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = 8429;
+
+	//
+	// MessageId: ERROR_DS_INTERNAL_FAILURE
+	//
+	// MessageText:
+	//
+	// The directory service encountered an internal failure.
+	//
+	public static final int ERROR_DS_INTERNAL_FAILURE = 8430;
+
+	//
+	// MessageId: ERROR_DS_UNKNOWN_ERROR
+	//
+	// MessageText:
+	//
+	// The directory service encountered an unknown failure.
+	//
+	public static final int ERROR_DS_UNKNOWN_ERROR = 8431;
+
+	//
+	// MessageId: ERROR_DS_ROOT_REQUIRES_CLASS_TOP
+	//
+	// MessageText:
+	//
+	// A root object requires a class of 'top'.
+	//
+	public static final int ERROR_DS_ROOT_REQUIRES_CLASS_TOP = 8432;
+
+	//
+	// MessageId: ERROR_DS_REFUSING_FSMO_ROLES
+	//
+	// MessageText:
+	//
+	// This directory server is shutting down, and cannot take ownership of new
+	// floating single-master operation roles.
+	//
+	public static final int ERROR_DS_REFUSING_FSMO_ROLES = 8433;
+
+	//
+	// MessageId: ERROR_DS_MISSING_FSMO_SETTINGS
+	//
+	// MessageText:
+	//
+	// The directory service is missing mandatory configuration information, and
+	// is unable to determine the ownership of floating single-master operation
+	// roles.
+	//
+	public static final int ERROR_DS_MISSING_FSMO_SETTINGS = 8434;
+
+	//
+	// MessageId: ERROR_DS_UNABLE_TO_SURRENDER_ROLES
+	//
+	// MessageText:
+	//
+	// The directory service was unable to transfer ownership of one or more
+	// floating single-master operation roles to other servers.
+	//
+	public static final int ERROR_DS_UNABLE_TO_SURRENDER_ROLES = 8435;
+
+	//
+	// MessageId: ERROR_DS_DRA_GENERIC
+	//
+	// MessageText:
+	//
+	// The replication operation failed.
+	//
+	public static final int ERROR_DS_DRA_GENERIC = 8436;
+
+	//
+	// MessageId: ERROR_DS_DRA_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// An invalid parameter was specified for this replication operation.
+	//
+	public static final int ERROR_DS_DRA_INVALID_PARAMETER = 8437;
+
+	//
+	// MessageId: ERROR_DS_DRA_BUSY
+	//
+	// MessageText:
+	//
+	// The directory service is too busy to complete the replication operation
+	// at this time.
+	//
+	public static final int ERROR_DS_DRA_BUSY = 8438;
+
+	//
+	// MessageId: ERROR_DS_DRA_BAD_DN
+	//
+	// MessageText:
+	//
+	// The distinguished name specified for this replication operation is
+	// invalid.
+	//
+	public static final int ERROR_DS_DRA_BAD_DN = 8439;
+
+	//
+	// MessageId: ERROR_DS_DRA_BAD_NC
+	//
+	// MessageText:
+	//
+	// The naming context specified for this replication operation is invalid.
+	//
+	public static final int ERROR_DS_DRA_BAD_NC = 8440;
+
+	//
+	// MessageId: ERROR_DS_DRA_DN_EXISTS
+	//
+	// MessageText:
+	//
+	// The distinguished name specified for this replication operation already
+	// exists.
+	//
+	public static final int ERROR_DS_DRA_DN_EXISTS = 8441;
+
+	//
+	// MessageId: ERROR_DS_DRA_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// The replication system encountered an internal error.
+	//
+	public static final int ERROR_DS_DRA_INTERNAL_ERROR = 8442;
+
+	//
+	// MessageId: ERROR_DS_DRA_INCONSISTENT_DIT
+	//
+	// MessageText:
+	//
+	// The replication operation encountered a database inconsistency.
+	//
+	public static final int ERROR_DS_DRA_INCONSISTENT_DIT = 8443;
+
+	//
+	// MessageId: ERROR_DS_DRA_CONNECTION_FAILED
+	//
+	// MessageText:
+	//
+	// The server specified for this replication operation could not be
+	// contacted.
+	//
+	public static final int ERROR_DS_DRA_CONNECTION_FAILED = 8444;
+
+	//
+	// MessageId: ERROR_DS_DRA_BAD_INSTANCE_TYPE
+	//
+	// MessageText:
+	//
+	// The replication operation encountered an object with an invalid instance
+	// type.
+	//
+	public static final int ERROR_DS_DRA_BAD_INSTANCE_TYPE = 8445;
+
+	//
+	// MessageId: ERROR_DS_DRA_OUT_OF_MEM
+	//
+	// MessageText:
+	//
+	// The replication operation failed to allocate memory.
+	//
+	public static final int ERROR_DS_DRA_OUT_OF_MEM = 8446;
+
+	//
+	// MessageId: ERROR_DS_DRA_MAIL_PROBLEM
+	//
+	// MessageText:
+	//
+	// The replication operation encountered an error with the mail system.
+	//
+	public static final int ERROR_DS_DRA_MAIL_PROBLEM = 8447;
+
+	//
+	// MessageId: ERROR_DS_DRA_REF_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The replication reference information for the target server already
+	// exists.
+	//
+	public static final int ERROR_DS_DRA_REF_ALREADY_EXISTS = 8448;
+
+	//
+	// MessageId: ERROR_DS_DRA_REF_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The replication reference information for the target server does not
+	// exist.
+	//
+	public static final int ERROR_DS_DRA_REF_NOT_FOUND = 8449;
+
+	//
+	// MessageId: ERROR_DS_DRA_OBJ_IS_REP_SOURCE
+	//
+	// MessageText:
+	//
+	// The naming context cannot be removed because it is replicated to another
+	// server.
+	//
+	public static final int ERROR_DS_DRA_OBJ_IS_REP_SOURCE = 8450;
+
+	//
+	// MessageId: ERROR_DS_DRA_DB_ERROR
+	//
+	// MessageText:
+	//
+	// The replication operation encountered a database error.
+	//
+	public static final int ERROR_DS_DRA_DB_ERROR = 8451;
+
+	//
+	// MessageId: ERROR_DS_DRA_NO_REPLICA
+	//
+	// MessageText:
+	//
+	// The naming context is in the process of being removed or is not
+	// replicated from the specified server.
+	//
+	public static final int ERROR_DS_DRA_NO_REPLICA = 8452;
+
+	//
+	// MessageId: ERROR_DS_DRA_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// Replication access was denied.
+	//
+	public static final int ERROR_DS_DRA_ACCESS_DENIED = 8453;
+
+	//
+	// MessageId: ERROR_DS_DRA_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested operation is not supported by this version of the directory
+	// service.
+	//
+	public static final int ERROR_DS_DRA_NOT_SUPPORTED = 8454;
+
+	//
+	// MessageId: ERROR_DS_DRA_RPC_CANCELLED
+	//
+	// MessageText:
+	//
+	// The replication remote procedure call was cancelled.
+	//
+	public static final int ERROR_DS_DRA_RPC_CANCELLED = 8455;
+
+	//
+	// MessageId: ERROR_DS_DRA_SOURCE_DISABLED
+	//
+	// MessageText:
+	//
+	// The source server is currently rejecting replication requests.
+	//
+	public static final int ERROR_DS_DRA_SOURCE_DISABLED = 8456;
+
+	//
+	// MessageId: ERROR_DS_DRA_SINK_DISABLED
+	//
+	// MessageText:
+	//
+	// The destination server is currently rejecting replication requests.
+	//
+	public static final int ERROR_DS_DRA_SINK_DISABLED = 8457;
+
+	//
+	// MessageId: ERROR_DS_DRA_NAME_COLLISION
+	//
+	// MessageText:
+	//
+	// The replication operation failed due to a collision of object names.
+	//
+	public static final int ERROR_DS_DRA_NAME_COLLISION = 8458;
+
+	//
+	// MessageId: ERROR_DS_DRA_SOURCE_REINSTALLED
+	//
+	// MessageText:
+	//
+	// The replication source has been reinstalled.
+	//
+	public static final int ERROR_DS_DRA_SOURCE_REINSTALLED = 8459;
+
+	//
+	// MessageId: ERROR_DS_DRA_MISSING_PARENT
+	//
+	// MessageText:
+	//
+	// The replication operation failed because a required parent object is
+	// missing.
+	//
+	public static final int ERROR_DS_DRA_MISSING_PARENT = 8460;
+
+	//
+	// MessageId: ERROR_DS_DRA_PREEMPTED
+	//
+	// MessageText:
+	//
+	// The replication operation was preempted.
+	//
+	public static final int ERROR_DS_DRA_PREEMPTED = 8461;
+
+	//
+	// MessageId: ERROR_DS_DRA_ABANDON_SYNC
+	//
+	// MessageText:
+	//
+	// The replication synchronization attempt was abandoned because of a lack
+	// of updates.
+	//
+	public static final int ERROR_DS_DRA_ABANDON_SYNC = 8462;
+
+	//
+	// MessageId: ERROR_DS_DRA_SHUTDOWN
+	//
+	// MessageText:
+	//
+	// The replication operation was terminated because the system is shutting
+	// down.
+	//
+	public static final int ERROR_DS_DRA_SHUTDOWN = 8463;
+
+	//
+	// MessageId: ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET
+	//
+	// MessageText:
+	//
+	// Synchronization attempt failed because the destination DC is currently
+	// waiting to synchronize new partial attributes from source. This condition
+	// is normal if a recent schema change modified the partial attribute set.
+	// The destination partial attribute set is not a subset of source partial
+	// attribute set.
+	//
+	public static final int ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = 8464;
+
+	//
+	// MessageId: ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA
+	//
+	// MessageText:
+	//
+	// The replication synchronization attempt failed because a master replica
+	// attempted to sync from a partial replica.
+	//
+	public static final int ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = 8465;
+
+	//
+	// MessageId: ERROR_DS_DRA_EXTN_CONNECTION_FAILED
+	//
+	// MessageText:
+	//
+	// The server specified for this replication operation was contacted, but
+	// that server was unable to contact an additional server needed to complete
+	// the operation.
+	//
+	public static final int ERROR_DS_DRA_EXTN_CONNECTION_FAILED = 8466;
+
+	//
+	// MessageId: ERROR_DS_INSTALL_SCHEMA_MISMATCH
+	//
+	// MessageText:
+	//
+	// The version of the directory service schema of the source forest is not
+	// compatible with the version of directory service on this computer.
+	//
+	public static final int ERROR_DS_INSTALL_SCHEMA_MISMATCH = 8467;
+
+	//
+	// MessageId: ERROR_DS_DUP_LINK_ID
+	//
+	// MessageText:
+	//
+	// Schema update failed: An attribute with the same link identifier already
+	// exists.
+	//
+	public static final int ERROR_DS_DUP_LINK_ID = 8468;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_RESOLVING
+	//
+	// MessageText:
+	//
+	// Name translation: Generic processing error.
+	//
+	public static final int ERROR_DS_NAME_ERROR_RESOLVING = 8469;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Name translation: Could not find the name or insufficient right to see
+	// name.
+	//
+	public static final int ERROR_DS_NAME_ERROR_NOT_FOUND = 8470;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_NOT_UNIQUE
+	//
+	// MessageText:
+	//
+	// Name translation: Input name mapped to more than one output name.
+	//
+	public static final int ERROR_DS_NAME_ERROR_NOT_UNIQUE = 8471;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_NO_MAPPING
+	//
+	// MessageText:
+	//
+	// Name translation: Input name found, but not the associated output format.
+	//
+	public static final int ERROR_DS_NAME_ERROR_NO_MAPPING = 8472;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_DOMAIN_ONLY
+	//
+	// MessageText:
+	//
+	// Name translation: Unable to resolve completely, only the domain was
+	// found.
+	//
+	public static final int ERROR_DS_NAME_ERROR_DOMAIN_ONLY = 8473;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING
+	//
+	// MessageText:
+	//
+	// Name translation: Unable to perform purely syntactical mapping at the
+	// client without going out to the wire.
+	//
+	public static final int ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 8474;
+
+	//
+	// MessageId: ERROR_DS_CONSTRUCTED_ATT_MOD
+	//
+	// MessageText:
+	//
+	// Modification of a constructed attribute is not allowed.
+	//
+	public static final int ERROR_DS_CONSTRUCTED_ATT_MOD = 8475;
+
+	//
+	// MessageId: ERROR_DS_WRONG_OM_OBJ_CLASS
+	//
+	// MessageText:
+	//
+	// The OM-Object-Class specified is incorrect for an attribute with the
+	// specified syntax.
+	//
+	public static final int ERROR_DS_WRONG_OM_OBJ_CLASS = 8476;
+
+	//
+	// MessageId: ERROR_DS_DRA_REPL_PENDING
+	//
+	// MessageText:
+	//
+	// The replication request has been posted; waiting for reply.
+	//
+	public static final int ERROR_DS_DRA_REPL_PENDING = 8477;
+
+	//
+	// MessageId: ERROR_DS_DS_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation requires a directory service, and none was
+	// available.
+	//
+	public static final int ERROR_DS_DS_REQUIRED = 8478;
+
+	//
+	// MessageId: ERROR_DS_INVALID_LDAP_DISPLAY_NAME
+	//
+	// MessageText:
+	//
+	// The LDAP display name of the class or attribute contains non-ASCII
+	// characters.
+	//
+	public static final int ERROR_DS_INVALID_LDAP_DISPLAY_NAME = 8479;
+
+	//
+	// MessageId: ERROR_DS_NON_BASE_SEARCH
+	//
+	// MessageText:
+	//
+	// The requested search operation is only supported for base searches.
+	//
+	public static final int ERROR_DS_NON_BASE_SEARCH = 8480;
+
+	//
+	// MessageId: ERROR_DS_CANT_RETRIEVE_ATTS
+	//
+	// MessageText:
+	//
+	// The search failed to retrieve attributes from the database.
+	//
+	public static final int ERROR_DS_CANT_RETRIEVE_ATTS = 8481;
+
+	//
+	// MessageId: ERROR_DS_BACKLINK_WITHOUT_LINK
+	//
+	// MessageText:
+	//
+	// The schema update operation tried to add a backward link attribute that
+	// has no corresponding forward link.
+	//
+	public static final int ERROR_DS_BACKLINK_WITHOUT_LINK = 8482;
+
+	//
+	// MessageId: ERROR_DS_EPOCH_MISMATCH
+	//
+	// MessageText:
+	//
+	// Source and destination of a cross-domain move do not agree on the
+	// object's epoch number. Either source or destination does not have the
+	// latest version of the object.
+	//
+	public static final int ERROR_DS_EPOCH_MISMATCH = 8483;
+
+	//
+	// MessageId: ERROR_DS_SRC_NAME_MISMATCH
+	//
+	// MessageText:
+	//
+	// Source and destination of a cross-domain move do not agree on the
+	// object's current name. Either source or destination does not have the
+	// latest version of the object.
+	//
+	public static final int ERROR_DS_SRC_NAME_MISMATCH = 8484;
+
+	//
+	// MessageId: ERROR_DS_SRC_AND_DST_NC_IDENTICAL
+	//
+	// MessageText:
+	//
+	// Source and destination for the cross-domain move operation are identical.
+	// Caller should use local move operation instead of cross-domain move
+	// operation.
+	//
+	public static final int ERROR_DS_SRC_AND_DST_NC_IDENTICAL = 8485;
+
+	//
+	// MessageId: ERROR_DS_DST_NC_MISMATCH
+	//
+	// MessageText:
+	//
+	// Source and destination for a cross-domain move are not in agreement on
+	// the naming contexts in the forest. Either source or destination does not
+	// have the latest version of the Partitions container.
+	//
+	public static final int ERROR_DS_DST_NC_MISMATCH = 8486;
+
+	//
+	// MessageId: ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC
+	//
+	// MessageText:
+	//
+	// Destination of a cross-domain move is not authoritative for the
+	// destination naming context.
+	//
+	public static final int ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = 8487;
+
+	//
+	// MessageId: ERROR_DS_SRC_GUID_MISMATCH
+	//
+	// MessageText:
+	//
+	// Source and destination of a cross-domain move do not agree on the
+	// identity of the source object. Either source or destination does not have
+	// the latest version of the source object.
+	//
+	public static final int ERROR_DS_SRC_GUID_MISMATCH = 8488;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOVE_DELETED_OBJECT
+	//
+	// MessageText:
+	//
+	// Object being moved across-domains is already known to be deleted by the
+	// destination server. The source server does not have the latest version of
+	// the source object.
+	//
+	public static final int ERROR_DS_CANT_MOVE_DELETED_OBJECT = 8489;
+
+	//
+	// MessageId: ERROR_DS_PDC_OPERATION_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// Another operation which requires exclusive access to the PDC FSMO is
+	// already in progress.
+	//
+	public static final int ERROR_DS_PDC_OPERATION_IN_PROGRESS = 8490;
+
+	//
+	// MessageId: ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD
+	//
+	// MessageText:
+	//
+	// A cross-domain move operation failed such that two versions of the moved
+	// object exist - one each in the source and destination domains. The
+	// destination object needs to be removed to restore the system to a
+	// consistent state.
+	//
+	public static final int ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = 8491;
+
+	//
+	// MessageId: ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION
+	//
+	// MessageText:
+	//
+	// This object may not be moved across domain boundaries either because
+	// cross-domain moves for this class are disallowed, or the object has some
+	// special characteristics, e.g.: trust account or restricted RID, which
+	// prevent its move.
+	//
+	public static final int ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = 8492;
+
+	//
+	// MessageId: ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS
+	//
+	// MessageText:
+	//
+	// Can't move objects with memberships across domain boundaries as once
+	// moved, this would violate the membership conditions of the account group.
+	// Remove the object from any account group memberships and retry.
+	//
+	public static final int ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = 8493;
+
+	//
+	// MessageId: ERROR_DS_NC_MUST_HAVE_NC_PARENT
+	//
+	// MessageText:
+	//
+	// A naming context head must be the immediate child of another naming
+	// context head, not of an interior node.
+	//
+	public static final int ERROR_DS_NC_MUST_HAVE_NC_PARENT = 8494;
+
+	//
+	// MessageId: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE
+	//
+	// MessageText:
+	//
+	// The directory cannot validate the proposed naming context name because it
+	// does not hold a replica of the naming context above the proposed naming
+	// context. Please ensure that the domain naming master role is held by a
+	// server that is configured as a global catalog server, and that the server
+	// is up to date with its replication partners. (Applies only to
+	// Windows=2000 Domain Naming masters)
+	//
+	public static final int ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = 8495;
+
+	//
+	// MessageId: ERROR_DS_DST_DOMAIN_NOT_NATIVE
+	//
+	// MessageText:
+	//
+	// Destination domain must be in native mode.
+	//
+	public static final int ERROR_DS_DST_DOMAIN_NOT_NATIVE = 8496;
+
+	//
+	// MessageId: ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because the server does not have an
+	// infrastructure container in the domain of interest.
+	//
+	public static final int ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = 8497;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOVE_ACCOUNT_GROUP
+	//
+	// MessageText:
+	//
+	// Cross-domain move of non-empty account groups is not allowed.
+	//
+	public static final int ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = 8498;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOVE_RESOURCE_GROUP
+	//
+	// MessageText:
+	//
+	// Cross-domain move of non-empty resource groups is not allowed.
+	//
+	public static final int ERROR_DS_CANT_MOVE_RESOURCE_GROUP = 8499;
+
+	//
+	// MessageId: ERROR_DS_INVALID_SEARCH_FLAG
+	//
+	// MessageText:
+	//
+	// The search flags for the attribute are invalid. The ANR bit is valid only
+	// on attributes of Unicode or Teletex strings.
+	//
+	public static final int ERROR_DS_INVALID_SEARCH_FLAG = 8500;
+
+	//
+	// MessageId: ERROR_DS_NO_TREE_DELETE_ABOVE_NC
+	//
+	// MessageText:
+	//
+	// Tree deletions starting at an object which has an NC head as a descendant
+	// are not allowed.
+	//
+	public static final int ERROR_DS_NO_TREE_DELETE_ABOVE_NC = 8501;
+
+	//
+	// MessageId: ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE
+	//
+	// MessageText:
+	//
+	// The directory service failed to lock a tree in preparation for a tree
+	// deletion because the tree was in use.
+	//
+	public static final int ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = 8502;
+
+	//
+	// MessageId: ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE
+	//
+	// MessageText:
+	//
+	// The directory service failed to identify the list of objects to delete
+	// while attempting a tree deletion.
+	//
+	public static final int ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = 8503;
+
+	//
+	// MessageId: ERROR_DS_SAM_INIT_FAILURE
+	//
+	// MessageText:
+	//
+	// Security Accounts Manager initialization failed because of the following
+	// error: %1.
+	// Error Status: 0x%2. Click OK to shut down the system and reboot into
+	// Directory Services Restore Mode. Check the event log for detailed
+	// information.
+	//
+	public static final int ERROR_DS_SAM_INIT_FAILURE = 8504;
+
+	//
+	// MessageId: ERROR_DS_SENSITIVE_GROUP_VIOLATION
+	//
+	// MessageText:
+	//
+	// Only an administrator can modify the membership list of an administrative
+	// group.
+	//
+	public static final int ERROR_DS_SENSITIVE_GROUP_VIOLATION = 8505;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOD_PRIMARYGROUPID
+	//
+	// MessageText:
+	//
+	// Cannot change the primary group ID of a domain controller account.
+	//
+	public static final int ERROR_DS_CANT_MOD_PRIMARYGROUPID = 8506;
+
+	//
+	// MessageId: ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD
+	//
+	// MessageText:
+	//
+	// An attempt is made to modify the base schema.
+	//
+	public static final int ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = 8507;
+
+	//
+	// MessageId: ERROR_DS_NONSAFE_SCHEMA_CHANGE
+	//
+	// MessageText:
+	//
+	// Adding a new mandatory attribute to an existing class, deleting a
+	// mandatory attribute from an existing class, or adding an optional
+	// attribute to the special class Top that is not a backlink attribute
+	// (directly or through inheritance, for example, by adding or deleting an
+	// auxiliary class) is not allowed.
+	//
+	public static final int ERROR_DS_NONSAFE_SCHEMA_CHANGE = 8508;
+
+	//
+	// MessageId: ERROR_DS_SCHEMA_UPDATE_DISALLOWED
+	//
+	// MessageText:
+	//
+	// Schema update is not allowed on this DC because the DC is not the schema
+	// FSMO Role Owner.
+	//
+	public static final int ERROR_DS_SCHEMA_UPDATE_DISALLOWED = 8509;
+
+	//
+	// MessageId: ERROR_DS_CANT_CREATE_UNDER_SCHEMA
+	//
+	// MessageText:
+	//
+	// An object of this class cannot be created under the schema container. You
+	// can only create attribute-schema and class-schema objects under the
+	// schema container.
+	//
+	public static final int ERROR_DS_CANT_CREATE_UNDER_SCHEMA = 8510;
+
+	//
+	// MessageId: ERROR_DS_INSTALL_NO_SRC_SCH_VERSION
+	//
+	// MessageText:
+	//
+	// The replica/child install failed to get the objectVersion attribute on
+	// the schema container on the source DC. Either the attribute is missing on
+	// the schema container or the credentials supplied do not have permission
+	// to read it.
+	//
+	public static final int ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = 8511;
+
+	//
+	// MessageId: ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE
+	//
+	// MessageText:
+	//
+	// The replica/child install failed to read the objectVersion attribute in
+	// the SCHEMA section of the file schema.ini in the system32 directory.
+	//
+	public static final int ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = 8512;
+
+	//
+	// MessageId: ERROR_DS_INVALID_GROUP_TYPE
+	//
+	// MessageText:
+	//
+	// The specified group type is invalid.
+	//
+	public static final int ERROR_DS_INVALID_GROUP_TYPE = 8513;
+
+	//
+	// MessageId: ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
+	//
+	// MessageText:
+	//
+	// You cannot nest global groups in a mixed domain if the group is
+	// security-enabled.
+	//
+	public static final int ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 8514;
+
+	//
+	// MessageId: ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
+	//
+	// MessageText:
+	//
+	// You cannot nest local groups in a mixed domain if the group is
+	// security-enabled.
+	//
+	public static final int ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 8515;
+
+	//
+	// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
+	//
+	// MessageText:
+	//
+	// A global group cannot have a local group as a member.
+	//
+	public static final int ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 8516;
+
+	//
+	// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
+	//
+	// MessageText:
+	//
+	// A global group cannot have a universal group as a member.
+	//
+	public static final int ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 8517;
+
+	//
+	// MessageId: ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
+	//
+	// MessageText:
+	//
+	// A universal group cannot have a local group as a member.
+	//
+	public static final int ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 8518;
+
+	//
+	// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
+	//
+	// MessageText:
+	//
+	// A global group cannot have a cross-domain member.
+	//
+	public static final int ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 8519;
+
+	//
+	// MessageId: ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
+	//
+	// MessageText:
+	//
+	// A local group cannot have another cross domain local group as a member.
+	//
+	public static final int ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 8520;
+
+	//
+	// MessageId: ERROR_DS_HAVE_PRIMARY_MEMBERS
+	//
+	// MessageText:
+	//
+	// A group with primary members cannot change to a security-disabled group.
+	//
+	public static final int ERROR_DS_HAVE_PRIMARY_MEMBERS = 8521;
+
+	//
+	// MessageId: ERROR_DS_STRING_SD_CONVERSION_FAILED
+	//
+	// MessageText:
+	//
+	// The schema cache load failed to convert the string default SD on a
+	// class-schema object.
+	//
+	public static final int ERROR_DS_STRING_SD_CONVERSION_FAILED = 8522;
+
+	//
+	// MessageId: ERROR_DS_NAMING_MASTER_GC
+	//
+	// MessageText:
+	//
+	// Only DSAs configured to be Global Catalog servers should be allowed to
+	// hold the Domain Naming Master FSMO role. (Applies only to Windows=2000
+	// servers)
+	//
+	public static final int ERROR_DS_NAMING_MASTER_GC = 8523;
+
+	//
+	// MessageId: ERROR_DS_DNS_LOOKUP_FAILURE
+	//
+	// MessageText:
+	//
+	// The DSA operation is unable to proceed because of a DNS lookup failure.
+	//
+	public static final int ERROR_DS_DNS_LOOKUP_FAILURE = 8524;
+
+	//
+	// MessageId: ERROR_DS_COULDNT_UPDATE_SPNS
+	//
+	// MessageText:
+	//
+	// While processing a change to the DNS Host Name for an object, the Service
+	// Principal Name values could not be kept in sync.
+	//
+	public static final int ERROR_DS_COULDNT_UPDATE_SPNS = 8525;
+
+	//
+	// MessageId: ERROR_DS_CANT_RETRIEVE_SD
+	//
+	// MessageText:
+	//
+	// The Security Descriptor attribute could not be read.
+	//
+	public static final int ERROR_DS_CANT_RETRIEVE_SD = 8526;
+
+	//
+	// MessageId: ERROR_DS_KEY_NOT_UNIQUE
+	//
+	// MessageText:
+	//
+	// The object requested was not found, but an object with that key was
+	// found.
+	//
+	public static final int ERROR_DS_KEY_NOT_UNIQUE = 8527;
+
+	//
+	// MessageId: ERROR_DS_WRONG_LINKED_ATT_SYNTAX
+	//
+	// MessageText:
+	//
+	// The syntax of the linked attribute being added is incorrect. Forward
+	// links can only have syntax=2.5.5.1,=2.5.5.7, and=2.5.5.14, and backlinks
+	// can only have syntax=2.5.5.1
+	//
+	public static final int ERROR_DS_WRONG_LINKED_ATT_SYNTAX = 8528;
+
+	//
+	// MessageId: ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD
+	//
+	// MessageText:
+	//
+	// Security Account Manager needs to get the boot password.
+	//
+	public static final int ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = 8529;
+
+	//
+	// MessageId: ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY
+	//
+	// MessageText:
+	//
+	// Security Account Manager needs to get the boot key from floppy disk.
+	//
+	public static final int ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = 8530;
+
+	//
+	// MessageId: ERROR_DS_CANT_START
+	//
+	// MessageText:
+	//
+	// Directory Service cannot start.
+	//
+	public static final int ERROR_DS_CANT_START = 8531;
+
+	//
+	// MessageId: ERROR_DS_INIT_FAILURE
+	//
+	// MessageText:
+	//
+	// Directory Services could not start.
+	//
+	public static final int ERROR_DS_INIT_FAILURE = 8532;
+
+	//
+	// MessageId: ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION
+	//
+	// MessageText:
+	//
+	// The connection between client and server requires packet privacy or
+	// better.
+	//
+	public static final int ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = 8533;
+
+	//
+	// MessageId: ERROR_DS_SOURCE_DOMAIN_IN_FOREST
+	//
+	// MessageText:
+	//
+	// The source domain may not be in the same forest as destination.
+	//
+	public static final int ERROR_DS_SOURCE_DOMAIN_IN_FOREST = 8534;
+
+	//
+	// MessageId: ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST
+	//
+	// MessageText:
+	//
+	// The destination domain must be in the forest.
+	//
+	public static final int ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = 8535;
+
+	//
+	// MessageId: ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// The operation requires that destination domain auditing be enabled.
+	//
+	public static final int ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = 8536;
+
+	//
+	// MessageId: ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN
+	//
+	// MessageText:
+	//
+	// The operation couldn't locate a DC for the source domain.
+	//
+	public static final int ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = 8537;
+
+	//
+	// MessageId: ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER
+	//
+	// MessageText:
+	//
+	// The source object must be a group or user.
+	//
+	public static final int ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = 8538;
+
+	//
+	// MessageId: ERROR_DS_SRC_SID_EXISTS_IN_FOREST
+	//
+	// MessageText:
+	//
+	// The source object's SID already exists in destination forest.
+	//
+	public static final int ERROR_DS_SRC_SID_EXISTS_IN_FOREST = 8539;
+
+	//
+	// MessageId: ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH
+	//
+	// MessageText:
+	//
+	// The source and destination object must be of the same type.
+	//
+	public static final int ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = 8540;
+
+	//
+	// MessageId: ERROR_SAM_INIT_FAILURE
+	//
+	// MessageText:
+	//
+	// Security Accounts Manager initialization failed because of the following
+	// error: %1.
+	// Error Status: 0x%2. Click OK to shut down the system and reboot into Safe
+	// Mode. Check the event log for detailed information.
+	//
+	public static final int ERROR_SAM_INIT_FAILURE = 8541;
+
+	//
+	// MessageId: ERROR_DS_DRA_SCHEMA_INFO_SHIP
+	//
+	// MessageText:
+	//
+	// Schema information could not be included in the replication request.
+	//
+	public static final int ERROR_DS_DRA_SCHEMA_INFO_SHIP = 8542;
+
+	//
+	// MessageId: ERROR_DS_DRA_SCHEMA_CONFLICT
+	//
+	// MessageText:
+	//
+	// The replication operation could not be completed due to a schema
+	// incompatibility.
+	//
+	public static final int ERROR_DS_DRA_SCHEMA_CONFLICT = 8543;
+
+	//
+	// MessageId: ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT
+	//
+	// MessageText:
+	//
+	// The replication operation could not be completed due to a previous schema
+	// incompatibility.
+	//
+	public static final int ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = 8544;
+
+	//
+	// MessageId: ERROR_DS_DRA_OBJ_NC_MISMATCH
+	//
+	// MessageText:
+	//
+	// The replication update could not be applied because either the source or
+	// the destination has not yet received information regarding a recent
+	// cross-domain move operation.
+	//
+	public static final int ERROR_DS_DRA_OBJ_NC_MISMATCH = 8545;
+
+	//
+	// MessageId: ERROR_DS_NC_STILL_HAS_DSAS
+	//
+	// MessageText:
+	//
+	// The requested domain could not be deleted because there exist domain
+	// controllers that still host this domain.
+	//
+	public static final int ERROR_DS_NC_STILL_HAS_DSAS = 8546;
+
+	//
+	// MessageId: ERROR_DS_GC_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation can be performed only on a global catalog server.
+	//
+	public static final int ERROR_DS_GC_REQUIRED = 8547;
+
+	//
+	// MessageId: ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
+	//
+	// MessageText:
+	//
+	// A local group can only be a member of other local groups in the same
+	// domain.
+	//
+	public static final int ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 8548;
+
+	//
+	// MessageId: ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS
+	//
+	// MessageText:
+	//
+	// Foreign security principals cannot be members of universal groups.
+	//
+	public static final int ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 8549;
+
+	//
+	// MessageId: ERROR_DS_CANT_ADD_TO_GC
+	//
+	// MessageText:
+	//
+	// The attribute is not allowed to be replicated to the GC because of
+	// security reasons.
+	//
+	public static final int ERROR_DS_CANT_ADD_TO_GC = 8550;
+
+	//
+	// MessageId: ERROR_DS_NO_CHECKPOINT_WITH_PDC
+	//
+	// MessageText:
+	//
+	// The checkpoint with the PDC could not be taken because there too many
+	// modifications being processed currently.
+	//
+	public static final int ERROR_DS_NO_CHECKPOINT_WITH_PDC = 8551;
+
+	//
+	// MessageId: ERROR_DS_SOURCE_AUDITING_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// The operation requires that source domain auditing be enabled.
+	//
+	public static final int ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = 8552;
+
+	//
+	// MessageId: ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC
+	//
+	// MessageText:
+	//
+	// Security principal objects can only be created inside domain naming
+	// contexts.
+	//
+	public static final int ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = 8553;
+
+	//
+	// MessageId: ERROR_DS_INVALID_NAME_FOR_SPN
+	//
+	// MessageText:
+	//
+	// A Service Principal Name (SPN) could not be constructed because the
+	// provided hostname is not in the necessary format.
+	//
+	public static final int ERROR_DS_INVALID_NAME_FOR_SPN = 8554;
+
+	//
+	// MessageId: ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS
+	//
+	// MessageText:
+	//
+	// A Filter was passed that uses constructed attributes.
+	//
+	public static final int ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = 8555;
+
+	//
+	// MessageId: ERROR_DS_UNICODEPWD_NOT_IN_QUOTES
+	//
+	// MessageText:
+	//
+	// The unicodePwd attribute value must be enclosed in double quotes.
+	//
+	public static final int ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = 8556;
+
+	//
+	// MessageId: ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
+	//
+	// MessageText:
+	//
+	// Your computer could not be joined to the domain. You have exceeded the
+	// maximum number of computer accounts you are allowed to create in this
+	// domain. Contact your system administrator to have this limit reset or
+	// increased.
+	//
+	public static final int ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 8557;
+
+	//
+	// MessageId: ERROR_DS_MUST_BE_RUN_ON_DST_DC
+	//
+	// MessageText:
+	//
+	// For security reasons, the operation must be run on the destination DC.
+	//
+	public static final int ERROR_DS_MUST_BE_RUN_ON_DST_DC = 8558;
+
+	//
+	// MessageId: ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER
+	//
+	// MessageText:
+	//
+	// For security reasons, the source DC must be NT4SP4 or greater.
+	//
+	public static final int ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = 8559;
+
+	//
+	// MessageId: ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ
+	//
+	// MessageText:
+	//
+	// Critical Directory Service System objects cannot be deleted during tree
+	// delete operations. The tree delete may have been partially performed.
+	//
+	public static final int ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = 8560;
+
+	//
+	// MessageId: ERROR_DS_INIT_FAILURE_CONSOLE
+	//
+	// MessageText:
+	//
+	// Directory Services could not start because of the following error: %1.
+	// Error Status: 0x%2. Please click OK to shutdown the system. You can use
+	// the recovery console to diagnose the system further.
+	//
+	public static final int ERROR_DS_INIT_FAILURE_CONSOLE = 8561;
+
+	//
+	// MessageId: ERROR_DS_SAM_INIT_FAILURE_CONSOLE
+	//
+	// MessageText:
+	//
+	// Security Accounts Manager initialization failed because of the following
+	// error: %1.
+	// Error Status: 0x%2. Please click OK to shutdown the system. You can use
+	// the recovery console to diagnose the system further.
+	//
+	public static final int ERROR_DS_SAM_INIT_FAILURE_CONSOLE = 8562;
+
+	//
+	// MessageId: ERROR_DS_FOREST_VERSION_TOO_HIGH
+	//
+	// MessageText:
+	//
+	// The version of the operating system installed is incompatible with the
+	// current forest functional level. You must upgrade to a new version of the
+	// operating system before this server can become a domain controller in
+	// this forest.
+	//
+	public static final int ERROR_DS_FOREST_VERSION_TOO_HIGH = 8563;
+
+	//
+	// MessageId: ERROR_DS_DOMAIN_VERSION_TOO_HIGH
+	//
+	// MessageText:
+	//
+	// The version of the operating system installed is incompatible with the
+	// current domain functional level. You must upgrade to a new version of the
+	// operating system before this server can become a domain controller in
+	// this domain.
+	//
+	public static final int ERROR_DS_DOMAIN_VERSION_TOO_HIGH = 8564;
+
+	//
+	// MessageId: ERROR_DS_FOREST_VERSION_TOO_LOW
+	//
+	// MessageText:
+	//
+	// The version of the operating system installed on this server no longer
+	// supports the current forest functional level. You must raise the forest
+	// functional level before this server can become a domain controller in
+	// this forest.
+	//
+	public static final int ERROR_DS_FOREST_VERSION_TOO_LOW = 8565;
+
+	//
+	// MessageId: ERROR_DS_DOMAIN_VERSION_TOO_LOW
+	//
+	// MessageText:
+	//
+	// The version of the operating system installed on this server no longer
+	// supports the current domain functional level. You must raise the domain
+	// functional level before this server can become a domain controller in
+	// this domain.
+	//
+	public static final int ERROR_DS_DOMAIN_VERSION_TOO_LOW = 8566;
+
+	//
+	// MessageId: ERROR_DS_INCOMPATIBLE_VERSION
+	//
+	// MessageText:
+	//
+	// The version of the operating system installed on this server is
+	// incompatible with the functional level of the domain or forest.
+	//
+	public static final int ERROR_DS_INCOMPATIBLE_VERSION = 8567;
+
+	//
+	// MessageId: ERROR_DS_LOW_DSA_VERSION
+	//
+	// MessageText:
+	//
+	// The functional level of the domain (or forest) cannot be raised to the
+	// requested value, because there exist one or more domain controllers in
+	// the domain (or forest) that are at a lower incompatible functional level.
+	//
+	public static final int ERROR_DS_LOW_DSA_VERSION = 8568;
+
+	//
+	// MessageId: ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN
+	//
+	// MessageText:
+	//
+	// The forest functional level cannot be raised to the requested value since
+	// one or more domains are still in mixed domain mode. All domains in the
+	// forest must be in native mode, for you to raise the forest functional
+	// level.
+	//
+	public static final int ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = 8569;
+
+	//
+	// MessageId: ERROR_DS_NOT_SUPPORTED_SORT_ORDER
+	//
+	// MessageText:
+	//
+	// The sort order requested is not supported.
+	//
+	public static final int ERROR_DS_NOT_SUPPORTED_SORT_ORDER = 8570;
+
+	//
+	// MessageId: ERROR_DS_NAME_NOT_UNIQUE
+	//
+	// MessageText:
+	//
+	// The requested name already exists as a unique identifier.
+	//
+	public static final int ERROR_DS_NAME_NOT_UNIQUE = 8571;
+
+	//
+	// MessageId: ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4
+	//
+	// MessageText:
+	//
+	// The machine account was created pre-NT4. The account needs to be
+	// recreated.
+	//
+	public static final int ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = 8572;
+
+	//
+	// MessageId: ERROR_DS_OUT_OF_VERSION_STORE
+	//
+	// MessageText:
+	//
+	// The database is out of version store.
+	//
+	public static final int ERROR_DS_OUT_OF_VERSION_STORE = 8573;
+
+	//
+	// MessageId: ERROR_DS_INCOMPATIBLE_CONTROLS_USED
+	//
+	// MessageText:
+	//
+	// Unable to continue operation because multiple conflicting controls were
+	// used.
+	//
+	public static final int ERROR_DS_INCOMPATIBLE_CONTROLS_USED = 8574;
+
+	//
+	// MessageId: ERROR_DS_NO_REF_DOMAIN
+	//
+	// MessageText:
+	//
+	// Unable to find a valid security descriptor reference domain for this
+	// partition.
+	//
+	public static final int ERROR_DS_NO_REF_DOMAIN = 8575;
+
+	//
+	// MessageId: ERROR_DS_RESERVED_LINK_ID
+	//
+	// MessageText:
+	//
+	// Schema update failed: The link identifier is reserved.
+	//
+	public static final int ERROR_DS_RESERVED_LINK_ID = 8576;
+
+	//
+	// MessageId: ERROR_DS_LINK_ID_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// Schema update failed: There are no link identifiers available.
+	//
+	public static final int ERROR_DS_LINK_ID_NOT_AVAILABLE = 8577;
+
+	//
+	// MessageId: ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER
+	//
+	// MessageText:
+	//
+	// An account group cannot have a universal group as a member.
+	//
+	public static final int ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 8578;
+
+	//
+	// MessageId: ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE
+	//
+	// MessageText:
+	//
+	// Rename or move operations on naming context heads or read-only objects
+	// are not allowed.
+	//
+	public static final int ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = 8579;
+
+	//
+	// MessageId: ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC
+	//
+	// MessageText:
+	//
+	// Move operations on objects in the schema naming context are not allowed.
+	//
+	public static final int ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = 8580;
+
+	//
+	// MessageId: ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG
+	//
+	// MessageText:
+	//
+	// A system flag has been set on the object and does not allow the object to
+	// be moved or renamed.
+	//
+	public static final int ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = 8581;
+
+	//
+	// MessageId: ERROR_DS_MODIFYDN_WRONG_GRANDPARENT
+	//
+	// MessageText:
+	//
+	// This object is not allowed to change its grandparent container. Moves are
+	// not forbidden on this object, but are restricted to sibling containers.
+	//
+	public static final int ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = 8582;
+
+	//
+	// MessageId: ERROR_DS_NAME_ERROR_TRUST_REFERRAL
+	//
+	// MessageText:
+	//
+	// Unable to resolve completely, a referral to another forest is generated.
+	//
+	public static final int ERROR_DS_NAME_ERROR_TRUST_REFERRAL = 8583;
+
+	//
+	// MessageId: ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER
+	//
+	// MessageText:
+	//
+	// The requested action is not supported on standard server.
+	//
+	public static final int ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = 8584;
+
+	//
+	// MessageId: ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD
+	//
+	// MessageText:
+	//
+	// Could not access a partition of the directory service located on a remote
+	// server. Make sure at least one server is running for the partition in
+	// question.
+	//
+	public static final int ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = 8585;
+
+	//
+	// MessageId: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2
+	//
+	// MessageText:
+	//
+	// The directory cannot validate the proposed naming context (or partition)
+	// name because it does not hold a replica nor can it contact a replica of
+	// the naming context above the proposed naming context. Please ensure that
+	// the parent naming context is properly registered in DNS, and at least one
+	// replica of this naming context is reachable by the Domain Naming master.
+	//
+	public static final int ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = 8586;
+
+	//
+	// MessageId: ERROR_DS_THREAD_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The thread limit for this request was exceeded.
+	//
+	public static final int ERROR_DS_THREAD_LIMIT_EXCEEDED = 8587;
+
+	//
+	// MessageId: ERROR_DS_NOT_CLOSEST
+	//
+	// MessageText:
+	//
+	// The Global catalog server is not in the closest site.
+	//
+	public static final int ERROR_DS_NOT_CLOSEST = 8588;
+
+	//
+	// MessageId: ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF
+	//
+	// MessageText:
+	//
+	// The DS cannot derive a service principal name (SPN) with which to
+	// mutually authenticate the target server because the corresponding server
+	// object in the local DS database has no serverReference attribute.
+	//
+	public static final int ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = 8589;
+
+	//
+	// MessageId: ERROR_DS_SINGLE_USER_MODE_FAILED
+	//
+	// MessageText:
+	//
+	// The Directory Service failed to enter single user mode.
+	//
+	public static final int ERROR_DS_SINGLE_USER_MODE_FAILED = 8590;
+
+	//
+	// MessageId: ERROR_DS_NTDSCRIPT_SYNTAX_ERROR
+	//
+	// MessageText:
+	//
+	// The Directory Service cannot parse the script because of a syntax error.
+	//
+	public static final int ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = 8591;
+
+	//
+	// MessageId: ERROR_DS_NTDSCRIPT_PROCESS_ERROR
+	//
+	// MessageText:
+	//
+	// The Directory Service cannot process the script because of an error.
+	//
+	public static final int ERROR_DS_NTDSCRIPT_PROCESS_ERROR = 8592;
+
+	//
+	// MessageId: ERROR_DS_DIFFERENT_REPL_EPOCHS
+	//
+	// MessageText:
+	//
+	// The directory service cannot perform the requested operation because the
+	// servers
+	// involved are of different replication epochs (which is usually related to
+	// a
+	// domain rename that is in progress).
+	//
+	public static final int ERROR_DS_DIFFERENT_REPL_EPOCHS = 8593;
+
+	//
+	// MessageId: ERROR_DS_DRS_EXTENSIONS_CHANGED
+	//
+	// MessageText:
+	//
+	// The directory service binding must be renegotiated due to a change in the
+	// server
+	// extensions information.
+	//
+	public static final int ERROR_DS_DRS_EXTENSIONS_CHANGED = 8594;
+
+	//
+	// MessageId: ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR
+	//
+	// MessageText:
+	//
+	// Operation not allowed on a disabled cross ref.
+	//
+	public static final int ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = 8595;
+
+	//
+	// MessageId: ERROR_DS_NO_MSDS_INTID
+	//
+	// MessageText:
+	//
+	// Schema update failed: No values for msDS-IntId are available.
+	//
+	public static final int ERROR_DS_NO_MSDS_INTID = 8596;
+
+	//
+	// MessageId: ERROR_DS_DUP_MSDS_INTID
+	//
+	// MessageText:
+	//
+	// Schema update failed: Duplicate msDS-INtId. Retry the operation.
+	//
+	public static final int ERROR_DS_DUP_MSDS_INTID = 8597;
+
+	//
+	// MessageId: ERROR_DS_EXISTS_IN_RDNATTID
+	//
+	// MessageText:
+	//
+	// Schema deletion failed: attribute is used in rDNAttID.
+	//
+	public static final int ERROR_DS_EXISTS_IN_RDNATTID = 8598;
+
+	//
+	// MessageId: ERROR_DS_AUTHORIZATION_FAILED
+	//
+	// MessageText:
+	//
+	// The directory service failed to authorize the request.
+	//
+	public static final int ERROR_DS_AUTHORIZATION_FAILED = 8599;
+
+	//
+	// MessageId: ERROR_DS_INVALID_SCRIPT
+	//
+	// MessageText:
+	//
+	// The Directory Service cannot process the script because it is invalid.
+	//
+	public static final int ERROR_DS_INVALID_SCRIPT = 8600;
+
+	//
+	// MessageId: ERROR_DS_REMOTE_CROSSREF_OP_FAILED
+	//
+	// MessageText:
+	//
+	// The remote create cross reference operation failed on the Domain Naming
+	// Master FSMO. The operation's error is in the extended data.
+	//
+	public static final int ERROR_DS_REMOTE_CROSSREF_OP_FAILED = 8601;
+
+	//
+	// MessageId: ERROR_DS_CROSS_REF_BUSY
+	//
+	// MessageText:
+	//
+	// A cross reference is in use locally with the same name.
+	//
+	public static final int ERROR_DS_CROSS_REF_BUSY = 8602;
+
+	//
+	// MessageId: ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN
+	//
+	// MessageText:
+	//
+	// The DS cannot derive a service principal name (SPN) with which to
+	// mutually authenticate the target server because the server's domain has
+	// been deleted from the forest.
+	//
+	public static final int ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = 8603;
+
+	//
+	// MessageId: ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC
+	//
+	// MessageText:
+	//
+	// Writeable NCs prevent this DC from demoting.
+	//
+	public static final int ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = 8604;
+
+	//
+	// MessageId: ERROR_DS_DUPLICATE_ID_FOUND
+	//
+	// MessageText:
+	//
+	// The requested object has a non-unique identifier and cannot be retrieved.
+	//
+	public static final int ERROR_DS_DUPLICATE_ID_FOUND = 8605;
+
+	//
+	// MessageId: ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT
+	//
+	// MessageText:
+	//
+	// Insufficient attributes were given to create an object. This object may
+	// not exist because it may have been deleted and already garbage collected.
+	//
+	public static final int ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = 8606;
+
+	//
+	// MessageId: ERROR_DS_GROUP_CONVERSION_ERROR
+	//
+	// MessageText:
+	//
+	// The group cannot be converted due to attribute restrictions on the
+	// requested group type.
+	//
+	public static final int ERROR_DS_GROUP_CONVERSION_ERROR = 8607;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOVE_APP_BASIC_GROUP
+	//
+	// MessageText:
+	//
+	// Cross-domain move of non-empty basic application groups is not allowed.
+	//
+	public static final int ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = 8608;
+
+	//
+	// MessageId: ERROR_DS_CANT_MOVE_APP_QUERY_GROUP
+	//
+	// MessageText:
+	//
+	// Cross-domain move of non-empty query based application groups is not
+	// allowed.
+	//
+	public static final int ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = 8609;
+
+	//
+	// MessageId: ERROR_DS_ROLE_NOT_VERIFIED
+	//
+	// MessageText:
+	//
+	// The FSMO role ownership could not be verified because its directory
+	// partition has not replicated successfully with atleast one replication
+	// partner.
+	//
+	public static final int ERROR_DS_ROLE_NOT_VERIFIED = 8610;
+
+	//
+	// MessageId: ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL
+	//
+	// MessageText:
+	//
+	// The target container for a redirection of a well known object container
+	// cannot already be a special container.
+	//
+	public static final int ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = 8611;
+
+	//
+	// MessageId: ERROR_DS_DOMAIN_RENAME_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The Directory Service cannot perform the requested operation because a
+	// domain rename operation is in progress.
+	//
+	public static final int ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = 8612;
+
+	//
+	// MessageId: ERROR_DS_EXISTING_AD_CHILD_NC
+	//
+	// MessageText:
+	//
+	// The directory service detected a child partition below the requested
+	// partition name. The partition hierarchy must be created in a top down
+	// method.
+	//
+	public static final int ERROR_DS_EXISTING_AD_CHILD_NC = 8613;
+
+	//
+	// MessageId: ERROR_DS_REPL_LIFETIME_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The directory service cannot replicate with this server because the time
+	// since the last replication with this server has exceeded the tombstone
+	// lifetime.
+	//
+	public static final int ERROR_DS_REPL_LIFETIME_EXCEEDED = 8614;
+
+	//
+	// MessageId: ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER
+	//
+	// MessageText:
+	//
+	// The requested operation is not allowed on an object under the system
+	// container.
+	//
+	public static final int ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = 8615;
+
+	//
+	// MessageId: ERROR_DS_LDAP_SEND_QUEUE_FULL
+	//
+	// MessageText:
+	//
+	// The LDAP servers network send queue has filled up because the client is
+	// not processing the results of it's requests fast enough. No more requests
+	// will be processed until the client catches up. If the client does not
+	// catch up then it will be disconnected.
+	//
+	public static final int ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616;
+
+	//
+	// MessageId: ERROR_DS_DRA_OUT_SCHEDULE_WINDOW
+	//
+	// MessageText:
+	//
+	// The scheduled replication did not take place because the system was too
+	// busy to execute the request within the schedule window. The replication
+	// queue is overloaded. Consider reducing the number of partners or
+	// decreasing the scheduled replication frequency.
+	//
+	public static final int ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = 8617;
+
+	//
+	// MessageId: ERROR_DS_POLICY_NOT_KNOWN
+	//
+	// MessageText:
+	//
+	// At this time, it cannot be determined if the branch replication policy is
+	// available on the hub domain controller. Please retry at a later time to
+	// account for replication latencies.
+	//
+	public static final int ERROR_DS_POLICY_NOT_KNOWN = 8618;
+
+	//
+	// MessageId: ERROR_NO_SITE_SETTINGS_OBJECT
+	//
+	// MessageText:
+	//
+	// The site settings object for the specified site does not exist.
+	//
+	public static final int ERROR_NO_SITE_SETTINGS_OBJECT = 8619;
+
+	//
+	// MessageId: ERROR_NO_SECRETS
+	//
+	// MessageText:
+	//
+	// The local account store does not contain secret material for the
+	// specified account.
+	//
+	public static final int ERROR_NO_SECRETS = 8620;
+
+	//
+	// MessageId: ERROR_NO_WRITABLE_DC_FOUND
+	//
+	// MessageText:
+	//
+	// Could not find a writable domain controller in the domain.
+	//
+	public static final int ERROR_NO_WRITABLE_DC_FOUND = 8621;
+
+	//
+	// MessageId: ERROR_DS_NO_SERVER_OBJECT
+	//
+	// MessageText:
+	//
+	// The server object for the domain controller does not exist.
+	//
+	public static final int ERROR_DS_NO_SERVER_OBJECT = 8622;
+
+	//
+	// MessageId: ERROR_DS_NO_NTDSA_OBJECT
+	//
+	// MessageText:
+	//
+	// The NTDS Settings object for the domain controller does not exist.
+	//
+	public static final int ERROR_DS_NO_NTDSA_OBJECT = 8623;
+
+	//
+	// MessageId: ERROR_DS_NON_ASQ_SEARCH
+	//
+	// MessageText:
+	//
+	// The requested search operation is not supported for ASQ searches.
+	//
+	public static final int ERROR_DS_NON_ASQ_SEARCH = 8624;
+
+	//
+	// MessageId: ERROR_DS_AUDIT_FAILURE
+	//
+	// MessageText:
+	//
+	// A required audit event could not be generated for the operation.
+	//
+	public static final int ERROR_DS_AUDIT_FAILURE = 8625;
+
+	//
+	// MessageId: ERROR_DS_INVALID_SEARCH_FLAG_SUBTREE
+	//
+	// MessageText:
+	//
+	// The search flags for the attribute are invalid. The subtree index bit is
+	// valid only on single valued attributes.
+	//
+	public static final int ERROR_DS_INVALID_SEARCH_FLAG_SUBTREE = 8626;
+
+	//
+	// MessageId: ERROR_DS_INVALID_SEARCH_FLAG_TUPLE
+	//
+	// MessageText:
+	//
+	// The search flags for the attribute are invalid. The tuple index bit is
+	// valid only on attributes of Unicode strings.
+	//
+	public static final int ERROR_DS_INVALID_SEARCH_FLAG_TUPLE = 8627;
+
+	//
+	// MessageId: ERROR_DS_HIERARCHY_TABLE_TOO_DEEP
+	//
+	// MessageText:
+	//
+	// The address books are nested too deeply. Failed to build the hierarchy
+	// table.
+	//
+	public static final int ERROR_DS_HIERARCHY_TABLE_TOO_DEEP = 8628;
+
+	// /////////////////////////////////////////////////
+	// =/
+	// =End of Active Directory Error Codes /
+	// =/
+	// =8000 to =8999=/
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =DNS Error codes=//
+	// =//
+	// =9000 to=9999=//
+	// /////////////////////////////////////////////////
+
+	// ====
+	// Facility DNS Error Messages
+	// ====
+
+	//
+	// DNS response codes.
+	//
+
+	public static final int DNS_ERROR_RESPONSE_CODES_BASE = 9000;
+
+	public static final int DNS_ERROR_RCODE_NO_ERROR = NO_ERROR;
+
+	public static final int DNS_ERROR_MASK = 0x00002328; // =9000 or
+															// DNS_ERROR_RESPONSE_CODES_BASE
+
+	// DNS_ERROR_RCODE_FORMAT_ERROR=0x00002329
+	//
+	// MessageId: DNS_ERROR_RCODE_FORMAT_ERROR
+	//
+	// MessageText:
+	//
+	// DNS server unable to interpret format.
+	//
+	public static final int DNS_ERROR_RCODE_FORMAT_ERROR = 9001;
+
+	// DNS_ERROR_RCODE_SERVER_FAILURE=0x0000232a
+	//
+	// MessageId: DNS_ERROR_RCODE_SERVER_FAILURE
+	//
+	// MessageText:
+	//
+	// DNS server failure.
+	//
+	public static final int DNS_ERROR_RCODE_SERVER_FAILURE = 9002;
+
+	// DNS_ERROR_RCODE_NAME_ERROR=0x0000232b
+	//
+	// MessageId: DNS_ERROR_RCODE_NAME_ERROR
+	//
+	// MessageText:
+	//
+	// DNS name does not exist.
+	//
+	public static final int DNS_ERROR_RCODE_NAME_ERROR = 9003;
+
+	// DNS_ERROR_RCODE_NOT_IMPLEMENTED 0x0000232c
+	//
+	// MessageId: DNS_ERROR_RCODE_NOT_IMPLEMENTED
+	//
+	// MessageText:
+	//
+	// DNS request not supported by name server.
+	//
+	public static final int DNS_ERROR_RCODE_NOT_IMPLEMENTED = 9004;
+
+	// DNS_ERROR_RCODE_REFUSED=0x0000232d
+	//
+	// MessageId: DNS_ERROR_RCODE_REFUSED
+	//
+	// MessageText:
+	//
+	// DNS operation refused.
+	//
+	public static final int DNS_ERROR_RCODE_REFUSED = 9005;
+
+	// DNS_ERROR_RCODE_YXDOMAIN=0x0000232e
+	//
+	// MessageId: DNS_ERROR_RCODE_YXDOMAIN
+	//
+	// MessageText:
+	//
+	// DNS name that ought not exist, does exist.
+	//
+	public static final int DNS_ERROR_RCODE_YXDOMAIN = 9006;
+
+	// DNS_ERROR_RCODE_YXRRSET=0x0000232f
+	//
+	// MessageId: DNS_ERROR_RCODE_YXRRSET
+	//
+	// MessageText:
+	//
+	// DNS RR set that ought not exist, does exist.
+	//
+	public static final int DNS_ERROR_RCODE_YXRRSET = 9007;
+
+	// DNS_ERROR_RCODE_NXRRSET=0x00002330
+	//
+	// MessageId: DNS_ERROR_RCODE_NXRRSET
+	//
+	// MessageText:
+	//
+	// DNS RR set that ought to exist, does not exist.
+	//
+	public static final int DNS_ERROR_RCODE_NXRRSET = 9008;
+
+	// DNS_ERROR_RCODE_NOTAUTH=0x00002331
+	//
+	// MessageId: DNS_ERROR_RCODE_NOTAUTH
+	//
+	// MessageText:
+	//
+	// DNS server not authoritative for zone.
+	//
+	public static final int DNS_ERROR_RCODE_NOTAUTH = 9009;
+
+	// DNS_ERROR_RCODE_NOTZONE=0x00002332
+	//
+	// MessageId: DNS_ERROR_RCODE_NOTZONE
+	//
+	// MessageText:
+	//
+	// DNS name in update or prereq is not in zone.
+	//
+	public static final int DNS_ERROR_RCODE_NOTZONE = 9010;
+
+	// DNS_ERROR_RCODE_BADSIG=0x00002338
+	//
+	// MessageId: DNS_ERROR_RCODE_BADSIG
+	//
+	// MessageText:
+	//
+	// DNS signature failed to verify.
+	//
+	public static final int DNS_ERROR_RCODE_BADSIG = 9016;
+
+	// DNS_ERROR_RCODE_BADKEY=0x00002339
+	//
+	// MessageId: DNS_ERROR_RCODE_BADKEY
+	//
+	// MessageText:
+	//
+	// DNS bad key.
+	//
+	public static final int DNS_ERROR_RCODE_BADKEY = 9017;
+
+	// DNS_ERROR_RCODE_BADTIME=0x0000233a
+	//
+	// MessageId: DNS_ERROR_RCODE_BADTIME
+	//
+	// MessageText:
+	//
+	// DNS signature validity expired.
+	//
+	public static final int DNS_ERROR_RCODE_BADTIME = 9018;
+
+	public static final int DNS_ERROR_RCODE_LAST = DNS_ERROR_RCODE_BADTIME;
+
+	//
+	// Packet format
+	//
+
+	public static final int DNS_ERROR_PACKET_FMT_BASE = 9500;
+
+	// DNS_INFO_NO_RECORDS=0x0000251d
+	//
+	// MessageId: DNS_INFO_NO_RECORDS
+	//
+	// MessageText:
+	//
+	// No records found for given DNS query.
+	//
+	public static final int DNS_INFO_NO_RECORDS = 9501;
+
+	// DNS_ERROR_BAD_PACKET=0x0000251e
+	//
+	// MessageId: DNS_ERROR_BAD_PACKET
+	//
+	// MessageText:
+	//
+	// Bad DNS packet.
+	//
+	public static final int DNS_ERROR_BAD_PACKET = 9502;
+
+	// DNS_ERROR_NO_PACKET=0x0000251f
+	//
+	// MessageId: DNS_ERROR_NO_PACKET
+	//
+	// MessageText:
+	//
+	// No DNS packet.
+	//
+	public static final int DNS_ERROR_NO_PACKET = 9503;
+
+	// DNS_ERROR_RCODE=0x00002520
+	//
+	// MessageId: DNS_ERROR_RCODE
+	//
+	// MessageText:
+	//
+	// DNS error, check rcode.
+	//
+	public static final int DNS_ERROR_RCODE = 9504;
+
+	// DNS_ERROR_UNSECURE_PACKET=0x00002521
+	//
+	// MessageId: DNS_ERROR_UNSECURE_PACKET
+	//
+	// MessageText:
+	//
+	// Unsecured DNS packet.
+	//
+	public static final int DNS_ERROR_UNSECURE_PACKET = 9505;
+
+	public static final int DNS_STATUS_PACKET_UNSECURE = DNS_ERROR_UNSECURE_PACKET;
+
+	//
+	// General API errors
+	//
+
+	public static final int DNS_ERROR_NO_MEMORY = ERROR_OUTOFMEMORY;
+	public static final int DNS_ERROR_INVALID_NAME = ERROR_INVALID_NAME;
+	public static final int DNS_ERROR_INVALID_DATA = ERROR_INVALID_DATA;
+
+	public static final int DNS_ERROR_GENERAL_API_BASE = 9550;
+
+	// DNS_ERROR_INVALID_TYPE=0x0000254f
+	//
+	// MessageId: DNS_ERROR_INVALID_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid DNS type.
+	//
+	public static final int DNS_ERROR_INVALID_TYPE = 9551;
+
+	// DNS_ERROR_INVALID_IP_ADDRESS=0x00002550
+	//
+	// MessageId: DNS_ERROR_INVALID_IP_ADDRESS
+	//
+	// MessageText:
+	//
+	// Invalid IP address.
+	//
+	public static final int DNS_ERROR_INVALID_IP_ADDRESS = 9552;
+
+	// DNS_ERROR_INVALID_PROPERTY=0x00002551
+	//
+	// MessageId: DNS_ERROR_INVALID_PROPERTY
+	//
+	// MessageText:
+	//
+	// Invalid property.
+	//
+	public static final int DNS_ERROR_INVALID_PROPERTY = 9553;
+
+	// DNS_ERROR_TRY_AGAIN_LATER=0x00002552
+	//
+	// MessageId: DNS_ERROR_TRY_AGAIN_LATER
+	//
+	// MessageText:
+	//
+	// Try DNS operation again later.
+	//
+	public static final int DNS_ERROR_TRY_AGAIN_LATER = 9554;
+
+	// DNS_ERROR_NOT_UNIQUE=0x00002553
+	//
+	// MessageId: DNS_ERROR_NOT_UNIQUE
+	//
+	// MessageText:
+	//
+	// Record for given name and type is not unique.
+	//
+	public static final int DNS_ERROR_NOT_UNIQUE = 9555;
+
+	// DNS_ERROR_NON_RFC_NAME=0x00002554
+	//
+	// MessageId: DNS_ERROR_NON_RFC_NAME
+	//
+	// MessageText:
+	//
+	// DNS name does not comply with RFC specifications.
+	//
+	public static final int DNS_ERROR_NON_RFC_NAME = 9556;
+
+	// DNS_STATUS_FQDN=0x00002555
+	//
+	// MessageId: DNS_STATUS_FQDN
+	//
+	// MessageText:
+	//
+	// DNS name is a fully-qualified DNS name.
+	//
+	public static final int DNS_STATUS_FQDN = 9557;
+
+	// DNS_STATUS_DOTTED_NAME=0x00002556
+	//
+	// MessageId: DNS_STATUS_DOTTED_NAME
+	//
+	// MessageText:
+	//
+	// DNS name is dotted (multi-labe;.
+	//
+	public static final int DNS_STATUS_DOTTED_NAME = 9558;
+
+	// DNS_STATUS_SINGLE_PART_NAME=0x00002557
+	//
+	// MessageId: DNS_STATUS_SINGLE_PART_NAME
+	//
+	// MessageText:
+	//
+	// DNS name is a single-part name.
+	//
+	public static final int DNS_STATUS_SINGLE_PART_NAME = 9559;
+
+	// DNS_ERROR_INVALID_NAME_CHAR=0x00002558
+	//
+	// MessageId: DNS_ERROR_INVALID_NAME_CHAR
+	//
+	// MessageText:
+	//
+	// DNS name contains an invalid character.
+	//
+	public static final int DNS_ERROR_INVALID_NAME_CHAR = 9560;
+
+	// DNS_ERROR_NUMERIC_NAME=0x00002559
+	//
+	// MessageId: DNS_ERROR_NUMERIC_NAME
+	//
+	// MessageText:
+	//
+	// DNS name is entirely numeric.
+	//
+	public static final int DNS_ERROR_NUMERIC_NAME = 9561;
+
+	// DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER 0x0000255A
+	//
+	// MessageId: DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER
+	//
+	// MessageText:
+	//
+	// The operation requested is not permitted on a DNS root server.
+	//
+	public static final int DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER = 9562;
+
+	// DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION 0x0000255B
+	//
+	// MessageId: DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION
+	//
+	// MessageText:
+	//
+	// The record could not be created because this part of the DNS namespace
+	// has been delegated to another server.
+	//
+	public static final int DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION = 9563;
+
+	// DNS_ERROR_CANNOT_FIND_ROOT_HINTS 0x0000255C
+	//
+	// MessageId: DNS_ERROR_CANNOT_FIND_ROOT_HINTS
+	//
+	// MessageText:
+	//
+	// The DNS server could not find a set of root hints.
+	//
+	public static final int DNS_ERROR_CANNOT_FIND_ROOT_HINTS = 9564;
+
+	// DNS_ERROR_INCONSISTENT_ROOT_HINTS 0x0000255D
+	//
+	// MessageId: DNS_ERROR_INCONSISTENT_ROOT_HINTS
+	//
+	// MessageText:
+	//
+	// The DNS server found root hints but they were not consistent across all
+	// adapters.
+	//
+	public static final int DNS_ERROR_INCONSISTENT_ROOT_HINTS = 9565;
+
+	// DNS_ERROR_DWORD_VALUE_TOO_SMALL 0x0000255E
+	//
+	// MessageId: DNS_ERROR_DWORD_VALUE_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The specified value is too small for this parameter.
+	//
+	public static final int DNS_ERROR_DWORD_VALUE_TOO_SMALL = 9566;
+
+	// DNS_ERROR_DWORD_VALUE_TOO_LARGE 0x0000255F
+	//
+	// MessageId: DNS_ERROR_DWORD_VALUE_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// The specified value is too large for this parameter.
+	//
+	public static final int DNS_ERROR_DWORD_VALUE_TOO_LARGE = 9567;
+
+	// DNS_ERROR_BACKGROUND_LOADING 0x00002560
+	//
+	// MessageId: DNS_ERROR_BACKGROUND_LOADING
+	//
+	// MessageText:
+	//
+	// This operation is not allowed while the DNS server is loading zones in
+	// the background. Please try again later.
+	//
+	public static final int DNS_ERROR_BACKGROUND_LOADING = 9568;
+
+	// DNS_ERROR_NOT_ALLOWED_ON_RODC 0x00002561
+	//
+	// MessageId: DNS_ERROR_NOT_ALLOWED_ON_RODC
+	//
+	// MessageText:
+	//
+	// The operation requested is not permitted on against a DNS server running
+	// on a read-only DC.
+	//
+	public static final int DNS_ERROR_NOT_ALLOWED_ON_RODC = 9569;
+
+	// DNS_ERROR_NOT_ALLOWED_UNDER_DNAME 0x00002562
+	//
+	// MessageId: DNS_ERROR_NOT_ALLOWED_UNDER_DNAME
+	//
+	// MessageText:
+	//
+	// No data is allowed to exist underneath a DNAME record.
+	//
+	public static final int DNS_ERROR_NOT_ALLOWED_UNDER_DNAME = 9570;
+
+	//
+	// Zone errors
+	//
+
+	public static final int DNS_ERROR_ZONE_BASE = 9600;
+
+	// DNS_ERROR_ZONE_DOES_NOT_EXIST=0x00002581
+	//
+	// MessageId: DNS_ERROR_ZONE_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// DNS zone does not exist.
+	//
+	public static final int DNS_ERROR_ZONE_DOES_NOT_EXIST = 9601;
+
+	// DNS_ERROR_NO_ZONE_INFO=0x00002582
+	//
+	// MessageId: DNS_ERROR_NO_ZONE_INFO
+	//
+	// MessageText:
+	//
+	// DNS zone information not available.
+	//
+	public static final int DNS_ERROR_NO_ZONE_INFO = 9602;
+
+	// DNS_ERROR_INVALID_ZONE_OPERATION 0x00002583
+	//
+	// MessageId: DNS_ERROR_INVALID_ZONE_OPERATION
+	//
+	// MessageText:
+	//
+	// Invalid operation for DNS zone.
+	//
+	public static final int DNS_ERROR_INVALID_ZONE_OPERATION = 9603;
+
+	// DNS_ERROR_ZONE_CONFIGURATION_ERROR 0x00002584
+	//
+	// MessageId: DNS_ERROR_ZONE_CONFIGURATION_ERROR
+	//
+	// MessageText:
+	//
+	// Invalid DNS zone configuration.
+	//
+	public static final int DNS_ERROR_ZONE_CONFIGURATION_ERROR = 9604;
+
+	// DNS_ERROR_ZONE_HAS_NO_SOA_RECORD 0x00002585
+	//
+	// MessageId: DNS_ERROR_ZONE_HAS_NO_SOA_RECORD
+	//
+	// MessageText:
+	//
+	// DNS zone has no start of authority (SOA) record.
+	//
+	public static final int DNS_ERROR_ZONE_HAS_NO_SOA_RECORD = 9605;
+
+	// DNS_ERROR_ZONE_HAS_NO_NS_RECORDS 0x00002586
+	//
+	// MessageId: DNS_ERROR_ZONE_HAS_NO_NS_RECORDS
+	//
+	// MessageText:
+	//
+	// DNS zone has no Name Server (NS) record.
+	//
+	public static final int DNS_ERROR_ZONE_HAS_NO_NS_RECORDS = 9606;
+
+	// DNS_ERROR_ZONE_LOCKED=0x00002587
+	//
+	// MessageId: DNS_ERROR_ZONE_LOCKED
+	//
+	// MessageText:
+	//
+	// DNS zone is locked.
+	//
+	public static final int DNS_ERROR_ZONE_LOCKED = 9607;
+
+	// DNS_ERROR_ZONE_CREATION_FAILED=0x00002588
+	//
+	// MessageId: DNS_ERROR_ZONE_CREATION_FAILED
+	//
+	// MessageText:
+	//
+	// DNS zone creation failed.
+	//
+	public static final int DNS_ERROR_ZONE_CREATION_FAILED = 9608;
+
+	// DNS_ERROR_ZONE_ALREADY_EXISTS=0x00002589
+	//
+	// MessageId: DNS_ERROR_ZONE_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// DNS zone already exists.
+	//
+	public static final int DNS_ERROR_ZONE_ALREADY_EXISTS = 9609;
+
+	// DNS_ERROR_AUTOZONE_ALREADY_EXISTS 0x0000258a
+	//
+	// MessageId: DNS_ERROR_AUTOZONE_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// DNS automatic zone already exists.
+	//
+	public static final int DNS_ERROR_AUTOZONE_ALREADY_EXISTS = 9610;
+
+	// DNS_ERROR_INVALID_ZONE_TYPE=0x0000258b
+	//
+	// MessageId: DNS_ERROR_INVALID_ZONE_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid DNS zone type.
+	//
+	public static final int DNS_ERROR_INVALID_ZONE_TYPE = 9611;
+
+	// DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 0x0000258c
+	//
+	// MessageId: DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP
+	//
+	// MessageText:
+	//
+	// Secondary DNS zone requires master IP address.
+	//
+	public static final int DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP = 9612;
+
+	// DNS_ERROR_ZONE_NOT_SECONDARY=0x0000258d
+	//
+	// MessageId: DNS_ERROR_ZONE_NOT_SECONDARY
+	//
+	// MessageText:
+	//
+	// DNS zone not secondary.
+	//
+	public static final int DNS_ERROR_ZONE_NOT_SECONDARY = 9613;
+
+	// DNS_ERROR_NEED_SECONDARY_ADDRESSES 0x0000258e
+	//
+	// MessageId: DNS_ERROR_NEED_SECONDARY_ADDRESSES
+	//
+	// MessageText:
+	//
+	// Need secondary IP address.
+	//
+	public static final int DNS_ERROR_NEED_SECONDARY_ADDRESSES = 9614;
+
+	// DNS_ERROR_WINS_INIT_FAILED=0x0000258f
+	//
+	// MessageId: DNS_ERROR_WINS_INIT_FAILED
+	//
+	// MessageText:
+	//
+	// WINS initialization failed.
+	//
+	public static final int DNS_ERROR_WINS_INIT_FAILED = 9615;
+
+	// DNS_ERROR_NEED_WINS_SERVERS=0x00002590
+	//
+	// MessageId: DNS_ERROR_NEED_WINS_SERVERS
+	//
+	// MessageText:
+	//
+	// Need WINS servers.
+	//
+	public static final int DNS_ERROR_NEED_WINS_SERVERS = 9616;
+
+	// DNS_ERROR_NBSTAT_INIT_FAILED=0x00002591
+	//
+	// MessageId: DNS_ERROR_NBSTAT_INIT_FAILED
+	//
+	// MessageText:
+	//
+	// NBTSTAT initialization call failed.
+	//
+	public static final int DNS_ERROR_NBSTAT_INIT_FAILED = 9617;
+
+	// DNS_ERROR_SOA_DELETE_INVALID=0x00002592
+	//
+	// MessageId: DNS_ERROR_SOA_DELETE_INVALID
+	//
+	// MessageText:
+	//
+	// Invalid delete of start of authority (SOA)
+	//
+	public static final int DNS_ERROR_SOA_DELETE_INVALID = 9618;
+
+	// DNS_ERROR_FORWARDER_ALREADY_EXISTS 0x00002593
+	//
+	// MessageId: DNS_ERROR_FORWARDER_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// A conditional forwarding zone already exists for that name.
+	//
+	public static final int DNS_ERROR_FORWARDER_ALREADY_EXISTS = 9619;
+
+	// DNS_ERROR_ZONE_REQUIRES_MASTER_IP 0x00002594
+	//
+	// MessageId: DNS_ERROR_ZONE_REQUIRES_MASTER_IP
+	//
+	// MessageText:
+	//
+	// This zone must be configured with one or more master DNS server IP
+	// addresses.
+	//
+	public static final int DNS_ERROR_ZONE_REQUIRES_MASTER_IP = 9620;
+
+	// DNS_ERROR_ZONE_IS_SHUTDOWN=0x00002595
+	//
+	// MessageId: DNS_ERROR_ZONE_IS_SHUTDOWN
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because this zone is shutdown.
+	//
+	public static final int DNS_ERROR_ZONE_IS_SHUTDOWN = 9621;
+
+	//
+	// Datafile errors
+	//
+
+	public static final int DNS_ERROR_DATAFILE_BASE = 9650;
+
+	// DNS=0x000025b3
+	//
+	// MessageId: DNS_ERROR_PRIMARY_REQUIRES_DATAFILE
+	//
+	// MessageText:
+	//
+	// Primary DNS zone requires datafile.
+	//
+	public static final int DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = 9651;
+
+	// DNS=0x000025b4
+	//
+	// MessageId: DNS_ERROR_INVALID_DATAFILE_NAME
+	//
+	// MessageText:
+	//
+	// Invalid datafile name for DNS zone.
+	//
+	public static final int DNS_ERROR_INVALID_DATAFILE_NAME = 9652;
+
+	// DNS=0x000025b5
+	//
+	// MessageId: DNS_ERROR_DATAFILE_OPEN_FAILURE
+	//
+	// MessageText:
+	//
+	// Failed to open datafile for DNS zone.
+	//
+	public static final int DNS_ERROR_DATAFILE_OPEN_FAILURE = 9653;
+
+	// DNS=0x000025b6
+	//
+	// MessageId: DNS_ERROR_FILE_WRITEBACK_FAILED
+	//
+	// MessageText:
+	//
+	// Failed to write datafile for DNS zone.
+	//
+	public static final int DNS_ERROR_FILE_WRITEBACK_FAILED = 9654;
+
+	// DNS=0x000025b7
+	//
+	// MessageId: DNS_ERROR_DATAFILE_PARSING
+	//
+	// MessageText:
+	//
+	// Failure while reading datafile for DNS zone.
+	//
+	public static final int DNS_ERROR_DATAFILE_PARSING = 9655;
+
+	//
+	// Database errors
+	//
+
+	public static final int DNS_ERROR_DATABASE_BASE = 9700;
+
+	// DNS_ERROR_RECORD_DOES_NOT_EXIST 0x000025e5
+	//
+	// MessageId: DNS_ERROR_RECORD_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// DNS record does not exist.
+	//
+	public static final int DNS_ERROR_RECORD_DOES_NOT_EXIST = 9701;
+
+	// DNS_ERROR_RECORD_FORMAT=0x000025e6
+	//
+	// MessageId: DNS_ERROR_RECORD_FORMAT
+	//
+	// MessageText:
+	//
+	// DNS record format error.
+	//
+	public static final int DNS_ERROR_RECORD_FORMAT = 9702;
+
+	// DNS_ERROR_NODE_CREATION_FAILED=0x000025e7
+	//
+	// MessageId: DNS_ERROR_NODE_CREATION_FAILED
+	//
+	// MessageText:
+	//
+	// Node creation failure in DNS.
+	//
+	public static final int DNS_ERROR_NODE_CREATION_FAILED = 9703;
+
+	// DNS_ERROR_UNKNOWN_RECORD_TYPE=0x000025e8
+	//
+	// MessageId: DNS_ERROR_UNKNOWN_RECORD_TYPE
+	//
+	// MessageText:
+	//
+	// Unknown DNS record type.
+	//
+	public static final int DNS_ERROR_UNKNOWN_RECORD_TYPE = 9704;
+
+	// DNS_ERROR_RECORD_TIMED_OUT=0x000025e9
+	//
+	// MessageId: DNS_ERROR_RECORD_TIMED_OUT
+	//
+	// MessageText:
+	//
+	// DNS record timed out.
+	//
+	public static final int DNS_ERROR_RECORD_TIMED_OUT = 9705;
+
+	// DNS_ERROR_NAME_NOT_IN_ZONE=0x000025ea
+	//
+	// MessageId: DNS_ERROR_NAME_NOT_IN_ZONE
+	//
+	// MessageText:
+	//
+	// Name not in DNS zone.
+	//
+	public static final int DNS_ERROR_NAME_NOT_IN_ZONE = 9706;
+
+	// DNS_ERROR_CNAME_LOOP=0x000025eb
+	//
+	// MessageId: DNS_ERROR_CNAME_LOOP
+	//
+	// MessageText:
+	//
+	// CNAME loop detected.
+	//
+	public static final int DNS_ERROR_CNAME_LOOP = 9707;
+
+	// DNS_ERROR_NODE_IS_CNAME=0x000025ec
+	//
+	// MessageId: DNS_ERROR_NODE_IS_CNAME
+	//
+	// MessageText:
+	//
+	// Node is a CNAME DNS record.
+	//
+	public static final int DNS_ERROR_NODE_IS_CNAME = 9708;
+
+	// DNS_ERROR_CNAME_COLLISION=0x000025ed
+	//
+	// MessageId: DNS_ERROR_CNAME_COLLISION
+	//
+	// MessageText:
+	//
+	// A CNAME record already exists for given name.
+	//
+	public static final int DNS_ERROR_CNAME_COLLISION = 9709;
+
+	// DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT 0x000025ee
+	//
+	// MessageId: DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT
+	//
+	// MessageText:
+	//
+	// Record only at DNS zone root.
+	//
+	public static final int DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT = 9710;
+
+	// DNS_ERROR_RECORD_ALREADY_EXISTS 0x000025ef
+	//
+	// MessageId: DNS_ERROR_RECORD_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// DNS record already exists.
+	//
+	public static final int DNS_ERROR_RECORD_ALREADY_EXISTS = 9711;
+
+	// DNS_ERROR_SECONDARY_DATA=0x000025f0
+	//
+	// MessageId: DNS_ERROR_SECONDARY_DATA
+	//
+	// MessageText:
+	//
+	// Secondary DNS zone data error.
+	//
+	public static final int DNS_ERROR_SECONDARY_DATA = 9712;
+
+	// DNS_ERROR_NO_CREATE_CACHE_DATA=0x000025f1
+	//
+	// MessageId: DNS_ERROR_NO_CREATE_CACHE_DATA
+	//
+	// MessageText:
+	//
+	// Could not create DNS cache data.
+	//
+	public static final int DNS_ERROR_NO_CREATE_CACHE_DATA = 9713;
+
+	// DNS_ERROR_NAME_DOES_NOT_EXIST=0x000025f2
+	//
+	// MessageId: DNS_ERROR_NAME_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// DNS name does not exist.
+	//
+	public static final int DNS_ERROR_NAME_DOES_NOT_EXIST = 9714;
+
+	// DNS_WARNING_PTR_CREATE_FAILED=0x000025f3
+	//
+	// MessageId: DNS_WARNING_PTR_CREATE_FAILED
+	//
+	// MessageText:
+	//
+	// Could not create pointer (PTR) record.
+	//
+	public static final int DNS_WARNING_PTR_CREATE_FAILED = 9715;
+
+	// DNS_WARNING_DOMAIN_UNDELETED=0x000025f4
+	//
+	// MessageId: DNS_WARNING_DOMAIN_UNDELETED
+	//
+	// MessageText:
+	//
+	// DNS domain was undeleted.
+	//
+	public static final int DNS_WARNING_DOMAIN_UNDELETED = 9716;
+
+	// DNS_ERROR_DS_UNAVAILABLE=0x000025f5
+	//
+	// MessageId: DNS_ERROR_DS_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The directory service is unavailable.
+	//
+	public static final int DNS_ERROR_DS_UNAVAILABLE = 9717;
+
+	// DNS_ERROR_DS_ZONE_ALREADY_EXISTS 0x000025f6
+	//
+	// MessageId: DNS_ERROR_DS_ZONE_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// DNS zone already exists in the directory service.
+	//
+	public static final int DNS_ERROR_DS_ZONE_ALREADY_EXISTS = 9718;
+
+	// DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE 0x000025f7
+	//
+	// MessageId: DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE
+	//
+	// MessageText:
+	//
+	// DNS server not creating or reading the boot file for the directory
+	// service integrated DNS zone.
+	//
+	public static final int DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE = 9719;
+
+	// DNS_ERROR_NODE_IS_DNAME=0x000025f8
+	//
+	// MessageId: DNS_ERROR_NODE_IS_DNAME
+	//
+	// MessageText:
+	//
+	// Node is a DNAME DNS record.
+	//
+	public static final int DNS_ERROR_NODE_IS_DNAME = 9720;
+
+	// DNS_ERROR_DNAME_COLLISION=0x000025f9
+	//
+	// MessageId: DNS_ERROR_DNAME_COLLISION
+	//
+	// MessageText:
+	//
+	// A DNAME record already exists for given name.
+	//
+	public static final int DNS_ERROR_DNAME_COLLISION = 9721;
+
+	// DNS_ERROR_ALIAS_LOOP=0x000025fa
+	//
+	// MessageId: DNS_ERROR_ALIAS_LOOP
+	//
+	// MessageText:
+	//
+	// An alias loop has been detected with either CNAME or DNAME records.
+	//
+	public static final int DNS_ERROR_ALIAS_LOOP = 9722;
+
+	//
+	// Operation errors
+	//
+
+	public static final int DNS_ERROR_OPERATION_BASE = 9750;
+
+	// DNS_INFO_AXFR_COMPLETE=0x00002617
+	//
+	// MessageId: DNS_INFO_AXFR_COMPLETE
+	//
+	// MessageText:
+	//
+	// DNS AXFR (zone transfer) complete.
+	//
+	public static final int DNS_INFO_AXFR_COMPLETE = 9751;
+
+	// DNS_ERROR_AXFR=0x00002618
+	//
+	// MessageId: DNS_ERROR_AXFR
+	//
+	// MessageText:
+	//
+	// DNS zone transfer failed.
+	//
+	public static final int DNS_ERROR_AXFR = 9752;
+
+	// DNS_INFO_ADDED_LOCAL_WINS=0x00002619
+	//
+	// MessageId: DNS_INFO_ADDED_LOCAL_WINS
+	//
+	// MessageText:
+	//
+	// Added local WINS server.
+	//
+	public static final int DNS_INFO_ADDED_LOCAL_WINS = 9753;
+
+	//
+	// Secure update
+	//
+
+	public static final int DNS_ERROR_SECURE_BASE = 9800;
+
+	// DNS_STATUS_CONTINUE_NEEDED=0x00002649
+	//
+	// MessageId: DNS_STATUS_CONTINUE_NEEDED
+	//
+	// MessageText:
+	//
+	// Secure update call needs to continue update request.
+	//
+	public static final int DNS_STATUS_CONTINUE_NEEDED = 9801;
+
+	//
+	// Setup errors
+	//
+
+	public static final int DNS_ERROR_SETUP_BASE = 9850;
+
+	// DNS_ERROR_NO_TCPIP=0x0000267b
+	//
+	// MessageId: DNS_ERROR_NO_TCPIP
+	//
+	// MessageText:
+	//
+	// TCP/IP network protocol not installed.
+	//
+	public static final int DNS_ERROR_NO_TCPIP = 9851;
+
+	// DNS_ERROR_NO_DNS_SERVERS=0x0000267c
+	//
+	// MessageId: DNS_ERROR_NO_DNS_SERVERS
+	//
+	// MessageText:
+	//
+	// No DNS servers configured for local system.
+	//
+	public static final int DNS_ERROR_NO_DNS_SERVERS = 9852;
+
+	//
+	// Directory partition (DP) errors
+	//
+
+	public static final int DNS_ERROR_DP_BASE = 9900;
+
+	// DNS_ERROR_DP_DOES_NOT_EXIST=0x000026ad
+	//
+	// MessageId: DNS_ERROR_DP_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// The specified directory partition does not exist.
+	//
+	public static final int DNS_ERROR_DP_DOES_NOT_EXIST = 9901;
+
+	// DNS_ERROR_DP_ALREADY_EXISTS=0x000026ae
+	//
+	// MessageId: DNS_ERROR_DP_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified directory partition already exists.
+	//
+	public static final int DNS_ERROR_DP_ALREADY_EXISTS = 9902;
+
+	// DNS_ERROR_DP_NOT_ENLISTED=0x000026af
+	//
+	// MessageId: DNS_ERROR_DP_NOT_ENLISTED
+	//
+	// MessageText:
+	//
+	// This DNS server is not enlisted in the specified directory partition.
+	//
+	public static final int DNS_ERROR_DP_NOT_ENLISTED = 9903;
+
+	// DNS_ERROR_DP_ALREADY_ENLISTED=0x000026b0
+	//
+	// MessageId: DNS_ERROR_DP_ALREADY_ENLISTED
+	//
+	// MessageText:
+	//
+	// This DNS server is already enlisted in the specified directory partition.
+	//
+	public static final int DNS_ERROR_DP_ALREADY_ENLISTED = 9904;
+
+	// DNS_ERROR_DP_NOT_AVAILABLE=0x000026b1
+	//
+	// MessageId: DNS_ERROR_DP_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The directory partition is not available at this time. Please wait a few
+	// minutes and try again.
+	//
+	public static final int DNS_ERROR_DP_NOT_AVAILABLE = 9905;
+
+	// DNS_ERROR_DP_FSMO_ERROR=0x000026b2
+	//
+	// MessageId: DNS_ERROR_DP_FSMO_ERROR
+	//
+	// MessageText:
+	//
+	// The application directory partition operation failed. The domain
+	// controller holding the domain naming master role is down or unable to
+	// service the request or is not running Windows Server=2003.
+	//
+	public static final int DNS_ERROR_DP_FSMO_ERROR = 9906;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =End of DNS Error Codes=//
+	// =//
+	// =9000 to=9999=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =WinSock Error Codes=//
+	// =//
+	// =10000 to=11999=//
+	// /////////////////////////////////////////////////
+
+	//
+	// WinSock error codes are also defined in WinSock.h
+	// and WinSock2.h, hence the IFDEF
+	//
+	public static final int WSABASEERR = 10000;
+	//
+	// MessageId: WSAEINTR
+	//
+	// MessageText:
+	//
+	// A blocking operation was interrupted by a call to WSACancelBlockingCall.
+	//
+	public static final int WSAEINTR = 10004;
+
+	//
+	// MessageId: WSAEBADF
+	//
+	// MessageText:
+	//
+	// The file handle supplied is not valid.
+	//
+	public static final int WSAEBADF = 10009;
+
+	//
+	// MessageId: WSAEACCES
+	//
+	// MessageText:
+	//
+	// An attempt was made to access a socket in a way forbidden by its access
+	// permissions.
+	//
+	public static final int WSAEACCES = 10013;
+
+	//
+	// MessageId: WSAEFAULT
+	//
+	// MessageText:
+	//
+	// The system detected an invalid pointer address in attempting to use a
+	// pointer argument in a call.
+	//
+	public static final int WSAEFAULT = 10014;
+
+	//
+	// MessageId: WSAEINVAL
+	//
+	// MessageText:
+	//
+	// An invalid argument was supplied.
+	//
+	public static final int WSAEINVAL = 10022;
+
+	//
+	// MessageId: WSAEMFILE
+	//
+	// MessageText:
+	//
+	// Too many open sockets.
+	//
+	public static final int WSAEMFILE = 10024;
+
+	//
+	// MessageId: WSAEWOULDBLOCK
+	//
+	// MessageText:
+	//
+	// A non-blocking socket operation could not be completed immediately.
+	//
+	public static final int WSAEWOULDBLOCK = 10035;
+
+	//
+	// MessageId: WSAEINPROGRESS
+	//
+	// MessageText:
+	//
+	// A blocking operation is currently executing.
+	//
+	public static final int WSAEINPROGRESS = 10036;
+
+	//
+	// MessageId: WSAEALREADY
+	//
+	// MessageText:
+	//
+	// An operation was attempted on a non-blocking socket that already had an
+	// operation in progress.
+	//
+	public static final int WSAEALREADY = 10037;
+
+	//
+	// MessageId: WSAENOTSOCK
+	//
+	// MessageText:
+	//
+	// An operation was attempted on something that is not a socket.
+	//
+	public static final int WSAENOTSOCK = 10038;
+
+	//
+	// MessageId: WSAEDESTADDRREQ
+	//
+	// MessageText:
+	//
+	// A required address was omitted from an operation on a socket.
+	//
+	public static final int WSAEDESTADDRREQ = 10039;
+
+	//
+	// MessageId: WSAEMSGSIZE
+	//
+	// MessageText:
+	//
+	// A message sent on a datagram socket was larger than the internal message
+	// buffer or some other network limit, or the buffer used to receive a
+	// datagram into was smaller than the datagram itself.
+	//
+	public static final int WSAEMSGSIZE = 10040;
+
+	//
+	// MessageId: WSAEPROTOTYPE
+	//
+	// MessageText:
+	//
+	// A protocol was specified in the socket function call that does not
+	// support the semantics of the socket type requested.
+	//
+	public static final int WSAEPROTOTYPE = 10041;
+
+	//
+	// MessageId: WSAENOPROTOOPT
+	//
+	// MessageText:
+	//
+	// An unknown, invalid, or unsupported option or level was specified in a
+	// getsockopt or setsockopt call.
+	//
+	public static final int WSAENOPROTOOPT = 10042;
+
+	//
+	// MessageId: WSAEPROTONOSUPPORT
+	//
+	// MessageText:
+	//
+	// The requested protocol has not been configured into the system, or no
+	// implementation for it exists.
+	//
+	public static final int WSAEPROTONOSUPPORT = 10043;
+
+	//
+	// MessageId: WSAESOCKTNOSUPPORT
+	//
+	// MessageText:
+	//
+	// The support for the specified socket type does not exist in this address
+	// family.
+	//
+	public static final int WSAESOCKTNOSUPPORT = 10044;
+
+	//
+	// MessageId: WSAEOPNOTSUPP
+	//
+	// MessageText:
+	//
+	// The attempted operation is not supported for the type of object
+	// referenced.
+	//
+	public static final int WSAEOPNOTSUPP = 10045;
+
+	//
+	// MessageId: WSAEPFNOSUPPORT
+	//
+	// MessageText:
+	//
+	// The protocol family has not been configured into the system or no
+	// implementation for it exists.
+	//
+	public static final int WSAEPFNOSUPPORT = 10046;
+
+	//
+	// MessageId: WSAEAFNOSUPPORT
+	//
+	// MessageText:
+	//
+	// An address incompatible with the requested protocol was used.
+	//
+	public static final int WSAEAFNOSUPPORT = 10047;
+
+	//
+	// MessageId: WSAEADDRINUSE
+	//
+	// MessageText:
+	//
+	// Only one usage of each socket address (protocol/network address/port) is
+	// normally permitted.
+	//
+	public static final int WSAEADDRINUSE = 10048;
+
+	//
+	// MessageId: WSAEADDRNOTAVAIL
+	//
+	// MessageText:
+	//
+	// The requested address is not valid in its context.
+	//
+	public static final int WSAEADDRNOTAVAIL = 10049;
+
+	//
+	// MessageId: WSAENETDOWN
+	//
+	// MessageText:
+	//
+	// A socket operation encountered a dead network.
+	//
+	public static final int WSAENETDOWN = 10050;
+
+	//
+	// MessageId: WSAENETUNREACH
+	//
+	// MessageText:
+	//
+	// A socket operation was attempted to an unreachable network.
+	//
+	public static final int WSAENETUNREACH = 10051;
+
+	//
+	// MessageId: WSAENETRESET
+	//
+	// MessageText:
+	//
+	// The connection has been broken due to keep-alive activity detecting a
+	// failure while the operation was in progress.
+	//
+	public static final int WSAENETRESET = 10052;
+
+	//
+	// MessageId: WSAECONNABORTED
+	//
+	// MessageText:
+	//
+	// An established connection was aborted by the software in your host
+	// machine.
+	//
+	public static final int WSAECONNABORTED = 10053;
+
+	//
+	// MessageId: WSAECONNRESET
+	//
+	// MessageText:
+	//
+	// An existing connection was forcibly closed by the remote host.
+	//
+	public static final int WSAECONNRESET = 10054;
+
+	//
+	// MessageId: WSAENOBUFS
+	//
+	// MessageText:
+	//
+	// An operation on a socket could not be performed because the system lacked
+	// sufficient buffer space or because a queue was full.
+	//
+	public static final int WSAENOBUFS = 10055;
+
+	//
+	// MessageId: WSAEISCONN
+	//
+	// MessageText:
+	//
+	// A connect request was made on an already connected socket.
+	//
+	public static final int WSAEISCONN = 10056;
+
+	//
+	// MessageId: WSAENOTCONN
+	//
+	// MessageText:
+	//
+	// A request to send or receive data was disallowed because the socket is
+	// not connected and (when sending on a datagram socket using a sendto cal;
+	// no address was supplied.
+	//
+	public static final int WSAENOTCONN = 10057;
+
+	//
+	// MessageId: WSAESHUTDOWN
+	//
+	// MessageText:
+	//
+	// A request to send or receive data was disallowed because the socket had
+	// already been shut down in that direction with a previous shutdown call.
+	//
+	public static final int WSAESHUTDOWN = 10058;
+
+	//
+	// MessageId: WSAETOOMANYREFS
+	//
+	// MessageText:
+	//
+	// Too many references to some kernel object.
+	//
+	public static final int WSAETOOMANYREFS = 10059;
+
+	//
+	// MessageId: WSAETIMEDOUT
+	//
+	// MessageText:
+	//
+	// A connection attempt failed because the connected party did not properly
+	// respond after a period of time, or established connection failed because
+	// connected host has failed to respond.
+	//
+	public static final int WSAETIMEDOUT = 10060;
+
+	//
+	// MessageId: WSAECONNREFUSED
+	//
+	// MessageText:
+	//
+	// No connection could be made because the target machine actively refused
+	// it.
+	//
+	public static final int WSAECONNREFUSED = 10061;
+
+	//
+	// MessageId: WSAELOOP
+	//
+	// MessageText:
+	//
+	// Cannot translate name.
+	//
+	public static final int WSAELOOP = 10062;
+
+	//
+	// MessageId: WSAENAMETOOLONG
+	//
+	// MessageText:
+	//
+	// Name component or name was too long.
+	//
+	public static final int WSAENAMETOOLONG = 10063;
+
+	//
+	// MessageId: WSAEHOSTDOWN
+	//
+	// MessageText:
+	//
+	// A socket operation failed because the destination host was down.
+	//
+	public static final int WSAEHOSTDOWN = 10064;
+
+	//
+	// MessageId: WSAEHOSTUNREACH
+	//
+	// MessageText:
+	//
+	// A socket operation was attempted to an unreachable host.
+	//
+	public static final int WSAEHOSTUNREACH = 10065;
+
+	//
+	// MessageId: WSAENOTEMPTY
+	//
+	// MessageText:
+	//
+	// Cannot remove a directory that is not empty.
+	//
+	public static final int WSAENOTEMPTY = 10066;
+
+	//
+	// MessageId: WSAEPROCLIM
+	//
+	// MessageText:
+	//
+	// A Windows Sockets implementation may have a limit on the number of
+	// applications that may use it simultaneously.
+	//
+	public static final int WSAEPROCLIM = 10067;
+
+	//
+	// MessageId: WSAEUSERS
+	//
+	// MessageText:
+	//
+	// Ran out of quota.
+	//
+	public static final int WSAEUSERS = 10068;
+
+	//
+	// MessageId: WSAEDQUOT
+	//
+	// MessageText:
+	//
+	// Ran out of disk quota.
+	//
+	public static final int WSAEDQUOT = 10069;
+
+	//
+	// MessageId: WSAESTALE
+	//
+	// MessageText:
+	//
+	// File handle reference is no longer available.
+	//
+	public static final int WSAESTALE = 10070;
+
+	//
+	// MessageId: WSAEREMOTE
+	//
+	// MessageText:
+	//
+	// Item is not available locally.
+	//
+	public static final int WSAEREMOTE = 10071;
+
+	//
+	// MessageId: WSASYSNOTREADY
+	//
+	// MessageText:
+	//
+	// WSAStartup cannot function at this time because the underlying system it
+	// uses to provide network services is currently unavailable.
+	//
+	public static final int WSASYSNOTREADY = 10091;
+
+	//
+	// MessageId: WSAVERNOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// The Windows Sockets version requested is not supported.
+	//
+	public static final int WSAVERNOTSUPPORTED = 10092;
+
+	//
+	// MessageId: WSANOTINITIALISED
+	//
+	// MessageText:
+	//
+	// Either the application has not called WSAStartup, or WSAStartup failed.
+	//
+	public static final int WSANOTINITIALISED = 10093;
+
+	//
+	// MessageId: WSAEDISCON
+	//
+	// MessageText:
+	//
+	// Returned by WSARecv or WSARecvFrom to indicate the remote party has
+	// initiated a graceful shutdown sequence.
+	//
+	public static final int WSAEDISCON = 10101;
+
+	//
+	// MessageId: WSAENOMORE
+	//
+	// MessageText:
+	//
+	// No more results can be returned by WSALookupServiceNext.
+	//
+	public static final int WSAENOMORE = 10102;
+
+	//
+	// MessageId: WSAECANCELLED
+	//
+	// MessageText:
+	//
+	// A call to WSALookupServiceEnd was made while this call was still
+	// processing. The call has been canceled.
+	//
+	public static final int WSAECANCELLED = 10103;
+
+	//
+	// MessageId: WSAEINVALIDPROCTABLE
+	//
+	// MessageText:
+	//
+	// The procedure call table is invalid.
+	//
+	public static final int WSAEINVALIDPROCTABLE = 10104;
+
+	//
+	// MessageId: WSAEINVALIDPROVIDER
+	//
+	// MessageText:
+	//
+	// The requested service provider is invalid.
+	//
+	public static final int WSAEINVALIDPROVIDER = 10105;
+
+	//
+	// MessageId: WSAEPROVIDERFAILEDINIT
+	//
+	// MessageText:
+	//
+	// The requested service provider could not be loaded or initialized.
+	//
+	public static final int WSAEPROVIDERFAILEDINIT = 10106;
+
+	//
+	// MessageId: WSASYSCALLFAILURE
+	//
+	// MessageText:
+	//
+	// A system call that should never fail has failed.
+	//
+	public static final int WSASYSCALLFAILURE = 10107;
+
+	//
+	// MessageId: WSASERVICE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// No such service is known. The service cannot be found in the specified
+	// name space.
+	//
+	public static final int WSASERVICE_NOT_FOUND = 10108;
+
+	//
+	// MessageId: WSATYPE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified class was not found.
+	//
+	public static final int WSATYPE_NOT_FOUND = 10109;
+
+	//
+	// MessageId: WSA_E_NO_MORE
+	//
+	// MessageText:
+	//
+	// No more results can be returned by WSALookupServiceNext.
+	//
+	public static final int WSA_E_NO_MORE = 10110;
+
+	//
+	// MessageId: WSA_E_CANCELLED
+	//
+	// MessageText:
+	//
+	// A call to WSALookupServiceEnd was made while this call was still
+	// processing. The call has been canceled.
+	//
+	public static final int WSA_E_CANCELLED = 10111;
+
+	//
+	// MessageId: WSAEREFUSED
+	//
+	// MessageText:
+	//
+	// A database query failed because it was actively refused.
+	//
+	public static final int WSAEREFUSED = 10112;
+
+	//
+	// MessageId: WSAHOST_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// No such host is known.
+	//
+	public static final int WSAHOST_NOT_FOUND = 11001;
+
+	//
+	// MessageId: WSATRY_AGAIN
+	//
+	// MessageText:
+	//
+	// This is usually a temporary error during hostname resolution and means
+	// that the local server did not receive a response from an authoritative
+	// server.
+	//
+	public static final int WSATRY_AGAIN = 11002;
+
+	//
+	// MessageId: WSANO_RECOVERY
+	//
+	// MessageText:
+	//
+	// A non-recoverable error occurred during a database lookup.
+	//
+	public static final int WSANO_RECOVERY = 11003;
+
+	//
+	// MessageId: WSANO_DATA
+	//
+	// MessageText:
+	//
+	// The requested name is valid, but no data of the requested type was found.
+	//
+	public static final int WSANO_DATA = 11004;
+
+	//
+	// MessageId: WSA_QOS_RECEIVERS
+	//
+	// MessageText:
+	//
+	// At least one reserve has arrived.
+	//
+	public static final int WSA_QOS_RECEIVERS = 11005;
+
+	//
+	// MessageId: WSA_QOS_SENDERS
+	//
+	// MessageText:
+	//
+	// At least one path has arrived.
+	//
+	public static final int WSA_QOS_SENDERS = 11006;
+
+	//
+	// MessageId: WSA_QOS_NO_SENDERS
+	//
+	// MessageText:
+	//
+	// There are no senders.
+	//
+	public static final int WSA_QOS_NO_SENDERS = 11007;
+
+	//
+	// MessageId: WSA_QOS_NO_RECEIVERS
+	//
+	// MessageText:
+	//
+	// There are no receivers.
+	//
+	public static final int WSA_QOS_NO_RECEIVERS = 11008;
+
+	//
+	// MessageId: WSA_QOS_REQUEST_CONFIRMED
+	//
+	// MessageText:
+	//
+	// Reserve has been confirmed.
+	//
+	public static final int WSA_QOS_REQUEST_CONFIRMED = 11009;
+
+	//
+	// MessageId: WSA_QOS_ADMISSION_FAILURE
+	//
+	// MessageText:
+	//
+	// Error due to lack of resources.
+	//
+	public static final int WSA_QOS_ADMISSION_FAILURE = 11010;
+
+	//
+	// MessageId: WSA_QOS_POLICY_FAILURE
+	//
+	// MessageText:
+	//
+	// Rejected for administrative reasons - bad credentials.
+	//
+	public static final int WSA_QOS_POLICY_FAILURE = 11011;
+
+	//
+	// MessageId: WSA_QOS_BAD_STYLE
+	//
+	// MessageText:
+	//
+	// Unknown or conflicting style.
+	//
+	public static final int WSA_QOS_BAD_STYLE = 11012;
+
+	//
+	// MessageId: WSA_QOS_BAD_OBJECT
+	//
+	// MessageText:
+	//
+	// Problem with some part of the filterspec or providerspecific buffer in
+	// general.
+	//
+	public static final int WSA_QOS_BAD_OBJECT = 11013;
+
+	//
+	// MessageId: WSA_QOS_TRAFFIC_CTRL_ERROR
+	//
+	// MessageText:
+	//
+	// Problem with some part of the flowspec.
+	//
+	public static final int WSA_QOS_TRAFFIC_CTRL_ERROR = 11014;
+
+	//
+	// MessageId: WSA_QOS_GENERIC_ERROR
+	//
+	// MessageText:
+	//
+	// General QOS error.
+	//
+	public static final int WSA_QOS_GENERIC_ERROR = 11015;
+
+	//
+	// MessageId: WSA_QOS_ESERVICETYPE
+	//
+	// MessageText:
+	//
+	// An invalid or unrecognized service type was found in the flowspec.
+	//
+	public static final int WSA_QOS_ESERVICETYPE = 11016;
+
+	//
+	// MessageId: WSA_QOS_EFLOWSPEC
+	//
+	// MessageText:
+	//
+	// An invalid or inconsistent flowspec was found in the QOS structure.
+	//
+	public static final int WSA_QOS_EFLOWSPEC = 11017;
+
+	//
+	// MessageId: WSA_QOS_EPROVSPECBUF
+	//
+	// MessageText:
+	//
+	// Invalid QOS provider-specific buffer.
+	//
+	public static final int WSA_QOS_EPROVSPECBUF = 11018;
+
+	//
+	// MessageId: WSA_QOS_EFILTERSTYLE
+	//
+	// MessageText:
+	//
+	// An invalid QOS filter style was used.
+	//
+	public static final int WSA_QOS_EFILTERSTYLE = 11019;
+
+	//
+	// MessageId: WSA_QOS_EFILTERTYPE
+	//
+	// MessageText:
+	//
+	// An invalid QOS filter type was used.
+	//
+	public static final int WSA_QOS_EFILTERTYPE = 11020;
+
+	//
+	// MessageId: WSA_QOS_EFILTERCOUNT
+	//
+	// MessageText:
+	//
+	// An incorrect number of QOS FILTERSPECs were specified in the
+	// FLOWDESCRIPTOR.
+	//
+	public static final int WSA_QOS_EFILTERCOUNT = 11021;
+
+	//
+	// MessageId: WSA_QOS_EOBJLENGTH
+	//
+	// MessageText:
+	//
+	// An object with an invalid ObjectLength field was specified in the QOS
+	// provider-specific buffer.
+	//
+	public static final int WSA_QOS_EOBJLENGTH = 11022;
+
+	//
+	// MessageId: WSA_QOS_EFLOWCOUNT
+	//
+	// MessageText:
+	//
+	// An incorrect number of flow descriptors was specified in the QOS
+	// structure.
+	//
+	public static final int WSA_QOS_EFLOWCOUNT = 11023;
+
+	//
+	// MessageId: WSA_QOS_EUNKOWNPSOBJ
+	//
+	// MessageText:
+	//
+	// An unrecognized object was found in the QOS provider-specific buffer.
+	//
+	public static final int WSA_QOS_EUNKOWNPSOBJ = 11024;
+
+	//
+	// MessageId: WSA_QOS_EPOLICYOBJ
+	//
+	// MessageText:
+	//
+	// An invalid policy object was found in the QOS provider-specific buffer.
+	//
+	public static final int WSA_QOS_EPOLICYOBJ = 11025;
+
+	//
+	// MessageId: WSA_QOS_EFLOWDESC
+	//
+	// MessageText:
+	//
+	// An invalid QOS flow descriptor was found in the flow descriptor list.
+	//
+	public static final int WSA_QOS_EFLOWDESC = 11026;
+
+	//
+	// MessageId: WSA_QOS_EPSFLOWSPEC
+	//
+	// MessageText:
+	//
+	// An invalid or inconsistent flowspec was found in the QOS provider
+	// specific buffer.
+	//
+	public static final int WSA_QOS_EPSFLOWSPEC = 11027;
+
+	//
+	// MessageId: WSA_QOS_EPSFILTERSPEC
+	//
+	// MessageText:
+	//
+	// An invalid FILTERSPEC was found in the QOS provider-specific buffer.
+	//
+	public static final int WSA_QOS_EPSFILTERSPEC = 11028;
+
+	//
+	// MessageId: WSA_QOS_ESDMODEOBJ
+	//
+	// MessageText:
+	//
+	// An invalid shape discard mode object was found in the QOS provider
+	// specific buffer.
+	//
+	public static final int WSA_QOS_ESDMODEOBJ = 11029;
+
+	//
+	// MessageId: WSA_QOS_ESHAPERATEOBJ
+	//
+	// MessageText:
+	//
+	// An invalid shaping rate object was found in the QOS provider-specific
+	// buffer.
+	//
+	public static final int WSA_QOS_ESHAPERATEOBJ = 11030;
+
+	//
+	// MessageId: WSA_QOS_RESERVED_PETYPE
+	//
+	// MessageText:
+	//
+	// A reserved policy element was found in the QOS provider-specific buffer.
+	//
+	public static final int WSA_QOS_RESERVED_PETYPE = 11031;
+
+	// /////////////////////////////////////////////////
+	// =End of WinSock Error Codes=//
+	// =//
+	// =10000 to=11999=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Available=//
+	// =//
+	// =12000 to=129999=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Start of IPSec Error codes=//
+	// =//
+	// =13000 to=13999=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_IPSEC_QM_POLICY_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified quick mode policy already exists.
+	//
+	public static final int ERROR_IPSEC_QM_POLICY_EXISTS = 13000;
+
+	//
+	// MessageId: ERROR_IPSEC_QM_POLICY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified quick mode policy was not found.
+	//
+	public static final int ERROR_IPSEC_QM_POLICY_NOT_FOUND = 13001;
+
+	//
+	// MessageId: ERROR_IPSEC_QM_POLICY_IN_USE
+	//
+	// MessageText:
+	//
+	// The specified quick mode policy is being used.
+	//
+	public static final int ERROR_IPSEC_QM_POLICY_IN_USE = 13002;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_POLICY_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified main mode policy already exists.
+	//
+	public static final int ERROR_IPSEC_MM_POLICY_EXISTS = 13003;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_POLICY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified main mode policy was not found
+	//
+	public static final int ERROR_IPSEC_MM_POLICY_NOT_FOUND = 13004;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_POLICY_IN_USE
+	//
+	// MessageText:
+	//
+	// The specified main mode policy is being used.
+	//
+	public static final int ERROR_IPSEC_MM_POLICY_IN_USE = 13005;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_FILTER_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified main mode filter already exists.
+	//
+	public static final int ERROR_IPSEC_MM_FILTER_EXISTS = 13006;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_FILTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified main mode filter was not found.
+	//
+	public static final int ERROR_IPSEC_MM_FILTER_NOT_FOUND = 13007;
+
+	//
+	// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified transport mode filter already exists.
+	//
+	public static final int ERROR_IPSEC_TRANSPORT_FILTER_EXISTS = 13008;
+
+	//
+	// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified transport mode filter does not exist.
+	//
+	public static final int ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND = 13009;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_AUTH_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified main mode authentication list exists.
+	//
+	public static final int ERROR_IPSEC_MM_AUTH_EXISTS = 13010;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_AUTH_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified main mode authentication list was not found.
+	//
+	public static final int ERROR_IPSEC_MM_AUTH_NOT_FOUND = 13011;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_AUTH_IN_USE
+	//
+	// MessageText:
+	//
+	// The specified main mode authentication list is being used.
+	//
+	public static final int ERROR_IPSEC_MM_AUTH_IN_USE = 13012;
+
+	//
+	// MessageId: ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified default main mode policy was not found.
+	//
+	public static final int ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND = 13013;
+
+	//
+	// MessageId: ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified default main mode authentication list was not found.
+	//
+	public static final int ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND = 13014;
+
+	//
+	// MessageId: ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified default quick mode policy was not found.
+	//
+	public static final int ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND = 13015;
+
+	//
+	// MessageId: ERROR_IPSEC_TUNNEL_FILTER_EXISTS
+	//
+	// MessageText:
+	//
+	// The specified tunnel mode filter exists.
+	//
+	public static final int ERROR_IPSEC_TUNNEL_FILTER_EXISTS = 13016;
+
+	//
+	// MessageId: ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified tunnel mode filter was not found.
+	//
+	public static final int ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND = 13017;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_FILTER_PENDING_DELETION
+	//
+	// MessageText:
+	//
+	// The Main Mode filter is pending deletion.
+	//
+	public static final int ERROR_IPSEC_MM_FILTER_PENDING_DELETION = 13018;
+
+	//
+	// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION
+	//
+	// MessageText:
+	//
+	// The transport filter is pending deletion.
+	//
+	public static final int ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION = 13019;
+
+	//
+	// MessageId: ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION
+	//
+	// MessageText:
+	//
+	// The tunnel filter is pending deletion.
+	//
+	public static final int ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION = 13020;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_POLICY_PENDING_DELETION
+	//
+	// MessageText:
+	//
+	// The Main Mode policy is pending deletion.
+	//
+	public static final int ERROR_IPSEC_MM_POLICY_PENDING_DELETION = 13021;
+
+	//
+	// MessageId: ERROR_IPSEC_MM_AUTH_PENDING_DELETION
+	//
+	// MessageText:
+	//
+	// The Main Mode authentication bundle is pending deletion.
+	//
+	public static final int ERROR_IPSEC_MM_AUTH_PENDING_DELETION = 13022;
+
+	//
+	// MessageId: ERROR_IPSEC_QM_POLICY_PENDING_DELETION
+	//
+	// MessageText:
+	//
+	// The Quick Mode policy is pending deletion.
+	//
+	public static final int ERROR_IPSEC_QM_POLICY_PENDING_DELETION = 13023;
+
+	//
+	// MessageId: WARNING_IPSEC_MM_POLICY_PRUNED
+	//
+	// MessageText:
+	//
+	// The Main Mode policy was successfully added, but some of the requested
+	// offers are not supported.
+	//
+	public static final int WARNING_IPSEC_MM_POLICY_PRUNED = 13024;
+
+	//
+	// MessageId: WARNING_IPSEC_QM_POLICY_PRUNED
+	//
+	// MessageText:
+	//
+	// The Quick Mode policy was successfully added, but some of the requested
+	// offers are not supported.
+	//
+	public static final int WARNING_IPSEC_QM_POLICY_PRUNED = 13025;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NEG_STATUS_BEGIN
+	//
+	// MessageText:
+	//
+	// ERROR_IPSEC_IKE_NEG_STATUS_BEGIN
+	//
+	public static final int ERROR_IPSEC_IKE_NEG_STATUS_BEGIN = 13800;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_AUTH_FAIL
+	//
+	// MessageText:
+	//
+	// IKE authentication credentials are unacceptable
+	//
+	public static final int ERROR_IPSEC_IKE_AUTH_FAIL = 13801;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_ATTRIB_FAIL
+	//
+	// MessageText:
+	//
+	// IKE security attributes are unacceptable
+	//
+	public static final int ERROR_IPSEC_IKE_ATTRIB_FAIL = 13802;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NEGOTIATION_PENDING
+	//
+	// MessageText:
+	//
+	// IKE Negotiation in progress
+	//
+	public static final int ERROR_IPSEC_IKE_NEGOTIATION_PENDING = 13803;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR
+	//
+	// MessageText:
+	//
+	// General processing error
+	//
+	public static final int ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR = 13804;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_TIMED_OUT
+	//
+	// MessageText:
+	//
+	// Negotiation timed out
+	//
+	public static final int ERROR_IPSEC_IKE_TIMED_OUT = 13805;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NO_CERT
+	//
+	// MessageText:
+	//
+	// IKE failed to find valid machine certificate. Contact your Network
+	// Security Administrator about installing a valid certificate in the
+	// appropriate Certificate Store.
+	//
+	public static final int ERROR_IPSEC_IKE_NO_CERT = 13806;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SA_DELETED
+	//
+	// MessageText:
+	//
+	// IKE SA deleted by peer before establishment completed
+	//
+	public static final int ERROR_IPSEC_IKE_SA_DELETED = 13807;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SA_REAPED
+	//
+	// MessageText:
+	//
+	// IKE SA deleted before establishment completed
+	//
+	public static final int ERROR_IPSEC_IKE_SA_REAPED = 13808;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_MM_ACQUIRE_DROP
+	//
+	// MessageText:
+	//
+	// Negotiation request sat in Queue too long
+	//
+	public static final int ERROR_IPSEC_IKE_MM_ACQUIRE_DROP = 13809;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_QM_ACQUIRE_DROP
+	//
+	// MessageText:
+	//
+	// Negotiation request sat in Queue too long
+	//
+	public static final int ERROR_IPSEC_IKE_QM_ACQUIRE_DROP = 13810;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_QUEUE_DROP_MM
+	//
+	// MessageText:
+	//
+	// Negotiation request sat in Queue too long
+	//
+	public static final int ERROR_IPSEC_IKE_QUEUE_DROP_MM = 13811;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM
+	//
+	// MessageText:
+	//
+	// Negotiation request sat in Queue too long
+	//
+	public static final int ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM = 13812;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_DROP_NO_RESPONSE
+	//
+	// MessageText:
+	//
+	// No response from peer
+	//
+	public static final int ERROR_IPSEC_IKE_DROP_NO_RESPONSE = 13813;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_MM_DELAY_DROP
+	//
+	// MessageText:
+	//
+	// Negotiation took too long
+	//
+	public static final int ERROR_IPSEC_IKE_MM_DELAY_DROP = 13814;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_QM_DELAY_DROP
+	//
+	// MessageText:
+	//
+	// Negotiation took too long
+	//
+	public static final int ERROR_IPSEC_IKE_QM_DELAY_DROP = 13815;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_ERROR
+	//
+	// MessageText:
+	//
+	// Unknown error occurred
+	//
+	public static final int ERROR_IPSEC_IKE_ERROR = 13816;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_CRL_FAILED
+	//
+	// MessageText:
+	//
+	// Certificate Revocation Check failed
+	//
+	public static final int ERROR_IPSEC_IKE_CRL_FAILED = 13817;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_KEY_USAGE
+	//
+	// MessageText:
+	//
+	// Invalid certificate key usage
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_KEY_USAGE = 13818;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_CERT_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid certificate type
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_CERT_TYPE = 13819;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NO_PRIVATE_KEY
+	//
+	// MessageText:
+	//
+	// IKE negotiation failed because the machine certificate used does not have
+	// a private key. IPsec certificates require a private key. Contact your
+	// Network Security administrator about replacing with a certificate that
+	// has a private key.
+	//
+	public static final int ERROR_IPSEC_IKE_NO_PRIVATE_KEY = 13820;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_DH_FAIL
+	//
+	// MessageText:
+	//
+	// Failure in Diffie-Helman computation
+	//
+	public static final int ERROR_IPSEC_IKE_DH_FAIL = 13822;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_HEADER
+	//
+	// MessageText:
+	//
+	// Invalid header
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_HEADER = 13824;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NO_POLICY
+	//
+	// MessageText:
+	//
+	// No policy configured
+	//
+	public static final int ERROR_IPSEC_IKE_NO_POLICY = 13825;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_SIGNATURE
+	//
+	// MessageText:
+	//
+	// Failed to verify signature
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_SIGNATURE = 13826;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_KERBEROS_ERROR
+	//
+	// MessageText:
+	//
+	// Failed to authenticate using kerberos
+	//
+	public static final int ERROR_IPSEC_IKE_KERBEROS_ERROR = 13827;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NO_PUBLIC_KEY
+	//
+	// MessageText:
+	//
+	// Peer's certificate did not have a public key
+	//
+	public static final int ERROR_IPSEC_IKE_NO_PUBLIC_KEY = 13828;
+
+	// These must stay as a unit.
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR
+	//
+	// MessageText:
+	//
+	// Error processing error payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR = 13829;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_SA
+	//
+	// MessageText:
+	//
+	// Error processing SA payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_SA = 13830;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_PROP
+	//
+	// MessageText:
+	//
+	// Error processing Proposal payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_PROP = 13831;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_TRANS
+	//
+	// MessageText:
+	//
+	// Error processing Transform payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_TRANS = 13832;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_KE
+	//
+	// MessageText:
+	//
+	// Error processing KE payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_KE = 13833;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_ID
+	//
+	// MessageText:
+	//
+	// Error processing ID payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_ID = 13834;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_CERT
+	//
+	// MessageText:
+	//
+	// Error processing Cert payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_CERT = 13835;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ
+	//
+	// MessageText:
+	//
+	// Error processing Certificate Request payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ = 13836;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_HASH
+	//
+	// MessageText:
+	//
+	// Error processing Hash payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_HASH = 13837;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_SIG
+	//
+	// MessageText:
+	//
+	// Error processing Signature payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_SIG = 13838;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NONCE
+	//
+	// MessageText:
+	//
+	// Error processing Nonce payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_NONCE = 13839;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY
+	//
+	// MessageText:
+	//
+	// Error processing Notify payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY = 13840;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_DELETE
+	//
+	// MessageText:
+	//
+	// Error processing Delete Payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_DELETE = 13841;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR
+	//
+	// MessageText:
+	//
+	// Error processing VendorId payload
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR = 13842;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_PAYLOAD
+	//
+	// MessageText:
+	//
+	// Invalid payload received
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_PAYLOAD = 13843;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_LOAD_SOFT_SA
+	//
+	// MessageText:
+	//
+	// Soft SA loaded
+	//
+	public static final int ERROR_IPSEC_IKE_LOAD_SOFT_SA = 13844;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN
+	//
+	// MessageText:
+	//
+	// Soft SA torn down
+	//
+	public static final int ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN = 13845;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_COOKIE
+	//
+	// MessageText:
+	//
+	// Invalid cookie received.
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_COOKIE = 13846;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NO_PEER_CERT
+	//
+	// MessageText:
+	//
+	// Peer failed to send valid machine certificate
+	//
+	public static final int ERROR_IPSEC_IKE_NO_PEER_CERT = 13847;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PEER_CRL_FAILED
+	//
+	// MessageText:
+	//
+	// Certification Revocation check of peer's certificate failed
+	//
+	public static final int ERROR_IPSEC_IKE_PEER_CRL_FAILED = 13848;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_POLICY_CHANGE
+	//
+	// MessageText:
+	//
+	// New policy invalidated SAs formed with old policy
+	//
+	public static final int ERROR_IPSEC_IKE_POLICY_CHANGE = 13849;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NO_MM_POLICY
+	//
+	// MessageText:
+	//
+	// There is no available Main Mode IKE policy.
+	//
+	public static final int ERROR_IPSEC_IKE_NO_MM_POLICY = 13850;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NOTCBPRIV
+	//
+	// MessageText:
+	//
+	// Failed to enabled TCB privilege.
+	//
+	public static final int ERROR_IPSEC_IKE_NOTCBPRIV = 13851;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SECLOADFAIL
+	//
+	// MessageText:
+	//
+	// Failed to load SECURITY.DLL.
+	//
+	public static final int ERROR_IPSEC_IKE_SECLOADFAIL = 13852;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_FAILSSPINIT
+	//
+	// MessageText:
+	//
+	// Failed to obtain security function table dispatch address from SSPI.
+	//
+	public static final int ERROR_IPSEC_IKE_FAILSSPINIT = 13853;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_FAILQUERYSSP
+	//
+	// MessageText:
+	//
+	// Failed to query Kerberos package to obtain max token size.
+	//
+	public static final int ERROR_IPSEC_IKE_FAILQUERYSSP = 13854;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SRVACQFAIL
+	//
+	// MessageText:
+	//
+	// Failed to obtain Kerberos server credentials for ISAKMP/ERROR_IPSEC_IKE
+	// service. Kerberos authentication will not function. The most likely
+	// reason for this is lack of domain membership. This is normal if your
+	// computer is a member of a workgroup.
+	//
+	public static final int ERROR_IPSEC_IKE_SRVACQFAIL = 13855;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SRVQUERYCRED
+	//
+	// MessageText:
+	//
+	// Failed to determine SSPI principal name for ISAKMP/ERROR_IPSEC_IKE
+	// service (QueryCredentialsAttributes).
+	//
+	public static final int ERROR_IPSEC_IKE_SRVQUERYCRED = 13856;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_GETSPIFAIL
+	//
+	// MessageText:
+	//
+	// Failed to obtain new SPI for the inbound SA from Ipsec driver. The most
+	// common cause for this is that the driver does not have the correct
+	// filter. Check your policy to verify the filters.
+	//
+	public static final int ERROR_IPSEC_IKE_GETSPIFAIL = 13857;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_FILTER
+	//
+	// MessageText:
+	//
+	// Given filter is invalid
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_FILTER = 13858;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_OUT_OF_MEMORY
+	//
+	// MessageText:
+	//
+	// Memory allocation failed.
+	//
+	public static final int ERROR_IPSEC_IKE_OUT_OF_MEMORY = 13859;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED
+	//
+	// MessageText:
+	//
+	// Failed to add Security Association to IPSec Driver. The most common cause
+	// for this is if the IKE negotiation took too long to complete. If the
+	// problem persists, reduce the load on the faulting machine.
+	//
+	public static final int ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED = 13860;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_POLICY
+	//
+	// MessageText:
+	//
+	// Invalid policy
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_POLICY = 13861;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_UNKNOWN_DOI
+	//
+	// MessageText:
+	//
+	// Invalid DOI
+	//
+	public static final int ERROR_IPSEC_IKE_UNKNOWN_DOI = 13862;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_SITUATION
+	//
+	// MessageText:
+	//
+	// Invalid situation
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_SITUATION = 13863;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_DH_FAILURE
+	//
+	// MessageText:
+	//
+	// Diffie-Hellman failure
+	//
+	public static final int ERROR_IPSEC_IKE_DH_FAILURE = 13864;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_GROUP
+	//
+	// MessageText:
+	//
+	// Invalid Diffie-Hellman group
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_GROUP = 13865;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_ENCRYPT
+	//
+	// MessageText:
+	//
+	// Error encrypting payload
+	//
+	public static final int ERROR_IPSEC_IKE_ENCRYPT = 13866;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_DECRYPT
+	//
+	// MessageText:
+	//
+	// Error decrypting payload
+	//
+	public static final int ERROR_IPSEC_IKE_DECRYPT = 13867;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_POLICY_MATCH
+	//
+	// MessageText:
+	//
+	// Policy match error
+	//
+	public static final int ERROR_IPSEC_IKE_POLICY_MATCH = 13868;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_UNSUPPORTED_ID
+	//
+	// MessageText:
+	//
+	// Unsupported ID
+	//
+	public static final int ERROR_IPSEC_IKE_UNSUPPORTED_ID = 13869;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_HASH
+	//
+	// MessageText:
+	//
+	// Hash verification failed
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_HASH = 13870;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_HASH_ALG
+	//
+	// MessageText:
+	//
+	// Invalid hash algorithm
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_HASH_ALG = 13871;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_HASH_SIZE
+	//
+	// MessageText:
+	//
+	// Invalid hash size
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_HASH_SIZE = 13872;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG
+	//
+	// MessageText:
+	//
+	// Invalid encryption algorithm
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG = 13873;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_AUTH_ALG
+	//
+	// MessageText:
+	//
+	// Invalid authentication algorithm
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_AUTH_ALG = 13874;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_SIG
+	//
+	// MessageText:
+	//
+	// Invalid certificate signature
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_SIG = 13875;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_LOAD_FAILED
+	//
+	// MessageText:
+	//
+	// Load failed
+	//
+	public static final int ERROR_IPSEC_IKE_LOAD_FAILED = 13876;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_RPC_DELETE
+	//
+	// MessageText:
+	//
+	// Deleted via RPC call
+	//
+	public static final int ERROR_IPSEC_IKE_RPC_DELETE = 13877;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_BENIGN_REINIT
+	//
+	// MessageText:
+	//
+	// Temporary state created to perform reinit. This is not a real failure.
+	//
+	public static final int ERROR_IPSEC_IKE_BENIGN_REINIT = 13878;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY
+	//
+	// MessageText:
+	//
+	// The lifetime value received in the Responder Lifetime Notify is below the
+	// Windows=2000 configured minimum value. Please fix the policy on the peer
+	// machine.
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = 13879;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN
+	//
+	// MessageText:
+	//
+	// Key length in certificate is too small for configured security
+	// requirements.
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = 13881;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_MM_LIMIT
+	//
+	// MessageText:
+	//
+	// Max number of established MM SAs to peer exceeded.
+	//
+	public static final int ERROR_IPSEC_IKE_MM_LIMIT = 13882;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NEGOTIATION_DISABLED
+	//
+	// MessageText:
+	//
+	// IKE received a policy that disables negotiation.
+	//
+	public static final int ERROR_IPSEC_IKE_NEGOTIATION_DISABLED = 13883;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_QM_LIMIT
+	//
+	// MessageText:
+	//
+	// Reached maximum quick mode limit for the main mode. New main mode will be
+	// started.
+	//
+	public static final int ERROR_IPSEC_IKE_QM_LIMIT = 13884;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_MM_EXPIRED
+	//
+	// MessageText:
+	//
+	// Main mode SA lifetime expired or peer sent a main mode delete.
+	//
+	public static final int ERROR_IPSEC_IKE_MM_EXPIRED = 13885;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID
+	//
+	// MessageText:
+	//
+	// Main mode SA assumed to be invalid because peer stopped responding.
+	//
+	public static final int ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID = 13886;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH
+	//
+	// MessageText:
+	//
+	// Certificate doesn't chain to a trusted root in IPsec policy.
+	//
+	public static final int ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH = 13887;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID
+	//
+	// MessageText:
+	//
+	// Received unexpected message ID.
+	//
+	public static final int ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID = 13888;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD
+	//
+	// MessageText:
+	//
+	// Received invalid authentication offers.
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD = 13889;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_DOS_COOKIE_SENT
+	//
+	// MessageText:
+	//
+	// Sent DOS cookie notify to intiator.
+	//
+	public static final int ERROR_IPSEC_IKE_DOS_COOKIE_SENT = 13890;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_SHUTTING_DOWN
+	//
+	// MessageText:
+	//
+	// IKE service is shutting down.
+	//
+	public static final int ERROR_IPSEC_IKE_SHUTTING_DOWN = 13891;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_CGA_AUTH_FAILED
+	//
+	// MessageText:
+	//
+	// Could not verify binding between CGA address and certificate.
+	//
+	public static final int ERROR_IPSEC_IKE_CGA_AUTH_FAILED = 13892;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NATOA
+	//
+	// MessageText:
+	//
+	// Error processing NatOA payload.
+	//
+	public static final int ERROR_IPSEC_IKE_PROCESS_ERR_NATOA = 13893;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_INVALID_MM_FOR_QM
+	//
+	// MessageText:
+	//
+	// Parameters of the main mode are invalid for this quick mode.
+	//
+	public static final int ERROR_IPSEC_IKE_INVALID_MM_FOR_QM = 13894;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_QM_EXPIRED
+	//
+	// MessageText:
+	//
+	// Quick mode SA was expired by IPsec driver.
+	//
+	public static final int ERROR_IPSEC_IKE_QM_EXPIRED = 13895;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_TOO_MANY_FILTERS
+	//
+	// MessageText:
+	//
+	// Too many dynamically added IKEEXT filters were detected.
+	//
+	public static final int ERROR_IPSEC_IKE_TOO_MANY_FILTERS = 13896;
+
+	//
+	// MessageId: ERROR_IPSEC_IKE_NEG_STATUS_END
+	//
+	// MessageText:
+	//
+	// ERROR_IPSEC_IKE_NEG_STATUS_END
+	//
+	public static final int ERROR_IPSEC_IKE_NEG_STATUS_END = 13897;
+
+	//
+	// Following error codes are returned by IPsec kernel.
+	//
+	//
+	// MessageId: ERROR_IPSEC_BAD_SPI
+	//
+	// MessageText:
+	//
+	// The SPI in the packet does not match a valid IPsec SA.
+	//
+	public static final int ERROR_IPSEC_BAD_SPI = 13910;
+
+	//
+	// MessageId: ERROR_IPSEC_SA_LIFETIME_EXPIRED
+	//
+	// MessageText:
+	//
+	// Packet was received on an IPsec SA whose lifetime has expired.
+	//
+	public static final int ERROR_IPSEC_SA_LIFETIME_EXPIRED = 13911;
+
+	//
+	// MessageId: ERROR_IPSEC_WRONG_SA
+	//
+	// MessageText:
+	//
+	// Packet was received on an IPsec SA that doesn't match the packet
+	// characteristics.
+	//
+	public static final int ERROR_IPSEC_WRONG_SA = 13912;
+
+	//
+	// MessageId: ERROR_IPSEC_REPLAY_CHECK_FAILED
+	//
+	// MessageText:
+	//
+	// Packet sequence number replay check failed.
+	//
+	public static final int ERROR_IPSEC_REPLAY_CHECK_FAILED = 13913;
+
+	//
+	// MessageId: ERROR_IPSEC_INVALID_PACKET
+	//
+	// MessageText:
+	//
+	// IPsec header and/or trailer in the packet is invalid.
+	//
+	public static final int ERROR_IPSEC_INVALID_PACKET = 13914;
+
+	//
+	// MessageId: ERROR_IPSEC_INTEGRITY_CHECK_FAILED
+	//
+	// MessageText:
+	//
+	// IPsec integrity check failed.
+	//
+	public static final int ERROR_IPSEC_INTEGRITY_CHECK_FAILED = 13915;
+
+	//
+	// MessageId: ERROR_IPSEC_CLEAR_TEXT_DROP
+	//
+	// MessageText:
+	//
+	// IPsec dropped a clear text packet.
+	//
+	public static final int ERROR_IPSEC_CLEAR_TEXT_DROP = 13916;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =End of IPSec Error codes=//
+	// =//
+	// =13000 to=13999=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Start of Side By Side Error Codes //
+	// =//
+	// =14000 to=14999=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_SXS_SECTION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The requested section was not present in the activation context.
+	//
+	public static final int ERROR_SXS_SECTION_NOT_FOUND = 14000;
+
+	//
+	// MessageId: ERROR_SXS_CANT_GEN_ACTCTX
+	//
+	// MessageText:
+	//
+	// The application has failed to start because its side-by-side
+	// configuration is incorrect. Please see the application event log for more
+	// detail.
+	//
+	public static final int ERROR_SXS_CANT_GEN_ACTCTX = 14001;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_ACTCTXDATA_FORMAT
+	//
+	// MessageText:
+	//
+	// The application binding data format is invalid.
+	//
+	public static final int ERROR_SXS_INVALID_ACTCTXDATA_FORMAT = 14002;
+
+	//
+	// MessageId: ERROR_SXS_ASSEMBLY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The referenced assembly is not installed on your system.
+	//
+	public static final int ERROR_SXS_ASSEMBLY_NOT_FOUND = 14003;
+
+	//
+	// MessageId: ERROR_SXS_MANIFEST_FORMAT_ERROR
+	//
+	// MessageText:
+	//
+	// The manifest file does not begin with the required tag and format
+	// information.
+	//
+	public static final int ERROR_SXS_MANIFEST_FORMAT_ERROR = 14004;
+
+	//
+	// MessageId: ERROR_SXS_MANIFEST_PARSE_ERROR
+	//
+	// MessageText:
+	//
+	// The manifest file contains one or more syntax errors.
+	//
+	public static final int ERROR_SXS_MANIFEST_PARSE_ERROR = 14005;
+
+	//
+	// MessageId: ERROR_SXS_ACTIVATION_CONTEXT_DISABLED
+	//
+	// MessageText:
+	//
+	// The application attempted to activate a disabled activation context.
+	//
+	public static final int ERROR_SXS_ACTIVATION_CONTEXT_DISABLED = 14006;
+
+	//
+	// MessageId: ERROR_SXS_KEY_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The requested lookup key was not found in any active activation context.
+	//
+	public static final int ERROR_SXS_KEY_NOT_FOUND = 14007;
+
+	//
+	// MessageId: ERROR_SXS_VERSION_CONFLICT
+	//
+	// MessageText:
+	//
+	// A component version required by the application conflicts with another
+	// component version already active.
+	//
+	public static final int ERROR_SXS_VERSION_CONFLICT = 14008;
+
+	//
+	// MessageId: ERROR_SXS_WRONG_SECTION_TYPE
+	//
+	// MessageText:
+	//
+	// The type requested activation context section does not match the query
+	// API used.
+	//
+	public static final int ERROR_SXS_WRONG_SECTION_TYPE = 14009;
+
+	//
+	// MessageId: ERROR_SXS_THREAD_QUERIES_DISABLED
+	//
+	// MessageText:
+	//
+	// Lack of system resources has required isolated activation to be disabled
+	// for the current thread of execution.
+	//
+	public static final int ERROR_SXS_THREAD_QUERIES_DISABLED = 14010;
+
+	//
+	// MessageId: ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET
+	//
+	// MessageText:
+	//
+	// An attempt to set the process default activation context failed because
+	// the process default activation context was already set.
+	//
+	public static final int ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET = 14011;
+
+	//
+	// MessageId: ERROR_SXS_UNKNOWN_ENCODING_GROUP
+	//
+	// MessageText:
+	//
+	// The encoding group identifier specified is not recognized.
+	//
+	public static final int ERROR_SXS_UNKNOWN_ENCODING_GROUP = 14012;
+
+	//
+	// MessageId: ERROR_SXS_UNKNOWN_ENCODING
+	//
+	// MessageText:
+	//
+	// The encoding requested is not recognized.
+	//
+	public static final int ERROR_SXS_UNKNOWN_ENCODING = 14013;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_XML_NAMESPACE_URI
+	//
+	// MessageText:
+	//
+	// The manifest contains a reference to an invalid URI.
+	//
+	public static final int ERROR_SXS_INVALID_XML_NAMESPACE_URI = 14014;
+
+	//
+	// MessageId: ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// The application manifest contains a reference to a dependent assembly
+	// which is not installed
+	//
+	public static final int ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14015;
+
+	//
+	// MessageId: ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// The manifest for an assembly used by the application has a reference to a
+	// dependent assembly which is not installed
+	//
+	public static final int ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14016;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE
+	//
+	// MessageText:
+	//
+	// The manifest contains an attribute for the assembly identity which is not
+	// valid.
+	//
+	public static final int ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE = 14017;
+
+	//
+	// MessageId: ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE
+	//
+	// MessageText:
+	//
+	// The manifest is missing the required default namespace specification on
+	// the assembly element.
+	//
+	public static final int ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE = 14018;
+
+	//
+	// MessageId: ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE
+	//
+	// MessageText:
+	//
+	// The manifest has a default namespace specified on the assembly element
+	// but its value is not "urn:schemas-microsoft-com:asm.v1".
+	//
+	public static final int ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE = 14019;
+
+	//
+	// MessageId: ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT
+	//
+	// MessageText:
+	//
+	// The private manifest probed has crossed reparse-point-associated path
+	//
+	public static final int ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT = 14020;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_DLL_NAME
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest have files by the same name.
+	//
+	public static final int ERROR_SXS_DUPLICATE_DLL_NAME = 14021;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest have window classes with the same name.
+	//
+	public static final int ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME = 14022;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_CLSID
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest have the same COM server CLSIDs.
+	//
+	public static final int ERROR_SXS_DUPLICATE_CLSID = 14023;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_IID
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest have proxies for the same COM interface IIDs.
+	//
+	public static final int ERROR_SXS_DUPLICATE_IID = 14024;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_TLBID
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest have the same COM type library TLBIDs.
+	//
+	public static final int ERROR_SXS_DUPLICATE_TLBID = 14025;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_PROGID
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest have the same COM ProgIDs.
+	//
+	public static final int ERROR_SXS_DUPLICATE_PROGID = 14026;
+
+	//
+	// MessageId: ERROR_SXS_DUPLICATE_ASSEMBLY_NAME
+	//
+	// MessageText:
+	//
+	// Two or more components referenced directly or indirectly by the
+	// application manifest are different versions of the same component which
+	// is not permitted.
+	//
+	public static final int ERROR_SXS_DUPLICATE_ASSEMBLY_NAME = 14027;
+
+	//
+	// MessageId: ERROR_SXS_FILE_HASH_MISMATCH
+	//
+	// MessageText:
+	//
+	// A component's file does not match the verification information present in
+	// the component manifest.
+	//
+	public static final int ERROR_SXS_FILE_HASH_MISMATCH = 14028;
+
+	//
+	// MessageId: ERROR_SXS_POLICY_PARSE_ERROR
+	//
+	// MessageText:
+	//
+	// The policy manifest contains one or more syntax errors.
+	//
+	public static final int ERROR_SXS_POLICY_PARSE_ERROR = 14029;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MISSINGQUOTE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A string literal was expected, but no opening
+	// quote character was found.
+	//
+	public static final int ERROR_SXS_XML_E_MISSINGQUOTE = 14030;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_COMMENTSYNTAX
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Incorrect syntax was used in a comment.
+	//
+	public static final int ERROR_SXS_XML_E_COMMENTSYNTAX = 14031;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADSTARTNAMECHAR
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A name was started with an invalid character.
+	//
+	public static final int ERROR_SXS_XML_E_BADSTARTNAMECHAR = 14032;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADNAMECHAR
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A name contained an invalid character.
+	//
+	public static final int ERROR_SXS_XML_E_BADNAMECHAR = 14033;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADCHARINSTRING
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A string literal contained an invalid character.
+	//
+	public static final int ERROR_SXS_XML_E_BADCHARINSTRING = 14034;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_XMLDECLSYNTAX
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid syntax for an xml declaration.
+	//
+	public static final int ERROR_SXS_XML_E_XMLDECLSYNTAX = 14035;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADCHARDATA
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : An Invalid character was found in text content.
+	//
+	public static final int ERROR_SXS_XML_E_BADCHARDATA = 14036;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MISSINGWHITESPACE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Required white space was missing.
+	//
+	public static final int ERROR_SXS_XML_E_MISSINGWHITESPACE = 14037;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_EXPECTINGTAGEND
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : The character '>' was expected.
+	//
+	public static final int ERROR_SXS_XML_E_EXPECTINGTAGEND = 14038;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MISSINGSEMICOLON
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A semi colon character was expected.
+	//
+	public static final int ERROR_SXS_XML_E_MISSINGSEMICOLON = 14039;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNBALANCEDPAREN
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Unbalanced parentheses.
+	//
+	public static final int ERROR_SXS_XML_E_UNBALANCEDPAREN = 14040;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INTERNALERROR
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Internal error.
+	//
+	public static final int ERROR_SXS_XML_E_INTERNALERROR = 14041;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Whitespace is not allowed at this location.
+	//
+	public static final int ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE = 14042;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INCOMPLETE_ENCODING
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : End of file reached in invalid state for current
+	// encoding.
+	//
+	public static final int ERROR_SXS_XML_E_INCOMPLETE_ENCODING = 14043;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MISSING_PAREN
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Missing parenthesis.
+	//
+	public static final int ERROR_SXS_XML_E_MISSING_PAREN = 14044;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A single or double closing quote character (\' or
+	// \") is missing.
+	//
+	public static final int ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = 14045;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MULTIPLE_COLONS
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Multiple colons are not allowed in a name.
+	//
+	public static final int ERROR_SXS_XML_E_MULTIPLE_COLONS = 14046;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALID_DECIMAL
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid character for decimal digit.
+	//
+	public static final int ERROR_SXS_XML_E_INVALID_DECIMAL = 14047;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALID_HEXIDECIMAL
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid character for hexidecimal digit.
+	//
+	public static final int ERROR_SXS_XML_E_INVALID_HEXIDECIMAL = 14048;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALID_UNICODE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid unicode character value for this platform.
+	//
+	public static final int ERROR_SXS_XML_E_INVALID_UNICODE = 14049;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Expecting whitespace or '?'.
+	//
+	public static final int ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK = 14050;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNEXPECTEDENDTAG
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : End tag was not expected at this location.
+	//
+	public static final int ERROR_SXS_XML_E_UNEXPECTEDENDTAG = 14051;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDTAG
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : The following tags were not closed: %1.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDTAG = 14052;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_DUPLICATEATTRIBUTE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Duplicate attribute.
+	//
+	public static final int ERROR_SXS_XML_E_DUPLICATEATTRIBUTE = 14053;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MULTIPLEROOTS
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Only one top level element is allowed in an XML
+	// document.
+	//
+	public static final int ERROR_SXS_XML_E_MULTIPLEROOTS = 14054;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALIDATROOTLEVEL
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid at the top level of the document.
+	//
+	public static final int ERROR_SXS_XML_E_INVALIDATROOTLEVEL = 14055;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADXMLDECL
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid xml declaration.
+	//
+	public static final int ERROR_SXS_XML_E_BADXMLDECL = 14056;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MISSINGROOT
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : XML document must have a top level element.
+	//
+	public static final int ERROR_SXS_XML_E_MISSINGROOT = 14057;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNEXPECTEDEOF
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Unexpected end of file.
+	//
+	public static final int ERROR_SXS_XML_E_UNEXPECTEDEOF = 14058;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADPEREFINSUBSET
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Parameter entities cannot be used inside markup
+	// declarations in an internal subset.
+	//
+	public static final int ERROR_SXS_XML_E_BADPEREFINSUBSET = 14059;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDSTARTTAG
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Element was not closed.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = 14060;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDENDTAG
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : End element was missing the character '>'.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDENDTAG = 14061;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDSTRING
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A string literal was not closed.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDSTRING = 14062;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDCOMMENT
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A comment was not closed.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDCOMMENT = 14063;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDDECL
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A declaration was not closed.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDDECL = 14064;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNCLOSEDCDATA
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : A CDATA section was not closed.
+	//
+	public static final int ERROR_SXS_XML_E_UNCLOSEDCDATA = 14065;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_RESERVEDNAMESPACE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : The namespace prefix is not allowed to start with
+	// the reserved string "xml".
+	//
+	public static final int ERROR_SXS_XML_E_RESERVEDNAMESPACE = 14066;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALIDENCODING
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : System does not support the specified encoding.
+	//
+	public static final int ERROR_SXS_XML_E_INVALIDENCODING = 14067;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALIDSWITCH
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Switch from current encoding to specified encoding
+	// not supported.
+	//
+	public static final int ERROR_SXS_XML_E_INVALIDSWITCH = 14068;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_BADXMLCASE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : The name 'xml' is reserved and must be lower case.
+	//
+	public static final int ERROR_SXS_XML_E_BADXMLCASE = 14069;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALID_STANDALONE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : The standalone attribute must have the value 'yes'
+	// or 'no'.
+	//
+	public static final int ERROR_SXS_XML_E_INVALID_STANDALONE = 14070;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_UNEXPECTED_STANDALONE
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : The standalone attribute cannot be used in
+	// external entities.
+	//
+	public static final int ERROR_SXS_XML_E_UNEXPECTED_STANDALONE = 14071;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_INVALID_VERSION
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Invalid version number.
+	//
+	public static final int ERROR_SXS_XML_E_INVALID_VERSION = 14072;
+
+	//
+	// MessageId: ERROR_SXS_XML_E_MISSINGEQUALS
+	//
+	// MessageText:
+	//
+	// Manifest Parse Error : Missing equals sign between attribute and
+	// attribute value.
+	//
+	public static final int ERROR_SXS_XML_E_MISSINGEQUALS = 14073;
+
+	//
+	// MessageId: ERROR_SXS_PROTECTION_RECOVERY_FAILED
+	//
+	// MessageText:
+	//
+	// Assembly Protection Error : Unable to recover the specified assembly.
+	//
+	public static final int ERROR_SXS_PROTECTION_RECOVERY_FAILED = 14074;
+
+	//
+	// MessageId: ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT
+	//
+	// MessageText:
+	//
+	// Assembly Protection Error : The public key for an assembly was too short
+	// to be allowed.
+	//
+	public static final int ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT = 14075;
+
+	//
+	// MessageId: ERROR_SXS_PROTECTION_CATALOG_NOT_VALID
+	//
+	// MessageText:
+	//
+	// Assembly Protection Error : The catalog for an assembly is not valid, or
+	// does not match the assembly's manifest.
+	//
+	public static final int ERROR_SXS_PROTECTION_CATALOG_NOT_VALID = 14076;
+
+	//
+	// MessageId: ERROR_SXS_UNTRANSLATABLE_HRESULT
+	//
+	// MessageText:
+	//
+	// An HRESULT could not be translated to a corresponding Win32 error code.
+	//
+	public static final int ERROR_SXS_UNTRANSLATABLE_HRESULT = 14077;
+
+	//
+	// MessageId: ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING
+	//
+	// MessageText:
+	//
+	// Assembly Protection Error : The catalog for an assembly is missing.
+	//
+	public static final int ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING = 14078;
+
+	//
+	// MessageId: ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE
+	//
+	// MessageText:
+	//
+	// The supplied assembly identity is missing one or more attributes which
+	// must be present in this context.
+	//
+	public static final int ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE = 14079;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME
+	//
+	// MessageText:
+	//
+	// The supplied assembly identity has one or more attribute names that
+	// contain characters not permitted in XML names.
+	//
+	public static final int ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME = 14080;
+
+	//
+	// MessageId: ERROR_SXS_ASSEMBLY_MISSING
+	//
+	// MessageText:
+	//
+	// The referenced assembly could not be found.
+	//
+	public static final int ERROR_SXS_ASSEMBLY_MISSING = 14081;
+
+	//
+	// MessageId: ERROR_SXS_CORRUPT_ACTIVATION_STACK
+	//
+	// MessageText:
+	//
+	// The activation context activation stack for the running thread of
+	// execution is corrupt.
+	//
+	public static final int ERROR_SXS_CORRUPT_ACTIVATION_STACK = 14082;
+
+	//
+	// MessageId: ERROR_SXS_CORRUPTION
+	//
+	// MessageText:
+	//
+	// The application isolation metadata for this process or thread has become
+	// corrupt.
+	//
+	public static final int ERROR_SXS_CORRUPTION = 14083;
+
+	//
+	// MessageId: ERROR_SXS_EARLY_DEACTIVATION
+	//
+	// MessageText:
+	//
+	// The activation context being deactivated is not the most recently
+	// activated one.
+	//
+	public static final int ERROR_SXS_EARLY_DEACTIVATION = 14084;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_DEACTIVATION
+	//
+	// MessageText:
+	//
+	// The activation context being deactivated is not active for the current
+	// thread of execution.
+	//
+	public static final int ERROR_SXS_INVALID_DEACTIVATION = 14085;
+
+	//
+	// MessageId: ERROR_SXS_MULTIPLE_DEACTIVATION
+	//
+	// MessageText:
+	//
+	// The activation context being deactivated has already been deactivated.
+	//
+	public static final int ERROR_SXS_MULTIPLE_DEACTIVATION = 14086;
+
+	//
+	// MessageId: ERROR_SXS_PROCESS_TERMINATION_REQUESTED
+	//
+	// MessageText:
+	//
+	// A component used by the isolation facility has requested to terminate the
+	// process.
+	//
+	public static final int ERROR_SXS_PROCESS_TERMINATION_REQUESTED = 14087;
+
+	//
+	// MessageId: ERROR_SXS_RELEASE_ACTIVATION_CONTEXT
+	//
+	// MessageText:
+	//
+	// A kernel mode component is releasing a reference on an activation
+	// context.
+	//
+	public static final int ERROR_SXS_RELEASE_ACTIVATION_CONTEXT = 14088;
+
+	//
+	// MessageId: ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY
+	//
+	// MessageText:
+	//
+	// The activation context of system default assembly could not be generated.
+	//
+	public static final int ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 14089;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE
+	//
+	// MessageText:
+	//
+	// The value of an attribute in an identity is not within the legal range.
+	//
+	public static final int ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 14090;
+
+	//
+	// MessageId: ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME
+	//
+	// MessageText:
+	//
+	// The name of an attribute in an identity is not within the legal range.
+	//
+	public static final int ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 14091;
+
+	//
+	// MessageId: ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE
+	//
+	// MessageText:
+	//
+	// An identity contains two definitions for the same attribute.
+	//
+	public static final int ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 14092;
+
+	//
+	// MessageId: ERROR_SXS_IDENTITY_PARSE_ERROR
+	//
+	// MessageText:
+	//
+	// The identity string is malformed. This may be due to a trailing comma,
+	// more than two unnamed attributes, missing attribute name or missing
+	// attribute value.
+	//
+	public static final int ERROR_SXS_IDENTITY_PARSE_ERROR = 14093;
+
+	//
+	// MessageId: ERROR_MALFORMED_SUBSTITUTION_STRING
+	//
+	// MessageText:
+	//
+	// A string containing localized substitutable content was malformed. Either
+	// a dollar sign ($) was follwed by something other than a left parenthesis
+	// or another dollar sign or an substitution's right parenthesis was not
+	// found.
+	//
+	public static final int ERROR_MALFORMED_SUBSTITUTION_STRING = 14094;
+
+	//
+	// MessageId: ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN
+	//
+	// MessageText:
+	//
+	// The public key token does not correspond to the public key specified.
+	//
+	public static final int ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN = 14095;
+
+	//
+	// MessageId: ERROR_UNMAPPED_SUBSTITUTION_STRING
+	//
+	// MessageText:
+	//
+	// A substitution string had no mapping.
+	//
+	public static final int ERROR_UNMAPPED_SUBSTITUTION_STRING = 14096;
+
+	//
+	// MessageId: ERROR_SXS_ASSEMBLY_NOT_LOCKED
+	//
+	// MessageText:
+	//
+	// The component must be locked before making the request.
+	//
+	public static final int ERROR_SXS_ASSEMBLY_NOT_LOCKED = 14097;
+
+	//
+	// MessageId: ERROR_SXS_COMPONENT_STORE_CORRUPT
+	//
+	// MessageText:
+	//
+	// The component store has been corrupted.
+	//
+	public static final int ERROR_SXS_COMPONENT_STORE_CORRUPT = 14098;
+
+	//
+	// MessageId: ERROR_ADVANCED_INSTALLER_FAILED
+	//
+	// MessageText:
+	//
+	// An advanced installer failed during setup or servicing.
+	//
+	public static final int ERROR_ADVANCED_INSTALLER_FAILED = 14099;
+
+	//
+	// MessageId: ERROR_XML_ENCODING_MISMATCH
+	//
+	// MessageText:
+	//
+	// The character encoding in the XML declaration did not match the encoding
+	// used in the document.
+	//
+	public static final int ERROR_XML_ENCODING_MISMATCH = 14100;
+
+	//
+	// MessageId: ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT
+	//
+	// MessageText:
+	//
+	// The identities of the manifests are identical but their contents are
+	// different.
+	//
+	public static final int ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 14101;
+
+	//
+	// MessageId: ERROR_SXS_IDENTITIES_DIFFERENT
+	//
+	// MessageText:
+	//
+	// The component identities are different.
+	//
+	public static final int ERROR_SXS_IDENTITIES_DIFFERENT = 14102;
+
+	//
+	// MessageId: ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT
+	//
+	// MessageText:
+	//
+	// The assembly is not a deployment.
+	//
+	public static final int ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 14103;
+
+	//
+	// MessageId: ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY
+	//
+	// MessageText:
+	//
+	// The file is not a part of the assembly.
+	//
+	public static final int ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY = 14104;
+
+	//
+	// MessageId: ERROR_SXS_MANIFEST_TOO_BIG
+	//
+	// MessageText:
+	//
+	// The size of the manifest exceeds the maximum allowed.
+	//
+	public static final int ERROR_SXS_MANIFEST_TOO_BIG = 14105;
+
+	//
+	// MessageId: ERROR_SXS_SETTING_NOT_REGISTERED
+	//
+	// MessageText:
+	//
+	// The setting is not registered.
+	//
+	public static final int ERROR_SXS_SETTING_NOT_REGISTERED = 14106;
+
+	//
+	// MessageId: ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE
+	//
+	// MessageText:
+	//
+	// One or more required members of the transaction are not present.
+	//
+	public static final int ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE = 14107;
+
+	//
+	// MessageId: ERROR_SMI_PRIMITIVE_INSTALLER_FAILED
+	//
+	// MessageText:
+	//
+	// The SMI primitive installer failed during setup or servicing.
+	//
+	public static final int ERROR_SMI_PRIMITIVE_INSTALLER_FAILED = 14108;
+
+	//
+	// MessageId: ERROR_GENERIC_COMMAND_FAILED
+	//
+	// MessageText:
+	//
+	// A generic command executable returned a result that indicates failure.
+	//
+	public static final int ERROR_GENERIC_COMMAND_FAILED = 14109;
+
+	//
+	// MessageId: ERROR_SXS_FILE_HASH_MISSING
+	//
+	// MessageText:
+	//
+	// A component is missing file verification information in its manifest.
+	//
+	public static final int ERROR_SXS_FILE_HASH_MISSING = 14110;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =End of Side By Side Error Codes //
+	// =//
+	// =14000 to=14999=//
+	// /////////////////////////////////////////////////
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Start of WinEvt Error codes=//
+	// =//
+	// =15000 to=15079=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_EVT_INVALID_CHANNEL_PATH
+	//
+	// MessageText:
+	//
+	// The specified channel path is invalid.
+	//
+	public static final int ERROR_EVT_INVALID_CHANNEL_PATH = 15000;
+
+	//
+	// MessageId: ERROR_EVT_INVALID_QUERY
+	//
+	// MessageText:
+	//
+	// The specified query is invalid.
+	//
+	public static final int ERROR_EVT_INVALID_QUERY = 15001;
+
+	//
+	// MessageId: ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The publisher metadata cannot be found in the resource.
+	//
+	public static final int ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND = 15002;
+
+	//
+	// MessageId: ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The template for an event definition cannot be found in the resource
+	// (error =%1).
+	//
+	public static final int ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND = 15003;
+
+	//
+	// MessageId: ERROR_EVT_INVALID_PUBLISHER_NAME
+	//
+	// MessageText:
+	//
+	// The specified publisher name is invalid.
+	//
+	public static final int ERROR_EVT_INVALID_PUBLISHER_NAME = 15004;
+
+	//
+	// MessageId: ERROR_EVT_INVALID_EVENT_DATA
+	//
+	// MessageText:
+	//
+	// The event data raised by the publisher is not compatible with the event
+	// template definition in the publisher's manifest
+	//
+	public static final int ERROR_EVT_INVALID_EVENT_DATA = 15005;
+
+	//
+	// MessageId: ERROR_EVT_CHANNEL_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified channel could not be found. Check channel configuration.
+	//
+	public static final int ERROR_EVT_CHANNEL_NOT_FOUND = 15007;
+
+	//
+	// MessageId: ERROR_EVT_MALFORMED_XML_TEXT
+	//
+	// MessageText:
+	//
+	// The specified xml text was not well-formed. See Extended Error for more
+	// details.
+	//
+	public static final int ERROR_EVT_MALFORMED_XML_TEXT = 15008;
+
+	//
+	// MessageId: ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL
+	//
+	// MessageText:
+	//
+	// The caller is trying to subscribe to a direct channel which is not
+	// allowed. The events for a direct channel go directly to a logfile and
+	// cannot be subscribed to.
+	//
+	public static final int ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL = 15009;
+
+	//
+	// MessageId: ERROR_EVT_CONFIGURATION_ERROR
+	//
+	// MessageText:
+	//
+	// Configuration error.
+	//
+	public static final int ERROR_EVT_CONFIGURATION_ERROR = 15010;
+
+	//
+	// MessageId: ERROR_EVT_QUERY_RESULT_STALE
+	//
+	// MessageText:
+	//
+	// The query result is stale / invalid. This may be due to the log being
+	// cleared or rolling over after the query result was created. Users should
+	// handle this code by releasing the query result object and reissuing the
+	// query.
+	//
+	public static final int ERROR_EVT_QUERY_RESULT_STALE = 15011;
+
+	//
+	// MessageId: ERROR_EVT_QUERY_RESULT_INVALID_POSITION
+	//
+	// MessageText:
+	//
+	// Query result is currently at an invalid position.
+	//
+	public static final int ERROR_EVT_QUERY_RESULT_INVALID_POSITION = 15012;
+
+	//
+	// MessageId: ERROR_EVT_NON_VALIDATING_MSXML
+	//
+	// MessageText:
+	//
+	// Registered MSXML doesn't support validation.
+	//
+	public static final int ERROR_EVT_NON_VALIDATING_MSXML = 15013;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_ALREADYSCOPED
+	//
+	// MessageText:
+	//
+	// An expression can only be followed by a change of scope operation if it
+	// itself evaluates to a node set and is not already part of some other
+	// change of scope operation.
+	//
+	public static final int ERROR_EVT_FILTER_ALREADYSCOPED = 15014;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_NOTELTSET
+	//
+	// MessageText:
+	//
+	// Can't perform a step operation from a term that does not represent an
+	// element set.
+	//
+	public static final int ERROR_EVT_FILTER_NOTELTSET = 15015;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_INVARG
+	//
+	// MessageText:
+	//
+	// Left hand side arguments to binary operators must be either attributes,
+	// nodes or variables and right hand side arguments must be constants.
+	//
+	public static final int ERROR_EVT_FILTER_INVARG = 15016;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_INVTEST
+	//
+	// MessageText:
+	//
+	// A step operation must involve either a node test or, in the case of a
+	// predicate, an algebraic expression against which to test each node in the
+	// node set identified by the preceeding node set can be evaluated.
+	//
+	public static final int ERROR_EVT_FILTER_INVTEST = 15017;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_INVTYPE
+	//
+	// MessageText:
+	//
+	// This data type is currently unsupported.
+	//
+	public static final int ERROR_EVT_FILTER_INVTYPE = 15018;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_PARSEERR
+	//
+	// MessageText:
+	//
+	// A syntax error occurred at position %1!d!
+	//
+	public static final int ERROR_EVT_FILTER_PARSEERR = 15019;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_UNSUPPORTEDOP
+	//
+	// MessageText:
+	//
+	// This operator is unsupported by this implementation of the filter.
+	//
+	public static final int ERROR_EVT_FILTER_UNSUPPORTEDOP = 15020;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_UNEXPECTEDTOKEN
+	//
+	// MessageText:
+	//
+	// The token encountered was unexpected.
+	//
+	public static final int ERROR_EVT_FILTER_UNEXPECTEDTOKEN = 15021;
+
+	//
+	// MessageId: ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL
+	//
+	// MessageText:
+	//
+	// The requested operation cannot be performed over an enabled direct
+	// channel. The channel must first be disabled before performing the
+	// requested operation.
+	//
+	public static final int ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL = 15022;
+
+	//
+	// MessageId: ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE
+	//
+	// MessageText:
+	//
+	// Channel property %1!s! contains invalid value. The value has invalid
+	// type, is outside of valid range, can't be updated or is not supported by
+	// this type of channel.
+	//
+	public static final int ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE = 15023;
+
+	//
+	// MessageId: ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE
+	//
+	// MessageText:
+	//
+	// Publisher property %1!s! contains invalid value. The value has invalid
+	// type, is outside of valid range, can't be updated or is not supported by
+	// this type of publisher.
+	//
+	public static final int ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE = 15024;
+
+	//
+	// MessageId: ERROR_EVT_CHANNEL_CANNOT_ACTIVATE
+	//
+	// MessageText:
+	//
+	// The channel fails to activate.
+	//
+	public static final int ERROR_EVT_CHANNEL_CANNOT_ACTIVATE = 15025;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_TOO_COMPLEX
+	//
+	// MessageText:
+	//
+	// The xpath expression exceeded supported complexity. Please symplify it or
+	// split it into two or more simple expressions.
+	//
+	public static final int ERROR_EVT_FILTER_TOO_COMPLEX = 15026;
+
+	//
+	// MessageId: ERROR_EVT_MESSAGE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// the message resource is present but the message is not found in the
+	// string/message table
+	//
+	public static final int ERROR_EVT_MESSAGE_NOT_FOUND = 15027;
+
+	//
+	// MessageId: ERROR_EVT_MESSAGE_ID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The message id for the desired message could not be found.
+	//
+	public static final int ERROR_EVT_MESSAGE_ID_NOT_FOUND = 15028;
+
+	//
+	// MessageId: ERROR_EVT_UNRESOLVED_VALUE_INSERT
+	//
+	// MessageText:
+	//
+	// The substitution string for insert index (%1) could not be found.
+	//
+	public static final int ERROR_EVT_UNRESOLVED_VALUE_INSERT = 15029;
+
+	//
+	// MessageId: ERROR_EVT_UNRESOLVED_PARAMETER_INSERT
+	//
+	// MessageText:
+	//
+	// The description string for parameter reference (%1) could not be found.
+	//
+	public static final int ERROR_EVT_UNRESOLVED_PARAMETER_INSERT = 15030;
+
+	//
+	// MessageId: ERROR_EVT_MAX_INSERTS_REACHED
+	//
+	// MessageText:
+	//
+	// The maximum number of replacements has been reached.
+	//
+	public static final int ERROR_EVT_MAX_INSERTS_REACHED = 15031;
+
+	//
+	// MessageId: ERROR_EVT_EVENT_DEFINITION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The event definition could not be found for event id (%1).
+	//
+	public static final int ERROR_EVT_EVENT_DEFINITION_NOT_FOUND = 15032;
+
+	//
+	// MessageId: ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The locale specific resource for the desired message is not present.
+	//
+	public static final int ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND = 15033;
+
+	//
+	// MessageId: ERROR_EVT_VERSION_TOO_OLD
+	//
+	// MessageText:
+	//
+	// The resource is too old to be compatible.
+	//
+	public static final int ERROR_EVT_VERSION_TOO_OLD = 15034;
+
+	//
+	// MessageId: ERROR_EVT_VERSION_TOO_NEW
+	//
+	// MessageText:
+	//
+	// The resource is too new to be compatible.
+	//
+	public static final int ERROR_EVT_VERSION_TOO_NEW = 15035;
+
+	//
+	// MessageId: ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY
+	//
+	// MessageText:
+	//
+	// The channel at index %1!d! of the query can't be opened.
+	//
+	public static final int ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY = 15036;
+
+	//
+	// MessageId: ERROR_EVT_PUBLISHER_DISABLED
+	//
+	// MessageText:
+	//
+	// The publisher has been disabled and its resource is not avaiable. This
+	// usually occurs when the publisher is in the process of being uninstalled
+	// or upgraded.
+	//
+	public static final int ERROR_EVT_PUBLISHER_DISABLED = 15037;
+
+	//
+	// MessageId: ERROR_EVT_FILTER_OUT_OF_RANGE
+	//
+	// MessageText:
+	//
+	// Attempted to create a numeric type that is outside of its valid range.
+	//
+	public static final int ERROR_EVT_FILTER_OUT_OF_RANGE = 15038;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Start of Wecsvc Error codes=//
+	// =//
+	// =15080 to=15099=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE
+	//
+	// MessageText:
+	//
+	// The subscription fails to activate.
+	//
+	public static final int ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE = 15080;
+
+	//
+	// MessageId: ERROR_EC_LOG_DISABLED
+	//
+	// MessageText:
+	//
+	// The log of the subscription is in disabled state, and can not be used to
+	// forward events to. The log must first be enabled before the subscription
+	// can be activated.
+	//
+	public static final int ERROR_EC_LOG_DISABLED = 15081;
+
+	//
+	// MessageId: ERROR_EC_CIRCULAR_FORWARDING
+	//
+	// MessageText:
+	//
+	// When forwarding events from local machine to itself, the query of the
+	// subscription can't contain target log of the subscription.
+	//
+	public static final int ERROR_EC_CIRCULAR_FORWARDING = 15082;
+
+	//
+	// MessageId: ERROR_EC_CREDSTORE_FULL
+	//
+	// MessageText:
+	//
+	// The credential store that is used to save credentials is full.
+	//
+	public static final int ERROR_EC_CREDSTORE_FULL = 15083;
+
+	//
+	// MessageId: ERROR_EC_CRED_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The credential used by this subscription can't be found in credential
+	// store.
+	//
+	public static final int ERROR_EC_CRED_NOT_FOUND = 15084;
+
+	//
+	// MessageId: ERROR_EC_NO_ACTIVE_CHANNEL
+	//
+	// MessageText:
+	//
+	// No active channel is found for the query.
+	//
+	public static final int ERROR_EC_NO_ACTIVE_CHANNEL = 15085;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// =Start of MUI Error codes=//
+	// =//
+	// =15100 to=15199=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_MUI_FILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The resource loader failed to find MUI file.
+	//
+	public static final int ERROR_MUI_FILE_NOT_FOUND = 15100;
+
+	//
+	// MessageId: ERROR_MUI_INVALID_FILE
+	//
+	// MessageText:
+	//
+	// The resource loader failed to load MUI file because the file fail to pass
+	// validation.
+	//
+	public static final int ERROR_MUI_INVALID_FILE = 15101;
+
+	//
+	// MessageId: ERROR_MUI_INVALID_RC_CONFIG
+	//
+	// MessageText:
+	//
+	// The RC Manifest is corrupted with garbage data or unsupported version or
+	// missing required item.
+	//
+	public static final int ERROR_MUI_INVALID_RC_CONFIG = 15102;
+
+	//
+	// MessageId: ERROR_MUI_INVALID_LOCALE_NAME
+	//
+	// MessageText:
+	//
+	// The RC Manifest has invalid culture name.
+	//
+	public static final int ERROR_MUI_INVALID_LOCALE_NAME = 15103;
+
+	//
+	// MessageId: ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME
+	//
+	// MessageText:
+	//
+	// The RC Manifest has invalid ultimatefallback name.
+	//
+	public static final int ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME = 15104;
+
+	//
+	// MessageId: ERROR_MUI_FILE_NOT_LOADED
+	//
+	// MessageText:
+	//
+	// The resource loader cache doesn't have loaded MUI entry.
+	//
+	public static final int ERROR_MUI_FILE_NOT_LOADED = 15105;
+
+	//
+	// MessageId: ERROR_RESOURCE_ENUM_USER_STOP
+	//
+	// MessageText:
+	//
+	// User stopped resource enumeration.
+	//
+	public static final int ERROR_RESOURCE_ENUM_USER_STOP = 15106;
+
+	//
+	// MessageId: ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// UI language installation failed.
+	//
+	public static final int ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED = 15107;
+
+	//
+	// MessageId: ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME
+	//
+	// MessageText:
+	//
+	// Locale installation failed.
+	//
+	public static final int ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME = 15108;
+
+	// /////////////////////////////////////////////////
+	// =//
+	// Start of Monitor Configuration API error codes//
+	// =//
+	// =15200 to=15249=//
+	// /////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_MCA_INVALID_CAPABILITIES_STRING
+	//
+	// MessageText:
+	//
+	// The monitor returned a DDC/CI capabilities string that did not comply
+	// with the ACCESS.bus=3.0, DDC/CI=1.1 or MCCS=2 Revision=1 specification.
+	//
+	public static final int ERROR_MCA_INVALID_CAPABILITIES_STRING = 15200;
+
+	//
+	// MessageId: ERROR_MCA_INVALID_VCP_VERSION
+	//
+	// MessageText:
+	//
+	// The monitor's VCP Version (0xDF) VCP code returned an invalid version
+	// value.
+	//
+	public static final int ERROR_MCA_INVALID_VCP_VERSION = 15201;
+
+	//
+	// MessageId: ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION
+	//
+	// MessageText:
+	//
+	// The monitor does not comply with the MCCS specification it claims to
+	// support.
+	//
+	public static final int ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION = 15202;
+
+	//
+	// MessageId: ERROR_MCA_MCCS_VERSION_MISMATCH
+	//
+	// MessageText:
+	//
+	// The MCCS version in a monitor's mccs_ver capability does not match the
+	// MCCS version the monitor reports when the VCP Version (0xDF) VCP code is
+	// used.
+	//
+	public static final int ERROR_MCA_MCCS_VERSION_MISMATCH = 15203;
+
+	//
+	// MessageId: ERROR_MCA_UNSUPPORTED_MCCS_VERSION
+	//
+	// MessageText:
+	//
+	// The Monitor Configuration API only works with monitors that support the
+	// MCCS=1.0 specification, MCCS=2.0 specification or the MCCS=2.0 Revision=1
+	// specification.
+	//
+	public static final int ERROR_MCA_UNSUPPORTED_MCCS_VERSION = 15204;
+
+	//
+	// MessageId: ERROR_MCA_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal Monitor Configuration API error occurred.
+	//
+	public static final int ERROR_MCA_INTERNAL_ERROR = 15205;
+
+	//
+	// MessageId: ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED
+	//
+	// MessageText:
+	//
+	// The monitor returned an invalid monitor technology type. CRT, Plasma and
+	// LCD (TFT) are examples of monitor technology types. This error implies
+	// that the monitor violated the MCCS=2.0 or MCCS=2.0 Revision=1
+	// specification.
+	//
+	public static final int ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED = 15206;
+
+	//
+	// MessageId: ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE
+	//
+	// MessageText:
+	//
+	// The caller of SetMonitorColorTemperature specified a color temperature
+	// that the current monitor did not support. This error implies that the
+	// monitor violated the MCCS=2.0 or MCCS=2.0 Revision=1 specification.
+	//
+	public static final int ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE = 15207;
+
+	// ////////////////////////////////////////////////
+	// =//
+	// End of Monitor Configuration API error codes //
+	// =//
+	// =15200 to=15249=//
+	// =//
+	// ////////////////////////////////////////////////
+	// ////////////////////////////////////////////////
+	// =//
+	// =Start of Syspart error codes=//
+	// =15250 -=15299=//
+	// =//
+	// ////////////////////////////////////////////////
+
+	//
+	// MessageId: ERROR_AMBIGUOUS_SYSTEM_DEVICE
+	//
+	// MessageText:
+	//
+	// The requested system device cannot be identified due to multiple
+	// indistinguishable devices potentially matching the identification
+	// criteria.
+	//
+	public static final int ERROR_AMBIGUOUS_SYSTEM_DEVICE = 15250;
+
+	//
+	// MessageId: ERROR_SYSTEM_DEVICE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The requested system device cannot be found.
+	//
+	public static final int ERROR_SYSTEM_DEVICE_NOT_FOUND = 15299;
+
+	// //////////////////////////////////
+	// =//
+	// COM Error Codes=//
+	// =//
+	// //////////////////////////////////
+
+	//
+	// The return value of COM functions and methods is an HRESULT.
+	// This is not a handle to anything, but is merely a=32-bit value
+	// with several fields encoded in the value. The parts of an
+	// HRESULT are shown below.
+	//
+	// Many of the macros and functions below were orginally defined to
+	// operate on SCODEs. SCODEs are no longer used. The macros are
+	// still present for compatibility and easy porting of Win16 code.
+	// Newly written code should use the HRESULT macros and functions.
+	//
+
+	//
+	// HRESULTs are=32 bit values layed out as follows:
+	//
+	// =3=3=2=2=2=2=2=2=2=2=2=2=1=1=1=1=1=1=1=1=1=1
+	// =1 0=9=8=7=6=5=4=3=2=1 0=9=8=7=6=5=4=3=2=1 0=9=8=7=6=5=4=3=2=1 0
+	// +-+-+-+-+-+---------------------+-------------------------------+
+	// |S|R|C|N|r| Facility=|=Code=|
+	// +-+-+-+-+-+---------------------+-------------------------------+
+	//
+	// where
+	//
+	// S - Severity - indicates success/fail
+	//
+	// =0 - Success
+	// =1 - Fail (COERROR)
+	//
+	// R - reserved portion of the facility code, corresponds to NT's
+	// =second severity bit.
+	//
+	// C - reserved portion of the facility code, corresponds to NT's
+	// =C field.
+	//
+	// N - reserved portion of the facility code. Used to indicate a
+	// =mapped NT status value.
+	//
+	// r - reserved portion of the facility code. Reserved for internal
+	// =use. Used to indicate HRESULT values that are not status
+	// =values, but are instead message ids for display strings.
+	//
+	// Facility - is the facility code
+	//
+	// Code - is the facility's status code
+	//
+
+	//
+	// Severity values
+	//
+
+	public static final int SEVERITY_SUCCESS = 0;
+	public static final int SEVERITY_ERROR = 1;
+
+	//
+	// Generic test for success on any status value (non-negative numbers
+	// indicate success).
+	//
+
+	public static final boolean SUCCEEDED(int hr) {
+		return hr >= 0;
+	}
+
+	//
+	// and the inverse
+	//
+
+	public static final boolean FAILED(int hr) {
+		return hr < 0;
+	}
+
+	//
+	// Return the code
+	//
+
+	public static final int HRESULT_CODE(int hr) {
+		return hr & 0xFFFF;
+	}
+
+	public static final int SCODE_CODE(int sc) {
+		return sc & 0xFFFF;
+	}
+
+	//
+	// Return the facility
+	//
+
+	public static final int HRESULT_FACILITY(int hr) {
+		return (hr >>= 16) & 0x1fff;
+	}
+
+	public static final int SCODE_FACILITY(short sc) {
+		return (sc >>= 16) & 0x1fff;
+	}
+
+	//
+	// Return the severity
+	//
+
+	public static short HRESULT_SEVERITY(int hr) {
+		return (short) ((hr >>= 31) & 0x1);
+	}
+
+	public static short SCODE_SEVERITY(short sc) {
+		return (short) ((sc >>= 31) & 0x1);
+	}
+
+	//
+	// Create an HRESULT value from component pieces
+	//
+
+	public static int MAKE_HRESULT(short sev, short fac, short code) {
+		return ((sev << 31) | (fac << 16) | code);
+	}
+
+	public static final int MAKE_SCODE(short sev, short fac, short code) {
+		return ((sev << 31) | (fac << 16) | code);
+	}
+
+	//
+	// Map a WIN32 error value into a HRESULT
+	// Note: This assumes that WIN32 errors fall in the range -32k to=32k.
+	//
+	// Define bits here so macros are guaranteed to work
+
+	public static final int FACILITY_NT_BIT = 0x10000000;
+
+	public static final HRESULT HRESULT_FROM_WIN32(int x) {
+		int f = FACILITY_WIN32;
+		return new HRESULT(x <= 0 ? x : ((x) & 0x0000FFFF) | (f <<= 16) | 0x80000000);
+	}
+
+	// ---------------------- HRESULT value definitions -----------------
+	//
+	// HRESULT definitions
+	//
+
+	public static final int NOERROR = 0;
+
+	//
+	// Error definitions follow
+	//
+
+	//
+	// Codes 0x4000-0x40ff are reserved for OLE
+	//
+	//
+	// Error codes
+	//
+	//
+	// MessageId: E_UNEXPECTED
+	//
+	// MessageText:
+	//
+	// Catastrophic failure
+	//
+	public static final int E_UNEXPECTED = 0x8000FFFF;
+
+	//
+	// MessageId: E_NOTIMPL
+	//
+	// MessageText:
+	//
+	// Not implemented
+	//
+	public static final int E_NOTIMPL = 0x80004001;
+
+	//
+	// MessageId: E_OUTOFMEMORY
+	//
+	// MessageText:
+	//
+	// Ran out of memory
+	//
+	public static final int E_OUTOFMEMORY = 0x8007000E;
+
+	//
+	// MessageId: E_INVALIDARG
+	//
+	// MessageText:
+	//
+	// One or more arguments are invalid
+	//
+	public static final int E_INVALIDARG = 0x80070057;
+
+	//
+	// MessageId: E_NOINTERFACE
+	//
+	// MessageText:
+	//
+	// No such interface supported
+	//
+	public static final int E_NOINTERFACE = 0x80004002;
+
+	//
+	// MessageId: E_POINTER
+	//
+	// MessageText:
+	//
+	// Invalid pointer
+	//
+	public static final int E_POINTER = 0x80004003;
+
+	//
+	// MessageId: E_HANDLE
+	//
+	// MessageText:
+	//
+	// Invalid handle
+	//
+	public static final int E_HANDLE = 0x80070006;
+
+	//
+	// MessageId: E_ABORT
+	//
+	// MessageText:
+	//
+	// Operation aborted
+	//
+	public static final int E_ABORT = 0x80004004;
+
+	//
+	// MessageId: E_FAIL
+	//
+	// MessageText:
+	//
+	// Unspecified error
+	//
+	public static final int E_FAIL = 0x80004005;
+
+	//
+	// MessageId: E_ACCESSDENIED
+	//
+	// MessageText:
+	//
+	// General access denied error
+	//
+	public static final int E_ACCESSDENIED = 0x80070005;
+
+	//
+	// MessageId: E_PENDING
+	//
+	// MessageText:
+	//
+	// The data necessary to complete this operation is not yet available.
+	//
+	public static final int E_PENDING = 0x8000000A;
+
+	//
+	// MessageId: CO_E_INIT_TLS
+	//
+	// MessageText:
+	//
+	// Thread local storage failure
+	//
+	public static final int CO_E_INIT_TLS = 0x80004006;
+
+	//
+	// MessageId: CO_E_INIT_SHARED_ALLOCATOR
+	//
+	// MessageText:
+	//
+	// Get shared memory allocator failure
+	//
+	public static final int CO_E_INIT_SHARED_ALLOCATOR = 0x80004007;
+
+	//
+	// MessageId: CO_E_INIT_MEMORY_ALLOCATOR
+	//
+	// MessageText:
+	//
+	// Get memory allocator failure
+	//
+	public static final int CO_E_INIT_MEMORY_ALLOCATOR = 0x80004008;
+
+	//
+	// MessageId: CO_E_INIT_CLASS_CACHE
+	//
+	// MessageText:
+	//
+	// Unable to initialize class cache
+	//
+	public static final int CO_E_INIT_CLASS_CACHE = 0x80004009;
+
+	//
+	// MessageId: CO_E_INIT_RPC_CHANNEL
+	//
+	// MessageText:
+	//
+	// Unable to initialize RPC services
+	//
+	public static final int CO_E_INIT_RPC_CHANNEL = 0x8000400A;
+
+	//
+	// MessageId: CO_E_INIT_TLS_SET_CHANNEL_CONTROL
+	//
+	// MessageText:
+	//
+	// Cannot set thread local storage channel control
+	//
+	public static final int CO_E_INIT_TLS_SET_CHANNEL_CONTROL = 0x8000400B;
+
+	//
+	// MessageId: CO_E_INIT_TLS_CHANNEL_CONTROL
+	//
+	// MessageText:
+	//
+	// Could not allocate thread local storage channel control
+	//
+	public static final int CO_E_INIT_TLS_CHANNEL_CONTROL = 0x8000400C;
+
+	//
+	// MessageId: CO_E_INIT_UNACCEPTED_USER_ALLOCATOR
+	//
+	// MessageText:
+	//
+	// The user supplied memory allocator is unacceptable
+	//
+	public static final int CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = 0x8000400D;
+
+	//
+	// MessageId: CO_E_INIT_SCM_MUTEX_EXISTS
+	//
+	// MessageText:
+	//
+	// The OLE service mutex already exists
+	//
+	public static final int CO_E_INIT_SCM_MUTEX_EXISTS = 0x8000400E;
+
+	//
+	// MessageId: CO_E_INIT_SCM_FILE_MAPPING_EXISTS
+	//
+	// MessageText:
+	//
+	// The OLE service file mapping already exists
+	//
+	public static final int CO_E_INIT_SCM_FILE_MAPPING_EXISTS = 0x8000400F;
+
+	//
+	// MessageId: CO_E_INIT_SCM_MAP_VIEW_OF_FILE
+	//
+	// MessageText:
+	//
+	// Unable to map view of file for OLE service
+	//
+	public static final int CO_E_INIT_SCM_MAP_VIEW_OF_FILE = 0x80004010;
+
+	//
+	// MessageId: CO_E_INIT_SCM_EXEC_FAILURE
+	//
+	// MessageText:
+	//
+	// Failure attempting to launch OLE service
+	//
+	public static final int CO_E_INIT_SCM_EXEC_FAILURE = 0x80004011;
+
+	//
+	// MessageId: CO_E_INIT_ONLY_SINGLE_THREADED
+	//
+	// MessageText:
+	//
+	// There was an attempt to call CoInitialize a second time while single
+	// threaded
+	//
+	public static final int CO_E_INIT_ONLY_SINGLE_THREADED = 0x80004012;
+
+	//
+	// MessageId: CO_E_CANT_REMOTE
+	//
+	// MessageText:
+	//
+	// A Remote activation was necessary but was not allowed
+	//
+	public static final int CO_E_CANT_REMOTE = 0x80004013;
+
+	//
+	// MessageId: CO_E_BAD_SERVER_NAME
+	//
+	// MessageText:
+	//
+	// A Remote activation was necessary but the server name provided was
+	// invalid
+	//
+	public static final int CO_E_BAD_SERVER_NAME = 0x80004014;
+
+	//
+	// MessageId: CO_E_WRONG_SERVER_IDENTITY
+	//
+	// MessageText:
+	//
+	// The class is configured to run as a security id different from the caller
+	//
+	public static final int CO_E_WRONG_SERVER_IDENTITY = 0x80004015;
+
+	//
+	// MessageId: CO_E_OLE1DDE_DISABLED
+	//
+	// MessageText:
+	//
+	// Use of Ole1 services requiring DDE windows is disabled
+	//
+	public static final int CO_E_OLE1DDE_DISABLED = 0x80004016;
+
+	//
+	// MessageId: CO_E_RUNAS_SYNTAX
+	//
+	// MessageText:
+	//
+	// A RunAs specification must be <domain name>\<user name> or simply <user
+	// name>
+	//
+	public static final int CO_E_RUNAS_SYNTAX = 0x80004017;
+
+	//
+	// MessageId: CO_E_CREATEPROCESS_FAILURE
+	//
+	// MessageText:
+	//
+	// The server process could not be started. The pathname may be incorrect.
+	//
+	public static final int CO_E_CREATEPROCESS_FAILURE = 0x80004018;
+
+	//
+	// MessageId: CO_E_RUNAS_CREATEPROCESS_FAILURE
+	//
+	// MessageText:
+	//
+	// The server process could not be started as the configured identity. The
+	// pathname may be incorrect or unavailable.
+	//
+	public static final int CO_E_RUNAS_CREATEPROCESS_FAILURE = 0x80004019;
+
+	//
+	// MessageId: CO_E_RUNAS_LOGON_FAILURE
+	//
+	// MessageText:
+	//
+	// The server process could not be started because the configured identity
+	// is incorrect. Check the username and password.
+	//
+	public static final int CO_E_RUNAS_LOGON_FAILURE = 0x8000401A;
+
+	//
+	// MessageId: CO_E_LAUNCH_PERMSSION_DENIED
+	//
+	// MessageText:
+	//
+	// The client is not allowed to launch this server.
+	//
+	public static final int CO_E_LAUNCH_PERMSSION_DENIED = 0x8000401B;
+
+	//
+	// MessageId: CO_E_START_SERVICE_FAILURE
+	//
+	// MessageText:
+	//
+	// The service providing this server could not be started.
+	//
+	public static final int CO_E_START_SERVICE_FAILURE = 0x8000401C;
+
+	//
+	// MessageId: CO_E_REMOTE_COMMUNICATION_FAILURE
+	//
+	// MessageText:
+	//
+	// This computer was unable to communicate with the computer providing the
+	// server.
+	//
+	public static final int CO_E_REMOTE_COMMUNICATION_FAILURE = 0x8000401D;
+
+	//
+	// MessageId: CO_E_SERVER_START_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The server did not respond after being launched.
+	//
+	public static final int CO_E_SERVER_START_TIMEOUT = 0x8000401E;
+
+	//
+	// MessageId: CO_E_CLSREG_INCONSISTENT
+	//
+	// MessageText:
+	//
+	// The registration information for this server is inconsistent or
+	// incomplete.
+	//
+	public static final int CO_E_CLSREG_INCONSISTENT = 0x8000401F;
+
+	//
+	// MessageId: CO_E_IIDREG_INCONSISTENT
+	//
+	// MessageText:
+	//
+	// The registration information for this interface is inconsistent or
+	// incomplete.
+	//
+	public static final int CO_E_IIDREG_INCONSISTENT = 0x80004020;
+
+	//
+	// MessageId: CO_E_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The operation attempted is not supported.
+	//
+	public static final int CO_E_NOT_SUPPORTED = 0x80004021;
+
+	//
+	// MessageId: CO_E_RELOAD_DLL
+	//
+	// MessageText:
+	//
+	// A dll must be loaded.
+	//
+	public static final int CO_E_RELOAD_DLL = 0x80004022;
+
+	//
+	// MessageId: CO_E_MSI_ERROR
+	//
+	// MessageText:
+	//
+	// A Microsoft Software Installer error was encountered.
+	//
+	public static final int CO_E_MSI_ERROR = 0x80004023;
+
+	//
+	// MessageId: CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT
+	//
+	// MessageText:
+	//
+	// The specified activation could not occur in the client context as
+	// specified.
+	//
+	public static final int CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT = 0x80004024;
+
+	//
+	// MessageId: CO_E_SERVER_PAUSED
+	//
+	// MessageText:
+	//
+	// Activations on the server are paused.
+	//
+	public static final int CO_E_SERVER_PAUSED = 0x80004025;
+
+	//
+	// MessageId: CO_E_SERVER_NOT_PAUSED
+	//
+	// MessageText:
+	//
+	// Activations on the server are not paused.
+	//
+	public static final int CO_E_SERVER_NOT_PAUSED = 0x80004026;
+
+	//
+	// MessageId: CO_E_CLASS_DISABLED
+	//
+	// MessageText:
+	//
+	// The component or application containing the component has been disabled.
+	//
+	public static final int CO_E_CLASS_DISABLED = 0x80004027;
+
+	//
+	// MessageId: CO_E_CLRNOTAVAILABLE
+	//
+	// MessageText:
+	//
+	// The common language runtime is not available
+	//
+	public static final int CO_E_CLRNOTAVAILABLE = 0x80004028;
+
+	//
+	// MessageId: CO_E_ASYNC_WORK_REJECTED
+	//
+	// MessageText:
+	//
+	// The thread-pool rejected the submitted asynchronous work.
+	//
+	public static final int CO_E_ASYNC_WORK_REJECTED = 0x80004029;
+
+	//
+	// MessageId: CO_E_SERVER_INIT_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The server started, but did not finish initializing in a timely fashion.
+	//
+	public static final int CO_E_SERVER_INIT_TIMEOUT = 0x8000402A;
+
+	//
+	// MessageId: CO_E_NO_SECCTX_IN_ACTIVATE
+	//
+	// MessageText:
+	//
+	// Unable to complete the call since there is no COM+ security context
+	// inside IObjectControl.Activate.
+	//
+	public static final int CO_E_NO_SECCTX_IN_ACTIVATE = 0x8000402B;
+
+	//
+	// MessageId: CO_E_TRACKER_CONFIG
+	//
+	// MessageText:
+	//
+	// The provided tracker configuration is invalid
+	//
+	public static final int CO_E_TRACKER_CONFIG = 0x80004030;
+
+	//
+	// MessageId: CO_E_THREADPOOL_CONFIG
+	//
+	// MessageText:
+	//
+	// The provided thread pool configuration is invalid
+	//
+	public static final int CO_E_THREADPOOL_CONFIG = 0x80004031;
+
+	//
+	// MessageId: CO_E_SXS_CONFIG
+	//
+	// MessageText:
+	//
+	// The provided side-by-side configuration is invalid
+	//
+	public static final int CO_E_SXS_CONFIG = 0x80004032;
+
+	//
+	// MessageId: CO_E_MALFORMED_SPN
+	//
+	// MessageText:
+	//
+	// The server principal name (SPN) obtained during security negotiation is
+	// malformed.
+	//
+	public static final int CO_E_MALFORMED_SPN = 0x80004033;
+
+	//
+	// Success codes
+	//
+	public static final HRESULT S_OK = new HRESULT(0);
+	public static final HRESULT S_FALSE = new HRESULT(1);
+
+	// ******************
+	// FACILITY_ITF
+	// ******************
+
+	//
+	// Codes 0x0-0x01ff are reserved for the OLE group of
+	// interfaces.
+	//
+
+	//
+	// Generic OLE errors that may be returned by many inerfaces
+	//
+
+	public static final int OLE_E_FIRST = 0x80040000;
+	public static final int OLE_E_LAST = 0x800400FF;
+	public static final int OLE_S_FIRST = 0x00040000;
+	public static final int OLE_S_LAST = 0x000400FF;
+
+	//
+	// Old OLE errors
+	//
+	//
+	// MessageId: OLE_E_OLEVERB
+	//
+	// MessageText:
+	//
+	// Invalid OLEVERB structure
+	//
+	public static final int OLE_E_OLEVERB = 0x80040000;
+
+	//
+	// MessageId: OLE_E_ADVF
+	//
+	// MessageText:
+	//
+	// Invalid advise flags
+	//
+	public static final int OLE_E_ADVF = 0x80040001;
+
+	//
+	// MessageId: OLE_E_ENUM_NOMORE
+	//
+	// MessageText:
+	//
+	// Can't enumerate any more, because the associated data is missing
+	//
+	public static final int OLE_E_ENUM_NOMORE = 0x80040002;
+
+	//
+	// MessageId: OLE_E_ADVISENOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// This implementation doesn't take advises
+	//
+	public static final int OLE_E_ADVISENOTSUPPORTED = 0x80040003;
+
+	//
+	// MessageId: OLE_E_NOCONNECTION
+	//
+	// MessageText:
+	//
+	// There is no connection for this connection ID
+	//
+	public static final int OLE_E_NOCONNECTION = 0x80040004;
+
+	//
+	// MessageId: OLE_E_NOTRUNNING
+	//
+	// MessageText:
+	//
+	// Need to run the object to perform this operation
+	//
+	public static final int OLE_E_NOTRUNNING = 0x80040005;
+
+	//
+	// MessageId: OLE_E_NOCACHE
+	//
+	// MessageText:
+	//
+	// There is no cache to operate on
+	//
+	public static final int OLE_E_NOCACHE = 0x80040006;
+
+	//
+	// MessageId: OLE_E_BLANK
+	//
+	// MessageText:
+	//
+	// Uninitialized object
+	//
+	public static final int OLE_E_BLANK = 0x80040007;
+
+	//
+	// MessageId: OLE_E_CLASSDIFF
+	//
+	// MessageText:
+	//
+	// Linked object's source class has changed
+	//
+	public static final int OLE_E_CLASSDIFF = 0x80040008;
+
+	//
+	// MessageId: OLE_E_CANT_GETMONIKER
+	//
+	// MessageText:
+	//
+	// Not able to get the moniker of the object
+	//
+	public static final int OLE_E_CANT_GETMONIKER = 0x80040009;
+
+	//
+	// MessageId: OLE_E_CANT_BINDTOSOURCE
+	//
+	// MessageText:
+	//
+	// Not able to bind to the source
+	//
+	public static final int OLE_E_CANT_BINDTOSOURCE = 0x8004000A;
+
+	//
+	// MessageId: OLE_E_STATIC
+	//
+	// MessageText:
+	//
+	// Object is static; operation not allowed
+	//
+	public static final int OLE_E_STATIC = 0x8004000B;
+
+	//
+	// MessageId: OLE_E_PROMPTSAVECANCELLED
+	//
+	// MessageText:
+	//
+	// User canceled out of save dialog
+	//
+	public static final int OLE_E_PROMPTSAVECANCELLED = 0x8004000C;
+
+	//
+	// MessageId: OLE_E_INVALIDRECT
+	//
+	// MessageText:
+	//
+	// Invalid rectangle
+	//
+	public static final int OLE_E_INVALIDRECT = 0x8004000D;
+
+	//
+	// MessageId: OLE_E_WRONGCOMPOBJ
+	//
+	// MessageText:
+	//
+	// compobj.dll is too old for the ole2.dll initialized
+	//
+	public static final int OLE_E_WRONGCOMPOBJ = 0x8004000E;
+
+	//
+	// MessageId: OLE_E_INVALIDHWND
+	//
+	// MessageText:
+	//
+	// Invalid window handle
+	//
+	public static final int OLE_E_INVALIDHWND = 0x8004000F;
+
+	//
+	// MessageId: OLE_E_NOT_INPLACEACTIVE
+	//
+	// MessageText:
+	//
+	// Object is not in any of the inplace active states
+	//
+	public static final int OLE_E_NOT_INPLACEACTIVE = 0x80040010;
+
+	//
+	// MessageId: OLE_E_CANTCONVERT
+	//
+	// MessageText:
+	//
+	// Not able to convert object
+	//
+	public static final int OLE_E_CANTCONVERT = 0x80040011;
+
+	//
+	// MessageId: OLE_E_NOSTORAGE
+	//
+	// MessageText:
+	//
+	// Not able to perform the operation because object is not given storage yet
+	//
+	public static final int OLE_E_NOSTORAGE = 0x80040012;
+
+	//
+	// MessageId: DV_E_FORMATETC
+	//
+	// MessageText:
+	//
+	// Invalid FORMATETC structure
+	//
+	public static final int DV_E_FORMATETC = 0x80040064;
+
+	//
+	// MessageId: DV_E_DVTARGETDEVICE
+	//
+	// MessageText:
+	//
+	// Invalid DVTARGETDEVICE structure
+	//
+	public static final int DV_E_DVTARGETDEVICE = 0x80040065;
+
+	//
+	// MessageId: DV_E_STGMEDIUM
+	//
+	// MessageText:
+	//
+	// Invalid STDGMEDIUM structure
+	//
+	public static final int DV_E_STGMEDIUM = 0x80040066;
+
+	//
+	// MessageId: DV_E_STATDATA
+	//
+	// MessageText:
+	//
+	// Invalid STATDATA structure
+	//
+	public static final int DV_E_STATDATA = 0x80040067;
+
+	//
+	// MessageId: DV_E_LINDEX
+	//
+	// MessageText:
+	//
+	// Invalid lindex
+	//
+	public static final int DV_E_LINDEX = 0x80040068;
+
+	//
+	// MessageId: DV_E_TYMED
+	//
+	// MessageText:
+	//
+	// Invalid tymed
+	//
+	public static final int DV_E_TYMED = 0x80040069;
+
+	//
+	// MessageId: DV_E_CLIPFORMAT
+	//
+	// MessageText:
+	//
+	// Invalid clipboard format
+	//
+	public static final int DV_E_CLIPFORMAT = 0x8004006A;
+
+	//
+	// MessageId: DV_E_DVASPECT
+	//
+	// MessageText:
+	//
+	// Invalid aspect(s)
+	//
+	public static final int DV_E_DVASPECT = 0x8004006B;
+
+	//
+	// MessageId: DV_E_DVTARGETDEVICE_SIZE
+	//
+	// MessageText:
+	//
+	// tdSize parameter of the DVTARGETDEVICE structure is invalid
+	//
+	public static final int DV_E_DVTARGETDEVICE_SIZE = 0x8004006C;
+
+	//
+	// MessageId: DV_E_NOIVIEWOBJECT
+	//
+	// MessageText:
+	//
+	// Object doesn't support IViewObject interface
+	//
+	public static final int DV_E_NOIVIEWOBJECT = 0x8004006D;
+
+	public static final int DRAGDROP_E_FIRST = 0x80040100;
+	public static final int DRAGDROP_E_LAST = 0x8004010F;
+	public static final int DRAGDROP_S_FIRST = 0x00040100;
+	public static final int DRAGDROP_S_LAST = 0x0004010F;
+	//
+	// MessageId: DRAGDROP_E_NOTREGISTERED
+	//
+	// MessageText:
+	//
+	// Trying to revoke a drop target that has not been registered
+	//
+	public static final int DRAGDROP_E_NOTREGISTERED = 0x80040100;
+
+	//
+	// MessageId: DRAGDROP_E_ALREADYREGISTERED
+	//
+	// MessageText:
+	//
+	// This window has already been registered as a drop target
+	//
+	public static final int DRAGDROP_E_ALREADYREGISTERED = 0x80040101;
+
+	//
+	// MessageId: DRAGDROP_E_INVALIDHWND
+	//
+	// MessageText:
+	//
+	// Invalid window handle
+	//
+	public static final int DRAGDROP_E_INVALIDHWND = 0x80040102;
+
+	public static final int CLASSFACTORY_E_FIRST = 0x80040110;
+	public static final int CLASSFACTORY_E_LAST = 0x8004011F;
+	public static final int CLASSFACTORY_S_FIRST = 0x00040110;
+	public static final int CLASSFACTORY_S_LAST = 0x0004011F;
+	//
+	// MessageId: CLASS_E_NOAGGREGATION
+	//
+	// MessageText:
+	//
+	// Class does not support aggregation (or class object is remote)
+	//
+	public static final int CLASS_E_NOAGGREGATION = 0x80040110;
+
+	//
+	// MessageId: CLASS_E_CLASSNOTAVAILABLE
+	//
+	// MessageText:
+	//
+	// ClassFactory cannot supply requested class
+	//
+	public static final int CLASS_E_CLASSNOTAVAILABLE = 0x80040111;
+
+	//
+	// MessageId: CLASS_E_NOTLICENSED
+	//
+	// MessageText:
+	//
+	// Class is not licensed for use
+	//
+	public static final int CLASS_E_NOTLICENSED = 0x80040112;
+
+	public static final int MARSHAL_E_FIRST = 0x80040120;
+	public static final int MARSHAL_E_LAST = 0x8004012F;
+	public static final int MARSHAL_S_FIRST = 0x00040120;
+	public static final int MARSHAL_S_LAST = 0x0004012F;
+	public static final int DATA_E_FIRST = 0x80040130;
+	public static final int DATA_E_LAST = 0x8004013F;
+	public static final int DATA_S_FIRST = 0x00040130;
+	public static final int DATA_S_LAST = 0x0004013F;
+	public static final int VIEW_E_FIRST = 0x80040140;
+	public static final int VIEW_E_LAST = 0x8004014F;
+	public static final int VIEW_S_FIRST = 0x00040140;
+	public static final int VIEW_S_LAST = 0x0004014F;
+	//
+	// MessageId: VIEW_E_DRAW
+	//
+	// MessageText:
+	//
+	// Error drawing view
+	//
+	public static final int VIEW_E_DRAW = 0x80040140;
+
+	public static final int REGDB_E_FIRST = 0x80040150;
+	public static final int REGDB_E_LAST = 0x8004015F;
+	public static final int REGDB_S_FIRST = 0x00040150;
+	public static final int REGDB_S_LAST = 0x0004015F;
+	//
+	// MessageId: REGDB_E_READREGDB
+	//
+	// MessageText:
+	//
+	// Could not read key from registry
+	//
+	public static final int REGDB_E_READREGDB = 0x80040150;
+
+	//
+	// MessageId: REGDB_E_WRITEREGDB
+	//
+	// MessageText:
+	//
+	// Could not write key to registry
+	//
+	public static final int REGDB_E_WRITEREGDB = 0x80040151;
+
+	//
+	// MessageId: REGDB_E_KEYMISSING
+	//
+	// MessageText:
+	//
+	// Could not find the key in the registry
+	//
+	public static final int REGDB_E_KEYMISSING = 0x80040152;
+
+	//
+	// MessageId: REGDB_E_INVALIDVALUE
+	//
+	// MessageText:
+	//
+	// Invalid value for registry
+	//
+	public static final int REGDB_E_INVALIDVALUE = 0x80040153;
+
+	//
+	// MessageId: REGDB_E_CLASSNOTREG
+	//
+	// MessageText:
+	//
+	// Class not registered
+	//
+	public static final int REGDB_E_CLASSNOTREG = 0x80040154;
+
+	//
+	// MessageId: REGDB_E_IIDNOTREG
+	//
+	// MessageText:
+	//
+	// Interface not registered
+	//
+	public static final int REGDB_E_IIDNOTREG = 0x80040155;
+
+	//
+	// MessageId: REGDB_E_BADTHREADINGMODEL
+	//
+	// MessageText:
+	//
+	// Threading model entry is not valid
+	//
+	public static final int REGDB_E_BADTHREADINGMODEL = 0x80040156;
+
+	public static final int CAT_E_FIRST = 0x80040160;
+	public static final int CAT_E_LAST = 0x80040161;
+	//
+	// MessageId: CAT_E_CATIDNOEXIST
+	//
+	// MessageText:
+	//
+	// CATID does not exist
+	//
+	public static final int CAT_E_CATIDNOEXIST = 0x80040160;
+
+	//
+	// MessageId: CAT_E_NODESCRIPTION
+	//
+	// MessageText:
+	//
+	// Description not found
+	//
+	public static final int CAT_E_NODESCRIPTION = 0x80040161;
+
+	// //////////////////////////////////
+	// =//
+	// Class Store Error Codes //
+	// =//
+	// //////////////////////////////////
+	public static final int CS_E_FIRST = 0x80040164;
+	public static final int CS_E_LAST = 0x8004016F;
+	//
+	// MessageId: CS_E_PACKAGE_NOTFOUND
+	//
+	// MessageText:
+	//
+	// No package in the software installation data in the Active Directory
+	// meets this criteria.
+	//
+	public static final int CS_E_PACKAGE_NOTFOUND = 0x80040164;
+
+	//
+	// MessageId: CS_E_NOT_DELETABLE
+	//
+	// MessageText:
+	//
+	// Deleting this will break the referential integrity of the software
+	// installation data in the Active Directory.
+	//
+	public static final int CS_E_NOT_DELETABLE = 0x80040165;
+
+	//
+	// MessageId: CS_E_CLASS_NOTFOUND
+	//
+	// MessageText:
+	//
+	// The CLSID was not found in the software installation data in the Active
+	// Directory.
+	//
+	public static final int CS_E_CLASS_NOTFOUND = 0x80040166;
+
+	//
+	// MessageId: CS_E_INVALID_VERSION
+	//
+	// MessageText:
+	//
+	// The software installation data in the Active Directory is corrupt.
+	//
+	public static final int CS_E_INVALID_VERSION = 0x80040167;
+
+	//
+	// MessageId: CS_E_NO_CLASSSTORE
+	//
+	// MessageText:
+	//
+	// There is no software installation data in the Active Directory.
+	//
+	public static final int CS_E_NO_CLASSSTORE = 0x80040168;
+
+	//
+	// MessageId: CS_E_OBJECT_NOTFOUND
+	//
+	// MessageText:
+	//
+	// There is no software installation data object in the Active Directory.
+	//
+	public static final int CS_E_OBJECT_NOTFOUND = 0x80040169;
+
+	//
+	// MessageId: CS_E_OBJECT_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The software installation data object in the Active Directory already
+	// exists.
+	//
+	public static final int CS_E_OBJECT_ALREADY_EXISTS = 0x8004016A;
+
+	//
+	// MessageId: CS_E_INVALID_PATH
+	//
+	// MessageText:
+	//
+	// The path to the software installation data in the Active Directory is not
+	// correct.
+	//
+	public static final int CS_E_INVALID_PATH = 0x8004016B;
+
+	//
+	// MessageId: CS_E_NETWORK_ERROR
+	//
+	// MessageText:
+	//
+	// A network error interrupted the operation.
+	//
+	public static final int CS_E_NETWORK_ERROR = 0x8004016C;
+
+	//
+	// MessageId: CS_E_ADMIN_LIMIT_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The size of this object exceeds the maximum size set by the
+	// Administrator.
+	//
+	public static final int CS_E_ADMIN_LIMIT_EXCEEDED = 0x8004016D;
+
+	//
+	// MessageId: CS_E_SCHEMA_MISMATCH
+	//
+	// MessageText:
+	//
+	// The schema for the software installation data in the Active Directory
+	// does not match the required schema.
+	//
+	public static final int CS_E_SCHEMA_MISMATCH = 0x8004016E;
+
+	//
+	// MessageId: CS_E_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred in the software installation data in the Active
+	// Directory.
+	//
+	public static final int CS_E_INTERNAL_ERROR = 0x8004016F;
+
+	public static final int CACHE_E_FIRST = 0x80040170;
+	public static final int CACHE_E_LAST = 0x8004017F;
+	public static final int CACHE_S_FIRST = 0x00040170;
+	public static final int CACHE_S_LAST = 0x0004017F;
+	//
+	// MessageId: CACHE_E_NOCACHE_UPDATED
+	//
+	// MessageText:
+	//
+	// Cache not updated
+	//
+	public static final int CACHE_E_NOCACHE_UPDATED = 0x80040170;
+
+	public static final int OLEOBJ_E_FIRST = 0x80040180;
+	public static final int OLEOBJ_E_LAST = 0x8004018F;
+	public static final int OLEOBJ_S_FIRST = 0x00040180;
+	public static final int OLEOBJ_S_LAST = 0x0004018F;
+	//
+	// MessageId: OLEOBJ_E_NOVERBS
+	//
+	// MessageText:
+	//
+	// No verbs for OLE object
+	//
+	public static final int OLEOBJ_E_NOVERBS = 0x80040180;
+
+	//
+	// MessageId: OLEOBJ_E_INVALIDVERB
+	//
+	// MessageText:
+	//
+	// Invalid verb for OLE object
+	//
+	public static final int OLEOBJ_E_INVALIDVERB = 0x80040181;
+
+	public static final int CLIENTSITE_E_FIRST = 0x80040190;
+	public static final int CLIENTSITE_E_LAST = 0x8004019F;
+	public static final int CLIENTSITE_S_FIRST = 0x00040190;
+	public static final int CLIENTSITE_S_LAST = 0x0004019F;
+	//
+	// MessageId: INPLACE_E_NOTUNDOABLE
+	//
+	// MessageText:
+	//
+	// Undo is not available
+	//
+	public static final int INPLACE_E_NOTUNDOABLE = 0x800401A0;
+
+	//
+	// MessageId: INPLACE_E_NOTOOLSPACE
+	//
+	// MessageText:
+	//
+	// Space for tools is not available
+	//
+	public static final int INPLACE_E_NOTOOLSPACE = 0x800401A1;
+
+	public static final int INPLACE_E_FIRST = 0x800401A0;
+	public static final int INPLACE_E_LAST = 0x800401AF;
+	public static final int INPLACE_S_FIRST = 0x000401A0;
+	public static final int INPLACE_S_LAST = 0x000401AF;
+	public static final int ENUM_E_FIRST = 0x800401B0;
+	public static final int ENUM_E_LAST = 0x800401BF;
+	public static final int ENUM_S_FIRST = 0x000401B0;
+	public static final int ENUM_S_LAST = 0x000401BF;
+	public static final int CONVERT10_E_FIRST = 0x800401C0;
+	public static final int CONVERT10_E_LAST = 0x800401CF;
+	public static final int CONVERT10_S_FIRST = 0x000401C0;
+	public static final int CONVERT10_S_LAST = 0x000401CF;
+	//
+	// MessageId: CONVERT10_E_OLESTREAM_GET
+	//
+	// MessageText:
+	//
+	// OLESTREAM Get method failed
+	//
+	public static final int CONVERT10_E_OLESTREAM_GET = 0x800401C0;
+
+	//
+	// MessageId: CONVERT10_E_OLESTREAM_PUT
+	//
+	// MessageText:
+	//
+	// OLESTREAM Put method failed
+	//
+	public static final int CONVERT10_E_OLESTREAM_PUT = 0x800401C1;
+
+	//
+	// MessageId: CONVERT10_E_OLESTREAM_FMT
+	//
+	// MessageText:
+	//
+	// Contents of the OLESTREAM not in correct format
+	//
+	public static final int CONVERT10_E_OLESTREAM_FMT = 0x800401C2;
+
+	//
+	// MessageId: CONVERT10_E_OLESTREAM_BITMAP_TO_DIB
+	//
+	// MessageText:
+	//
+	// There was an error in a Windows GDI call while converting the bitmap to a
+	// DIB
+	//
+	public static final int CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = 0x800401C3;
+
+	//
+	// MessageId: CONVERT10_E_STG_FMT
+	//
+	// MessageText:
+	//
+	// Contents of the IStorage not in correct format
+	//
+	public static final int CONVERT10_E_STG_FMT = 0x800401C4;
+
+	//
+	// MessageId: CONVERT10_E_STG_NO_STD_STREAM
+	//
+	// MessageText:
+	//
+	// Contents of IStorage is missing one of the standard streams
+	//
+	public static final int CONVERT10_E_STG_NO_STD_STREAM = 0x800401C5;
+
+	//
+	// MessageId: CONVERT10_E_STG_DIB_TO_BITMAP
+	//
+	// MessageText:
+	//
+	// There was an error in a Windows GDI call while converting the DIB to a
+	// bitmap.
+	// 
+	//
+	public static final int CONVERT10_E_STG_DIB_TO_BITMAP = 0x800401C6;
+
+	public static final int CLIPBRD_E_FIRST = 0x800401D0;
+	public static final int CLIPBRD_E_LAST = 0x800401DF;
+	public static final int CLIPBRD_S_FIRST = 0x000401D0;
+	public static final int CLIPBRD_S_LAST = 0x000401DF;
+	//
+	// MessageId: CLIPBRD_E_CANT_OPEN
+	//
+	// MessageText:
+	//
+	// OpenClipboard Failed
+	//
+	public static final int CLIPBRD_E_CANT_OPEN = 0x800401D0;
+
+	//
+	// MessageId: CLIPBRD_E_CANT_EMPTY
+	//
+	// MessageText:
+	//
+	// EmptyClipboard Failed
+	//
+	public static final int CLIPBRD_E_CANT_EMPTY = 0x800401D1;
+
+	//
+	// MessageId: CLIPBRD_E_CANT_SET
+	//
+	// MessageText:
+	//
+	// SetClipboard Failed
+	//
+	public static final int CLIPBRD_E_CANT_SET = 0x800401D2;
+
+	//
+	// MessageId: CLIPBRD_E_BAD_DATA
+	//
+	// MessageText:
+	//
+	// Data on clipboard is invalid
+	//
+	public static final int CLIPBRD_E_BAD_DATA = 0x800401D3;
+
+	//
+	// MessageId: CLIPBRD_E_CANT_CLOSE
+	//
+	// MessageText:
+	//
+	// CloseClipboard Failed
+	//
+	public static final int CLIPBRD_E_CANT_CLOSE = 0x800401D4;
+
+	public static final int MK_E_FIRST = 0x800401E0;
+	public static final int MK_E_LAST = 0x800401EF;
+	public static final int MK_S_FIRST = 0x000401E0;
+	public static final int MK_S_LAST = 0x000401EF;
+	//
+	// MessageId: MK_E_CONNECTMANUALLY
+	//
+	// MessageText:
+	//
+	// Moniker needs to be connected manually
+	//
+	public static final int MK_E_CONNECTMANUALLY = 0x800401E0;
+
+	//
+	// MessageId: MK_E_EXCEEDEDDEADLINE
+	//
+	// MessageText:
+	//
+	// Operation exceeded deadline
+	//
+	public static final int MK_E_EXCEEDEDDEADLINE = 0x800401E1;
+
+	//
+	// MessageId: MK_E_NEEDGENERIC
+	//
+	// MessageText:
+	//
+	// Moniker needs to be generic
+	//
+	public static final int MK_E_NEEDGENERIC = 0x800401E2;
+
+	//
+	// MessageId: MK_E_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// Operation unavailable
+	//
+	public static final int MK_E_UNAVAILABLE = 0x800401E3;
+
+	//
+	// MessageId: MK_E_SYNTAX
+	//
+	// MessageText:
+	//
+	// Invalid syntax
+	//
+	public static final int MK_E_SYNTAX = 0x800401E4;
+
+	//
+	// MessageId: MK_E_NOOBJECT
+	//
+	// MessageText:
+	//
+	// No object for moniker
+	//
+	public static final int MK_E_NOOBJECT = 0x800401E5;
+
+	//
+	// MessageId: MK_E_INVALIDEXTENSION
+	//
+	// MessageText:
+	//
+	// Bad extension for file
+	//
+	public static final int MK_E_INVALIDEXTENSION = 0x800401E6;
+
+	//
+	// MessageId: MK_E_INTERMEDIATEINTERFACENOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// Intermediate operation failed
+	//
+	public static final int MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = 0x800401E7;
+
+	//
+	// MessageId: MK_E_NOTBINDABLE
+	//
+	// MessageText:
+	//
+	// Moniker is not bindable
+	//
+	public static final int MK_E_NOTBINDABLE = 0x800401E8;
+
+	//
+	// MessageId: MK_E_NOTBOUND
+	//
+	// MessageText:
+	//
+	// Moniker is not bound
+	//
+	public static final int MK_E_NOTBOUND = 0x800401E9;
+
+	//
+	// MessageId: MK_E_CANTOPENFILE
+	//
+	// MessageText:
+	//
+	// Moniker cannot open file
+	//
+	public static final int MK_E_CANTOPENFILE = 0x800401EA;
+
+	//
+	// MessageId: MK_E_MUSTBOTHERUSER
+	//
+	// MessageText:
+	//
+	// User input required for operation to succeed
+	//
+	public static final int MK_E_MUSTBOTHERUSER = 0x800401EB;
+
+	//
+	// MessageId: MK_E_NOINVERSE
+	//
+	// MessageText:
+	//
+	// Moniker class has no inverse
+	//
+	public static final int MK_E_NOINVERSE = 0x800401EC;
+
+	//
+	// MessageId: MK_E_NOSTORAGE
+	//
+	// MessageText:
+	//
+	// Moniker does not refer to storage
+	//
+	public static final int MK_E_NOSTORAGE = 0x800401ED;
+
+	//
+	// MessageId: MK_E_NOPREFIX
+	//
+	// MessageText:
+	//
+	// No common prefix
+	//
+	public static final int MK_E_NOPREFIX = 0x800401EE;
+
+	//
+	// MessageId: MK_E_ENUMERATION_FAILED
+	//
+	// MessageText:
+	//
+	// Moniker could not be enumerated
+	//
+	public static final int MK_E_ENUMERATION_FAILED = 0x800401EF;
+
+	public static final int CO_E_FIRST = 0x800401F0;
+	public static final int CO_E_LAST = 0x800401FF;
+	public static final int CO_S_FIRST = 0x000401F0;
+	public static final int CO_S_LAST = 0x000401FF;
+	//
+	// MessageId: CO_E_NOTINITIALIZED
+	//
+	// MessageText:
+	//
+	// CoInitialize has not been called.
+	//
+	public static final int CO_E_NOTINITIALIZED = 0x800401F0;
+
+	//
+	// MessageId: CO_E_ALREADYINITIALIZED
+	//
+	// MessageText:
+	//
+	// CoInitialize has already been called.
+	//
+	public static final int CO_E_ALREADYINITIALIZED = 0x800401F1;
+
+	//
+	// MessageId: CO_E_CANTDETERMINECLASS
+	//
+	// MessageText:
+	//
+	// Class of object cannot be determined
+	//
+	public static final int CO_E_CANTDETERMINECLASS = 0x800401F2;
+
+	//
+	// MessageId: CO_E_CLASSSTRING
+	//
+	// MessageText:
+	//
+	// Invalid class string
+	//
+	public static final int CO_E_CLASSSTRING = 0x800401F3;
+
+	//
+	// MessageId: CO_E_IIDSTRING
+	//
+	// MessageText:
+	//
+	// Invalid interface string
+	//
+	public static final int CO_E_IIDSTRING = 0x800401F4;
+
+	//
+	// MessageId: CO_E_APPNOTFOUND
+	//
+	// MessageText:
+	//
+	// Application not found
+	//
+	public static final int CO_E_APPNOTFOUND = 0x800401F5;
+
+	//
+	// MessageId: CO_E_APPSINGLEUSE
+	//
+	// MessageText:
+	//
+	// Application cannot be run more than once
+	//
+	public static final int CO_E_APPSINGLEUSE = 0x800401F6;
+
+	//
+	// MessageId: CO_E_ERRORINAPP
+	//
+	// MessageText:
+	//
+	// Some error in application program
+	//
+	public static final int CO_E_ERRORINAPP = 0x800401F7;
+
+	//
+	// MessageId: CO_E_DLLNOTFOUND
+	//
+	// MessageText:
+	//
+	// DLL for class not found
+	//
+	public static final int CO_E_DLLNOTFOUND = 0x800401F8;
+
+	//
+	// MessageId: CO_E_ERRORINDLL
+	//
+	// MessageText:
+	//
+	// Error in the DLL
+	//
+	public static final int CO_E_ERRORINDLL = 0x800401F9;
+
+	//
+	// MessageId: CO_E_WRONGOSFORAPP
+	//
+	// MessageText:
+	//
+	// Wrong OS or OS version for application
+	//
+	public static final int CO_E_WRONGOSFORAPP = 0x800401FA;
+
+	//
+	// MessageId: CO_E_OBJNOTREG
+	//
+	// MessageText:
+	//
+	// Object is not registered
+	//
+	public static final int CO_E_OBJNOTREG = 0x800401FB;
+
+	//
+	// MessageId: CO_E_OBJISREG
+	//
+	// MessageText:
+	//
+	// Object is already registered
+	//
+	public static final int CO_E_OBJISREG = 0x800401FC;
+
+	//
+	// MessageId: CO_E_OBJNOTCONNECTED
+	//
+	// MessageText:
+	//
+	// Object is not connected to server
+	//
+	public static final int CO_E_OBJNOTCONNECTED = 0x800401FD;
+
+	//
+	// MessageId: CO_E_APPDIDNTREG
+	//
+	// MessageText:
+	//
+	// Application was launched but it didn't register a class factory
+	//
+	public static final int CO_E_APPDIDNTREG = 0x800401FE;
+
+	//
+	// MessageId: CO_E_RELEASED
+	//
+	// MessageText:
+	//
+	// Object has been released
+	//
+	public static final int CO_E_RELEASED = 0x800401FF;
+
+	public static final int EVENT_E_FIRST = 0x80040200;
+	public static final int EVENT_E_LAST = 0x8004021F;
+	public static final int EVENT_S_FIRST = 0x00040200;
+	public static final int EVENT_S_LAST = 0x0004021F;
+	//
+	// MessageId: EVENT_S_SOME_SUBSCRIBERS_FAILED
+	//
+	// MessageText:
+	//
+	// An event was able to invoke some but not all of the subscribers
+	//
+	public static final int EVENT_S_SOME_SUBSCRIBERS_FAILED = 0x00040200;
+
+	//
+	// MessageId: EVENT_E_ALL_SUBSCRIBERS_FAILED
+	//
+	// MessageText:
+	//
+	// An event was unable to invoke any of the subscribers
+	//
+	public static final int EVENT_E_ALL_SUBSCRIBERS_FAILED = 0x80040201;
+
+	//
+	// MessageId: EVENT_S_NOSUBSCRIBERS
+	//
+	// MessageText:
+	//
+	// An event was delivered but there were no subscribers
+	//
+	public static final int EVENT_S_NOSUBSCRIBERS = 0x00040202;
+
+	//
+	// MessageId: EVENT_E_QUERYSYNTAX
+	//
+	// MessageText:
+	//
+	// A syntax error occurred trying to evaluate a query string
+	//
+	public static final int EVENT_E_QUERYSYNTAX = 0x80040203;
+
+	//
+	// MessageId: EVENT_E_QUERYFIELD
+	//
+	// MessageText:
+	//
+	// An invalid field name was used in a query string
+	//
+	public static final int EVENT_E_QUERYFIELD = 0x80040204;
+
+	//
+	// MessageId: EVENT_E_INTERNALEXCEPTION
+	//
+	// MessageText:
+	//
+	// An unexpected exception was raised
+	//
+	public static final int EVENT_E_INTERNALEXCEPTION = 0x80040205;
+
+	//
+	// MessageId: EVENT_E_INTERNALERROR
+	//
+	// MessageText:
+	//
+	// An unexpected internal error was detected
+	//
+	public static final int EVENT_E_INTERNALERROR = 0x80040206;
+
+	//
+	// MessageId: EVENT_E_INVALID_PER_USER_SID
+	//
+	// MessageText:
+	//
+	// The owner SID on a per-user subscription doesn't exist
+	//
+	public static final int EVENT_E_INVALID_PER_USER_SID = 0x80040207;
+
+	//
+	// MessageId: EVENT_E_USER_EXCEPTION
+	//
+	// MessageText:
+	//
+	// A user-supplied component or subscriber raised an exception
+	//
+	public static final int EVENT_E_USER_EXCEPTION = 0x80040208;
+
+	//
+	// MessageId: EVENT_E_TOO_MANY_METHODS
+	//
+	// MessageText:
+	//
+	// An interface has too many methods to fire events from
+	//
+	public static final int EVENT_E_TOO_MANY_METHODS = 0x80040209;
+
+	//
+	// MessageId: EVENT_E_MISSING_EVENTCLASS
+	//
+	// MessageText:
+	//
+	// A subscription cannot be stored unless its event class already exists
+	//
+	public static final int EVENT_E_MISSING_EVENTCLASS = 0x8004020A;
+
+	//
+	// MessageId: EVENT_E_NOT_ALL_REMOVED
+	//
+	// MessageText:
+	//
+	// Not all the objects requested could be removed
+	//
+	public static final int EVENT_E_NOT_ALL_REMOVED = 0x8004020B;
+
+	//
+	// MessageId: EVENT_E_COMPLUS_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// COM+ is required for this operation, but is not installed
+	//
+	public static final int EVENT_E_COMPLUS_NOT_INSTALLED = 0x8004020C;
+
+	//
+	// MessageId: EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT
+	//
+	// MessageText:
+	//
+	// Cannot modify or delete an object that was not added using the COM+ Admin
+	// SDK
+	//
+	public static final int EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT = 0x8004020D;
+
+	//
+	// MessageId: EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT
+	//
+	// MessageText:
+	//
+	// Cannot modify or delete an object that was added using the COM+ Admin SDK
+	//
+	public static final int EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT = 0x8004020E;
+
+	//
+	// MessageId: EVENT_E_INVALID_EVENT_CLASS_PARTITION
+	//
+	// MessageText:
+	//
+	// The event class for this subscription is in an invalid partition
+	//
+	public static final int EVENT_E_INVALID_EVENT_CLASS_PARTITION = 0x8004020F;
+
+	//
+	// MessageId: EVENT_E_PER_USER_SID_NOT_LOGGED_ON
+	//
+	// MessageText:
+	//
+	// The owner of the PerUser subscription is not logged on to the system
+	// specified
+	//
+	public static final int EVENT_E_PER_USER_SID_NOT_LOGGED_ON = 0x80040210;
+
+	public static final int XACT_E_FIRST = 0x8004D000;
+	public static final int XACT_E_LAST = 0x8004D029;
+	public static final int XACT_S_FIRST = 0x0004D000;
+	public static final int XACT_S_LAST = 0x0004D010;
+	//
+	// MessageId: XACT_E_ALREADYOTHERSINGLEPHASE
+	//
+	// MessageText:
+	//
+	// Another single phase resource manager has already been enlisted in this
+	// transaction.
+	//
+	public static final int XACT_E_ALREADYOTHERSINGLEPHASE = 0x8004D000;
+
+	//
+	// MessageId: XACT_E_CANTRETAIN
+	//
+	// MessageText:
+	//
+	// A retaining commit or abort is not supported
+	//
+	public static final int XACT_E_CANTRETAIN = 0x8004D001;
+
+	//
+	// MessageId: XACT_E_COMMITFAILED
+	//
+	// MessageText:
+	//
+	// The transaction failed to commit for an unknown reason. The transaction
+	// was aborted.
+	//
+	public static final int XACT_E_COMMITFAILED = 0x8004D002;
+
+	//
+	// MessageId: XACT_E_COMMITPREVENTED
+	//
+	// MessageText:
+	//
+	// Cannot call commit on this transaction object because the calling
+	// application did not initiate the transaction.
+	//
+	public static final int XACT_E_COMMITPREVENTED = 0x8004D003;
+
+	//
+	// MessageId: XACT_E_HEURISTICABORT
+	//
+	// MessageText:
+	//
+	// Instead of committing, the resource heuristically aborted.
+	//
+	public static final int XACT_E_HEURISTICABORT = 0x8004D004;
+
+	//
+	// MessageId: XACT_E_HEURISTICCOMMIT
+	//
+	// MessageText:
+	//
+	// Instead of aborting, the resource heuristically committed.
+	//
+	public static final int XACT_E_HEURISTICCOMMIT = 0x8004D005;
+
+	//
+	// MessageId: XACT_E_HEURISTICDAMAGE
+	//
+	// MessageText:
+	//
+	// Some of the states of the resource were committed while others were
+	// aborted, likely because of heuristic decisions.
+	//
+	public static final int XACT_E_HEURISTICDAMAGE = 0x8004D006;
+
+	//
+	// MessageId: XACT_E_HEURISTICDANGER
+	//
+	// MessageText:
+	//
+	// Some of the states of the resource may have been committed while others
+	// may have been aborted, likely because of heuristic decisions.
+	//
+	public static final int XACT_E_HEURISTICDANGER = 0x8004D007;
+
+	//
+	// MessageId: XACT_E_ISOLATIONLEVEL
+	//
+	// MessageText:
+	//
+	// The requested isolation level is not valid or supported.
+	//
+	public static final int XACT_E_ISOLATIONLEVEL = 0x8004D008;
+
+	//
+	// MessageId: XACT_E_NOASYNC
+	//
+	// MessageText:
+	//
+	// The transaction manager doesn't support an asynchronous operation for
+	// this method.
+	//
+	public static final int XACT_E_NOASYNC = 0x8004D009;
+
+	//
+	// MessageId: XACT_E_NOENLIST
+	//
+	// MessageText:
+	//
+	// Unable to enlist in the transaction.
+	//
+	public static final int XACT_E_NOENLIST = 0x8004D00A;
+
+	//
+	// MessageId: XACT_E_NOISORETAIN
+	//
+	// MessageText:
+	//
+	// The requested semantics of retention of isolation across retaining commit
+	// and abort boundaries cannot be supported by this transaction
+	// implementation, or isoF;ags was not equal to zero.
+	//
+	public static final int XACT_E_NOISORETAIN = 0x8004D00B;
+
+	//
+	// MessageId: XACT_E_NORESOURCE
+	//
+	// MessageText:
+	//
+	// There is no resource presently associated with this enlistment
+	//
+	public static final int XACT_E_NORESOURCE = 0x8004D00C;
+
+	//
+	// MessageId: XACT_E_NOTCURRENT
+	//
+	// MessageText:
+	//
+	// The transaction failed to commit due to the failure of optimistic
+	// concurrency control in at least one of the resource managers.
+	//
+	public static final int XACT_E_NOTCURRENT = 0x8004D00D;
+
+	//
+	// MessageId: XACT_E_NOTRANSACTION
+	//
+	// MessageText:
+	//
+	// The transaction has already been implicitly or explicitly committed or
+	// aborted
+	//
+	public static final int XACT_E_NOTRANSACTION = 0x8004D00E;
+
+	//
+	// MessageId: XACT_E_NOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// An invalid combination of F;ags was specified
+	//
+	public static final int XACT_E_NOTSUPPORTED = 0x8004D00F;
+
+	//
+	// MessageId: XACT_E_UNKNOWNRMGRID
+	//
+	// MessageText:
+	//
+	// The resource manager id is not associated with this transaction or the
+	// transaction manager.
+	//
+	public static final int XACT_E_UNKNOWNRMGRID = 0x8004D010;
+
+	//
+	// MessageId: XACT_E_WRONGSTATE
+	//
+	// MessageText:
+	//
+	// This method was called in the wrong state
+	//
+	public static final int XACT_E_WRONGSTATE = 0x8004D011;
+
+	//
+	// MessageId: XACT_E_WRONGUOW
+	//
+	// MessageText:
+	//
+	// The indicated unit of work does not match the unit of work expected by
+	// the resource manager.
+	//
+	public static final int XACT_E_WRONGUOW = 0x8004D012;
+
+	//
+	// MessageId: XACT_E_XTIONEXISTS
+	//
+	// MessageText:
+	//
+	// An enlistment in a transaction already exists.
+	//
+	public static final int XACT_E_XTIONEXISTS = 0x8004D013;
+
+	//
+	// MessageId: XACT_E_NOIMPORTOBJECT
+	//
+	// MessageText:
+	//
+	// An import object for the transaction could not be found.
+	//
+	public static final int XACT_E_NOIMPORTOBJECT = 0x8004D014;
+
+	//
+	// MessageId: XACT_E_INVALIDCOOKIE
+	//
+	// MessageText:
+	//
+	// The transaction cookie is invalid.
+	//
+	public static final int XACT_E_INVALIDCOOKIE = 0x8004D015;
+
+	//
+	// MessageId: XACT_E_INDOUBT
+	//
+	// MessageText:
+	//
+	// The transaction status is in doubt. A communication failure occurred, or
+	// a transaction manager or resource manager has failed
+	//
+	public static final int XACT_E_INDOUBT = 0x8004D016;
+
+	//
+	// MessageId: XACT_E_NOTIMEOUT
+	//
+	// MessageText:
+	//
+	// A time-out was specified, but time-outs are not supported.
+	//
+	public static final int XACT_E_NOTIMEOUT = 0x8004D017;
+
+	//
+	// MessageId: XACT_E_ALREADYINPROGRESS
+	//
+	// MessageText:
+	//
+	// The requested operation is already in progress for the transaction.
+	//
+	public static final int XACT_E_ALREADYINPROGRESS = 0x8004D018;
+
+	//
+	// MessageId: XACT_E_ABORTED
+	//
+	// MessageText:
+	//
+	// The transaction has already been aborted.
+	//
+	public static final int XACT_E_ABORTED = 0x8004D019;
+
+	//
+	// MessageId: XACT_E_LOGFULL
+	//
+	// MessageText:
+	//
+	// The Transaction Manager returned a log full error.
+	//
+	public static final int XACT_E_LOGFULL = 0x8004D01A;
+
+	//
+	// MessageId: XACT_E_TMNOTAVAILABLE
+	//
+	// MessageText:
+	//
+	// The Transaction Manager is not available.
+	//
+	public static final int XACT_E_TMNOTAVAILABLE = 0x8004D01B;
+
+	//
+	// MessageId: XACT_E_CONNECTION_DOWN
+	//
+	// MessageText:
+	//
+	// A connection with the transaction manager was lost.
+	//
+	public static final int XACT_E_CONNECTION_DOWN = 0x8004D01C;
+
+	//
+	// MessageId: XACT_E_CONNECTION_DENIED
+	//
+	// MessageText:
+	//
+	// A request to establish a connection with the transaction manager was
+	// denied.
+	//
+	public static final int XACT_E_CONNECTION_DENIED = 0x8004D01D;
+
+	//
+	// MessageId: XACT_E_REENLISTTIMEOUT
+	//
+	// MessageText:
+	//
+	// Resource manager reenlistment to determine transaction status timed out.
+	//
+	public static final int XACT_E_REENLISTTIMEOUT = 0x8004D01E;
+
+	//
+	// MessageId: XACT_E_TIP_CONNECT_FAILED
+	//
+	// MessageText:
+	//
+	// This transaction manager failed to establish a connection with another
+	// TIP transaction manager.
+	//
+	public static final int XACT_E_TIP_CONNECT_FAILED = 0x8004D01F;
+
+	//
+	// MessageId: XACT_E_TIP_PROTOCOL_ERROR
+	//
+	// MessageText:
+	//
+	// This transaction manager encountered a protocol error with another TIP
+	// transaction manager.
+	//
+	public static final int XACT_E_TIP_PROTOCOL_ERROR = 0x8004D020;
+
+	//
+	// MessageId: XACT_E_TIP_PULL_FAILED
+	//
+	// MessageText:
+	//
+	// This transaction manager could not propagate a transaction from another
+	// TIP transaction manager.
+	//
+	public static final int XACT_E_TIP_PULL_FAILED = 0x8004D021;
+
+	//
+	// MessageId: XACT_E_DEST_TMNOTAVAILABLE
+	//
+	// MessageText:
+	//
+	// The Transaction Manager on the destination machine is not available.
+	//
+	public static final int XACT_E_DEST_TMNOTAVAILABLE = 0x8004D022;
+
+	//
+	// MessageId: XACT_E_TIP_DISABLED
+	//
+	// MessageText:
+	//
+	// The Transaction Manager has disabled its support for TIP.
+	//
+	public static final int XACT_E_TIP_DISABLED = 0x8004D023;
+
+	//
+	// MessageId: XACT_E_NETWORK_TX_DISABLED
+	//
+	// MessageText:
+	//
+	// The transaction manager has disabled its support for remote/network
+	// transactions.
+	//
+	public static final int XACT_E_NETWORK_TX_DISABLED = 0x8004D024;
+
+	//
+	// MessageId: XACT_E_PARTNER_NETWORK_TX_DISABLED
+	//
+	// MessageText:
+	//
+	// The partner transaction manager has disabled its support for
+	// remote/network transactions.
+	//
+	public static final int XACT_E_PARTNER_NETWORK_TX_DISABLED = 0x8004D025;
+
+	//
+	// MessageId: XACT_E_XA_TX_DISABLED
+	//
+	// MessageText:
+	//
+	// The transaction manager has disabled its support for XA transactions.
+	//
+	public static final int XACT_E_XA_TX_DISABLED = 0x8004D026;
+
+	//
+	// MessageId: XACT_E_UNABLE_TO_READ_DTC_CONFIG
+	//
+	// MessageText:
+	//
+	// MSDTC was unable to read its configuration information.
+	//
+	public static final int XACT_E_UNABLE_TO_READ_DTC_CONFIG = 0x8004D027;
+
+	//
+	// MessageId: XACT_E_UNABLE_TO_LOAD_DTC_PROXY
+	//
+	// MessageText:
+	//
+	// MSDTC was unable to load the dtc proxy dll.
+	//
+	public static final int XACT_E_UNABLE_TO_LOAD_DTC_PROXY = 0x8004D028;
+
+	//
+	// MessageId: XACT_E_ABORTING
+	//
+	// MessageText:
+	//
+	// The local transaction has aborted.
+	//
+	public static final int XACT_E_ABORTING = 0x8004D029;
+
+	//
+	// TXF & CRM errors start=4d080.
+	//
+	// MessageId: XACT_E_CLERKNOTFOUND
+	//
+	// MessageText:
+	//
+	// XACT_E_CLERKNOTFOUND
+	//
+	public static final int XACT_E_CLERKNOTFOUND = 0x8004D080;
+
+	//
+	// MessageId: XACT_E_CLERKEXISTS
+	//
+	// MessageText:
+	//
+	// XACT_E_CLERKEXISTS
+	//
+	public static final int XACT_E_CLERKEXISTS = 0x8004D081;
+
+	//
+	// MessageId: XACT_E_RECOVERYINPROGRESS
+	//
+	// MessageText:
+	//
+	// XACT_E_RECOVERYINPROGRESS
+	//
+	public static final int XACT_E_RECOVERYINPROGRESS = 0x8004D082;
+
+	//
+	// MessageId: XACT_E_TRANSACTIONCLOSED
+	//
+	// MessageText:
+	//
+	// XACT_E_TRANSACTIONCLOSED
+	//
+	public static final int XACT_E_TRANSACTIONCLOSED = 0x8004D083;
+
+	//
+	// MessageId: XACT_E_INVALIDLSN
+	//
+	// MessageText:
+	//
+	// XACT_E_INVALIDLSN
+	//
+	public static final int XACT_E_INVALIDLSN = 0x8004D084;
+
+	//
+	// MessageId: XACT_E_REPLAYREQUEST
+	//
+	// MessageText:
+	//
+	// XACT_E_REPLAYREQUEST
+	//
+	public static final int XACT_E_REPLAYREQUEST = 0x8004D085;
+
+	// Begin XACT_DTC_CONSTANTS enumerated values defined in txdtc.h
+
+	// SymbolicName=XACT_E_CONNECTION_REQUEST_DENIED
+	//
+	// MessageId: 0x8004D100; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The request to connect to the specified transaction coordinator was
+	// denied.
+	//
+
+	// SymbolicName=XACT_E_TOOMANY_ENLISTMENTS
+	//
+	// MessageId: 0x8004D101; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The maximum number of enlistments for the specified transaction has been
+	// reached.
+	//
+
+	// SymbolicName=XACT_E_DUPLICATE_GUID
+	//
+	// MessageId: 0x8004D102; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// A resource manager with the same identifier is already registered with
+	// the specified transaction coordinator.
+	//
+
+	// SymbolicName=XACT_E_NOTSINGLEPHASE
+	//
+	// MessageId: 0x8004D103; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The prepare request given was not eligible for single phase
+	// optimizations.
+	//
+
+	// SymbolicName=XACT_E_RECOVERYALREADYDONE
+	//
+	// MessageId: 0x8004D104; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// RecoveryComplete has already been called for the given resource manager.
+	//
+
+	// SymbolicName=XACT_E_PROTOCOL
+	//
+	// MessageId: 0x8004D105; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The interface call made was incorrect for the current state of the
+	// protocol.
+	//
+
+	// SymbolicName=XACT_E_RM_FAILURE
+	//
+	// MessageId: 0x8004D106; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// xa_open call failed for the XA resource.
+	//
+
+	// SymbolicName=XACT_E_RECOVERY_FAILED
+	//
+	// MessageId: 0x8004D107; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// xa_recover call failed for the XA resource.
+	//
+
+	// SymbolicName=XACT_E_LU_NOT_FOUND
+	//
+	// MessageId: 0x8004D108; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The Logical Unit of Work specified cannot be found.
+	//
+
+	// SymbolicName=XACT_E_DUPLICATE_LU
+	//
+	// MessageId: 0x8004D109; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The specified Logical Unit of Work already exists.
+	//
+
+	// SymbolicName=XACT_E_LU_NOT_CONNECTED
+	//
+	// MessageId: 0x8004D10AL (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// Subordinate creation failed. The specified Logical Unit of Work was not
+	// connected.
+	//
+
+	// SymbolicName=XACT_E_DUPLICATE_TRANSID
+	//
+	// MessageId: 0x8004D10BL (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// A transaction with the given identifier already exists.
+	//
+
+	// SymbolicName=XACT_E_LU_BUSY
+	//
+	// MessageId: 0x8004D10CL (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The resource is in use.
+	//
+
+	// SymbolicName=XACT_E_LU_NO_RECOVERY_PROCESS
+	//
+	// MessageId: 0x8004D10DL (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The LU Recovery process is down.
+	//
+
+	// SymbolicName=XACT_E_LU_DOWN
+	//
+	// MessageId: 0x8004D10EL (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The remote session was lost.
+	//
+
+	// SymbolicName=XACT_E_LU_RECOVERING
+	//
+	// MessageId: 0x8004D10F; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// The resource is currently recovering.
+	//
+
+	// SymbolicName=XACT_E_LU_RECOVERY_MISMATCH
+	//
+	// MessageId: 0x8004D110; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// There was a mismatch in driving recovery.
+	//
+
+	// SymbolicName=XACT_E_RM_UNAVAILABLE
+	//
+	// MessageId: 0x8004D111; (No symbolic name defined)
+	//
+	// MessageText:
+	//
+	// An error occurred with the XA resource.
+	//
+
+	// End XACT_DTC_CONSTANTS enumerated values defined in txdtc.h
+
+	//
+	// OleTx Success codes.
+	//
+	//
+	// MessageId: XACT_S_ASYNC
+	//
+	// MessageText:
+	//
+	// An asynchronous operation was specified. The operation has begun, but its
+	// outcome is not known yet.
+	//
+	public static final int XACT_S_ASYNC = 0x0004D000;
+
+	//
+	// MessageId: XACT_S_DEFECT
+	//
+	// MessageText:
+	//
+	// XACT_S_DEFECT
+	//
+	public static final int XACT_S_DEFECT = 0x0004D001;
+
+	//
+	// MessageId: XACT_S_READONLY
+	//
+	// MessageText:
+	//
+	// The method call succeeded because the transaction was read-only.
+	//
+	public static final int XACT_S_READONLY = 0x0004D002;
+
+	//
+	// MessageId: XACT_S_SOMENORETAIN
+	//
+	// MessageText:
+	//
+	// The transaction was successfully aborted. However, this is a coordinated
+	// transaction, and some number of enlisted resources were aborted outright
+	// because they could not support abort-retaining semantics
+	//
+	public static final int XACT_S_SOMENORETAIN = 0x0004D003;
+
+	//
+	// MessageId: XACT_S_OKINFORM
+	//
+	// MessageText:
+	//
+	// No changes were made during this call, but the sink wants another chance
+	// to look if any other sinks make further changes.
+	//
+	public static final int XACT_S_OKINFORM = 0x0004D004;
+
+	//
+	// MessageId: XACT_S_MADECHANGESCONTENT
+	//
+	// MessageText:
+	//
+	// The sink is content and wishes the transaction to proceed. Changes were
+	// made to one or more resources during this call.
+	//
+	public static final int XACT_S_MADECHANGESCONTENT = 0x0004D005;
+
+	//
+	// MessageId: XACT_S_MADECHANGESINFORM
+	//
+	// MessageText:
+	//
+	// The sink is for the moment and wishes the transaction to proceed, but if
+	// other changes are made following this return by other event sinks then
+	// this sink wants another chance to look
+	//
+	public static final int XACT_S_MADECHANGESINFORM = 0x0004D006;
+
+	//
+	// MessageId: XACT_S_ALLNORETAIN
+	//
+	// MessageText:
+	//
+	// The transaction was successfully aborted. However, the abort was
+	// non-retaining.
+	//
+	public static final int XACT_S_ALLNORETAIN = 0x0004D007;
+
+	//
+	// MessageId: XACT_S_ABORTING
+	//
+	// MessageText:
+	//
+	// An abort operation was already in progress.
+	//
+	public static final int XACT_S_ABORTING = 0x0004D008;
+
+	//
+	// MessageId: XACT_S_SINGLEPHASE
+	//
+	// MessageText:
+	//
+	// The resource manager has performed a single-phase commit of the
+	// transaction.
+	//
+	public static final int XACT_S_SINGLEPHASE = 0x0004D009;
+
+	//
+	// MessageId: XACT_S_LOCALLY_OK
+	//
+	// MessageText:
+	//
+	// The local transaction has not aborted.
+	//
+	public static final int XACT_S_LOCALLY_OK = 0x0004D00A;
+
+	//
+	// MessageId: XACT_S_LASTRESOURCEMANAGER
+	//
+	// MessageText:
+	//
+	// The resource manager has requested to be the coordinator (last resource
+	// manager) for the transaction.
+	//
+	public static final int XACT_S_LASTRESOURCEMANAGER = 0x0004D010;
+
+	public static final int CONTEXT_E_FIRST = 0x8004E000;
+	public static final int CONTEXT_E_LAST = 0x8004E02F;
+	public static final int CONTEXT_S_FIRST = 0x0004E000;
+	public static final int CONTEXT_S_LAST = 0x0004E02F;
+	//
+	// MessageId: CONTEXT_E_ABORTED
+	//
+	// MessageText:
+	//
+	// The root transaction wanted to commit, but transaction aborted
+	//
+	public static final int CONTEXT_E_ABORTED = 0x8004E002;
+
+	//
+	// MessageId: CONTEXT_E_ABORTING
+	//
+	// MessageText:
+	//
+	// You made a method call on a COM+ component that has a transaction that
+	// has already aborted or in the process of aborting.
+	//
+	public static final int CONTEXT_E_ABORTING = 0x8004E003;
+
+	//
+	// MessageId: CONTEXT_E_NOCONTEXT
+	//
+	// MessageText:
+	//
+	// There is no MTS object context
+	//
+	public static final int CONTEXT_E_NOCONTEXT = 0x8004E004;
+
+	//
+	// MessageId: CONTEXT_E_WOULD_DEADLOCK
+	//
+	// MessageText:
+	//
+	// The component is configured to use synchronization and this method call
+	// would cause a deadlock to occur.
+	//
+	public static final int CONTEXT_E_WOULD_DEADLOCK = 0x8004E005;
+
+	//
+	// MessageId: CONTEXT_E_SYNCH_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The component is configured to use synchronization and a thread has timed
+	// out waiting to enter the context.
+	//
+	public static final int CONTEXT_E_SYNCH_TIMEOUT = 0x8004E006;
+
+	//
+	// MessageId: CONTEXT_E_OLDREF
+	//
+	// MessageText:
+	//
+	// You made a method call on a COM+ component that has a transaction that
+	// has already committed or aborted.
+	//
+	public static final int CONTEXT_E_OLDREF = 0x8004E007;
+
+	//
+	// MessageId: CONTEXT_E_ROLENOTFOUND
+	//
+	// MessageText:
+	//
+	// The specified role was not configured for the application
+	//
+	public static final int CONTEXT_E_ROLENOTFOUND = 0x8004E00C;
+
+	//
+	// MessageId: CONTEXT_E_TMNOTAVAILABLE
+	//
+	// MessageText:
+	//
+	// COM+ was unable to talk to the Microsoft Distributed Transaction
+	// Coordinator
+	//
+	public static final int CONTEXT_E_TMNOTAVAILABLE = 0x8004E00F;
+
+	//
+	// MessageId: CO_E_ACTIVATIONFAILED
+	//
+	// MessageText:
+	//
+	// An unexpected error occurred during COM+ Activation.
+	//
+	public static final int CO_E_ACTIVATIONFAILED = 0x8004E021;
+
+	//
+	// MessageId: CO_E_ACTIVATIONFAILED_EVENTLOGGED
+	//
+	// MessageText:
+	//
+	// COM+ Activation failed. Check the event log for more information
+	//
+	public static final int CO_E_ACTIVATIONFAILED_EVENTLOGGED = 0x8004E022;
+
+	//
+	// MessageId: CO_E_ACTIVATIONFAILED_CATALOGERROR
+	//
+	// MessageText:
+	//
+	// COM+ Activation failed due to a catalog or configuration error.
+	//
+	public static final int CO_E_ACTIVATIONFAILED_CATALOGERROR = 0x8004E023;
+
+	//
+	// MessageId: CO_E_ACTIVATIONFAILED_TIMEOUT
+	//
+	// MessageText:
+	//
+	// COM+ activation failed because the activation could not be completed in
+	// the specified amount of time.
+	//
+	public static final int CO_E_ACTIVATIONFAILED_TIMEOUT = 0x8004E024;
+
+	//
+	// MessageId: CO_E_INITIALIZATIONFAILED
+	//
+	// MessageText:
+	//
+	// COM+ Activation failed because an initialization function failed. Check
+	// the event log for more information.
+	//
+	public static final int CO_E_INITIALIZATIONFAILED = 0x8004E025;
+
+	//
+	// MessageId: CONTEXT_E_NOJIT
+	//
+	// MessageText:
+	//
+	// The requested operation requires that JIT be in the current context and
+	// it is not
+	//
+	public static final int CONTEXT_E_NOJIT = 0x8004E026;
+
+	//
+	// MessageId: CONTEXT_E_NOTRANSACTION
+	//
+	// MessageText:
+	//
+	// The requested operation requires that the current context have a
+	// Transaction, and it does not
+	//
+	public static final int CONTEXT_E_NOTRANSACTION = 0x8004E027;
+
+	//
+	// MessageId: CO_E_THREADINGMODEL_CHANGED
+	//
+	// MessageText:
+	//
+	// The components threading model has changed after install into a COM+
+	// Application. Please re-install component.
+	//
+	public static final int CO_E_THREADINGMODEL_CHANGED = 0x8004E028;
+
+	//
+	// MessageId: CO_E_NOIISINTRINSICS
+	//
+	// MessageText:
+	//
+	// IIS intrinsics not available. Start your work with IIS.
+	//
+	public static final int CO_E_NOIISINTRINSICS = 0x8004E029;
+
+	//
+	// MessageId: CO_E_NOCOOKIES
+	//
+	// MessageText:
+	//
+	// An attempt to write a cookie failed.
+	//
+	public static final int CO_E_NOCOOKIES = 0x8004E02A;
+
+	//
+	// MessageId: CO_E_DBERROR
+	//
+	// MessageText:
+	//
+	// An attempt to use a database generated a database specific error.
+	//
+	public static final int CO_E_DBERROR = 0x8004E02B;
+
+	//
+	// MessageId: CO_E_NOTPOOLED
+	//
+	// MessageText:
+	//
+	// The COM+ component you created must use object pooling to work.
+	//
+	public static final int CO_E_NOTPOOLED = 0x8004E02C;
+
+	//
+	// MessageId: CO_E_NOTCONSTRUCTED
+	//
+	// MessageText:
+	//
+	// The COM+ component you created must use object construction to work
+	// correctly.
+	//
+	public static final int CO_E_NOTCONSTRUCTED = 0x8004E02D;
+
+	//
+	// MessageId: CO_E_NOSYNCHRONIZATION
+	//
+	// MessageText:
+	//
+	// The COM+ component requires synchronization, and it is not configured for
+	// it.
+	//
+	public static final int CO_E_NOSYNCHRONIZATION = 0x8004E02E;
+
+	//
+	// MessageId: CO_E_ISOLEVELMISMATCH
+	//
+	// MessageText:
+	//
+	// The TxIsolation Level property for the COM+ component being created is
+	// stronger than the TxIsolationLevel for the "root" component for the
+	// transaction. The creation failed.
+	//
+	public static final int CO_E_ISOLEVELMISMATCH = 0x8004E02F;
+
+	//
+	// MessageId: CO_E_CALL_OUT_OF_TX_SCOPE_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// The component attempted to make a cross-context call between invocations
+	// of EnterTransactionScopeand ExitTransactionScope. This is not allowed.
+	// Cross-context calls cannot be made while inside of a transaction scope.
+	//
+	public static final int CO_E_CALL_OUT_OF_TX_SCOPE_NOT_ALLOWED = 0x8004E030;
+
+	//
+	// MessageId: CO_E_EXIT_TRANSACTION_SCOPE_NOT_CALLED
+	//
+	// MessageText:
+	//
+	// The component made a call to EnterTransactionScope, but did not make a
+	// corresponding call to ExitTransactionScope before returning.
+	//
+	public static final int CO_E_EXIT_TRANSACTION_SCOPE_NOT_CALLED = 0x8004E031;
+
+	//
+	// Old OLE Success Codes
+	//
+	//
+	// MessageId: OLE_S_USEREG
+	//
+	// MessageText:
+	//
+	// Use the registry database to provide the requested information
+	//
+	public static final int OLE_S_USEREG = 0x00040000;
+
+	//
+	// MessageId: OLE_S_STATIC
+	//
+	// MessageText:
+	//
+	// Success, but static
+	//
+	public static final int OLE_S_STATIC = 0x00040001;
+
+	//
+	// MessageId: OLE_S_MAC_CLIPFORMAT
+	//
+	// MessageText:
+	//
+	// Macintosh clipboard format
+	//
+	public static final int OLE_S_MAC_CLIPFORMAT = 0x00040002;
+
+	//
+	// MessageId: DRAGDROP_S_DROP
+	//
+	// MessageText:
+	//
+	// Successful drop took place
+	//
+	public static final int DRAGDROP_S_DROP = 0x00040100;
+
+	//
+	// MessageId: DRAGDROP_S_CANCEL
+	//
+	// MessageText:
+	//
+	// Drag-drop operation canceled
+	//
+	public static final int DRAGDROP_S_CANCEL = 0x00040101;
+
+	//
+	// MessageId: DRAGDROP_S_USEDEFAULTCURSORS
+	//
+	// MessageText:
+	//
+	// Use the default cursor
+	//
+	public static final int DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102;
+
+	//
+	// MessageId: DATA_S_SAMEFORMATETC
+	//
+	// MessageText:
+	//
+	// Data has same FORMATETC
+	//
+	public static final int DATA_S_SAMEFORMATETC = 0x00040130;
+
+	//
+	// MessageId: VIEW_S_ALREADY_FROZEN
+	//
+	// MessageText:
+	//
+	// View is already frozen
+	//
+	public static final int VIEW_S_ALREADY_FROZEN = 0x00040140;
+
+	//
+	// MessageId: CACHE_S_FORMATETC_NOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// FORMATETC not supported
+	//
+	public static final int CACHE_S_FORMATETC_NOTSUPPORTED = 0x00040170;
+
+	//
+	// MessageId: CACHE_S_SAMECACHE
+	//
+	// MessageText:
+	//
+	// Same cache
+	//
+	public static final int CACHE_S_SAMECACHE = 0x00040171;
+
+	//
+	// MessageId: CACHE_S_SOMECACHES_NOTUPDATED
+	//
+	// MessageText:
+	//
+	// Some cache(s) not updated
+	//
+	public static final int CACHE_S_SOMECACHES_NOTUPDATED = 0x00040172;
+
+	//
+	// MessageId: OLEOBJ_S_INVALIDVERB
+	//
+	// MessageText:
+	//
+	// Invalid verb for OLE object
+	//
+	public static final int OLEOBJ_S_INVALIDVERB = 0x00040180;
+
+	//
+	// MessageId: OLEOBJ_S_CANNOT_DOVERB_NOW
+	//
+	// MessageText:
+	//
+	// Verb number is valid but verb cannot be done now
+	//
+	public static final int OLEOBJ_S_CANNOT_DOVERB_NOW = 0x00040181;
+
+	//
+	// MessageId: OLEOBJ_S_INVALIDHWND
+	//
+	// MessageText:
+	//
+	// Invalid window handle passed
+	//
+	public static final int OLEOBJ_S_INVALIDHWND = 0x00040182;
+
+	//
+	// MessageId: INPLACE_S_TRUNCATED
+	//
+	// MessageText:
+	//
+	// Message is too long; some of it had to be truncated before displaying
+	//
+	public static final int INPLACE_S_TRUNCATED = 0x000401A0;
+
+	//
+	// MessageId: CONVERT10_S_NO_PRESENTATION
+	//
+	// MessageText:
+	//
+	// Unable to convert OLESTREAM to IStorage
+	//
+	public static final int CONVERT10_S_NO_PRESENTATION = 0x000401C0;
+
+	//
+	// MessageId: MK_S_REDUCED_TO_SELF
+	//
+	// MessageText:
+	//
+	// Moniker reduced to itself
+	//
+	public static final int MK_S_REDUCED_TO_SELF = 0x000401E2;
+
+	//
+	// MessageId: MK_S_ME
+	//
+	// MessageText:
+	//
+	// Common prefix is this moniker
+	//
+	public static final int MK_S_ME = 0x000401E4;
+
+	//
+	// MessageId: MK_S_HIM
+	//
+	// MessageText:
+	//
+	// Common prefix is input moniker
+	//
+	public static final int MK_S_HIM = 0x000401E5;
+
+	//
+	// MessageId: MK_S_US
+	//
+	// MessageText:
+	//
+	// Common prefix is both monikers
+	//
+	public static final int MK_S_US = 0x000401E6;
+
+	//
+	// MessageId: MK_S_MONIKERALREADYREGISTERED
+	//
+	// MessageText:
+	//
+	// Moniker is already registered in running object table
+	//
+	public static final int MK_S_MONIKERALREADYREGISTERED = 0x000401E7;
+
+	//
+	// Task Scheduler errors
+	//
+	//
+	// MessageId: SCHED_S_TASK_READY
+	//
+	// MessageText:
+	//
+	// The task is ready to run at its next scheduled time.
+	//
+	public static final int SCHED_S_TASK_READY = 0x00041300;
+
+	//
+	// MessageId: SCHED_S_TASK_RUNNING
+	//
+	// MessageText:
+	//
+	// The task is currently running.
+	//
+	public static final int SCHED_S_TASK_RUNNING = 0x00041301;
+
+	//
+	// MessageId: SCHED_S_TASK_DISABLED
+	//
+	// MessageText:
+	//
+	// The task will not run at the scheduled times because it has been
+	// disabled.
+	//
+	public static final int SCHED_S_TASK_DISABLED = 0x00041302;
+
+	//
+	// MessageId: SCHED_S_TASK_HAS_NOT_RUN
+	//
+	// MessageText:
+	//
+	// The task has not yet run.
+	//
+	public static final int SCHED_S_TASK_HAS_NOT_RUN = 0x00041303;
+
+	//
+	// MessageId: SCHED_S_TASK_NO_MORE_RUNS
+	//
+	// MessageText:
+	//
+	// There are no more runs scheduled for this task.
+	//
+	public static final int SCHED_S_TASK_NO_MORE_RUNS = 0x00041304;
+
+	//
+	// MessageId: SCHED_S_TASK_NOT_SCHEDULED
+	//
+	// MessageText:
+	//
+	// One or more of the properties that are needed to run this task on a
+	// schedule have not been set.
+	//
+	public static final int SCHED_S_TASK_NOT_SCHEDULED = 0x00041305;
+
+	//
+	// MessageId: SCHED_S_TASK_TERMINATED
+	//
+	// MessageText:
+	//
+	// The last run of the task was terminated by the user.
+	//
+	public static final int SCHED_S_TASK_TERMINATED = 0x00041306;
+
+	//
+	// MessageId: SCHED_S_TASK_NO_VALID_TRIGGERS
+	//
+	// MessageText:
+	//
+	// Either the task has no triggers or the existing triggers are disabled or
+	// not set.
+	//
+	public static final int SCHED_S_TASK_NO_VALID_TRIGGERS = 0x00041307;
+
+	//
+	// MessageId: SCHED_S_EVENT_TRIGGER
+	//
+	// MessageText:
+	//
+	// Event triggers don't have set run times.
+	//
+	public static final int SCHED_S_EVENT_TRIGGER = 0x00041308;
+
+	//
+	// MessageId: SCHED_E_TRIGGER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Trigger not found.
+	//
+	public static final int SCHED_E_TRIGGER_NOT_FOUND = 0x80041309;
+
+	//
+	// MessageId: SCHED_E_TASK_NOT_READY
+	//
+	// MessageText:
+	//
+	// One or more of the properties that are needed to run this task have not
+	// been set.
+	//
+	public static final int SCHED_E_TASK_NOT_READY = 0x8004130A;
+
+	//
+	// MessageId: SCHED_E_TASK_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// There is no running instance of the task.
+	//
+	public static final int SCHED_E_TASK_NOT_RUNNING = 0x8004130B;
+
+	//
+	// MessageId: SCHED_E_SERVICE_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// The Task Scheduler Service is not installed on this computer.
+	//
+	public static final int SCHED_E_SERVICE_NOT_INSTALLED = 0x8004130C;
+
+	//
+	// MessageId: SCHED_E_CANNOT_OPEN_TASK
+	//
+	// MessageText:
+	//
+	// The task object could not be opened.
+	//
+	public static final int SCHED_E_CANNOT_OPEN_TASK = 0x8004130D;
+
+	//
+	// MessageId: SCHED_E_INVALID_TASK
+	//
+	// MessageText:
+	//
+	// The object is either an invalid task object or is not a task object.
+	//
+	public static final int SCHED_E_INVALID_TASK = 0x8004130E;
+
+	//
+	// MessageId: SCHED_E_ACCOUNT_INFORMATION_NOT_SET
+	//
+	// MessageText:
+	//
+	// No account information could be found in the Task Scheduler security
+	// database for the task indicated.
+	//
+	public static final int SCHED_E_ACCOUNT_INFORMATION_NOT_SET = 0x8004130F;
+
+	//
+	// MessageId: SCHED_E_ACCOUNT_NAME_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Unable to establish existence of the account specified.
+	//
+	public static final int SCHED_E_ACCOUNT_NAME_NOT_FOUND = 0x80041310;
+
+	//
+	// MessageId: SCHED_E_ACCOUNT_DBASE_CORRUPT
+	//
+	// MessageText:
+	//
+	// Corruption was detected in the Task Scheduler security database; the
+	// database has been reset.
+	//
+	public static final int SCHED_E_ACCOUNT_DBASE_CORRUPT = 0x80041311;
+
+	//
+	// MessageId: SCHED_E_NO_SECURITY_SERVICES
+	//
+	// MessageText:
+	//
+	// Task Scheduler security services are available only on Windows NT.
+	//
+	public static final int SCHED_E_NO_SECURITY_SERVICES = 0x80041312;
+
+	//
+	// MessageId: SCHED_E_UNKNOWN_OBJECT_VERSION
+	//
+	// MessageText:
+	//
+	// The task object version is either unsupported or invalid.
+	//
+	public static final int SCHED_E_UNKNOWN_OBJECT_VERSION = 0x80041313;
+
+	//
+	// MessageId: SCHED_E_UNSUPPORTED_ACCOUNT_OPTION
+	//
+	// MessageText:
+	//
+	// The task has been configured with an unsupported combination of account
+	// settings and run time options.
+	//
+	public static final int SCHED_E_UNSUPPORTED_ACCOUNT_OPTION = 0x80041314;
+
+	//
+	// MessageId: SCHED_E_SERVICE_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// The Task Scheduler Service is not running.
+	//
+	public static final int SCHED_E_SERVICE_NOT_RUNNING = 0x80041315;
+
+	//
+	// MessageId: SCHED_E_UNEXPECTEDNODE
+	//
+	// MessageText:
+	//
+	// The task XML contains an unexpected node.
+	//
+	public static final int SCHED_E_UNEXPECTEDNODE = 0x80041316;
+
+	//
+	// MessageId: SCHED_E_NAMESPACE
+	//
+	// MessageText:
+	//
+	// The task XML contains an element or attribute from an unexpected
+	// namespace.
+	//
+	public static final int SCHED_E_NAMESPACE = 0x80041317;
+
+	//
+	// MessageId: SCHED_E_INVALIDVALUE
+	//
+	// MessageText:
+	//
+	// The task XML contains a value which is incorrectly formatted or out of
+	// range.
+	//
+	public static final int SCHED_E_INVALIDVALUE = 0x80041318;
+
+	//
+	// MessageId: SCHED_E_MISSINGNODE
+	//
+	// MessageText:
+	//
+	// The task XML is missing a required element or attribute.
+	//
+	public static final int SCHED_E_MISSINGNODE = 0x80041319;
+
+	//
+	// MessageId: SCHED_E_MALFORMEDXML
+	//
+	// MessageText:
+	//
+	// The task XML is malformed.
+	//
+	public static final int SCHED_E_MALFORMEDXML = 0x8004131A;
+
+	//
+	// MessageId: SCHED_S_SOME_TRIGGERS_FAILED
+	//
+	// MessageText:
+	//
+	// The task is registered, but not all specified triggers will start the
+	// task.
+	//
+	public static final int SCHED_S_SOME_TRIGGERS_FAILED = 0x0004131B;
+
+	//
+	// MessageId: SCHED_S_BATCH_LOGON_PROBLEM
+	//
+	// MessageText:
+	//
+	// The task is registered, but may fail to start. Batch logon privilege
+	// needs to be enabled for the task principal.
+	//
+	public static final int SCHED_S_BATCH_LOGON_PROBLEM = 0x0004131C;
+
+	//
+	// MessageId: SCHED_E_TOO_MANY_NODES
+	//
+	// MessageText:
+	//
+	// The task XML contains too many nodes of the same type.
+	//
+	public static final int SCHED_E_TOO_MANY_NODES = 0x8004131D;
+
+	//
+	// MessageId: SCHED_E_PAST_END_BOUNDARY
+	//
+	// MessageText:
+	//
+	// The task cannot be started after the trigger's end boundary.
+	//
+	public static final int SCHED_E_PAST_END_BOUNDARY = 0x8004131E;
+
+	//
+	// MessageId: SCHED_E_ALREADY_RUNNING
+	//
+	// MessageText:
+	//
+	// An instance of this task is already running.
+	//
+	public static final int SCHED_E_ALREADY_RUNNING = 0x8004131F;
+
+	//
+	// MessageId: SCHED_E_USER_NOT_LOGGED_ON
+	//
+	// MessageText:
+	//
+	// The task will not run because the user is not logged on.
+	//
+	public static final int SCHED_E_USER_NOT_LOGGED_ON = 0x80041320;
+
+	//
+	// MessageId: SCHED_E_INVALID_TASK_HASH
+	//
+	// MessageText:
+	//
+	// The task image is corrupt or has been tampered with.
+	//
+	public static final int SCHED_E_INVALID_TASK_HASH = 0x80041321;
+
+	//
+	// MessageId: SCHED_E_SERVICE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// The Task Scheduler service is not available.
+	//
+	public static final int SCHED_E_SERVICE_NOT_AVAILABLE = 0x80041322;
+
+	//
+	// MessageId: SCHED_E_SERVICE_TOO_BUSY
+	//
+	// MessageText:
+	//
+	// The Task Scheduler service is too busy to handle your request. Please try
+	// again later.
+	//
+	public static final int SCHED_E_SERVICE_TOO_BUSY = 0x80041323;
+
+	//
+	// MessageId: SCHED_E_TASK_ATTEMPTED
+	//
+	// MessageText:
+	//
+	// The Task Scheduler service attempted to run the task, but the task did
+	// not run due to one of the constraints in the task definition.
+	//
+	public static final int SCHED_E_TASK_ATTEMPTED = 0x80041324;
+
+	//
+	// MessageId: SCHED_S_TASK_QUEUED
+	//
+	// MessageText:
+	//
+	// The Task Scheduler service has asked the task to run.
+	//
+	public static final int SCHED_S_TASK_QUEUED = 0x00041325;
+
+	//
+	// MessageId: SCHED_E_TASK_DISABLED
+	//
+	// MessageText:
+	//
+	// The task is disabled.
+	//
+	public static final int SCHED_E_TASK_DISABLED = 0x80041326;
+
+	//
+	// MessageId: SCHED_E_TASK_NOT_V1_COMPAT
+	//
+	// MessageText:
+	//
+	// The task has properties that are not compatible with previous versions of
+	// Windows.
+	//
+	public static final int SCHED_E_TASK_NOT_V1_COMPAT = 0x80041327;
+
+	//
+	// MessageId: SCHED_E_START_ON_DEMAND
+	//
+	// MessageText:
+	//
+	// The task settings do not allow the task to start on demand.
+	//
+	public static final int SCHED_E_START_ON_DEMAND = 0x80041328;
+
+	// ******************
+	// FACILITY_WINDOWS
+	// ******************
+	//
+	// Codes 0x0-0x01ff are reserved for the OLE group of
+	// interfaces.
+	//
+	//
+	// MessageId: CO_E_CLASS_CREATE_FAILED
+	//
+	// MessageText:
+	//
+	// Attempt to create a class object failed
+	//
+	public static final int CO_E_CLASS_CREATE_FAILED = 0x80080001;
+
+	//
+	// MessageId: CO_E_SCM_ERROR
+	//
+	// MessageText:
+	//
+	// OLE service could not bind object
+	//
+	public static final int CO_E_SCM_ERROR = 0x80080002;
+
+	//
+	// MessageId: CO_E_SCM_RPC_FAILURE
+	//
+	// MessageText:
+	//
+	// RPC communication failed with OLE service
+	//
+	public static final int CO_E_SCM_RPC_FAILURE = 0x80080003;
+
+	//
+	// MessageId: CO_E_BAD_PATH
+	//
+	// MessageText:
+	//
+	// Bad path to object
+	//
+	public static final int CO_E_BAD_PATH = 0x80080004;
+
+	//
+	// MessageId: CO_E_SERVER_EXEC_FAILURE
+	//
+	// MessageText:
+	//
+	// Server execution failed
+	//
+	public static final int CO_E_SERVER_EXEC_FAILURE = 0x80080005;
+
+	//
+	// MessageId: CO_E_OBJSRV_RPC_FAILURE
+	//
+	// MessageText:
+	//
+	// OLE service could not communicate with the object server
+	//
+	public static final int CO_E_OBJSRV_RPC_FAILURE = 0x80080006;
+
+	//
+	// MessageId: MK_E_NO_NORMALIZED
+	//
+	// MessageText:
+	//
+	// Moniker path could not be normalized
+	//
+	public static final int MK_E_NO_NORMALIZED = 0x80080007;
+
+	//
+	// MessageId: CO_E_SERVER_STOPPING
+	//
+	// MessageText:
+	//
+	// Object server is stopping when OLE service contacts it
+	//
+	public static final int CO_E_SERVER_STOPPING = 0x80080008;
+
+	//
+	// MessageId: MEM_E_INVALID_ROOT
+	//
+	// MessageText:
+	//
+	// An invalid root block pointer was specified
+	//
+	public static final int MEM_E_INVALID_ROOT = 0x80080009;
+
+	//
+	// MessageId: MEM_E_INVALID_LINK
+	//
+	// MessageText:
+	//
+	// An allocation chain contained an invalid link pointer
+	//
+	public static final int MEM_E_INVALID_LINK = 0x80080010;
+
+	//
+	// MessageId: MEM_E_INVALID_SIZE
+	//
+	// MessageText:
+	//
+	// The requested allocation size was too large
+	//
+	public static final int MEM_E_INVALID_SIZE = 0x80080011;
+
+	//
+	// MessageId: CO_S_NOTALLINTERFACES
+	//
+	// MessageText:
+	//
+	// Not all the requested interfaces were available
+	//
+	public static final int CO_S_NOTALLINTERFACES = 0x00080012;
+
+	//
+	// MessageId: CO_S_MACHINENAMENOTFOUND
+	//
+	// MessageText:
+	//
+	// The specified machine name was not found in the cache.
+	//
+	public static final int CO_S_MACHINENAMENOTFOUND = 0x00080013;
+
+	//
+	// MessageId: CO_E_MISSING_DISPLAYNAME
+	//
+	// MessageText:
+	//
+	// The activation requires a display name to be present under the CLSID key.
+	//
+	public static final int CO_E_MISSING_DISPLAYNAME = 0x80080015;
+
+	//
+	// MessageId: CO_E_RUNAS_VALUE_MUST_BE_AAA
+	//
+	// MessageText:
+	//
+	// The activation requires that the RunAs value for the application is
+	// Activate As Activator.
+	//
+	public static final int CO_E_RUNAS_VALUE_MUST_BE_AAA = 0x80080016;
+
+	//
+	// MessageId: CO_E_ELEVATION_DISABLED
+	//
+	// MessageText:
+	//
+	// The class is not configured to support Elevated activation.
+	//
+	public static final int CO_E_ELEVATION_DISABLED = 0x80080017;
+
+	// ******************
+	// FACILITY_DISPATCH
+	// ******************
+	//
+	// MessageId: DISP_E_UNKNOWNINTERFACE
+	//
+	// MessageText:
+	//
+	// Unknown interface.
+	//
+	public static final int DISP_E_UNKNOWNINTERFACE = 0x80020001;
+
+	//
+	// MessageId: DISP_E_MEMBERNOTFOUND
+	//
+	// MessageText:
+	//
+	// Member not found.
+	//
+	public static final int DISP_E_MEMBERNOTFOUND = 0x80020003;
+
+	//
+	// MessageId: DISP_E_PARAMNOTFOUND
+	//
+	// MessageText:
+	//
+	// Parameter not found.
+	//
+	public static final int DISP_E_PARAMNOTFOUND = 0x80020004;
+
+	//
+	// MessageId: DISP_E_TYPEMISMATCH
+	//
+	// MessageText:
+	//
+	// Type mismatch.
+	//
+	public static final int DISP_E_TYPEMISMATCH = 0x80020005;
+
+	//
+	// MessageId: DISP_E_UNKNOWNNAME
+	//
+	// MessageText:
+	//
+	// Unknown name.
+	//
+	public static final int DISP_E_UNKNOWNNAME = 0x80020006;
+
+	//
+	// MessageId: DISP_E_NONAMEDARGS
+	//
+	// MessageText:
+	//
+	// No named arguments.
+	//
+	public static final int DISP_E_NONAMEDARGS = 0x80020007;
+
+	//
+	// MessageId: DISP_E_BADVARTYPE
+	//
+	// MessageText:
+	//
+	// Bad variable type.
+	//
+	public static final int DISP_E_BADVARTYPE = 0x80020008;
+
+	//
+	// MessageId: DISP_E_EXCEPTION
+	//
+	// MessageText:
+	//
+	// Exception occurred.
+	//
+	public static final int DISP_E_EXCEPTION = 0x80020009;
+
+	//
+	// MessageId: DISP_E_OVERF;OW
+	//
+	// MessageText:
+	//
+	// Out of present range.
+	//
+	public static final int DISP_E_OVERFLOW = 0x8002000A;
+
+	//
+	// MessageId: DISP_E_BADINDEX
+	//
+	// MessageText:
+	//
+	// Invalid index.
+	//
+	public static final int DISP_E_BADINDEX = 0x8002000B;
+
+	//
+	// MessageId: DISP_E_UNKNOWNLCID
+	//
+	// MessageText:
+	//
+	// Unknown language.
+	//
+	public static final int DISP_E_UNKNOWNLCID = 0x8002000C;
+
+	//
+	// MessageId: DISP_E_ARRAYISLOCKED
+	//
+	// MessageText:
+	//
+	// Memory is locked.
+	//
+	public static final int DISP_E_ARRAYISLOCKED = 0x8002000D;
+
+	//
+	// MessageId: DISP_E_BADPARAMCOUNT
+	//
+	// MessageText:
+	//
+	// Invalid number of parameters.
+	//
+	public static final int DISP_E_BADPARAMCOUNT = 0x8002000E;
+
+	//
+	// MessageId: DISP_E_PARAMNOTOPTIONAL
+	//
+	// MessageText:
+	//
+	// Parameter not optional.
+	//
+	public static final int DISP_E_PARAMNOTOPTIONAL = 0x8002000F;
+
+	//
+	// MessageId: DISP_E_BADCALLEE
+	//
+	// MessageText:
+	//
+	// Invalid callee.
+	//
+	public static final int DISP_E_BADCALLEE = 0x80020010;
+
+	//
+	// MessageId: DISP_E_NOTACOLLECTION
+	//
+	// MessageText:
+	//
+	// Does not support a collection.
+	//
+	public static final int DISP_E_NOTACOLLECTION = 0x80020011;
+
+	//
+	// MessageId: DISP_E_DIVBYZERO
+	//
+	// MessageText:
+	//
+	// Division by zero.
+	//
+	public static final int DISP_E_DIVBYZERO = 0x80020012;
+
+	//
+	// MessageId: DISP_E_BUFFERTOOSMALL
+	//
+	// MessageText:
+	//
+	// Buffer too small
+	//
+	public static final int DISP_E_BUFFERTOOSMALL = 0x80020013;
+
+	//
+	// MessageId: TYPE_E_BUFFERTOOSMALL
+	//
+	// MessageText:
+	//
+	// Buffer too small.
+	//
+	public static final int TYPE_E_BUFFERTOOSMALL = 0x80028016;
+
+	//
+	// MessageId: TYPE_E_FIELDNOTFOUND
+	//
+	// MessageText:
+	//
+	// Field name not defined in the record.
+	//
+	public static final int TYPE_E_FIELDNOTFOUND = 0x80028017;
+
+	//
+	// MessageId: TYPE_E_INVDATAREAD
+	//
+	// MessageText:
+	//
+	// Old format or invalid type library.
+	//
+	public static final int TYPE_E_INVDATAREAD = 0x80028018;
+
+	//
+	// MessageId: TYPE_E_UNSUPFORMAT
+	//
+	// MessageText:
+	//
+	// Old format or invalid type library.
+	//
+	public static final int TYPE_E_UNSUPFORMAT = 0x80028019;
+
+	//
+	// MessageId: TYPE_E_REGISTRYACCESS
+	//
+	// MessageText:
+	//
+	// Error accessing the OLE registry.
+	//
+	public static final int TYPE_E_REGISTRYACCESS = 0x8002801C;
+
+	//
+	// MessageId: TYPE_E_LIBNOTREGISTERED
+	//
+	// MessageText:
+	//
+	// Library not registered.
+	//
+	public static final int TYPE_E_LIBNOTREGISTERED = 0x8002801D;
+
+	//
+	// MessageId: TYPE_E_UNDEFINEDTYPE
+	//
+	// MessageText:
+	//
+	// Bound to unknown type.
+	//
+	public static final int TYPE_E_UNDEFINEDTYPE = 0x80028027;
+
+	//
+	// MessageId: TYPE_E_QUALIFIEDNAMEDISALLOWED
+	//
+	// MessageText:
+	//
+	// Qualified name disallowed.
+	//
+	public static final int TYPE_E_QUALIFIEDNAMEDISALLOWED = 0x80028028;
+
+	//
+	// MessageId: TYPE_E_INVALIDSTATE
+	//
+	// MessageText:
+	//
+	// Invalid forward reference, or reference to uncompiled type.
+	//
+	public static final int TYPE_E_INVALIDSTATE = 0x80028029;
+
+	//
+	// MessageId: TYPE_E_WRONGTYPEKIND
+	//
+	// MessageText:
+	//
+	// Type mismatch.
+	//
+	public static final int TYPE_E_WRONGTYPEKIND = 0x8002802A;
+
+	//
+	// MessageId: TYPE_E_ELEMENTNOTFOUND
+	//
+	// MessageText:
+	//
+	// Element not found.
+	//
+	public static final int TYPE_E_ELEMENTNOTFOUND = 0x8002802B;
+
+	//
+	// MessageId: TYPE_E_AMBIGUOUSNAME
+	//
+	// MessageText:
+	//
+	// Ambiguous name.
+	//
+	public static final int TYPE_E_AMBIGUOUSNAME = 0x8002802C;
+
+	//
+	// MessageId: TYPE_E_NAMECONF;ICT
+	//
+	// MessageText:
+	//
+	// Name already exists in the library.
+	//
+	public static final int TYPE_E_NAMECONFLICT = 0x8002802D;
+
+	//
+	// MessageId: TYPE_E_UNKNOWNLCID
+	//
+	// MessageText:
+	//
+	// Unknown LCID.
+	//
+	public static final int TYPE_E_UNKNOWNLCID = 0x8002802E;
+
+	//
+	// MessageId: TYPE_E_DLLFUNCTIONNOTFOUND
+	//
+	// MessageText:
+	//
+	// Function not defined in specified DLL.
+	//
+	public static final int TYPE_E_DLLFUNCTIONNOTFOUND = 0x8002802F;
+
+	//
+	// MessageId: TYPE_E_BADMODULEKIND
+	//
+	// MessageText:
+	//
+	// Wrong module kind for the operation.
+	//
+	public static final int TYPE_E_BADMODULEKIND = 0x800288BD;
+
+	//
+	// MessageId: TYPE_E_SIZETOOBIG
+	//
+	// MessageText:
+	//
+	// Size may not exceed=64K.
+	//
+	public static final int TYPE_E_SIZETOOBIG = 0x800288C5;
+
+	//
+	// MessageId: TYPE_E_DUPLICATEID
+	//
+	// MessageText:
+	//
+	// Duplicate ID in inheritance hierarchy.
+	//
+	public static final int TYPE_E_DUPLICATEID = 0x800288C6;
+
+	//
+	// MessageId: TYPE_E_INVALIDID
+	//
+	// MessageText:
+	//
+	// Incorrect inheritance depth in standard OLE hmember.
+	//
+	public static final int TYPE_E_INVALIDID = 0x800288CF;
+
+	//
+	// MessageId: TYPE_E_TYPEMISMATCH
+	//
+	// MessageText:
+	//
+	// Type mismatch.
+	//
+	public static final int TYPE_E_TYPEMISMATCH = 0x80028CA0;
+
+	//
+	// MessageId: TYPE_E_OUTOFBOUNDS
+	//
+	// MessageText:
+	//
+	// Invalid number of arguments.
+	//
+	public static final int TYPE_E_OUTOFBOUNDS = 0x80028CA1;
+
+	//
+	// MessageId: TYPE_E_IOERROR
+	//
+	// MessageText:
+	//
+	// I/O Error.
+	//
+	public static final int TYPE_E_IOERROR = 0x80028CA2;
+
+	//
+	// MessageId: TYPE_E_CANTCREATETMPFILE
+	//
+	// MessageText:
+	//
+	// Error creating unique tmp file.
+	//
+	public static final int TYPE_E_CANTCREATETMPFILE = 0x80028CA3;
+
+	//
+	// MessageId: TYPE_E_CANTLOADLIBRARY
+	//
+	// MessageText:
+	//
+	// Error loading type library/DLL.
+	//
+	public static final int TYPE_E_CANTLOADLIBRARY = 0x80029C4A;
+
+	//
+	// MessageId: TYPE_E_INCONSISTENTPROPFUNCS
+	//
+	// MessageText:
+	//
+	// Inconsistent property functions.
+	//
+	public static final int TYPE_E_INCONSISTENTPROPFUNCS = 0x80029C83;
+
+	//
+	// MessageId: TYPE_E_CIRCULARTYPE
+	//
+	// MessageText:
+	//
+	// Circular dependency between types/modules.
+	//
+	public static final int TYPE_E_CIRCULARTYPE = 0x80029C84;
+
+	// ******************
+	// FACILITY_STORAGE
+	// ******************
+	//
+	// MessageId: STG_E_INVALIDFUNCTION
+	//
+	// MessageText:
+	//
+	// Unable to perform requested operation.
+	//
+	public static final int STG_E_INVALIDFUNCTION = 0x80030001;
+
+	//
+	// MessageId: STG_E_FILENOTFOUND
+	//
+	// MessageText:
+	//
+	// %1 could not be found.
+	//
+	public static final int STG_E_FILENOTFOUND = 0x80030002;
+
+	//
+	// MessageId: STG_E_PATHNOTFOUND
+	//
+	// MessageText:
+	//
+	// The path %1 could not be found.
+	//
+	public static final int STG_E_PATHNOTFOUND = 0x80030003;
+
+	//
+	// MessageId: STG_E_TOOMANYOPENFILES
+	//
+	// MessageText:
+	//
+	// There are insufficient resources to open another file.
+	//
+	public static final int STG_E_TOOMANYOPENFILES = 0x80030004;
+
+	//
+	// MessageId: STG_E_ACCESSDENIED
+	//
+	// MessageText:
+	//
+	// Access Denied.
+	//
+	public static final int STG_E_ACCESSDENIED = 0x80030005;
+
+	//
+	// MessageId: STG_E_INVALIDHANDLE
+	//
+	// MessageText:
+	//
+	// Attempted an operation on an invalid object.
+	//
+	public static final int STG_E_INVALIDHANDLE = 0x80030006;
+
+	//
+	// MessageId: STG_E_INSUFFICIENTMEMORY
+	//
+	// MessageText:
+	//
+	// There is insufficient memory available to complete operation.
+	//
+	public static final int STG_E_INSUFFICIENTMEMORY = 0x80030008;
+
+	//
+	// MessageId: STG_E_INVALIDPOINTER
+	//
+	// MessageText:
+	//
+	// Invalid pointer error.
+	//
+	public static final int STG_E_INVALIDPOINTER = 0x80030009;
+
+	//
+	// MessageId: STG_E_NOMOREFILES
+	//
+	// MessageText:
+	//
+	// There are no more entries to return.
+	//
+	public static final int STG_E_NOMOREFILES = 0x80030012;
+
+	//
+	// MessageId: STG_E_DISKISWRITEPROTECTED
+	//
+	// MessageText:
+	//
+	// Disk is write-protected.
+	//
+	public static final int STG_E_DISKISWRITEPROTECTED = 0x80030013;
+
+	//
+	// MessageId: STG_E_SEEKERROR
+	//
+	// MessageText:
+	//
+	// An error occurred during a seek operation.
+	//
+	public static final int STG_E_SEEKERROR = 0x80030019;
+
+	//
+	// MessageId: STG_E_WRITEFAULT
+	//
+	// MessageText:
+	//
+	// A disk error occurred during a write operation.
+	//
+	public static final int STG_E_WRITEFAULT = 0x8003001D;
+
+	//
+	// MessageId: STG_E_READFAULT
+	//
+	// MessageText:
+	//
+	// A disk error occurred during a read operation.
+	//
+	public static final int STG_E_READFAULT = 0x8003001E;
+
+	//
+	// MessageId: STG_E_SHAREVIOLATION
+	//
+	// MessageText:
+	//
+	// A share violation has occurred.
+	//
+	public static final int STG_E_SHAREVIOLATION = 0x80030020;
+
+	//
+	// MessageId: STG_E_LOCKVIOLATION
+	//
+	// MessageText:
+	//
+	// A lock violation has occurred.
+	//
+	public static final int STG_E_LOCKVIOLATION = 0x80030021;
+
+	//
+	// MessageId: STG_E_FILEALREADYEXISTS
+	//
+	// MessageText:
+	//
+	// %1 already exists.
+	//
+	public static final int STG_E_FILEALREADYEXISTS = 0x80030050;
+
+	//
+	// MessageId: STG_E_INVALIDPARAMETER
+	//
+	// MessageText:
+	//
+	// Invalid parameter error.
+	//
+	public static final int STG_E_INVALIDPARAMETER = 0x80030057;
+
+	//
+	// MessageId: STG_E_MEDIUMFULL
+	//
+	// MessageText:
+	//
+	// There is insufficient disk space to complete operation.
+	//
+	public static final int STG_E_MEDIUMFULL = 0x80030070;
+
+	//
+	// MessageId: STG_E_PROPSETMISMATCHED
+	//
+	// MessageText:
+	//
+	// Illegal write of non-simple property to simple property set.
+	//
+	public static final int STG_E_PROPSETMISMATCHED = 0x800300F0;
+
+	//
+	// MessageId: STG_E_ABNORMALAPIEXIT
+	//
+	// MessageText:
+	//
+	// An API call exited abnormally.
+	//
+	public static final int STG_E_ABNORMALAPIEXIT = 0x800300FA;
+
+	//
+	// MessageId: STG_E_INVALIDHEADER
+	//
+	// MessageText:
+	//
+	// The file %1 is not a valid compound file.
+	//
+	public static final int STG_E_INVALIDHEADER = 0x800300FB;
+
+	//
+	// MessageId: STG_E_INVALIDNAME
+	//
+	// MessageText:
+	//
+	// The name %1 is not valid.
+	//
+	public static final int STG_E_INVALIDNAME = 0x800300FC;
+
+	//
+	// MessageId: STG_E_UNKNOWN
+	//
+	// MessageText:
+	//
+	// An unexpected error occurred.
+	//
+	public static final int STG_E_UNKNOWN = 0x800300FD;
+
+	//
+	// MessageId: STG_E_UNIMPLEMENTEDFUNCTION
+	//
+	// MessageText:
+	//
+	// That function is not implemented.
+	//
+	public static final int STG_E_UNIMPLEMENTEDFUNCTION = 0x800300FE;
+
+	//
+	// MessageId: STG_E_INVALIDF;AG
+	//
+	// MessageText:
+	//
+	// Invalid F;ag error.
+	//
+	public static final int STG_E_INVALIDFLAG = 0x800300FF;
+
+	//
+	// MessageId: STG_E_INUSE
+	//
+	// MessageText:
+	//
+	// Attempted to use an object that is busy.
+	//
+	public static final int STG_E_INUSE = 0x80030100;
+
+	//
+	// MessageId: STG_E_NOTCURRENT
+	//
+	// MessageText:
+	//
+	// The storage has been changed since the last commit.
+	//
+	public static final int STG_E_NOTCURRENT = 0x80030101;
+
+	//
+	// MessageId: STG_E_REVERTED
+	//
+	// MessageText:
+	//
+	// Attempted to use an object that has ceased to exist.
+	//
+	public static final int STG_E_REVERTED = 0x80030102;
+
+	//
+	// MessageId: STG_E_CANTSAVE
+	//
+	// MessageText:
+	//
+	// Can't save.
+	//
+	public static final int STG_E_CANTSAVE = 0x80030103;
+
+	//
+	// MessageId: STG_E_OLDFORMAT
+	//
+	// MessageText:
+	//
+	// The compound file %1 was produced with an incompatible version of
+	// storage.
+	//
+	public static final int STG_E_OLDFORMAT = 0x80030104;
+
+	//
+	// MessageId: STG_E_OLDDLL
+	//
+	// MessageText:
+	//
+	// The compound file %1 was produced with a newer version of storage.
+	//
+	public static final int STG_E_OLDDLL = 0x80030105;
+
+	//
+	// MessageId: STG_E_SHAREREQUIRED
+	//
+	// MessageText:
+	//
+	// Share.exe or equivalent is required for operation.
+	//
+	public static final int STG_E_SHAREREQUIRED = 0x80030106;
+
+	//
+	// MessageId: STG_E_NOTFILEBASEDSTORAGE
+	//
+	// MessageText:
+	//
+	// Illegal operation called on non-file based storage.
+	//
+	public static final int STG_E_NOTFILEBASEDSTORAGE = 0x80030107;
+
+	//
+	// MessageId: STG_E_EXTANTMARSHALLINGS
+	//
+	// MessageText:
+	//
+	// Illegal operation called on object with extant marshallings.
+	//
+	public static final int STG_E_EXTANTMARSHALLINGS = 0x80030108;
+
+	//
+	// MessageId: STG_E_DOCFILECORRUPT
+	//
+	// MessageText:
+	//
+	// The docfile has been corrupted.
+	//
+	public static final int STG_E_DOCFILECORRUPT = 0x80030109;
+
+	//
+	// MessageId: STG_E_BADBASEADDRESS
+	//
+	// MessageText:
+	//
+	// OLE32.DLL has been loaded at the wrong address.
+	//
+	public static final int STG_E_BADBASEADDRESS = 0x80030110;
+
+	//
+	// MessageId: STG_E_DOCFILETOOLARGE
+	//
+	// MessageText:
+	//
+	// The compound file is too large for the current implementation
+	//
+	public static final int STG_E_DOCFILETOOLARGE = 0x80030111;
+
+	//
+	// MessageId: STG_E_NOTSIMPLEFORMAT
+	//
+	// MessageText:
+	//
+	// The compound file was not created with the STGM_SIMPLE F;ag
+	//
+	public static final int STG_E_NOTSIMPLEFORMAT = 0x80030112;
+
+	//
+	// MessageId: STG_E_INCOMPLETE
+	//
+	// MessageText:
+	//
+	// The file download was aborted abnormally. The file is incomplete.
+	//
+	public static final int STG_E_INCOMPLETE = 0x80030201;
+
+	//
+	// MessageId: STG_E_TERMINATED
+	//
+	// MessageText:
+	//
+	// The file download has been terminated.
+	//
+	public static final int STG_E_TERMINATED = 0x80030202;
+
+	//
+	// MessageId: STG_S_CONVERTED
+	//
+	// MessageText:
+	//
+	// The underlying file was converted to compound file format.
+	//
+	public static final int STG_S_CONVERTED = 0x00030200;
+
+	//
+	// MessageId: STG_S_BLOCK
+	//
+	// MessageText:
+	//
+	// The storage operation should block until more data is available.
+	//
+	public static final int STG_S_BLOCK = 0x00030201;
+
+	//
+	// MessageId: STG_S_RETRYNOW
+	//
+	// MessageText:
+	//
+	// The storage operation should retry immediately.
+	//
+	public static final int STG_S_RETRYNOW = 0x00030202;
+
+	//
+	// MessageId: STG_S_MONITORING
+	//
+	// MessageText:
+	//
+	// The notified event sink will not inF;uence the storage operation.
+	//
+	public static final int STG_S_MONITORING = 0x00030203;
+
+	//
+	// MessageId: STG_S_MULTIPLEOPENS
+	//
+	// MessageText:
+	//
+	// Multiple opens prevent consolidated. (commit succeeded).
+	//
+	public static final int STG_S_MULTIPLEOPENS = 0x00030204;
+
+	//
+	// MessageId: STG_S_CONSOLIDATIONFAILED
+	//
+	// MessageText:
+	//
+	// Consolidation of the storage file failed. (commit succeeded).
+	//
+	public static final int STG_S_CONSOLIDATIONFAILED = 0x00030205;
+
+	//
+	// MessageId: STG_S_CANNOTCONSOLIDATE
+	//
+	// MessageText:
+	//
+	// Consolidation of the storage file is inappropriate. (commit succeeded).
+	//
+	public static final int STG_S_CANNOTCONSOLIDATE = 0x00030206;
+
+	/*
+	 * ++
+	 * 
+	 * MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE** copy
+	 * protection errors.
+	 * 
+	 * --
+	 */
+	//
+	// MessageId: STG_E_STATUS_COPY_PROTECTION_FAILURE
+	//
+	// MessageText:
+	//
+	// Generic Copy Protection Error.
+	//
+	public static final int STG_E_STATUS_COPY_PROTECTION_FAILURE = 0x80030305;
+
+	//
+	// MessageId: STG_E_CSS_AUTHENTICATION_FAILURE
+	//
+	// MessageText:
+	//
+	// Copy Protection Error - DVD CSS Authentication failed.
+	//
+	public static final int STG_E_CSS_AUTHENTICATION_FAILURE = 0x80030306;
+
+	//
+	// MessageId: STG_E_CSS_KEY_NOT_PRESENT
+	//
+	// MessageText:
+	//
+	// Copy Protection Error - The given sector does not have a valid CSS key.
+	//
+	public static final int STG_E_CSS_KEY_NOT_PRESENT = 0x80030307;
+
+	//
+	// MessageId: STG_E_CSS_KEY_NOT_ESTABLISHED
+	//
+	// MessageText:
+	//
+	// Copy Protection Error - DVD session key not established.
+	//
+	public static final int STG_E_CSS_KEY_NOT_ESTABLISHED = 0x80030308;
+
+	//
+	// MessageId: STG_E_CSS_SCRAMBLED_SECTOR
+	//
+	// MessageText:
+	//
+	// Copy Protection Error - The read failed because the sector is encrypted.
+	//
+	public static final int STG_E_CSS_SCRAMBLED_SECTOR = 0x80030309;
+
+	//
+	// MessageId: STG_E_CSS_REGION_MISMATCH
+	//
+	// MessageText:
+	//
+	// Copy Protection Error - The current DVD's region does not correspond to
+	// the region setting of the drive.
+	//
+	public static final int STG_E_CSS_REGION_MISMATCH = 0x8003030A;
+
+	//
+	// MessageId: STG_E_RESETS_EXHAUSTED
+	//
+	// MessageText:
+	//
+	// Copy Protection Error - The drive's region setting may be permanent or
+	// the number of user resets has been exhausted.
+	//
+	public static final int STG_E_RESETS_EXHAUSTED = 0x8003030B;
+
+	/*
+	 * ++
+	 * 
+	 * MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE** copy
+	 * protection errors.
+	 * 
+	 * --
+	 */
+	// ******************
+	// FACILITY_RPC
+	// ******************
+	//
+	// Codes 0x0-0x11 are propagated from=16 bit OLE.
+	//
+	//
+	// MessageId: RPC_E_CALL_REJECTED
+	//
+	// MessageText:
+	//
+	// Call was rejected by callee.
+	//
+	public static final int RPC_E_CALL_REJECTED = 0x80010001;
+
+	//
+	// MessageId: RPC_E_CALL_CANCELED
+	//
+	// MessageText:
+	//
+	// Call was canceled by the message filter.
+	//
+	public static final int RPC_E_CALL_CANCELED = 0x80010002;
+
+	//
+	// MessageId: RPC_E_CANTPOST_INSENDCALL
+	//
+	// MessageText:
+	//
+	// The caller is dispatching an intertask SendMessage call and cannot call
+	// out via PostMessage.
+	//
+	public static final int RPC_E_CANTPOST_INSENDCALL = 0x80010003;
+
+	//
+	// MessageId: RPC_E_CANTCALLOUT_INASYNCCALL
+	//
+	// MessageText:
+	//
+	// The caller is dispatching an asynchronous call and cannot make an
+	// outgoing call on behalf of this call.
+	//
+	public static final int RPC_E_CANTCALLOUT_INASYNCCALL = 0x80010004;
+
+	//
+	// MessageId: RPC_E_CANTCALLOUT_INEXTERNALCALL
+	//
+	// MessageText:
+	//
+	// It is illegal to call out while inside message filter.
+	//
+	public static final int RPC_E_CANTCALLOUT_INEXTERNALCALL = 0x80010005;
+
+	//
+	// MessageId: RPC_E_CONNECTION_TERMINATED
+	//
+	// MessageText:
+	//
+	// The connection terminated or is in a bogus state and cannot be used any
+	// more. Other connections are still valid.
+	//
+	public static final int RPC_E_CONNECTION_TERMINATED = 0x80010006;
+
+	//
+	// MessageId: RPC_E_SERVER_DIED
+	//
+	// MessageText:
+	//
+	// The callee (server [not server application]) is not available and
+	// disappeared; all connections are invalid. The call may have executed.
+	//
+	public static final int RPC_E_SERVER_DIED = 0x80010007;
+
+	//
+	// MessageId: RPC_E_CLIENT_DIED
+	//
+	// MessageText:
+	//
+	// The caller (client) disappeared while the callee (server) was processing
+	// a call.
+	//
+	public static final int RPC_E_CLIENT_DIED = 0x80010008;
+
+	//
+	// MessageId: RPC_E_INVALID_DATAPACKET
+	//
+	// MessageText:
+	//
+	// The data packet with the marshalled parameter data is incorrect.
+	//
+	public static final int RPC_E_INVALID_DATAPACKET = 0x80010009;
+
+	//
+	// MessageId: RPC_E_CANTTRANSMIT_CALL
+	//
+	// MessageText:
+	//
+	// The call was not transmitted properly; the message queue was full and was
+	// not emptied after yielding.
+	//
+	public static final int RPC_E_CANTTRANSMIT_CALL = 0x8001000A;
+
+	//
+	// MessageId: RPC_E_CLIENT_CANTMARSHAL_DATA
+	//
+	// MessageText:
+	//
+	// The client (caller) cannot marshall the parameter data - low memory, etc.
+	//
+	public static final int RPC_E_CLIENT_CANTMARSHAL_DATA = 0x8001000B;
+
+	//
+	// MessageId: RPC_E_CLIENT_CANTUNMARSHAL_DATA
+	//
+	// MessageText:
+	//
+	// The client (caller) cannot unmarshall the return data - low memory, etc.
+	//
+	public static final int RPC_E_CLIENT_CANTUNMARSHAL_DATA = 0x8001000C;
+
+	//
+	// MessageId: RPC_E_SERVER_CANTMARSHAL_DATA
+	//
+	// MessageText:
+	//
+	// The server (callee) cannot marshall the return data - low memory, etc.
+	//
+	public static final int RPC_E_SERVER_CANTMARSHAL_DATA = 0x8001000D;
+
+	//
+	// MessageId: RPC_E_SERVER_CANTUNMARSHAL_DATA
+	//
+	// MessageText:
+	//
+	// The server (callee) cannot unmarshall the parameter data - low memory,
+	// etc.
+	//
+	public static final int RPC_E_SERVER_CANTUNMARSHAL_DATA = 0x8001000E;
+
+	//
+	// MessageId: RPC_E_INVALID_DATA
+	//
+	// MessageText:
+	//
+	// Received data is invalid; could be server or client data.
+	//
+	public static final int RPC_E_INVALID_DATA = 0x8001000F;
+
+	//
+	// MessageId: RPC_E_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// A particular parameter is invalid and cannot be (un)marshalled.
+	//
+	public static final int RPC_E_INVALID_PARAMETER = 0x80010010;
+
+	//
+	// MessageId: RPC_E_CANTCALLOUT_AGAIN
+	//
+	// MessageText:
+	//
+	// There is no second outgoing call on same channel in DDE conversation.
+	//
+	public static final int RPC_E_CANTCALLOUT_AGAIN = 0x80010011;
+
+	//
+	// MessageId: RPC_E_SERVER_DIED_DNE
+	//
+	// MessageText:
+	//
+	// The callee (server [not server application]) is not available and
+	// disappeared; all connections are invalid. The call did not execute.
+	//
+	public static final int RPC_E_SERVER_DIED_DNE = 0x80010012;
+
+	//
+	// MessageId: RPC_E_SYS_CALL_FAILED
+	//
+	// MessageText:
+	//
+	// System call failed.
+	//
+	public static final int RPC_E_SYS_CALL_FAILED = 0x80010100;
+
+	//
+	// MessageId: RPC_E_OUT_OF_RESOURCES
+	//
+	// MessageText:
+	//
+	// Could not allocate some required resource (memory, events, ...)
+	//
+	public static final int RPC_E_OUT_OF_RESOURCES = 0x80010101;
+
+	//
+	// MessageId: RPC_E_ATTEMPTED_MULTITHREAD
+	//
+	// MessageText:
+	//
+	// Attempted to make calls on more than one thread in single threaded mode.
+	//
+	public static final int RPC_E_ATTEMPTED_MULTITHREAD = 0x80010102;
+
+	//
+	// MessageId: RPC_E_NOT_REGISTERED
+	//
+	// MessageText:
+	//
+	// The requested interface is not registered on the server object.
+	//
+	public static final int RPC_E_NOT_REGISTERED = 0x80010103;
+
+	//
+	// MessageId: RPC_E_FAULT
+	//
+	// MessageText:
+	//
+	// RPC could not call the server or could not return the results of calling
+	// the server.
+	//
+	public static final int RPC_E_FAULT = 0x80010104;
+
+	//
+	// MessageId: RPC_E_SERVERFAULT
+	//
+	// MessageText:
+	//
+	// The server threw an exception.
+	//
+	public static final int RPC_E_SERVERFAULT = 0x80010105;
+
+	//
+	// MessageId: RPC_E_CHANGED_MODE
+	//
+	// MessageText:
+	//
+	// Cannot change thread mode after it is set.
+	//
+	public static final int RPC_E_CHANGED_MODE = 0x80010106;
+
+	//
+	// MessageId: RPC_E_INVALIDMETHOD
+	//
+	// MessageText:
+	//
+	// The method called does not exist on the server.
+	//
+	public static final int RPC_E_INVALIDMETHOD = 0x80010107;
+
+	//
+	// MessageId: RPC_E_DISCONNECTED
+	//
+	// MessageText:
+	//
+	// The object invoked has disconnected from its clients.
+	//
+	public static final int RPC_E_DISCONNECTED = 0x80010108;
+
+	//
+	// MessageId: RPC_E_RETRY
+	//
+	// MessageText:
+	//
+	// The object invoked chose not to process the call now. Try again later.
+	//
+	public static final int RPC_E_RETRY = 0x80010109;
+
+	//
+	// MessageId: RPC_E_SERVERCALL_RETRYLATER
+	//
+	// MessageText:
+	//
+	// The message filter indicated that the application is busy.
+	//
+	public static final int RPC_E_SERVERCALL_RETRYLATER = 0x8001010A;
+
+	//
+	// MessageId: RPC_E_SERVERCALL_REJECTED
+	//
+	// MessageText:
+	//
+	// The message filter rejected the call.
+	//
+	public static final int RPC_E_SERVERCALL_REJECTED = 0x8001010B;
+
+	//
+	// MessageId: RPC_E_INVALID_CALLDATA
+	//
+	// MessageText:
+	//
+	// A call control interfaces was called with invalid data.
+	//
+	public static final int RPC_E_INVALID_CALLDATA = 0x8001010C;
+
+	//
+	// MessageId: RPC_E_CANTCALLOUT_ININPUTSYNCCALL
+	//
+	// MessageText:
+	//
+	// An outgoing call cannot be made since the application is dispatching an
+	// input-synchronous call.
+	//
+	public static final int RPC_E_CANTCALLOUT_ININPUTSYNCCALL = 0x8001010D;
+
+	//
+	// MessageId: RPC_E_WRONG_THREAD
+	//
+	// MessageText:
+	//
+	// The application called an interface that was marshalled for a different
+	// thread.
+	//
+	public static final int RPC_E_WRONG_THREAD = 0x8001010E;
+
+	//
+	// MessageId: RPC_E_THREAD_NOT_INIT
+	//
+	// MessageText:
+	//
+	// CoInitialize has not been called on the current thread.
+	//
+	public static final int RPC_E_THREAD_NOT_INIT = 0x8001010F;
+
+	//
+	// MessageId: RPC_E_VERSION_MISMATCH
+	//
+	// MessageText:
+	//
+	// The version of OLE on the client and server machines does not match.
+	//
+	public static final int RPC_E_VERSION_MISMATCH = 0x80010110;
+
+	//
+	// MessageId: RPC_E_INVALID_HEADER
+	//
+	// MessageText:
+	//
+	// OLE received a packet with an invalid header.
+	//
+	public static final int RPC_E_INVALID_HEADER = 0x80010111;
+
+	//
+	// MessageId: RPC_E_INVALID_EXTENSION
+	//
+	// MessageText:
+	//
+	// OLE received a packet with an invalid extension.
+	//
+	public static final int RPC_E_INVALID_EXTENSION = 0x80010112;
+
+	//
+	// MessageId: RPC_E_INVALID_IPID
+	//
+	// MessageText:
+	//
+	// The requested object or interface does not exist.
+	//
+	public static final int RPC_E_INVALID_IPID = 0x80010113;
+
+	//
+	// MessageId: RPC_E_INVALID_OBJECT
+	//
+	// MessageText:
+	//
+	// The requested object does not exist.
+	//
+	public static final int RPC_E_INVALID_OBJECT = 0x80010114;
+
+	//
+	// MessageId: RPC_S_CALLPENDING
+	//
+	// MessageText:
+	//
+	// OLE has sent a request and is waiting for a reply.
+	//
+	public static final int RPC_S_CALLPENDING = 0x80010115;
+
+	//
+	// MessageId: RPC_S_WAITONTIMER
+	//
+	// MessageText:
+	//
+	// OLE is waiting before retrying a request.
+	//
+	public static final int RPC_S_WAITONTIMER = 0x80010116;
+
+	//
+	// MessageId: RPC_E_CALL_COMPLETE
+	//
+	// MessageText:
+	//
+	// Call context cannot be accessed after call completed.
+	//
+	public static final int RPC_E_CALL_COMPLETE = 0x80010117;
+
+	//
+	// MessageId: RPC_E_UNSECURE_CALL
+	//
+	// MessageText:
+	//
+	// Impersonate on unsecure calls is not supported.
+	//
+	public static final int RPC_E_UNSECURE_CALL = 0x80010118;
+
+	//
+	// MessageId: RPC_E_TOO_LATE
+	//
+	// MessageText:
+	//
+	// Security must be initialized before any interfaces are marshalled or
+	// unmarshalled. It cannot be changed once initialized.
+	//
+	public static final int RPC_E_TOO_LATE = 0x80010119;
+
+	//
+	// MessageId: RPC_E_NO_GOOD_SECURITY_PACKAGES
+	//
+	// MessageText:
+	//
+	// No security packages are installed on this machine or the user is not
+	// logged on or there are no compatible security packages between the client
+	// and server.
+	//
+	public static final int RPC_E_NO_GOOD_SECURITY_PACKAGES = 0x8001011A;
+
+	//
+	// MessageId: RPC_E_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// Access is denied.
+	//
+	public static final int RPC_E_ACCESS_DENIED = 0x8001011B;
+
+	//
+	// MessageId: RPC_E_REMOTE_DISABLED
+	//
+	// MessageText:
+	//
+	// Remote calls are not allowed for this process.
+	//
+	public static final int RPC_E_REMOTE_DISABLED = 0x8001011C;
+
+	//
+	// MessageId: RPC_E_INVALID_OBJREF
+	//
+	// MessageText:
+	//
+	// The marshaled interface data packet (OBJREF) has an invalid or unknown
+	// format.
+	//
+	public static final int RPC_E_INVALID_OBJREF = 0x8001011D;
+
+	//
+	// MessageId: RPC_E_NO_CONTEXT
+	//
+	// MessageText:
+	//
+	// No context is associated with this call. This happens for some custom
+	// marshalled calls and on the client side of the call.
+	//
+	public static final int RPC_E_NO_CONTEXT = 0x8001011E;
+
+	//
+	// MessageId: RPC_E_TIMEOUT
+	//
+	// MessageText:
+	//
+	// This operation returned because the timeout period expired.
+	//
+	public static final int RPC_E_TIMEOUT = 0x8001011F;
+
+	//
+	// MessageId: RPC_E_NO_SYNC
+	//
+	// MessageText:
+	//
+	// There are no synchronize objects to wait on.
+	//
+	public static final int RPC_E_NO_SYNC = 0x80010120;
+
+	//
+	// MessageId: RPC_E_FULLSIC_REQUIRED
+	//
+	// MessageText:
+	//
+	// Full subject issuer chain SSL principal name expected from the server.
+	//
+	public static final int RPC_E_FULLSIC_REQUIRED = 0x80010121;
+
+	//
+	// MessageId: RPC_E_INVALID_STD_NAME
+	//
+	// MessageText:
+	//
+	// Principal name is not a valid MSSTD name.
+	//
+	public static final int RPC_E_INVALID_STD_NAME = 0x80010122;
+
+	//
+	// MessageId: CO_E_FAILEDTOIMPERSONATE
+	//
+	// MessageText:
+	//
+	// Unable to impersonate DCOM client
+	//
+	public static final int CO_E_FAILEDTOIMPERSONATE = 0x80010123;
+
+	//
+	// MessageId: CO_E_FAILEDTOGETSECCTX
+	//
+	// MessageText:
+	//
+	// Unable to obtain server's security context
+	//
+	public static final int CO_E_FAILEDTOGETSECCTX = 0x80010124;
+
+	//
+	// MessageId: CO_E_FAILEDTOOPENTHREADTOKEN
+	//
+	// MessageText:
+	//
+	// Unable to open the access token of the current thread
+	//
+	public static final int CO_E_FAILEDTOOPENTHREADTOKEN = 0x80010125;
+
+	//
+	// MessageId: CO_E_FAILEDTOGETTOKENINFO
+	//
+	// MessageText:
+	//
+	// Unable to obtain user info from an access token
+	//
+	public static final int CO_E_FAILEDTOGETTOKENINFO = 0x80010126;
+
+	//
+	// MessageId: CO_E_TRUSTEEDOESNTMATCHCLIENT
+	//
+	// MessageText:
+	//
+	// The client who called IAccessControl::IsAccessPermitted was not the
+	// trustee provided to the method
+	//
+	public static final int CO_E_TRUSTEEDOESNTMATCHCLIENT = 0x80010127;
+
+	//
+	// MessageId: CO_E_FAILEDTOQUERYCLIENTBLANKET
+	//
+	// MessageText:
+	//
+	// Unable to obtain the client's security blanket
+	//
+	public static final int CO_E_FAILEDTOQUERYCLIENTBLANKET = 0x80010128;
+
+	//
+	// MessageId: CO_E_FAILEDTOSETDACL
+	//
+	// MessageText:
+	//
+	// Unable to set a discretionary ACL into a security descriptor
+	//
+	public static final int CO_E_FAILEDTOSETDACL = 0x80010129;
+
+	//
+	// MessageId: CO_E_ACCESSCHECKFAILED
+	//
+	// MessageText:
+	//
+	// The system function, AccessCheck, returned false
+	//
+	public static final int CO_E_ACCESSCHECKFAILED = 0x8001012A;
+
+	//
+	// MessageId: CO_E_NETACCESSAPIFAILED
+	//
+	// MessageText:
+	//
+	// Either NetAccessDel or NetAccessAdd returned an error code.
+	//
+	public static final int CO_E_NETACCESSAPIFAILED = 0x8001012B;
+
+	//
+	// MessageId: CO_E_WRONGTRUSTEENAMESYNTAX
+	//
+	// MessageText:
+	//
+	// One of the trustee strings provided by the user did not conform to the
+	// <Domain>\<Name> syntax and it was not the "*" string
+	//
+	public static final int CO_E_WRONGTRUSTEENAMESYNTAX = 0x8001012C;
+
+	//
+	// MessageId: CO_E_INVALIDSID
+	//
+	// MessageText:
+	//
+	// One of the security identifiers provided by the user was invalid
+	//
+	public static final int CO_E_INVALIDSID = 0x8001012D;
+
+	//
+	// MessageId: CO_E_CONVERSIONFAILED
+	//
+	// MessageText:
+	//
+	// Unable to convert a wide character trustee string to a multibyte trustee
+	// string
+	//
+	public static final int CO_E_CONVERSIONFAILED = 0x8001012E;
+
+	//
+	// MessageId: CO_E_NOMATCHINGSIDFOUND
+	//
+	// MessageText:
+	//
+	// Unable to find a security identifier that corresponds to a trustee string
+	// provided by the user
+	//
+	public static final int CO_E_NOMATCHINGSIDFOUND = 0x8001012F;
+
+	//
+	// MessageId: CO_E_LOOKUPACCSIDFAILED
+	//
+	// MessageText:
+	//
+	// The system function, LookupAccountSID, failed
+	//
+	public static final int CO_E_LOOKUPACCSIDFAILED = 0x80010130;
+
+	//
+	// MessageId: CO_E_NOMATCHINGNAMEFOUND
+	//
+	// MessageText:
+	//
+	// Unable to find a trustee name that corresponds to a security identifier
+	// provided by the user
+	//
+	public static final int CO_E_NOMATCHINGNAMEFOUND = 0x80010131;
+
+	//
+	// MessageId: CO_E_LOOKUPACCNAMEFAILED
+	//
+	// MessageText:
+	//
+	// The system function, LookupAccountName, failed
+	//
+	public static final int CO_E_LOOKUPACCNAMEFAILED = 0x80010132;
+
+	//
+	// MessageId: CO_E_SETSERLHNDLFAILED
+	//
+	// MessageText:
+	//
+	// Unable to set or reset a serialization handle
+	//
+	public static final int CO_E_SETSERLHNDLFAILED = 0x80010133;
+
+	//
+	// MessageId: CO_E_FAILEDTOGETWINDIR
+	//
+	// MessageText:
+	//
+	// Unable to obtain the Windows directory
+	//
+	public static final int CO_E_FAILEDTOGETWINDIR = 0x80010134;
+
+	//
+	// MessageId: CO_E_PATHTOOLONG
+	//
+	// MessageText:
+	//
+	// Path too long
+	//
+	public static final int CO_E_PATHTOOLONG = 0x80010135;
+
+	//
+	// MessageId: CO_E_FAILEDTOGENUUID
+	//
+	// MessageText:
+	//
+	// Unable to generate a uuid.
+	//
+	public static final int CO_E_FAILEDTOGENUUID = 0x80010136;
+
+	//
+	// MessageId: CO_E_FAILEDTOCREATEFILE
+	//
+	// MessageText:
+	//
+	// Unable to create file
+	//
+	public static final int CO_E_FAILEDTOCREATEFILE = 0x80010137;
+
+	//
+	// MessageId: CO_E_FAILEDTOCLOSEHANDLE
+	//
+	// MessageText:
+	//
+	// Unable to close a serialization handle or a file handle.
+	//
+	public static final int CO_E_FAILEDTOCLOSEHANDLE = 0x80010138;
+
+	//
+	// MessageId: CO_E_EXCEEDSYSACLLIMIT
+	//
+	// MessageText:
+	//
+	// The number of ACEs in an ACL exceeds the system limit.
+	//
+	public static final int CO_E_EXCEEDSYSACLLIMIT = 0x80010139;
+
+	//
+	// MessageId: CO_E_ACESINWRONGORDER
+	//
+	// MessageText:
+	//
+	// Not all the DENY_ACCESS ACEs are arranged in front of the GRANT_ACCESS
+	// ACEs in the stream.
+	//
+	public static final int CO_E_ACESINWRONGORDER = 0x8001013A;
+
+	//
+	// MessageId: CO_E_INCOMPATIBLESTREAMVERSION
+	//
+	// MessageText:
+	//
+	// The version of ACL format in the stream is not supported by this
+	// implementation of IAccessControl
+	//
+	public static final int CO_E_INCOMPATIBLESTREAMVERSION = 0x8001013B;
+
+	//
+	// MessageId: CO_E_FAILEDTOOPENPROCESSTOKEN
+	//
+	// MessageText:
+	//
+	// Unable to open the access token of the server process
+	//
+	public static final int CO_E_FAILEDTOOPENPROCESSTOKEN = 0x8001013C;
+
+	//
+	// MessageId: CO_E_DECODEFAILED
+	//
+	// MessageText:
+	//
+	// Unable to decode the ACL in the stream provided by the user
+	//
+	public static final int CO_E_DECODEFAILED = 0x8001013D;
+
+	//
+	// MessageId: CO_E_ACNOTINITIALIZED
+	//
+	// MessageText:
+	//
+	// The COM IAccessControl object is not initialized
+	//
+	public static final int CO_E_ACNOTINITIALIZED = 0x8001013F;
+
+	//
+	// MessageId: CO_E_CANCEL_DISABLED
+	//
+	// MessageText:
+	//
+	// Call Cancellation is disabled
+	//
+	public static final int CO_E_CANCEL_DISABLED = 0x80010140;
+
+	//
+	// MessageId: RPC_E_UNEXPECTED
+	//
+	// MessageText:
+	//
+	// An internal error occurred.
+	//
+	public static final int RPC_E_UNEXPECTED = 0x8001FFFF;
+
+	// ////////////////////////////////////
+	// =//
+	// Additional Security Status Codes //
+	// =//
+	// Facility=Security=//
+	// =//
+	// ////////////////////////////////////
+
+	//
+	// MessageId: ERROR_AUDITING_DISABLED
+	//
+	// MessageText:
+	//
+	// The specified event is currently not being audited.
+	//
+	public static final int ERROR_AUDITING_DISABLED = 0xC0090001;
+
+	//
+	// MessageId: ERROR_ALL_SIDS_FILTERED
+	//
+	// MessageText:
+	//
+	// The SID filtering operation removed all SIDs.
+	//
+	public static final int ERROR_ALL_SIDS_FILTERED = 0xC0090002;
+
+	//
+	// MessageId: ERROR_BIZRULES_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// Business rule scripts are disabled for the calling application.
+	//
+	public static final int ERROR_BIZRULES_NOT_ENABLED = 0xC0090003;
+
+	// ///////////////////////////////////////////
+	// =//
+	// end of Additional Security Status Codes //
+	// =//
+	// ///////////////////////////////////////////
+
+	// ///////////////
+	//
+	// FACILITY_SSPI
+	//
+	// ///////////////
+
+	//
+	// MessageId: NTE_BAD_UID
+	//
+	// MessageText:
+	//
+	// Bad UID.
+	//
+	public static final int NTE_BAD_UID = 0x80090001;
+
+	//
+	// MessageId: NTE_BAD_HASH
+	//
+	// MessageText:
+	//
+	// Bad Hash.
+	//
+	public static final int NTE_BAD_HASH = 0x80090002;
+
+	//
+	// MessageId: NTE_BAD_KEY
+	//
+	// MessageText:
+	//
+	// Bad Key.
+	//
+	public static final int NTE_BAD_KEY = 0x80090003;
+
+	//
+	// MessageId: NTE_BAD_LEN
+	//
+	// MessageText:
+	//
+	// Bad Length.
+	//
+	public static final int NTE_BAD_LEN = 0x80090004;
+
+	//
+	// MessageId: NTE_BAD_DATA
+	//
+	// MessageText:
+	//
+	// Bad Data.
+	//
+	public static final int NTE_BAD_DATA = 0x80090005;
+
+	//
+	// MessageId: NTE_BAD_SIGNATURE
+	//
+	// MessageText:
+	//
+	// Invalid Signature.
+	//
+	public static final int NTE_BAD_SIGNATURE = 0x80090006;
+
+	//
+	// MessageId: NTE_BAD_VER
+	//
+	// MessageText:
+	//
+	// Bad Version of provider.
+	//
+	public static final int NTE_BAD_VER = 0x80090007;
+
+	//
+	// MessageId: NTE_BAD_ALGID
+	//
+	// MessageText:
+	//
+	// Invalid algorithm specified.
+	//
+	public static final int NTE_BAD_ALGID = 0x80090008;
+
+	//
+	// MessageId: NTE_BAD_F;AGS
+	//
+	// MessageText:
+	//
+	// Invalid F;ags specified.
+	//
+	public static final int NTE_BAD_FLAGS = 0x80090009;
+
+	//
+	// MessageId: NTE_BAD_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid type specified.
+	//
+	public static final int NTE_BAD_TYPE = 0x8009000A;
+
+	//
+	// MessageId: NTE_BAD_KEY_STATE
+	//
+	// MessageText:
+	//
+	// Key not valid for use in specified state.
+	//
+	public static final int NTE_BAD_KEY_STATE = 0x8009000B;
+
+	//
+	// MessageId: NTE_BAD_HASH_STATE
+	//
+	// MessageText:
+	//
+	// Hash not valid for use in specified state.
+	//
+	public static final int NTE_BAD_HASH_STATE = 0x8009000C;
+
+	//
+	// MessageId: NTE_NO_KEY
+	//
+	// MessageText:
+	//
+	// Key does not exist.
+	//
+	public static final int NTE_NO_KEY = 0x8009000D;
+
+	//
+	// MessageId: NTE_NO_MEMORY
+	//
+	// MessageText:
+	//
+	// Insufficient memory available for the operation.
+	//
+	public static final int NTE_NO_MEMORY = 0x8009000E;
+
+	//
+	// MessageId: NTE_EXISTS
+	//
+	// MessageText:
+	//
+	// Object already exists.
+	//
+	public static final int NTE_EXISTS = 0x8009000F;
+
+	//
+	// MessageId: NTE_PERM
+	//
+	// MessageText:
+	//
+	// Access denied.
+	//
+	public static final int NTE_PERM = 0x80090010;
+
+	//
+	// MessageId: NTE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Object was not found.
+	//
+	public static final int NTE_NOT_FOUND = 0x80090011;
+
+	//
+	// MessageId: NTE_DOUBLE_ENCRYPT
+	//
+	// MessageText:
+	//
+	// Data already encrypted.
+	//
+	public static final int NTE_DOUBLE_ENCRYPT = 0x80090012;
+
+	//
+	// MessageId: NTE_BAD_PROVIDER
+	//
+	// MessageText:
+	//
+	// Invalid provider specified.
+	//
+	public static final int NTE_BAD_PROVIDER = 0x80090013;
+
+	//
+	// MessageId: NTE_BAD_PROV_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid provider type specified.
+	//
+	public static final int NTE_BAD_PROV_TYPE = 0x80090014;
+
+	//
+	// MessageId: NTE_BAD_PUBLIC_KEY
+	//
+	// MessageText:
+	//
+	// Provider's public key is invalid.
+	//
+	public static final int NTE_BAD_PUBLIC_KEY = 0x80090015;
+
+	//
+	// MessageId: NTE_BAD_KEYSET
+	//
+	// MessageText:
+	//
+	// Keyset does not exist
+	//
+	public static final int NTE_BAD_KEYSET = 0x80090016;
+
+	//
+	// MessageId: NTE_PROV_TYPE_NOT_DEF
+	//
+	// MessageText:
+	//
+	// Provider type not defined.
+	//
+	public static final int NTE_PROV_TYPE_NOT_DEF = 0x80090017;
+
+	//
+	// MessageId: NTE_PROV_TYPE_ENTRY_BAD
+	//
+	// MessageText:
+	//
+	// Provider type as registered is invalid.
+	//
+	public static final int NTE_PROV_TYPE_ENTRY_BAD = 0x80090018;
+
+	//
+	// MessageId: NTE_KEYSET_NOT_DEF
+	//
+	// MessageText:
+	//
+	// The keyset is not defined.
+	//
+	public static final int NTE_KEYSET_NOT_DEF = 0x80090019;
+
+	//
+	// MessageId: NTE_KEYSET_ENTRY_BAD
+	//
+	// MessageText:
+	//
+	// Keyset as registered is invalid.
+	//
+	public static final int NTE_KEYSET_ENTRY_BAD = 0x8009001A;
+
+	//
+	// MessageId: NTE_PROV_TYPE_NO_MATCH
+	//
+	// MessageText:
+	//
+	// Provider type does not match registered value.
+	//
+	public static final int NTE_PROV_TYPE_NO_MATCH = 0x8009001B;
+
+	//
+	// MessageId: NTE_SIGNATURE_FILE_BAD
+	//
+	// MessageText:
+	//
+	// The digital signature file is corrupt.
+	//
+	public static final int NTE_SIGNATURE_FILE_BAD = 0x8009001C;
+
+	//
+	// MessageId: NTE_PROVIDER_DLL_FAIL
+	//
+	// MessageText:
+	//
+	// Provider DLL failed to initialize correctly.
+	//
+	public static final int NTE_PROVIDER_DLL_FAIL = 0x8009001D;
+
+	//
+	// MessageId: NTE_PROV_DLL_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Provider DLL could not be found.
+	//
+	public static final int NTE_PROV_DLL_NOT_FOUND = 0x8009001E;
+
+	//
+	// MessageId: NTE_BAD_KEYSET_PARAM
+	//
+	// MessageText:
+	//
+	// The Keyset parameter is invalid.
+	//
+	public static final int NTE_BAD_KEYSET_PARAM = 0x8009001F;
+
+	//
+	// MessageId: NTE_FAIL
+	//
+	// MessageText:
+	//
+	// An internal error occurred.
+	//
+	public static final int NTE_FAIL = 0x80090020;
+
+	//
+	// MessageId: NTE_SYS_ERR
+	//
+	// MessageText:
+	//
+	// A base error occurred.
+	//
+	public static final int NTE_SYS_ERR = 0x80090021;
+
+	//
+	// MessageId: NTE_SILENT_CONTEXT
+	//
+	// MessageText:
+	//
+	// Provider could not perform the action since the context was acquired as
+	// silent.
+	//
+	public static final int NTE_SILENT_CONTEXT = 0x80090022;
+
+	//
+	// MessageId: NTE_TOKEN_KEYSET_STORAGE_FULL
+	//
+	// MessageText:
+	//
+	// The security token does not have storage space available for an
+	// additional container.
+	//
+	public static final int NTE_TOKEN_KEYSET_STORAGE_FULL = 0x80090023;
+
+	//
+	// MessageId: NTE_TEMPORARY_PROFILE
+	//
+	// MessageText:
+	//
+	// The profile for the user is a temporary profile.
+	//
+	public static final int NTE_TEMPORARY_PROFILE = 0x80090024;
+
+	//
+	// MessageId: NTE_FIXEDPARAMETER
+	//
+	// MessageText:
+	//
+	// The key parameters could not be set because the CSP uses fixed
+	// parameters.
+	//
+	public static final int NTE_FIXEDPARAMETER = 0x80090025;
+
+	//
+	// MessageId: NTE_INVALID_HANDLE
+	//
+	// MessageText:
+	//
+	// The supplied handle is invalid.
+	//
+	public static final int NTE_INVALID_HANDLE = 0x80090026;
+
+	//
+	// MessageId: NTE_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// The parameter is incorrect.
+	//
+	public static final int NTE_INVALID_PARAMETER = 0x80090027;
+
+	//
+	// MessageId: NTE_BUFFER_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The buffer supplied to a function was too small.
+	//
+	public static final int NTE_BUFFER_TOO_SMALL = 0x80090028;
+
+	//
+	// MessageId: NTE_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested operation is not supported.
+	//
+	public static final int NTE_NOT_SUPPORTED = 0x80090029;
+
+	//
+	// MessageId: NTE_NO_MORE_ITEMS
+	//
+	// MessageText:
+	//
+	// No more data is available.
+	//
+	public static final int NTE_NO_MORE_ITEMS = 0x8009002A;
+
+	//
+	// MessageId: NTE_BUFFERS_OVERLAP
+	//
+	// MessageText:
+	//
+	// The supplied buffers overlap incorrectly.
+	//
+	public static final int NTE_BUFFERS_OVERLAP = 0x8009002B;
+
+	//
+	// MessageId: NTE_DECRYPTION_FAILURE
+	//
+	// MessageText:
+	//
+	// The specified data could not be decrypted.
+	//
+	public static final int NTE_DECRYPTION_FAILURE = 0x8009002C;
+
+	//
+	// MessageId: NTE_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal consistency check failed.
+	//
+	public static final int NTE_INTERNAL_ERROR = 0x8009002D;
+
+	//
+	// MessageId: NTE_UI_REQUIRED
+	//
+	// MessageText:
+	//
+	// This operation requires input from the user.
+	//
+	public static final int NTE_UI_REQUIRED = 0x8009002E;
+
+	//
+	// MessageId: NTE_HMAC_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The cryptographic provider does not support HMAC.
+	//
+	public static final int NTE_HMAC_NOT_SUPPORTED = 0x8009002F;
+
+	//
+	// MessageId: SEC_E_INSUFFICIENT_MEMORY
+	//
+	// MessageText:
+	//
+	// Not enough memory is available to complete this request
+	//
+	public static final int SEC_E_INSUFFICIENT_MEMORY = 0x80090300;
+
+	//
+	// MessageId: SEC_E_INVALID_HANDLE
+	//
+	// MessageText:
+	//
+	// The handle specified is invalid
+	//
+	public static final int SEC_E_INVALID_HANDLE = 0x80090301;
+
+	//
+	// MessageId: SEC_E_UNSUPPORTED_FUNCTION
+	//
+	// MessageText:
+	//
+	// The function requested is not supported
+	//
+	public static final int SEC_E_UNSUPPORTED_FUNCTION = 0x80090302;
+
+	//
+	// MessageId: SEC_E_TARGET_UNKNOWN
+	//
+	// MessageText:
+	//
+	// The specified target is unknown or unreachable
+	//
+	public static final int SEC_E_TARGET_UNKNOWN = 0x80090303;
+
+	//
+	// MessageId: SEC_E_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// The Local Security Authority cannot be contacted
+	//
+	public static final int SEC_E_INTERNAL_ERROR = 0x80090304;
+
+	//
+	// MessageId: SEC_E_SECPKG_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The requested security package does not exist
+	//
+	public static final int SEC_E_SECPKG_NOT_FOUND = 0x80090305;
+
+	//
+	// MessageId: SEC_E_NOT_OWNER
+	//
+	// MessageText:
+	//
+	// The caller is not the owner of the desired credentials
+	//
+	public static final int SEC_E_NOT_OWNER = 0x80090306;
+
+	//
+	// MessageId: SEC_E_CANNOT_INSTALL
+	//
+	// MessageText:
+	//
+	// The security package failed to initialize, and cannot be installed
+	//
+	public static final int SEC_E_CANNOT_INSTALL = 0x80090307;
+
+	//
+	// MessageId: SEC_E_INVALID_TOKEN
+	//
+	// MessageText:
+	//
+	// The token supplied to the function is invalid
+	//
+	public static final int SEC_E_INVALID_TOKEN = 0x80090308;
+
+	//
+	// MessageId: SEC_E_CANNOT_PACK
+	//
+	// MessageText:
+	//
+	// The security package is not able to marshall the logon buffer, so the
+	// logon attempt has failed
+	//
+	public static final int SEC_E_CANNOT_PACK = 0x80090309;
+
+	//
+	// MessageId: SEC_E_QOP_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The per-message Quality of Protection is not supported by the security
+	// package
+	//
+	public static final int SEC_E_QOP_NOT_SUPPORTED = 0x8009030A;
+
+	//
+	// MessageId: SEC_E_NO_IMPERSONATION
+	//
+	// MessageText:
+	//
+	// The security context does not allow impersonation of the client
+	//
+	public static final int SEC_E_NO_IMPERSONATION = 0x8009030B;
+
+	//
+	// MessageId: SEC_E_LOGON_DENIED
+	//
+	// MessageText:
+	//
+	// The logon attempt failed
+	//
+	public static final int SEC_E_LOGON_DENIED = 0x8009030C;
+
+	//
+	// MessageId: SEC_E_UNKNOWN_CREDENTIALS
+	//
+	// MessageText:
+	//
+	// The credentials supplied to the package were not recognized
+	//
+	public static final int SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D;
+
+	//
+	// MessageId: SEC_E_NO_CREDENTIALS
+	//
+	// MessageText:
+	//
+	// No credentials are available in the security package
+	//
+	public static final int SEC_E_NO_CREDENTIALS = 0x8009030E;
+
+	//
+	// MessageId: SEC_E_MESSAGE_ALTERED
+	//
+	// MessageText:
+	//
+	// The message or signature supplied for verification has been altered
+	//
+	public static final int SEC_E_MESSAGE_ALTERED = 0x8009030F;
+
+	//
+	// MessageId: SEC_E_OUT_OF_SEQUENCE
+	//
+	// MessageText:
+	//
+	// The message supplied for verification is out of sequence
+	//
+	public static final int SEC_E_OUT_OF_SEQUENCE = 0x80090310;
+
+	//
+	// MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
+	//
+	// MessageText:
+	//
+	// No authority could be contacted for authentication.
+	//
+	public static final int SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311;
+
+	//
+	// MessageId: SEC_I_CONTINUE_NEEDED
+	//
+	// MessageText:
+	//
+	// The function completed successfully, but must be called again to complete
+	// the context
+	//
+	public static final int SEC_I_CONTINUE_NEEDED = 0x00090312;
+
+	//
+	// MessageId: SEC_I_COMPLETE_NEEDED
+	//
+	// MessageText:
+	//
+	// The function completed successfully, but CompleteToken must be called
+	//
+	public static final int SEC_I_COMPLETE_NEEDED = 0x00090313;
+
+	//
+	// MessageId: SEC_I_COMPLETE_AND_CONTINUE
+	//
+	// MessageText:
+	//
+	// The function completed successfully, but both CompleteToken and this
+	// function must be called to complete the context
+	//
+	public static final int SEC_I_COMPLETE_AND_CONTINUE = 0x00090314;
+
+	//
+	// MessageId: SEC_I_LOCAL_LOGON
+	//
+	// MessageText:
+	//
+	// The logon was completed, but no network authority was available. The
+	// logon was made using locally known information
+	//
+	public static final int SEC_I_LOCAL_LOGON = 0x00090315;
+
+	//
+	// MessageId: SEC_E_BAD_PKGID
+	//
+	// MessageText:
+	//
+	// The requested security package does not exist
+	//
+	public static final int SEC_E_BAD_PKGID = 0x80090316;
+
+	//
+	// MessageId: SEC_E_CONTEXT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The context has expired and can no longer be used.
+	//
+	public static final int SEC_E_CONTEXT_EXPIRED = 0x80090317;
+
+	//
+	// MessageId: SEC_I_CONTEXT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The context has expired and can no longer be used.
+	//
+	public static final int SEC_I_CONTEXT_EXPIRED = 0x00090317;
+
+	//
+	// MessageId: SEC_E_INCOMPLETE_MESSAGE
+	//
+	// MessageText:
+	//
+	// The supplied message is incomplete. The signature was not verified.
+	//
+	public static final int SEC_E_INCOMPLETE_MESSAGE = 0x80090318;
+
+	//
+	// MessageId: SEC_E_INCOMPLETE_CREDENTIALS
+	//
+	// MessageText:
+	//
+	// The credentials supplied were not complete, and could not be verified.
+	// The context could not be initialized.
+	//
+	public static final int SEC_E_INCOMPLETE_CREDENTIALS = 0x80090320;
+
+	//
+	// MessageId: SEC_E_BUFFER_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The buffers supplied to a function was too small.
+	//
+	public static final int SEC_E_BUFFER_TOO_SMALL = 0x80090321;
+
+	//
+	// MessageId: SEC_I_INCOMPLETE_CREDENTIALS
+	//
+	// MessageText:
+	//
+	// The credentials supplied were not complete, and could not be verified.
+	// Additional information can be returned from the context.
+	//
+	public static final int SEC_I_INCOMPLETE_CREDENTIALS = 0x00090320;
+
+	//
+	// MessageId: SEC_I_RENEGOTIATE
+	//
+	// MessageText:
+	//
+	// The context data must be renegotiated with the peer.
+	//
+	public static final int SEC_I_RENEGOTIATE = 0x00090321;
+
+	//
+	// MessageId: SEC_E_WRONG_PRINCIPAL
+	//
+	// MessageText:
+	//
+	// The target principal name is incorrect.
+	//
+	public static final int SEC_E_WRONG_PRINCIPAL = 0x80090322;
+
+	//
+	// MessageId: SEC_I_NO_LSA_CONTEXT
+	//
+	// MessageText:
+	//
+	// There is no LSA mode context associated with this context.
+	//
+	public static final int SEC_I_NO_LSA_CONTEXT = 0x00090323;
+
+	//
+	// MessageId: SEC_E_TIME_SKEW
+	//
+	// MessageText:
+	//
+	// The clocks on the client and server machines are skewed.
+	//
+	public static final int SEC_E_TIME_SKEW = 0x80090324;
+
+	//
+	// MessageId: SEC_E_UNTRUSTED_ROOT
+	//
+	// MessageText:
+	//
+	// The certificate chain was issued by an authority that is not trusted.
+	//
+	public static final int SEC_E_UNTRUSTED_ROOT = 0x80090325;
+
+	//
+	// MessageId: SEC_E_ILLEGAL_MESSAGE
+	//
+	// MessageText:
+	//
+	// The message received was unexpected or badly formatted.
+	//
+	public static final int SEC_E_ILLEGAL_MESSAGE = 0x80090326;
+
+	//
+	// MessageId: SEC_E_CERT_UNKNOWN
+	//
+	// MessageText:
+	//
+	// An unknown error occurred while processing the certificate.
+	//
+	public static final int SEC_E_CERT_UNKNOWN = 0x80090327;
+
+	//
+	// MessageId: SEC_E_CERT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The received certificate has expired.
+	//
+	public static final int SEC_E_CERT_EXPIRED = 0x80090328;
+
+	//
+	// MessageId: SEC_E_ENCRYPT_FAILURE
+	//
+	// MessageText:
+	//
+	// The specified data could not be encrypted.
+	//
+	public static final int SEC_E_ENCRYPT_FAILURE = 0x80090329;
+
+	//
+	// MessageId: SEC_E_DECRYPT_FAILURE
+	//
+	// MessageText:
+	//
+	// The specified data could not be decrypted.
+	// 
+	//
+	public static final int SEC_E_DECRYPT_FAILURE = 0x80090330;
+
+	//
+	// MessageId: SEC_E_ALGORITHM_MISMATCH
+	//
+	// MessageText:
+	//
+	// The client and server cannot communicate, because they do not possess a
+	// common algorithm.
+	//
+	public static final int SEC_E_ALGORITHM_MISMATCH = 0x80090331;
+
+	//
+	// MessageId: SEC_E_SECURITY_QOS_FAILED
+	//
+	// MessageText:
+	//
+	// The security context could not be established due to a failure in the
+	// requested quality of service (e.g. mutual authentication or delegation).
+	//
+	public static final int SEC_E_SECURITY_QOS_FAILED = 0x80090332;
+
+	//
+	// MessageId: SEC_E_UNFINISHED_CONTEXT_DELETED
+	//
+	// MessageText:
+	//
+	// A security context was deleted before the context was completed. This is
+	// considered a logon failure.
+	//
+	public static final int SEC_E_UNFINISHED_CONTEXT_DELETED = 0x80090333;
+
+	//
+	// MessageId: SEC_E_NO_TGT_REPLY
+	//
+	// MessageText:
+	//
+	// The client is trying to negotiate a context and the server requires
+	// user-to-user but didn't send a TGT reply.
+	//
+	public static final int SEC_E_NO_TGT_REPLY = 0x80090334;
+
+	//
+	// MessageId: SEC_E_NO_IP_ADDRESSES
+	//
+	// MessageText:
+	//
+	// Unable to accomplish the requested task because the local machine does
+	// not have any IP addresses.
+	//
+	public static final int SEC_E_NO_IP_ADDRESSES = 0x80090335;
+
+	//
+	// MessageId: SEC_E_WRONG_CREDENTIAL_HANDLE
+	//
+	// MessageText:
+	//
+	// The supplied credential handle does not match the credential associated
+	// with the security context.
+	//
+	public static final int SEC_E_WRONG_CREDENTIAL_HANDLE = 0x80090336;
+
+	//
+	// MessageId: SEC_E_CRYPTO_SYSTEM_INVALID
+	//
+	// MessageText:
+	//
+	// The crypto system or checksum function is invalid because a required
+	// function is unavailable.
+	//
+	public static final int SEC_E_CRYPTO_SYSTEM_INVALID = 0x80090337;
+
+	//
+	// MessageId: SEC_E_MAX_REFERRALS_EXCEEDED
+	//
+	// MessageText:
+	//
+	// The number of maximum ticket referrals has been exceeded.
+	//
+	public static final int SEC_E_MAX_REFERRALS_EXCEEDED = 0x80090338;
+
+	//
+	// MessageId: SEC_E_MUST_BE_KDC
+	//
+	// MessageText:
+	//
+	// The local machine must be a Kerberos KDC (domain controller) and it is
+	// not.
+	//
+	public static final int SEC_E_MUST_BE_KDC = 0x80090339;
+
+	//
+	// MessageId: SEC_E_STRONG_CRYPTO_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The other end of the security negotiation is requires strong crypto but
+	// it is not supported on the local machine.
+	//
+	public static final int SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = 0x8009033A;
+
+	//
+	// MessageId: SEC_E_TOO_MANY_PRINCIPALS
+	//
+	// MessageText:
+	//
+	// The KDC reply contained more than one principal name.
+	//
+	public static final int SEC_E_TOO_MANY_PRINCIPALS = 0x8009033B;
+
+	//
+	// MessageId: SEC_E_NO_PA_DATA
+	//
+	// MessageText:
+	//
+	// Expected to find PA data for a hint of what etype to use, but it was not
+	// found.
+	//
+	public static final int SEC_E_NO_PA_DATA = 0x8009033C;
+
+	//
+	// MessageId: SEC_E_PKINIT_NAME_MISMATCH
+	//
+	// MessageText:
+	//
+	// The client certificate does not contain a valid UPN, or does not match
+	// the client name
+	// in the logon request. Please contact your administrator.
+	//
+	public static final int SEC_E_PKINIT_NAME_MISMATCH = 0x8009033D;
+
+	//
+	// MessageId: SEC_E_SMARTCARD_LOGON_REQUIRED
+	//
+	// MessageText:
+	//
+	// Smartcard logon is required and was not used.
+	//
+	public static final int SEC_E_SMARTCARD_LOGON_REQUIRED = 0x8009033E;
+
+	//
+	// MessageId: SEC_E_SHUTDOWN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// A system shutdown is in progress.
+	//
+	public static final int SEC_E_SHUTDOWN_IN_PROGRESS = 0x8009033F;
+
+	//
+	// MessageId: SEC_E_KDC_INVALID_REQUEST
+	//
+	// MessageText:
+	//
+	// An invalid request was sent to the KDC.
+	//
+	public static final int SEC_E_KDC_INVALID_REQUEST = 0x80090340;
+
+	//
+	// MessageId: SEC_E_KDC_UNABLE_TO_REFER
+	//
+	// MessageText:
+	//
+	// The KDC was unable to generate a referral for the service requested.
+	//
+	public static final int SEC_E_KDC_UNABLE_TO_REFER = 0x80090341;
+
+	//
+	// MessageId: SEC_E_KDC_UNKNOWN_ETYPE
+	//
+	// MessageText:
+	//
+	// The encryption type requested is not supported by the KDC.
+	//
+	public static final int SEC_E_KDC_UNKNOWN_ETYPE = 0x80090342;
+
+	//
+	// MessageId: SEC_E_UNSUPPORTED_PREAUTH
+	//
+	// MessageText:
+	//
+	// An unsupported preauthentication mechanism was presented to the kerberos
+	// package.
+	//
+	public static final int SEC_E_UNSUPPORTED_PREAUTH = 0x80090343;
+
+	//
+	// MessageId: SEC_E_DELEGATION_REQUIRED
+	//
+	// MessageText:
+	//
+	// The requested operation cannot be completed. The computer must be trusted
+	// for delegation and the current user account must be configured to allow
+	// delegation.
+	//
+	public static final int SEC_E_DELEGATION_REQUIRED = 0x80090345;
+
+	//
+	// MessageId: SEC_E_BAD_BINDINGS
+	//
+	// MessageText:
+	//
+	// Client's supplied SSPI channel bindings were incorrect.
+	//
+	public static final int SEC_E_BAD_BINDINGS = 0x80090346;
+
+	//
+	// MessageId: SEC_E_MULTIPLE_ACCOUNTS
+	//
+	// MessageText:
+	//
+	// The received certificate was mapped to multiple accounts.
+	//
+	public static final int SEC_E_MULTIPLE_ACCOUNTS = 0x80090347;
+
+	//
+	// MessageId: SEC_E_NO_KERB_KEY
+	//
+	// MessageText:
+	//
+	// SEC_E_NO_KERB_KEY
+	//
+	public static final int SEC_E_NO_KERB_KEY = 0x80090348;
+
+	//
+	// MessageId: SEC_E_CERT_WRONG_USAGE
+	//
+	// MessageText:
+	//
+	// The certificate is not valid for the requested usage.
+	//
+	public static final int SEC_E_CERT_WRONG_USAGE = 0x80090349;
+
+	//
+	// MessageId: SEC_E_DOWNGRADE_DETECTED
+	//
+	// MessageText:
+	//
+	// The system detected a possible attempt to compromise security. Please
+	// ensure that you can contact the server that authenticated you.
+	//
+	public static final int SEC_E_DOWNGRADE_DETECTED = 0x80090350;
+
+	//
+	// MessageId: SEC_E_SMARTCARD_CERT_REVOKED
+	//
+	// MessageText:
+	//
+	// The smartcard certificate used for authentication has been revoked.
+	// Please contact your system administrator. There may be additional
+	// information in the event log.
+	//
+	public static final int SEC_E_SMARTCARD_CERT_REVOKED = 0x80090351;
+
+	//
+	// MessageId: SEC_E_ISSUING_CA_UNTRUSTED
+	//
+	// MessageText:
+	//
+	// An untrusted certificate authority was detected While processing the
+	// smartcard certificate used for authentication. Please contact your system
+	// administrator.
+	//
+	public static final int SEC_E_ISSUING_CA_UNTRUSTED = 0x80090352;
+
+	//
+	// MessageId: SEC_E_REVOCATION_OFF;INE_C
+	//
+	// MessageText:
+	//
+	// The revocation status of the smartcard certificate used for
+	// authentication could not be determined. Please contact your system
+	// administrator.
+	//
+	public static final int SEC_E_REVOCATION_OFFLINE_C = 0x80090353;
+
+	//
+	// MessageId: SEC_E_PKINIT_CLIENT_FAILURE
+	//
+	// MessageText:
+	//
+	// The smartcard certificate used for authentication was not trusted. Please
+	// contact your system administrator.
+	//
+	public static final int SEC_E_PKINIT_CLIENT_FAILURE = 0x80090354;
+
+	//
+	// MessageId: SEC_E_SMARTCARD_CERT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The smartcard certificate used for authentication has expired. Please
+	// contact your system administrator.
+	//
+	public static final int SEC_E_SMARTCARD_CERT_EXPIRED = 0x80090355;
+
+	//
+	// MessageId: SEC_E_NO_S4U_PROT_SUPPORT
+	//
+	// MessageText:
+	//
+	// The Kerberos subsystem encountered an error. A service for user protocol
+	// request was made against a domain controller which does not support
+	// service for user.
+	//
+	public static final int SEC_E_NO_S4U_PROT_SUPPORT = 0x80090356;
+
+	//
+	// MessageId: SEC_E_CROSSREALM_DELEGATION_FAILURE
+	//
+	// MessageText:
+	//
+	// An attempt was made by this server to make a Kerberos constrained
+	// delegation request for a target outside of the server's realm. This is
+	// not supported, and indicates a misconfiguration on this server's allowed
+	// to delegate to list. Please contact your administrator.
+	//
+	public static final int SEC_E_CROSSREALM_DELEGATION_FAILURE = 0x80090357;
+
+	//
+	// MessageId: SEC_E_REVOCATION_OFF;INE_KDC
+	//
+	// MessageText:
+	//
+	// The revocation status of the domain controller certificate used for
+	// smartcard authentication could not be determined. There is additional
+	// information in the system event log. Please contact your system
+	// administrator.
+	//
+	public static final int SEC_E_REVOCATION_OFFLINE_KDC = 0x80090358;
+
+	//
+	// MessageId: SEC_E_ISSUING_CA_UNTRUSTED_KDC
+	//
+	// MessageText:
+	//
+	// An untrusted certificate authority was detected while processing the
+	// domain controller certificate used for authentication. There is
+	// additional information in the system event log. Please contact your
+	// system administrator.
+	//
+	public static final int SEC_E_ISSUING_CA_UNTRUSTED_KDC = 0x80090359;
+
+	//
+	// MessageId: SEC_E_KDC_CERT_EXPIRED
+	//
+	// MessageText:
+	//
+	// The domain controller certificate used for smartcard logon has expired.
+	// Please contact your system administrator with the contents of your system
+	// event log.
+	//
+	public static final int SEC_E_KDC_CERT_EXPIRED = 0x8009035A;
+
+	//
+	// MessageId: SEC_E_KDC_CERT_REVOKED
+	//
+	// MessageText:
+	//
+	// The domain controller certificate used for smartcard logon has been
+	// revoked. Please contact your system administrator with the contents of
+	// your system event log.
+	//
+	public static final int SEC_E_KDC_CERT_REVOKED = 0x8009035B;
+
+	//
+	// MessageId: SEC_I_SIGNATURE_NEEDED
+	//
+	// MessageText:
+	//
+	// A signature operation must be performed before the user can authenticate.
+	//
+	public static final int SEC_I_SIGNATURE_NEEDED = 0x0009035C;
+
+	//
+	// MessageId: SEC_E_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// One or more of the parameters passed to the function was invalid.
+	//
+	public static final int SEC_E_INVALID_PARAMETER = 0x8009035D;
+
+	//
+	// MessageId: SEC_E_DELEGATION_POLICY
+	//
+	// MessageText:
+	//
+	// Client policy does not allow credential delegation to target server.
+	//
+	public static final int SEC_E_DELEGATION_POLICY = 0x8009035E;
+
+	//
+	// MessageId: SEC_E_POLICY_NLTM_ONLY
+	//
+	// MessageText:
+	//
+	// Client policy does not allow credential delegation to target server with
+	// NLTM only authentication.
+	//
+	public static final int SEC_E_POLICY_NLTM_ONLY = 0x8009035F;
+
+	//
+	// MessageId: SEC_I_NO_RENEGOTIATION
+	//
+	// MessageText:
+	//
+	// The recipient rejected the renegotiation request.
+	//
+	public static final int SEC_I_NO_RENEGOTIATION = 0x00090360;
+
+	//
+	// Provided for backwards compatibility
+	//
+
+	public static final int SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
+	public static final int SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
+
+	//
+	// MessageId: CRYPT_E_MSG_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred while performing an operation on a cryptographic
+	// message.
+	//
+	public static final int CRYPT_E_MSG_ERROR = 0x80091001;
+
+	//
+	// MessageId: CRYPT_E_UNKNOWN_ALGO
+	//
+	// MessageText:
+	//
+	// Unknown cryptographic algorithm.
+	//
+	public static final int CRYPT_E_UNKNOWN_ALGO = 0x80091002;
+
+	//
+	// MessageId: CRYPT_E_OID_FORMAT
+	//
+	// MessageText:
+	//
+	// The object identifier is poorly formatted.
+	//
+	public static final int CRYPT_E_OID_FORMAT = 0x80091003;
+
+	//
+	// MessageId: CRYPT_E_INVALID_MSG_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid cryptographic message type.
+	//
+	public static final int CRYPT_E_INVALID_MSG_TYPE = 0x80091004;
+
+	//
+	// MessageId: CRYPT_E_UNEXPECTED_ENCODING
+	//
+	// MessageText:
+	//
+	// Unexpected cryptographic message encoding.
+	//
+	public static final int CRYPT_E_UNEXPECTED_ENCODING = 0x80091005;
+
+	//
+	// MessageId: CRYPT_E_AUTH_ATTR_MISSING
+	//
+	// MessageText:
+	//
+	// The cryptographic message does not contain an expected authenticated
+	// attribute.
+	//
+	public static final int CRYPT_E_AUTH_ATTR_MISSING = 0x80091006;
+
+	//
+	// MessageId: CRYPT_E_HASH_VALUE
+	//
+	// MessageText:
+	//
+	// The hash value is not correct.
+	//
+	public static final int CRYPT_E_HASH_VALUE = 0x80091007;
+
+	//
+	// MessageId: CRYPT_E_INVALID_INDEX
+	//
+	// MessageText:
+	//
+	// The index value is not valid.
+	//
+	public static final int CRYPT_E_INVALID_INDEX = 0x80091008;
+
+	//
+	// MessageId: CRYPT_E_ALREADY_DECRYPTED
+	//
+	// MessageText:
+	//
+	// The content of the cryptographic message has already been decrypted.
+	//
+	public static final int CRYPT_E_ALREADY_DECRYPTED = 0x80091009;
+
+	//
+	// MessageId: CRYPT_E_NOT_DECRYPTED
+	//
+	// MessageText:
+	//
+	// The content of the cryptographic message has not been decrypted yet.
+	//
+	public static final int CRYPT_E_NOT_DECRYPTED = 0x8009100A;
+
+	//
+	// MessageId: CRYPT_E_RECIPIENT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The enveloped-data message does not contain the specified recipient.
+	//
+	public static final int CRYPT_E_RECIPIENT_NOT_FOUND = 0x8009100B;
+
+	//
+	// MessageId: CRYPT_E_CONTROL_TYPE
+	//
+	// MessageText:
+	//
+	// Invalid control type.
+	//
+	public static final int CRYPT_E_CONTROL_TYPE = 0x8009100C;
+
+	//
+	// MessageId: CRYPT_E_ISSUER_SERIALNUMBER
+	//
+	// MessageText:
+	//
+	// Invalid issuer and/or serial number.
+	//
+	public static final int CRYPT_E_ISSUER_SERIALNUMBER = 0x8009100D;
+
+	//
+	// MessageId: CRYPT_E_SIGNER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Cannot find the original signer.
+	//
+	public static final int CRYPT_E_SIGNER_NOT_FOUND = 0x8009100E;
+
+	//
+	// MessageId: CRYPT_E_ATTRIBUTES_MISSING
+	//
+	// MessageText:
+	//
+	// The cryptographic message does not contain all of the requested
+	// attributes.
+	//
+	public static final int CRYPT_E_ATTRIBUTES_MISSING = 0x8009100F;
+
+	//
+	// MessageId: CRYPT_E_STREAM_MSG_NOT_READY
+	//
+	// MessageText:
+	//
+	// The streamed cryptographic message is not ready to return data.
+	//
+	public static final int CRYPT_E_STREAM_MSG_NOT_READY = 0x80091010;
+
+	//
+	// MessageId: CRYPT_E_STREAM_INSUFFICIENT_DATA
+	//
+	// MessageText:
+	//
+	// The streamed cryptographic message requires more data to complete the
+	// decode operation.
+	//
+	public static final int CRYPT_E_STREAM_INSUFFICIENT_DATA = 0x80091011;
+
+	//
+	// MessageId: CRYPT_I_NEW_PROTECTION_REQUIRED
+	//
+	// MessageText:
+	//
+	// The protected data needs to be re-protected.
+	//
+	public static final int CRYPT_I_NEW_PROTECTION_REQUIRED = 0x00091012;
+
+	//
+	// MessageId: CRYPT_E_BAD_LEN
+	//
+	// MessageText:
+	//
+	// The length specified for the output data was insufficient.
+	//
+	public static final int CRYPT_E_BAD_LEN = 0x80092001;
+
+	//
+	// MessageId: CRYPT_E_BAD_ENCODE
+	//
+	// MessageText:
+	//
+	// An error occurred during encode or decode operation.
+	//
+	public static final int CRYPT_E_BAD_ENCODE = 0x80092002;
+
+	//
+	// MessageId: CRYPT_E_FILE_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred while reading or writing to a file.
+	//
+	public static final int CRYPT_E_FILE_ERROR = 0x80092003;
+
+	//
+	// MessageId: CRYPT_E_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Cannot find object or property.
+	//
+	public static final int CRYPT_E_NOT_FOUND = 0x80092004;
+
+	//
+	// MessageId: CRYPT_E_EXISTS
+	//
+	// MessageText:
+	//
+	// The object or property already exists.
+	//
+	public static final int CRYPT_E_EXISTS = 0x80092005;
+
+	//
+	// MessageId: CRYPT_E_NO_PROVIDER
+	//
+	// MessageText:
+	//
+	// No provider was specified for the store or object.
+	//
+	public static final int CRYPT_E_NO_PROVIDER = 0x80092006;
+
+	//
+	// MessageId: CRYPT_E_SELF_SIGNED
+	//
+	// MessageText:
+	//
+	// The specified certificate is self signed.
+	//
+	public static final int CRYPT_E_SELF_SIGNED = 0x80092007;
+
+	//
+	// MessageId: CRYPT_E_DELETED_PREV
+	//
+	// MessageText:
+	//
+	// The previous certificate or CRL context was deleted.
+	//
+	public static final int CRYPT_E_DELETED_PREV = 0x80092008;
+
+	//
+	// MessageId: CRYPT_E_NO_MATCH
+	//
+	// MessageText:
+	//
+	// Cannot find the requested object.
+	//
+	public static final int CRYPT_E_NO_MATCH = 0x80092009;
+
+	//
+	// MessageId: CRYPT_E_UNEXPECTED_MSG_TYPE
+	//
+	// MessageText:
+	//
+	// The certificate does not have a property that references a private key.
+	//
+	public static final int CRYPT_E_UNEXPECTED_MSG_TYPE = 0x8009200A;
+
+	//
+	// MessageId: CRYPT_E_NO_KEY_PROPERTY
+	//
+	// MessageText:
+	//
+	// Cannot find the certificate and private key for decryption.
+	//
+	public static final int CRYPT_E_NO_KEY_PROPERTY = 0x8009200B;
+
+	//
+	// MessageId: CRYPT_E_NO_DECRYPT_CERT
+	//
+	// MessageText:
+	//
+	// Cannot find the certificate and private key to use for decryption.
+	//
+	public static final int CRYPT_E_NO_DECRYPT_CERT = 0x8009200C;
+
+	//
+	// MessageId: CRYPT_E_BAD_MSG
+	//
+	// MessageText:
+	//
+	// Not a cryptographic message or the cryptographic message is not formatted
+	// correctly.
+	//
+	public static final int CRYPT_E_BAD_MSG = 0x8009200D;
+
+	//
+	// MessageId: CRYPT_E_NO_SIGNER
+	//
+	// MessageText:
+	//
+	// The signed cryptographic message does not have a signer for the specified
+	// signer index.
+	//
+	public static final int CRYPT_E_NO_SIGNER = 0x8009200E;
+
+	//
+	// MessageId: CRYPT_E_PENDING_CLOSE
+	//
+	// MessageText:
+	//
+	// Final closure is pending until additional frees or closes.
+	//
+	public static final int CRYPT_E_PENDING_CLOSE = 0x8009200F;
+
+	//
+	// MessageId: CRYPT_E_REVOKED
+	//
+	// MessageText:
+	//
+	// The certificate is revoked.
+	//
+	public static final int CRYPT_E_REVOKED = 0x80092010;
+
+	//
+	// MessageId: CRYPT_E_NO_REVOCATION_DLL
+	//
+	// MessageText:
+	//
+	// No Dll or exported function was found to verify revocation.
+	//
+	public static final int CRYPT_E_NO_REVOCATION_DLL = 0x80092011;
+
+	//
+	// MessageId: CRYPT_E_NO_REVOCATION_CHECK
+	//
+	// MessageText:
+	//
+	// The revocation function was unable to check revocation for the
+	// certificate.
+	//
+	public static final int CRYPT_E_NO_REVOCATION_CHECK = 0x80092012;
+
+	//
+	// MessageId: CRYPT_E_REVOCATION_OFF;INE
+	//
+	// MessageText:
+	//
+	// The revocation function was unable to check revocation because the
+	// revocation server was ofF;ine.
+	//
+	public static final int CRYPT_E_REVOCATION_OFFLINE = 0x80092013;
+
+	//
+	// MessageId: CRYPT_E_NOT_IN_REVOCATION_DATABASE
+	//
+	// MessageText:
+	//
+	// The certificate is not in the revocation server's database.
+	//
+	public static final int CRYPT_E_NOT_IN_REVOCATION_DATABASE = 0x80092014;
+
+	//
+	// MessageId: CRYPT_E_INVALID_NUMERIC_STRING
+	//
+	// MessageText:
+	//
+	// The string contains a non-numeric character.
+	//
+	public static final int CRYPT_E_INVALID_NUMERIC_STRING = 0x80092020;
+
+	//
+	// MessageId: CRYPT_E_INVALID_PRINTABLE_STRING
+	//
+	// MessageText:
+	//
+	// The string contains a non-printable character.
+	//
+	public static final int CRYPT_E_INVALID_PRINTABLE_STRING = 0x80092021;
+
+	//
+	// MessageId: CRYPT_E_INVALID_IA5_STRING
+	//
+	// MessageText:
+	//
+	// The string contains a character not in the=7 bit ASCII character set.
+	//
+	public static final int CRYPT_E_INVALID_IA5_STRING = 0x80092022;
+
+	//
+	// MessageId: CRYPT_E_INVALID_X500_STRING
+	//
+	// MessageText:
+	//
+	// The string contains an invalid X500 name attribute key, oid, value or
+	// delimiter.
+	//
+	public static final int CRYPT_E_INVALID_X500_STRING = 0x80092023;
+
+	//
+	// MessageId: CRYPT_E_NOT_CHAR_STRING
+	//
+	// MessageText:
+	//
+	// The dwValueType for the CERT_NAME_VALUE is not one of the character
+	// strings. Most likely it is either a CERT_RDN_ENCODED_BLOB or
+	// CERT_TDN_OCTED_STRING.
+	//
+	public static final int CRYPT_E_NOT_CHAR_STRING = 0x80092024;
+
+	//
+	// MessageId: CRYPT_E_FILERESIZED
+	//
+	// MessageText:
+	//
+	// The Put operation cannot continue. The file needs to be resized. However,
+	// there is already a signature present. A complete signing operation must
+	// be done.
+	//
+	public static final int CRYPT_E_FILERESIZED = 0x80092025;
+
+	//
+	// MessageId: CRYPT_E_SECURITY_SETTINGS
+	//
+	// MessageText:
+	//
+	// The cryptographic operation failed due to a local security option
+	// setting.
+	//
+	public static final int CRYPT_E_SECURITY_SETTINGS = 0x80092026;
+
+	//
+	// MessageId: CRYPT_E_NO_VERIFY_USAGE_DLL
+	//
+	// MessageText:
+	//
+	// No DLL or exported function was found to verify subject usage.
+	//
+	public static final int CRYPT_E_NO_VERIFY_USAGE_DLL = 0x80092027;
+
+	//
+	// MessageId: CRYPT_E_NO_VERIFY_USAGE_CHECK
+	//
+	// MessageText:
+	//
+	// The called function was unable to do a usage check on the subject.
+	//
+	public static final int CRYPT_E_NO_VERIFY_USAGE_CHECK = 0x80092028;
+
+	//
+	// MessageId: CRYPT_E_VERIFY_USAGE_OFF;INE
+	//
+	// MessageText:
+	//
+	// Since the server was ofF;ine, the called function was unable to complete
+	// the usage check.
+	//
+	public static final int CRYPT_E_VERIFY_USAGE_OFFLINE = 0x80092029;
+
+	//
+	// MessageId: CRYPT_E_NOT_IN_CTL
+	//
+	// MessageText:
+	//
+	// The subject was not found in a Certificate Trust List (CT;.
+	//
+	public static final int CRYPT_E_NOT_IN_CTL = 0x8009202A;
+
+	//
+	// MessageId: CRYPT_E_NO_TRUSTED_SIGNER
+	//
+	// MessageText:
+	//
+	// None of the signers of the cryptographic message or certificate trust
+	// list is trusted.
+	//
+	public static final int CRYPT_E_NO_TRUSTED_SIGNER = 0x8009202B;
+
+	//
+	// MessageId: CRYPT_E_MISSING_PUBKEY_PARA
+	//
+	// MessageText:
+	//
+	// The public key's algorithm parameters are missing.
+	//
+	public static final int CRYPT_E_MISSING_PUBKEY_PARA = 0x8009202C;
+
+	//
+	// MessageId: CRYPT_E_OSS_ERROR
+	//
+	// MessageText:
+	//
+	// OSS Certificate encode/decode error code base
+	// 
+	// See asn1code.h for a definition of the OSS runtime errors. The OSS
+	// error values are offset by CRYPT_E_OSS_ERROR.
+	//
+	public static final int CRYPT_E_OSS_ERROR = 0x80093000;
+
+	//
+	// MessageId: OSS_MORE_BUF
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Output Buffer is too small.
+	//
+	public static final int OSS_MORE_BUF = 0x80093001;
+
+	//
+	// MessageId: OSS_NEGATIVE_UINTEGER
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Signed integer is encoded as a unsigned integer.
+	//
+	public static final int OSS_NEGATIVE_UINTEGER = 0x80093002;
+
+	//
+	// MessageId: OSS_PDU_RANGE
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Unknown ASN.1 data type.
+	//
+	public static final int OSS_PDU_RANGE = 0x80093003;
+
+	//
+	// MessageId: OSS_MORE_INPUT
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Output buffer is too small, the decoded data has been
+	// truncated.
+	//
+	public static final int OSS_MORE_INPUT = 0x80093004;
+
+	//
+	// MessageId: OSS_DATA_ERROR
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_DATA_ERROR = 0x80093005;
+
+	//
+	// MessageId: OSS_BAD_ARG
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid argument.
+	//
+	public static final int OSS_BAD_ARG = 0x80093006;
+
+	//
+	// MessageId: OSS_BAD_VERSION
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Encode/Decode version mismatch.
+	//
+	public static final int OSS_BAD_VERSION = 0x80093007;
+
+	//
+	// MessageId: OSS_OUT_MEMORY
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Out of memory.
+	//
+	public static final int OSS_OUT_MEMORY = 0x80093008;
+
+	//
+	// MessageId: OSS_PDU_MISMATCH
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Encode/Decode Error.
+	//
+	public static final int OSS_PDU_MISMATCH = 0x80093009;
+
+	//
+	// MessageId: OSS_LIMITED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Internal Error.
+	//
+	public static final int OSS_LIMITED = 0x8009300A;
+
+	//
+	// MessageId: OSS_BAD_PTR
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_BAD_PTR = 0x8009300B;
+
+	//
+	// MessageId: OSS_BAD_TIME
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_BAD_TIME = 0x8009300C;
+
+	//
+	// MessageId: OSS_INDEFINITE_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Unsupported BER indefinite-length encoding.
+	//
+	public static final int OSS_INDEFINITE_NOT_SUPPORTED = 0x8009300D;
+
+	//
+	// MessageId: OSS_MEM_ERROR
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Access violation.
+	//
+	public static final int OSS_MEM_ERROR = 0x8009300E;
+
+	//
+	// MessageId: OSS_BAD_TABLE
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_BAD_TABLE = 0x8009300F;
+
+	//
+	// MessageId: OSS_TOO_LONG
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_TOO_LONG = 0x80093010;
+
+	//
+	// MessageId: OSS_CONSTRAINT_VIOLATED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_CONSTRAINT_VIOLATED = 0x80093011;
+
+	//
+	// MessageId: OSS_FATAL_ERROR
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Internal Error.
+	//
+	public static final int OSS_FATAL_ERROR = 0x80093012;
+
+	//
+	// MessageId: OSS_ACCESS_SERIALIZATION_ERROR
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Multi-threading conF;ict.
+	//
+	public static final int OSS_ACCESS_SERIALIZATION_ERROR = 0x80093013;
+
+	//
+	// MessageId: OSS_NULL_TBL
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_NULL_TBL = 0x80093014;
+
+	//
+	// MessageId: OSS_NULL_FCN
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_NULL_FCN = 0x80093015;
+
+	//
+	// MessageId: OSS_BAD_ENCRULES
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_BAD_ENCRULES = 0x80093016;
+
+	//
+	// MessageId: OSS_UNAVAIL_ENCRULES
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Encode/Decode function not implemented.
+	//
+	public static final int OSS_UNAVAIL_ENCRULES = 0x80093017;
+
+	//
+	// MessageId: OSS_CANT_OPEN_TRACE_WINDOW
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Trace file error.
+	//
+	public static final int OSS_CANT_OPEN_TRACE_WINDOW = 0x80093018;
+
+	//
+	// MessageId: OSS_UNIMPLEMENTED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Function not implemented.
+	//
+	public static final int OSS_UNIMPLEMENTED = 0x80093019;
+
+	//
+	// MessageId: OSS_OID_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_OID_DLL_NOT_LINKED = 0x8009301A;
+
+	//
+	// MessageId: OSS_CANT_OPEN_TRACE_FILE
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Trace file error.
+	//
+	public static final int OSS_CANT_OPEN_TRACE_FILE = 0x8009301B;
+
+	//
+	// MessageId: OSS_TRACE_FILE_ALREADY_OPEN
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Trace file error.
+	//
+	public static final int OSS_TRACE_FILE_ALREADY_OPEN = 0x8009301C;
+
+	//
+	// MessageId: OSS_TABLE_MISMATCH
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_TABLE_MISMATCH = 0x8009301D;
+
+	//
+	// MessageId: OSS_TYPE_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Invalid data.
+	//
+	public static final int OSS_TYPE_NOT_SUPPORTED = 0x8009301E;
+
+	//
+	// MessageId: OSS_REAL_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_REAL_DLL_NOT_LINKED = 0x8009301F;
+
+	//
+	// MessageId: OSS_REAL_CODE_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_REAL_CODE_NOT_LINKED = 0x80093020;
+
+	//
+	// MessageId: OSS_OUT_OF_RANGE
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_OUT_OF_RANGE = 0x80093021;
+
+	//
+	// MessageId: OSS_COPIER_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_COPIER_DLL_NOT_LINKED = 0x80093022;
+
+	//
+	// MessageId: OSS_CONSTRAINT_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_CONSTRAINT_DLL_NOT_LINKED = 0x80093023;
+
+	//
+	// MessageId: OSS_COMPARATOR_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_COMPARATOR_DLL_NOT_LINKED = 0x80093024;
+
+	//
+	// MessageId: OSS_COMPARATOR_CODE_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_COMPARATOR_CODE_NOT_LINKED = 0x80093025;
+
+	//
+	// MessageId: OSS_MEM_MGR_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_MEM_MGR_DLL_NOT_LINKED = 0x80093026;
+
+	//
+	// MessageId: OSS_PDV_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_PDV_DLL_NOT_LINKED = 0x80093027;
+
+	//
+	// MessageId: OSS_PDV_CODE_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_PDV_CODE_NOT_LINKED = 0x80093028;
+
+	//
+	// MessageId: OSS_API_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_API_DLL_NOT_LINKED = 0x80093029;
+
+	//
+	// MessageId: OSS_BERDER_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_BERDER_DLL_NOT_LINKED = 0x8009302A;
+
+	//
+	// MessageId: OSS_PER_DLL_NOT_LINKED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_PER_DLL_NOT_LINKED = 0x8009302B;
+
+	//
+	// MessageId: OSS_OPEN_TYPE_ERROR
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Program link error.
+	//
+	public static final int OSS_OPEN_TYPE_ERROR = 0x8009302C;
+
+	//
+	// MessageId: OSS_MUTEX_NOT_CREATED
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: System resource error.
+	//
+	public static final int OSS_MUTEX_NOT_CREATED = 0x8009302D;
+
+	//
+	// MessageId: OSS_CANT_CLOSE_TRACE_FILE
+	//
+	// MessageText:
+	//
+	// OSS ASN.1 Error: Trace file error.
+	//
+	public static final int OSS_CANT_CLOSE_TRACE_FILE = 0x8009302E;
+
+	//
+	// MessageId: CRYPT_E_ASN1_ERROR
+	//
+	// MessageText:
+	//
+	// ASN1 Certificate encode/decode error code base.
+	// 
+	// The ASN1 error values are offset by CRYPT_E_ASN1_ERROR.
+	//
+	public static final int CRYPT_E_ASN1_ERROR = 0x80093100;
+
+	//
+	// MessageId: CRYPT_E_ASN1_INTERNAL
+	//
+	// MessageText:
+	//
+	// ASN1 internal encode or decode error.
+	//
+	public static final int CRYPT_E_ASN1_INTERNAL = 0x80093101;
+
+	//
+	// MessageId: CRYPT_E_ASN1_EOD
+	//
+	// MessageText:
+	//
+	// ASN1 unexpected end of data.
+	//
+	public static final int CRYPT_E_ASN1_EOD = 0x80093102;
+
+	//
+	// MessageId: CRYPT_E_ASN1_CORRUPT
+	//
+	// MessageText:
+	//
+	// ASN1 corrupted data.
+	//
+	public static final int CRYPT_E_ASN1_CORRUPT = 0x80093103;
+
+	//
+	// MessageId: CRYPT_E_ASN1_LARGE
+	//
+	// MessageText:
+	//
+	// ASN1 value too large.
+	//
+	public static final int CRYPT_E_ASN1_LARGE = 0x80093104;
+
+	//
+	// MessageId: CRYPT_E_ASN1_CONSTRAINT
+	//
+	// MessageText:
+	//
+	// ASN1 constraint violated.
+	//
+	public static final int CRYPT_E_ASN1_CONSTRAINT = 0x80093105;
+
+	//
+	// MessageId: CRYPT_E_ASN1_MEMORY
+	//
+	// MessageText:
+	//
+	// ASN1 out of memory.
+	//
+	public static final int CRYPT_E_ASN1_MEMORY = 0x80093106;
+
+	//
+	// MessageId: CRYPT_E_ASN1_OVERF;OW
+	//
+	// MessageText:
+	//
+	// ASN1 buffer overF;ow.
+	//
+	public static final int CRYPT_E_ASN1_OVERFLOW = 0x80093107;
+
+	//
+	// MessageId: CRYPT_E_ASN1_BADPDU
+	//
+	// MessageText:
+	//
+	// ASN1 function not supported for this PDU.
+	//
+	public static final int CRYPT_E_ASN1_BADPDU = 0x80093108;
+
+	//
+	// MessageId: CRYPT_E_ASN1_BADARGS
+	//
+	// MessageText:
+	//
+	// ASN1 bad arguments to function call.
+	//
+	public static final int CRYPT_E_ASN1_BADARGS = 0x80093109;
+
+	//
+	// MessageId: CRYPT_E_ASN1_BADREAL
+	//
+	// MessageText:
+	//
+	// ASN1 bad real value.
+	//
+	public static final int CRYPT_E_ASN1_BADREAL = 0x8009310A;
+
+	//
+	// MessageId: CRYPT_E_ASN1_BADTAG
+	//
+	// MessageText:
+	//
+	// ASN1 bad tag value met.
+	//
+	public static final int CRYPT_E_ASN1_BADTAG = 0x8009310B;
+
+	//
+	// MessageId: CRYPT_E_ASN1_CHOICE
+	//
+	// MessageText:
+	//
+	// ASN1 bad choice value.
+	//
+	public static final int CRYPT_E_ASN1_CHOICE = 0x8009310C;
+
+	//
+	// MessageId: CRYPT_E_ASN1_RULE
+	//
+	// MessageText:
+	//
+	// ASN1 bad encoding rule.
+	//
+	public static final int CRYPT_E_ASN1_RULE = 0x8009310D;
+
+	//
+	// MessageId: CRYPT_E_ASN1_UTF8
+	//
+	// MessageText:
+	//
+	// ASN1 bad unicode (UTF8).
+	//
+	public static final int CRYPT_E_ASN1_UTF8 = 0x8009310E;
+
+	//
+	// MessageId: CRYPT_E_ASN1_PDU_TYPE
+	//
+	// MessageText:
+	//
+	// ASN1 bad PDU type.
+	//
+	public static final int CRYPT_E_ASN1_PDU_TYPE = 0x80093133;
+
+	//
+	// MessageId: CRYPT_E_ASN1_NYI
+	//
+	// MessageText:
+	//
+	// ASN1 not yet implemented.
+	//
+	public static final int CRYPT_E_ASN1_NYI = 0x80093134;
+
+	//
+	// MessageId: CRYPT_E_ASN1_EXTENDED
+	//
+	// MessageText:
+	//
+	// ASN1 skipped unknown extension(s).
+	//
+	public static final int CRYPT_E_ASN1_EXTENDED = 0x80093201;
+
+	//
+	// MessageId: CRYPT_E_ASN1_NOEOD
+	//
+	// MessageText:
+	//
+	// ASN1 end of data expected
+	//
+	public static final int CRYPT_E_ASN1_NOEOD = 0x80093202;
+
+	//
+	// MessageId: CERTSRV_E_BAD_REQUESTSUBJECT
+	//
+	// MessageText:
+	//
+	// The request subject name is invalid or too long.
+	//
+	public static final int CERTSRV_E_BAD_REQUESTSUBJECT = 0x80094001;
+
+	//
+	// MessageId: CERTSRV_E_NO_REQUEST
+	//
+	// MessageText:
+	//
+	// The request does not exist.
+	//
+	public static final int CERTSRV_E_NO_REQUEST = 0x80094002;
+
+	//
+	// MessageId: CERTSRV_E_BAD_REQUESTSTATUS
+	//
+	// MessageText:
+	//
+	// The request's current status does not allow this operation.
+	//
+	public static final int CERTSRV_E_BAD_REQUESTSTATUS = 0x80094003;
+
+	//
+	// MessageId: CERTSRV_E_PROPERTY_EMPTY
+	//
+	// MessageText:
+	//
+	// The requested property value is empty.
+	//
+	public static final int CERTSRV_E_PROPERTY_EMPTY = 0x80094004;
+
+	//
+	// MessageId: CERTSRV_E_INVALID_CA_CERTIFICATE
+	//
+	// MessageText:
+	//
+	// The certification authority's certificate contains invalid data.
+	//
+	public static final int CERTSRV_E_INVALID_CA_CERTIFICATE = 0x80094005;
+
+	//
+	// MessageId: CERTSRV_E_SERVER_SUSPENDED
+	//
+	// MessageText:
+	//
+	// Certificate service has been suspended for a database restore operation.
+	//
+	public static final int CERTSRV_E_SERVER_SUSPENDED = 0x80094006;
+
+	//
+	// MessageId: CERTSRV_E_ENCODING_LENGTH
+	//
+	// MessageText:
+	//
+	// The certificate contains an encoded length that is potentially
+	// incompatible with older enrollment software.
+	//
+	public static final int CERTSRV_E_ENCODING_LENGTH = 0x80094007;
+
+	//
+	// MessageId: CERTSRV_E_ROLECONF;ICT
+	//
+	// MessageText:
+	//
+	// The operation is denied. The user has multiple roles assigned and the
+	// certification authority is configured to enforce role separation.
+	//
+	public static final int CERTSRV_E_ROLECONFLICT = 0x80094008;
+
+	//
+	// MessageId: CERTSRV_E_RESTRICTEDOFFICER
+	//
+	// MessageText:
+	//
+	// The operation is denied. It can only be performed by a certificate
+	// manager that is allowed to manage certificates for the current requester.
+	//
+	public static final int CERTSRV_E_RESTRICTEDOFFICER = 0x80094009;
+
+	//
+	// MessageId: CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED
+	//
+	// MessageText:
+	//
+	// Cannot archive private key. The certification authority is not configured
+	// for key archival.
+	//
+	public static final int CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED = 0x8009400A;
+
+	//
+	// MessageId: CERTSRV_E_NO_VALID_KRA
+	//
+	// MessageText:
+	//
+	// Cannot archive private key. The certification authority could not verify
+	// one or more key recovery certificates.
+	//
+	public static final int CERTSRV_E_NO_VALID_KRA = 0x8009400B;
+
+	//
+	// MessageId: CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL
+	//
+	// MessageText:
+	//
+	// The request is incorrectly formatted. The encrypted private key must be
+	// in an unauthenticated attribute in an outermost signature.
+	//
+	public static final int CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL = 0x8009400C;
+
+	//
+	// MessageId: CERTSRV_E_NO_CAADMIN_DEFINED
+	//
+	// MessageText:
+	//
+	// At least one security principal must have the permission to manage this
+	// CA.
+	//
+	public static final int CERTSRV_E_NO_CAADMIN_DEFINED = 0x8009400D;
+
+	//
+	// MessageId: CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE
+	//
+	// MessageText:
+	//
+	// The request contains an invalid renewal certificate attribute.
+	//
+	public static final int CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE = 0x8009400E;
+
+	//
+	// MessageId: CERTSRV_E_NO_DB_SESSIONS
+	//
+	// MessageText:
+	//
+	// An attempt was made to open a Certification Authority database session,
+	// but there are already too many active sessions. The server may need to be
+	// configured to allow additional sessions.
+	//
+	public static final int CERTSRV_E_NO_DB_SESSIONS = 0x8009400F;
+
+	//
+	// MessageId: CERTSRV_E_ALIGNMENT_FAULT
+	//
+	// MessageText:
+	//
+	// A memory reference caused a data alignment fault.
+	//
+	public static final int CERTSRV_E_ALIGNMENT_FAULT = 0x80094010;
+
+	//
+	// MessageId: CERTSRV_E_ENROLL_DENIED
+	//
+	// MessageText:
+	//
+	// The permissions on this certification authority do not allow the current
+	// user to enroll for certificates.
+	//
+	public static final int CERTSRV_E_ENROLL_DENIED = 0x80094011;
+
+	//
+	// MessageId: CERTSRV_E_TEMPLATE_DENIED
+	//
+	// MessageText:
+	//
+	// The permissions on the certificate template do not allow the current user
+	// to enroll for this type of certificate.
+	//
+	public static final int CERTSRV_E_TEMPLATE_DENIED = 0x80094012;
+
+	//
+	// MessageId: CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE
+	//
+	// MessageText:
+	//
+	// The contacted domain controller cannot support signed LDAP traffic.
+	// Update the domain controller or configure Certificate Services to use SSL
+	// for Active Directory access.
+	//
+	public static final int CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE = 0x80094013;
+
+	//
+	// MessageId: CERTSRV_E_UNSUPPORTED_CERT_TYPE
+	//
+	// MessageText:
+	//
+	// The requested certificate template is not supported by this CA.
+	//
+	public static final int CERTSRV_E_UNSUPPORTED_CERT_TYPE = 0x80094800;
+
+	//
+	// MessageId: CERTSRV_E_NO_CERT_TYPE
+	//
+	// MessageText:
+	//
+	// The request contains no certificate template information.
+	//
+	public static final int CERTSRV_E_NO_CERT_TYPE = 0x80094801;
+
+	//
+	// MessageId: CERTSRV_E_TEMPLATE_CONF;ICT
+	//
+	// MessageText:
+	//
+	// The request contains conF;icting template information.
+	//
+	public static final int CERTSRV_E_TEMPLATE_CONFLICT = 0x80094802;
+
+	//
+	// MessageId: CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED
+	//
+	// MessageText:
+	//
+	// The request is missing a required Subject Alternate name extension.
+	//
+	public static final int CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED = 0x80094803;
+
+	//
+	// MessageId: CERTSRV_E_ARCHIVED_KEY_REQUIRED
+	//
+	// MessageText:
+	//
+	// The request is missing a required private key for archival by the server.
+	//
+	public static final int CERTSRV_E_ARCHIVED_KEY_REQUIRED = 0x80094804;
+
+	//
+	// MessageId: CERTSRV_E_SMIME_REQUIRED
+	//
+	// MessageText:
+	//
+	// The request is missing a required SMIME capabilities extension.
+	//
+	public static final int CERTSRV_E_SMIME_REQUIRED = 0x80094805;
+
+	//
+	// MessageId: CERTSRV_E_BAD_RENEWAL_SUBJECT
+	//
+	// MessageText:
+	//
+	// The request was made on behalf of a subject other than the caller. The
+	// certificate template must be configured to require at least one signature
+	// to authorize the request.
+	//
+	public static final int CERTSRV_E_BAD_RENEWAL_SUBJECT = 0x80094806;
+
+	//
+	// MessageId: CERTSRV_E_BAD_TEMPLATE_VERSION
+	//
+	// MessageText:
+	//
+	// The request template version is newer than the supported template
+	// version.
+	//
+	public static final int CERTSRV_E_BAD_TEMPLATE_VERSION = 0x80094807;
+
+	//
+	// MessageId: CERTSRV_E_TEMPLATE_POLICY_REQUIRED
+	//
+	// MessageText:
+	//
+	// The template is missing a required signature policy attribute.
+	//
+	public static final int CERTSRV_E_TEMPLATE_POLICY_REQUIRED = 0x80094808;
+
+	//
+	// MessageId: CERTSRV_E_SIGNATURE_POLICY_REQUIRED
+	//
+	// MessageText:
+	//
+	// The request is missing required signature policy information.
+	//
+	public static final int CERTSRV_E_SIGNATURE_POLICY_REQUIRED = 0x80094809;
+
+	//
+	// MessageId: CERTSRV_E_SIGNATURE_COUNT
+	//
+	// MessageText:
+	//
+	// The request is missing one or more required signatures.
+	//
+	public static final int CERTSRV_E_SIGNATURE_COUNT = 0x8009480A;
+
+	//
+	// MessageId: CERTSRV_E_SIGNATURE_REJECTED
+	//
+	// MessageText:
+	//
+	// One or more signatures did not include the required application or
+	// issuance policies. The request is missing one or more required valid
+	// signatures.
+	//
+	public static final int CERTSRV_E_SIGNATURE_REJECTED = 0x8009480B;
+
+	//
+	// MessageId: CERTSRV_E_ISSUANCE_POLICY_REQUIRED
+	//
+	// MessageText:
+	//
+	// The request is missing one or more required signature issuance policies.
+	//
+	public static final int CERTSRV_E_ISSUANCE_POLICY_REQUIRED = 0x8009480C;
+
+	//
+	// MessageId: CERTSRV_E_SUBJECT_UPN_REQUIRED
+	//
+	// MessageText:
+	//
+	// The UPN is unavailable and cannot be added to the Subject Alternate name.
+	//
+	public static final int CERTSRV_E_SUBJECT_UPN_REQUIRED = 0x8009480D;
+
+	//
+	// MessageId: CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED
+	//
+	// MessageText:
+	//
+	// The Active Directory GUID is unavailable and cannot be added to the
+	// Subject Alternate name.
+	//
+	public static final int CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED = 0x8009480E;
+
+	//
+	// MessageId: CERTSRV_E_SUBJECT_DNS_REQUIRED
+	//
+	// MessageText:
+	//
+	// The DNS name is unavailable and cannot be added to the Subject Alternate
+	// name.
+	//
+	public static final int CERTSRV_E_SUBJECT_DNS_REQUIRED = 0x8009480F;
+
+	//
+	// MessageId: CERTSRV_E_ARCHIVED_KEY_UNEXPECTED
+	//
+	// MessageText:
+	//
+	// The request includes a private key for archival by the server, but key
+	// archival is not enabled for the specified certificate template.
+	//
+	public static final int CERTSRV_E_ARCHIVED_KEY_UNEXPECTED = 0x80094810;
+
+	//
+	// MessageId: CERTSRV_E_KEY_LENGTH
+	//
+	// MessageText:
+	//
+	// The public key does not meet the minimum size required by the specified
+	// certificate template.
+	//
+	public static final int CERTSRV_E_KEY_LENGTH = 0x80094811;
+
+	//
+	// MessageId: CERTSRV_E_SUBJECT_EMAIL_REQUIRED
+	//
+	// MessageText:
+	//
+	// The EMail name is unavailable and cannot be added to the Subject or
+	// Subject Alternate name.
+	//
+	public static final int CERTSRV_E_SUBJECT_EMAIL_REQUIRED = 0x80094812;
+
+	//
+	// MessageId: CERTSRV_E_UNKNOWN_CERT_TYPE
+	//
+	// MessageText:
+	//
+	// One or more certificate templates to be enabled on this certification
+	// authority could not be found.
+	//
+	public static final int CERTSRV_E_UNKNOWN_CERT_TYPE = 0x80094813;
+
+	//
+	// MessageId: CERTSRV_E_CERT_TYPE_OVERLAP
+	//
+	// MessageText:
+	//
+	// The certificate template renewal period is longer than the certificate
+	// validity period. The template should be reconfigured or the CA
+	// certificate renewed.
+	//
+	public static final int CERTSRV_E_CERT_TYPE_OVERLAP = 0x80094814;
+
+	//
+	// MessageId: CERTSRV_E_TOO_MANY_SIGNATURES
+	//
+	// MessageText:
+	//
+	// The certificate template requires too many RA signatures. Only one RA
+	// signature is allowed.
+	//
+	public static final int CERTSRV_E_TOO_MANY_SIGNATURES = 0x80094815;
+
+	//
+	// The range 0x5000-0x51ff is reserved for XENROLL errors.
+	//
+	//
+	// MessageId: XENROLL_E_KEY_NOT_EXPORTABLE
+	//
+	// MessageText:
+	//
+	// The key is not exportable.
+	//
+	public static final int XENROLL_E_KEY_NOT_EXPORTABLE = 0x80095000;
+
+	//
+	// MessageId: XENROLL_E_CANNOT_ADD_ROOT_CERT
+	//
+	// MessageText:
+	//
+	// You cannot add the root CA certificate into your local store.
+	//
+	public static final int XENROLL_E_CANNOT_ADD_ROOT_CERT = 0x80095001;
+
+	//
+	// MessageId: XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The key archival hash attribute was not found in the response.
+	//
+	public static final int XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND = 0x80095002;
+
+	//
+	// MessageId: XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH
+	//
+	// MessageText:
+	//
+	// An unexpected key archival hash attribute was found in the response.
+	//
+	public static final int XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH = 0x80095003;
+
+	//
+	// MessageId: XENROLL_E_RESPONSE_KA_HASH_MISMATCH
+	//
+	// MessageText:
+	//
+	// There is a key archival hash mismatch between the request and the
+	// response.
+	//
+	public static final int XENROLL_E_RESPONSE_KA_HASH_MISMATCH = 0x80095004;
+
+	//
+	// MessageId: XENROLL_E_KEYSPEC_SMIME_MISMATCH
+	//
+	// MessageText:
+	//
+	// Signing certificate cannot include SMIME extension.
+	//
+	public static final int XENROLL_E_KEYSPEC_SMIME_MISMATCH = 0x80095005;
+
+	//
+	// MessageId: TRUST_E_SYSTEM_ERROR
+	//
+	// MessageText:
+	//
+	// A system-level error occurred while verifying trust.
+	//
+	public static final int TRUST_E_SYSTEM_ERROR = 0x80096001;
+
+	//
+	// MessageId: TRUST_E_NO_SIGNER_CERT
+	//
+	// MessageText:
+	//
+	// The certificate for the signer of the message is invalid or not found.
+	//
+	public static final int TRUST_E_NO_SIGNER_CERT = 0x80096002;
+
+	//
+	// MessageId: TRUST_E_COUNTER_SIGNER
+	//
+	// MessageText:
+	//
+	// One of the counter signatures was invalid.
+	//
+	public static final int TRUST_E_COUNTER_SIGNER = 0x80096003;
+
+	//
+	// MessageId: TRUST_E_CERT_SIGNATURE
+	//
+	// MessageText:
+	//
+	// The signature of the certificate cannot be verified.
+	//
+	public static final int TRUST_E_CERT_SIGNATURE = 0x80096004;
+
+	//
+	// MessageId: TRUST_E_TIME_STAMP
+	//
+	// MessageText:
+	//
+	// The timestamp signature and/or certificate could not be verified or is
+	// malformed.
+	//
+	public static final int TRUST_E_TIME_STAMP = 0x80096005;
+
+	//
+	// MessageId: TRUST_E_BAD_DIGEST
+	//
+	// MessageText:
+	//
+	// The digital signature of the object did not verify.
+	//
+	public static final int TRUST_E_BAD_DIGEST = 0x80096010;
+
+	//
+	// MessageId: TRUST_E_BASIC_CONSTRAINTS
+	//
+	// MessageText:
+	//
+	// A certificate's basic constraint extension has not been observed.
+	//
+	public static final int TRUST_E_BASIC_CONSTRAINTS = 0x80096019;
+
+	//
+	// MessageId: TRUST_E_FINANCIAL_CRITERIA
+	//
+	// MessageText:
+	//
+	// The certificate does not meet or contain the Authenticode(tm) financial
+	// extensions.
+	//
+	public static final int TRUST_E_FINANCIAL_CRITERIA = 0x8009601E;
+
+	//
+	// Error codes for mssipotf.dll
+	// Most of the error codes can only occur when an error occurs
+	// during font file signing
+	//
+	//
+	//
+	// MessageId: MSSIPOTF_E_OUTOFMEMRANGE
+	//
+	// MessageText:
+	//
+	// Tried to reference a part of the file outside the proper range.
+	//
+	public static final int MSSIPOTF_E_OUTOFMEMRANGE = 0x80097001;
+
+	//
+	// MessageId: MSSIPOTF_E_CANTGETOBJECT
+	//
+	// MessageText:
+	//
+	// Could not retrieve an object from the file.
+	//
+	public static final int MSSIPOTF_E_CANTGETOBJECT = 0x80097002;
+
+	//
+	// MessageId: MSSIPOTF_E_NOHEADTABLE
+	//
+	// MessageText:
+	//
+	// Could not find the head table in the file.
+	//
+	public static final int MSSIPOTF_E_NOHEADTABLE = 0x80097003;
+
+	//
+	// MessageId: MSSIPOTF_E_BAD_MAGICNUMBER
+	//
+	// MessageText:
+	//
+	// The magic number in the head table is incorrect.
+	//
+	public static final int MSSIPOTF_E_BAD_MAGICNUMBER = 0x80097004;
+
+	//
+	// MessageId: MSSIPOTF_E_BAD_OFFSET_TABLE
+	//
+	// MessageText:
+	//
+	// The offset table has incorrect values.
+	//
+	public static final int MSSIPOTF_E_BAD_OFFSET_TABLE = 0x80097005;
+
+	//
+	// MessageId: MSSIPOTF_E_TABLE_TAGORDER
+	//
+	// MessageText:
+	//
+	// Duplicate table tags or tags out of alphabetical order.
+	//
+	public static final int MSSIPOTF_E_TABLE_TAGORDER = 0x80097006;
+
+	//
+	// MessageId: MSSIPOTF_E_TABLE_LONGWORD
+	//
+	// MessageText:
+	//
+	// A table does not start on a long word boundary.
+	//
+	public static final int MSSIPOTF_E_TABLE_LONGWORD = 0x80097007;
+
+	//
+	// MessageId: MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT
+	//
+	// MessageText:
+	//
+	// First table does not appear after header information.
+	//
+	public static final int MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT = 0x80097008;
+
+	//
+	// MessageId: MSSIPOTF_E_TABLES_OVERLAP
+	//
+	// MessageText:
+	//
+	// Two or more tables overlap.
+	//
+	public static final int MSSIPOTF_E_TABLES_OVERLAP = 0x80097009;
+
+	//
+	// MessageId: MSSIPOTF_E_TABLE_PADBYTES
+	//
+	// MessageText:
+	//
+	// Too many pad bytes between tables or pad bytes are not 0.
+	//
+	public static final int MSSIPOTF_E_TABLE_PADBYTES = 0x8009700A;
+
+	//
+	// MessageId: MSSIPOTF_E_FILETOOSMALL
+	//
+	// MessageText:
+	//
+	// File is too small to contain the last table.
+	//
+	public static final int MSSIPOTF_E_FILETOOSMALL = 0x8009700B;
+
+	//
+	// MessageId: MSSIPOTF_E_TABLE_CHECKSUM
+	//
+	// MessageText:
+	//
+	// A table checksum is incorrect.
+	//
+	public static final int MSSIPOTF_E_TABLE_CHECKSUM = 0x8009700C;
+
+	//
+	// MessageId: MSSIPOTF_E_FILE_CHECKSUM
+	//
+	// MessageText:
+	//
+	// The file checksum is incorrect.
+	//
+	public static final int MSSIPOTF_E_FILE_CHECKSUM = 0x8009700D;
+
+	//
+	// MessageId: MSSIPOTF_E_FAILED_POLICY
+	//
+	// MessageText:
+	//
+	// The signature does not have the correct attributes for the policy.
+	//
+	public static final int MSSIPOTF_E_FAILED_POLICY = 0x80097010;
+
+	//
+	// MessageId: MSSIPOTF_E_FAILED_HINTS_CHECK
+	//
+	// MessageText:
+	//
+	// The file did not pass the hints check.
+	//
+	public static final int MSSIPOTF_E_FAILED_HINTS_CHECK = 0x80097011;
+
+	//
+	// MessageId: MSSIPOTF_E_NOT_OPENTYPE
+	//
+	// MessageText:
+	//
+	// The file is not an OpenType file.
+	//
+	public static final int MSSIPOTF_E_NOT_OPENTYPE = 0x80097012;
+
+	//
+	// MessageId: MSSIPOTF_E_FILE
+	//
+	// MessageText:
+	//
+	// Failed on a file operation (open, map, read, write).
+	//
+	public static final int MSSIPOTF_E_FILE = 0x80097013;
+
+	//
+	// MessageId: MSSIPOTF_E_CRYPT
+	//
+	// MessageText:
+	//
+	// A call to a CryptoAPI function failed.
+	//
+	public static final int MSSIPOTF_E_CRYPT = 0x80097014;
+
+	//
+	// MessageId: MSSIPOTF_E_BADVERSION
+	//
+	// MessageText:
+	//
+	// There is a bad version number in the file.
+	//
+	public static final int MSSIPOTF_E_BADVERSION = 0x80097015;
+
+	//
+	// MessageId: MSSIPOTF_E_DSIG_STRUCTURE
+	//
+	// MessageText:
+	//
+	// The structure of the DSIG table is incorrect.
+	//
+	public static final int MSSIPOTF_E_DSIG_STRUCTURE = 0x80097016;
+
+	//
+	// MessageId: MSSIPOTF_E_PCONST_CHECK
+	//
+	// MessageText:
+	//
+	// A check failed in a partially constant table.
+	//
+	public static final int MSSIPOTF_E_PCONST_CHECK = 0x80097017;
+
+	//
+	// MessageId: MSSIPOTF_E_STRUCTURE
+	//
+	// MessageText:
+	//
+	// Some kind of structural error.
+	//
+	public static final int MSSIPOTF_E_STRUCTURE = 0x80097018;
+
+	//
+	// MessageId: ERROR_CRED_REQUIRES_CONFIRMATION
+	//
+	// MessageText:
+	//
+	// The requested credential requires confirmation.
+	//
+	public static final int ERROR_CRED_REQUIRES_CONFIRMATION = 0x80097019;
+
+	public static final int NTE_OP_OK = 0;
+
+	//
+	// Note that additional FACILITY_SSPI errors are in issperr.h
+	//
+	// ******************
+	// FACILITY_CERT
+	// ******************
+	//
+	// MessageId: TRUST_E_PROVIDER_UNKNOWN
+	//
+	// MessageText:
+	//
+	// Unknown trust provider.
+	//
+	public static final int TRUST_E_PROVIDER_UNKNOWN = 0x800B0001;
+
+	//
+	// MessageId: TRUST_E_ACTION_UNKNOWN
+	//
+	// MessageText:
+	//
+	// The trust verification action specified is not supported by the specified
+	// trust provider.
+	//
+	public static final int TRUST_E_ACTION_UNKNOWN = 0x800B0002;
+
+	//
+	// MessageId: TRUST_E_SUBJECT_FORM_UNKNOWN
+	//
+	// MessageText:
+	//
+	// The form specified for the subject is not one supported or known by the
+	// specified trust provider.
+	//
+	public static final int TRUST_E_SUBJECT_FORM_UNKNOWN = 0x800B0003;
+
+	//
+	// MessageId: TRUST_E_SUBJECT_NOT_TRUSTED
+	//
+	// MessageText:
+	//
+	// The subject is not trusted for the specified action.
+	//
+	public static final int TRUST_E_SUBJECT_NOT_TRUSTED = 0x800B0004;
+
+	//
+	// MessageId: DIGSIG_E_ENCODE
+	//
+	// MessageText:
+	//
+	// Error due to problem in ASN.1 encoding process.
+	//
+	public static final int DIGSIG_E_ENCODE = 0x800B0005;
+
+	//
+	// MessageId: DIGSIG_E_DECODE
+	//
+	// MessageText:
+	//
+	// Error due to problem in ASN.1 decoding process.
+	//
+	public static final int DIGSIG_E_DECODE = 0x800B0006;
+
+	//
+	// MessageId: DIGSIG_E_EXTENSIBILITY
+	//
+	// MessageText:
+	//
+	// Reading / writing Extensions where Attributes are appropriate, and visa
+	// versa.
+	//
+	public static final int DIGSIG_E_EXTENSIBILITY = 0x800B0007;
+
+	//
+	// MessageId: DIGSIG_E_CRYPTO
+	//
+	// MessageText:
+	//
+	// Unspecified cryptographic failure.
+	//
+	public static final int DIGSIG_E_CRYPTO = 0x800B0008;
+
+	//
+	// MessageId: PERSIST_E_SIZEDEFINITE
+	//
+	// MessageText:
+	//
+	// The size of the data could not be determined.
+	//
+	public static final int PERSIST_E_SIZEDEFINITE = 0x800B0009;
+
+	//
+	// MessageId: PERSIST_E_SIZEINDEFINITE
+	//
+	// MessageText:
+	//
+	// The size of the indefinite-sized data could not be determined.
+	//
+	public static final int PERSIST_E_SIZEINDEFINITE = 0x800B000A;
+
+	//
+	// MessageId: PERSIST_E_NOTSELFSIZING
+	//
+	// MessageText:
+	//
+	// This object does not read and write self-sizing data.
+	//
+	public static final int PERSIST_E_NOTSELFSIZING = 0x800B000B;
+
+	//
+	// MessageId: TRUST_E_NOSIGNATURE
+	//
+	// MessageText:
+	//
+	// No signature was present in the subject.
+	//
+	public static final int TRUST_E_NOSIGNATURE = 0x800B0100;
+
+	//
+	// MessageId: CERT_E_EXPIRED
+	//
+	// MessageText:
+	//
+	// A required certificate is not within its validity period when verifying
+	// against the current system clock or the timestamp in the signed file.
+	//
+	public static final int CERT_E_EXPIRED = 0x800B0101;
+
+	//
+	// MessageId: CERT_E_VALIDITYPERIODNESTING
+	//
+	// MessageText:
+	//
+	// The validity periods of the certification chain do not nest correctly.
+	//
+	public static final int CERT_E_VALIDITYPERIODNESTING = 0x800B0102;
+
+	//
+	// MessageId: CERT_E_ROLE
+	//
+	// MessageText:
+	//
+	// A certificate that can only be used as an end-entity is being used as a
+	// CA or visa versa.
+	//
+	public static final int CERT_E_ROLE = 0x800B0103;
+
+	//
+	// MessageId: CERT_E_PATHLENCONST
+	//
+	// MessageText:
+	//
+	// A path length constraint in the certification chain has been violated.
+	//
+	public static final int CERT_E_PATHLENCONST = 0x800B0104;
+
+	//
+	// MessageId: CERT_E_CRITICAL
+	//
+	// MessageText:
+	//
+	// A certificate contains an unknown extension that is marked 'critical'.
+	//
+	public static final int CERT_E_CRITICAL = 0x800B0105;
+
+	//
+	// MessageId: CERT_E_PURPOSE
+	//
+	// MessageText:
+	//
+	// A certificate being used for a purpose other than the ones specified by
+	// its CA.
+	//
+	public static final int CERT_E_PURPOSE = 0x800B0106;
+
+	//
+	// MessageId: CERT_E_ISSUERCHAINING
+	//
+	// MessageText:
+	//
+	// A parent of a given certificate in fact did not issue that child
+	// certificate.
+	//
+	public static final int CERT_E_ISSUERCHAINING = 0x800B0107;
+
+	//
+	// MessageId: CERT_E_MALFORMED
+	//
+	// MessageText:
+	//
+	// A certificate is missing or has an empty value for an important field,
+	// such as a subject or issuer name.
+	//
+	public static final int CERT_E_MALFORMED = 0x800B0108;
+
+	//
+	// MessageId: CERT_E_UNTRUSTEDROOT
+	//
+	// MessageText:
+	//
+	// A certificate chain processed, but terminated in a root certificate which
+	// is not trusted by the trust provider.
+	//
+	public static final int CERT_E_UNTRUSTEDROOT = 0x800B0109;
+
+	//
+	// MessageId: CERT_E_CHAINING
+	//
+	// MessageText:
+	//
+	// A certificate chain could not be built to a trusted root authority.
+	//
+	public static final int CERT_E_CHAINING = 0x800B010A;
+
+	//
+	// MessageId: TRUST_E_FAIL
+	//
+	// MessageText:
+	//
+	// Generic trust failure.
+	//
+	public static final int TRUST_E_FAIL = 0x800B010B;
+
+	//
+	// MessageId: CERT_E_REVOKED
+	//
+	// MessageText:
+	//
+	// A certificate was explicitly revoked by its issuer.
+	//
+	public static final int CERT_E_REVOKED = 0x800B010C;
+
+	//
+	// MessageId: CERT_E_UNTRUSTEDTESTROOT
+	//
+	// MessageText:
+	//
+	// The certification path terminates with the test root which is not trusted
+	// with the current policy settings.
+	//
+	public static final int CERT_E_UNTRUSTEDTESTROOT = 0x800B010D;
+
+	//
+	// MessageId: CERT_E_REVOCATION_FAILURE
+	//
+	// MessageText:
+	//
+	// The revocation process could not continue - the certificate(s) could not
+	// be checked.
+	//
+	public static final int CERT_E_REVOCATION_FAILURE = 0x800B010E;
+
+	//
+	// MessageId: CERT_E_CN_NO_MATCH
+	//
+	// MessageText:
+	//
+	// The certificate's CN name does not match the passed value.
+	//
+	public static final int CERT_E_CN_NO_MATCH = 0x800B010F;
+
+	//
+	// MessageId: CERT_E_WRONG_USAGE
+	//
+	// MessageText:
+	//
+	// The certificate is not valid for the requested usage.
+	//
+	public static final int CERT_E_WRONG_USAGE = 0x800B0110;
+
+	//
+	// MessageId: TRUST_E_EXPLICIT_DISTRUST
+	//
+	// MessageText:
+	//
+	// The certificate was explicitly marked as untrusted by the user.
+	//
+	public static final int TRUST_E_EXPLICIT_DISTRUST = 0x800B0111;
+
+	//
+	// MessageId: CERT_E_UNTRUSTEDCA
+	//
+	// MessageText:
+	//
+	// A certification chain processed correctly, but one of the CA certificates
+	// is not trusted by the policy provider.
+	//
+	public static final int CERT_E_UNTRUSTEDCA = 0x800B0112;
+
+	//
+	// MessageId: CERT_E_INVALID_POLICY
+	//
+	// MessageText:
+	//
+	// The certificate has invalid policy.
+	//
+	public static final int CERT_E_INVALID_POLICY = 0x800B0113;
+
+	//
+	// MessageId: CERT_E_INVALID_NAME
+	//
+	// MessageText:
+	//
+	// The certificate has an invalid name. The name is not included in the
+	// permitted list or is explicitly excluded.
+	//
+	public static final int CERT_E_INVALID_NAME = 0x800B0114;
+
+	// *****************
+	// FACILITY_SETUPAPI
+	// *****************
+	//
+	// Since these error codes aren't in the standard Win32 range (i.e., 0-64K),
+	// define a
+	// macro to map either Win32 or SetupAPI error codes into an HRESULT.
+	//
+	// MessageId: SPAPI_E_EXPECTED_SECTION_NAME
+	//
+	// MessageText:
+	//
+	// A non-empty line was encountered in the INF before the start of a
+	// section.
+	//
+	public static final int SPAPI_E_EXPECTED_SECTION_NAME = 0x800F0000;
+
+	//
+	// MessageId: SPAPI_E_BAD_SECTION_NAME_LINE
+	//
+	// MessageText:
+	//
+	// A section name marker in the INF is not complete, or does not exist on a
+	// line by itself.
+	//
+	public static final int SPAPI_E_BAD_SECTION_NAME_LINE = 0x800F0001;
+
+	//
+	// MessageId: SPAPI_E_SECTION_NAME_TOO_LONG
+	//
+	// MessageText:
+	//
+	// An INF section was encountered whose name exceeds the maximum section
+	// name length.
+	//
+	public static final int SPAPI_E_SECTION_NAME_TOO_LONG = 0x800F0002;
+
+	//
+	// MessageId: SPAPI_E_GENERAL_SYNTAX
+	//
+	// MessageText:
+	//
+	// The syntax of the INF is invalid.
+	//
+	public static final int SPAPI_E_GENERAL_SYNTAX = 0x800F0003;
+
+	//
+	// MessageId: SPAPI_E_WRONG_INF_STYLE
+	//
+	// MessageText:
+	//
+	// The style of the INF is different than what was requested.
+	//
+	public static final int SPAPI_E_WRONG_INF_STYLE = 0x800F0100;
+
+	//
+	// MessageId: SPAPI_E_SECTION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The required section was not found in the INF.
+	//
+	public static final int SPAPI_E_SECTION_NOT_FOUND = 0x800F0101;
+
+	//
+	// MessageId: SPAPI_E_LINE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The required line was not found in the INF.
+	//
+	public static final int SPAPI_E_LINE_NOT_FOUND = 0x800F0102;
+
+	//
+	// MessageId: SPAPI_E_NO_BACKUP
+	//
+	// MessageText:
+	//
+	// The files affected by the installation of this file queue have not been
+	// backed up for uninstall.
+	//
+	public static final int SPAPI_E_NO_BACKUP = 0x800F0103;
+
+	//
+	// MessageId: SPAPI_E_NO_ASSOCIATED_CLASS
+	//
+	// MessageText:
+	//
+	// The INF or the device information set or element does not have an
+	// associated install class.
+	//
+	public static final int SPAPI_E_NO_ASSOCIATED_CLASS = 0x800F0200;
+
+	//
+	// MessageId: SPAPI_E_CLASS_MISMATCH
+	//
+	// MessageText:
+	//
+	// The INF or the device information set or element does not match the
+	// specified install class.
+	//
+	public static final int SPAPI_E_CLASS_MISMATCH = 0x800F0201;
+
+	//
+	// MessageId: SPAPI_E_DUPLICATE_FOUND
+	//
+	// MessageText:
+	//
+	// An existing device was found that is a duplicate of the device being
+	// manually installed.
+	//
+	public static final int SPAPI_E_DUPLICATE_FOUND = 0x800F0202;
+
+	//
+	// MessageId: SPAPI_E_NO_DRIVER_SELECTED
+	//
+	// MessageText:
+	//
+	// There is no driver selected for the device information set or element.
+	//
+	public static final int SPAPI_E_NO_DRIVER_SELECTED = 0x800F0203;
+
+	//
+	// MessageId: SPAPI_E_KEY_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// The requested device registry key does not exist.
+	//
+	public static final int SPAPI_E_KEY_DOES_NOT_EXIST = 0x800F0204;
+
+	//
+	// MessageId: SPAPI_E_INVALID_DEVINST_NAME
+	//
+	// MessageText:
+	//
+	// The device instance name is invalid.
+	//
+	public static final int SPAPI_E_INVALID_DEVINST_NAME = 0x800F0205;
+
+	//
+	// MessageId: SPAPI_E_INVALID_CLASS
+	//
+	// MessageText:
+	//
+	// The install class is not present or is invalid.
+	//
+	public static final int SPAPI_E_INVALID_CLASS = 0x800F0206;
+
+	//
+	// MessageId: SPAPI_E_DEVINST_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// The device instance cannot be created because it already exists.
+	//
+	public static final int SPAPI_E_DEVINST_ALREADY_EXISTS = 0x800F0207;
+
+	//
+	// MessageId: SPAPI_E_DEVINFO_NOT_REGISTERED
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed on a device information element that
+	// has not been registered.
+	//
+	public static final int SPAPI_E_DEVINFO_NOT_REGISTERED = 0x800F0208;
+
+	//
+	// MessageId: SPAPI_E_INVALID_REG_PROPERTY
+	//
+	// MessageText:
+	//
+	// The device property code is invalid.
+	//
+	public static final int SPAPI_E_INVALID_REG_PROPERTY = 0x800F0209;
+
+	//
+	// MessageId: SPAPI_E_NO_INF
+	//
+	// MessageText:
+	//
+	// The INF from which a driver list is to be built does not exist.
+	//
+	public static final int SPAPI_E_NO_INF = 0x800F020A;
+
+	//
+	// MessageId: SPAPI_E_NO_SUCH_DEVINST
+	//
+	// MessageText:
+	//
+	// The device instance does not exist in the hardware tree.
+	//
+	public static final int SPAPI_E_NO_SUCH_DEVINST = 0x800F020B;
+
+	//
+	// MessageId: SPAPI_E_CANT_LOAD_CLASS_ICON
+	//
+	// MessageText:
+	//
+	// The icon representing this install class cannot be loaded.
+	//
+	public static final int SPAPI_E_CANT_LOAD_CLASS_ICON = 0x800F020C;
+
+	//
+	// MessageId: SPAPI_E_INVALID_CLASS_INSTALLER
+	//
+	// MessageText:
+	//
+	// The class installer registry entry is invalid.
+	//
+	public static final int SPAPI_E_INVALID_CLASS_INSTALLER = 0x800F020D;
+
+	//
+	// MessageId: SPAPI_E_DI_DO_DEFAULT
+	//
+	// MessageText:
+	//
+	// The class installer has indicated that the default action should be
+	// performed for this installation request.
+	//
+	public static final int SPAPI_E_DI_DO_DEFAULT = 0x800F020E;
+
+	//
+	// MessageId: SPAPI_E_DI_NOFILECOPY
+	//
+	// MessageText:
+	//
+	// The operation does not require any files to be copied.
+	//
+	public static final int SPAPI_E_DI_NOFILECOPY = 0x800F020F;
+
+	//
+	// MessageId: SPAPI_E_INVALID_HWPROFILE
+	//
+	// MessageText:
+	//
+	// The specified hardware profile does not exist.
+	//
+	public static final int SPAPI_E_INVALID_HWPROFILE = 0x800F0210;
+
+	//
+	// MessageId: SPAPI_E_NO_DEVICE_SELECTED
+	//
+	// MessageText:
+	//
+	// There is no device information element currently selected for this device
+	// information set.
+	//
+	public static final int SPAPI_E_NO_DEVICE_SELECTED = 0x800F0211;
+
+	//
+	// MessageId: SPAPI_E_DEVINFO_LIST_LOCKED
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because the device information set is
+	// locked.
+	//
+	public static final int SPAPI_E_DEVINFO_LIST_LOCKED = 0x800F0212;
+
+	//
+	// MessageId: SPAPI_E_DEVINFO_DATA_LOCKED
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because the device information element
+	// is locked.
+	//
+	public static final int SPAPI_E_DEVINFO_DATA_LOCKED = 0x800F0213;
+
+	//
+	// MessageId: SPAPI_E_DI_BAD_PATH
+	//
+	// MessageText:
+	//
+	// The specified path does not contain any applicable device INFs.
+	//
+	public static final int SPAPI_E_DI_BAD_PATH = 0x800F0214;
+
+	//
+	// MessageId: SPAPI_E_NO_CLASSINSTALL_PARAMS
+	//
+	// MessageText:
+	//
+	// No class installer parameters have been set for the device information
+	// set or element.
+	//
+	public static final int SPAPI_E_NO_CLASSINSTALL_PARAMS = 0x800F0215;
+
+	//
+	// MessageId: SPAPI_E_FILEQUEUE_LOCKED
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because the file queue is locked.
+	//
+	public static final int SPAPI_E_FILEQUEUE_LOCKED = 0x800F0216;
+
+	//
+	// MessageId: SPAPI_E_BAD_SERVICE_INSTALLSECT
+	//
+	// MessageText:
+	//
+	// A service installation section in this INF is invalid.
+	//
+	public static final int SPAPI_E_BAD_SERVICE_INSTALLSECT = 0x800F0217;
+
+	//
+	// MessageId: SPAPI_E_NO_CLASS_DRIVER_LIST
+	//
+	// MessageText:
+	//
+	// There is no class driver list for the device information element.
+	//
+	public static final int SPAPI_E_NO_CLASS_DRIVER_LIST = 0x800F0218;
+
+	//
+	// MessageId: SPAPI_E_NO_ASSOCIATED_SERVICE
+	//
+	// MessageText:
+	//
+	// The installation failed because a function driver was not specified for
+	// this device instance.
+	//
+	public static final int SPAPI_E_NO_ASSOCIATED_SERVICE = 0x800F0219;
+
+	//
+	// MessageId: SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE
+	//
+	// MessageText:
+	//
+	// There is presently no default device interface designated for this
+	// interface class.
+	//
+	public static final int SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE = 0x800F021A;
+
+	//
+	// MessageId: SPAPI_E_DEVICE_INTERFACE_ACTIVE
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because the device interface is
+	// currently active.
+	//
+	public static final int SPAPI_E_DEVICE_INTERFACE_ACTIVE = 0x800F021B;
+
+	//
+	// MessageId: SPAPI_E_DEVICE_INTERFACE_REMOVED
+	//
+	// MessageText:
+	//
+	// The operation cannot be performed because the device interface has been
+	// removed from the system.
+	//
+	public static final int SPAPI_E_DEVICE_INTERFACE_REMOVED = 0x800F021C;
+
+	//
+	// MessageId: SPAPI_E_BAD_INTERFACE_INSTALLSECT
+	//
+	// MessageText:
+	//
+	// An interface installation section in this INF is invalid.
+	//
+	public static final int SPAPI_E_BAD_INTERFACE_INSTALLSECT = 0x800F021D;
+
+	//
+	// MessageId: SPAPI_E_NO_SUCH_INTERFACE_CLASS
+	//
+	// MessageText:
+	//
+	// This interface class does not exist in the system.
+	//
+	public static final int SPAPI_E_NO_SUCH_INTERFACE_CLASS = 0x800F021E;
+
+	//
+	// MessageId: SPAPI_E_INVALID_REFERENCE_STRING
+	//
+	// MessageText:
+	//
+	// The reference string supplied for this interface device is invalid.
+	//
+	public static final int SPAPI_E_INVALID_REFERENCE_STRING = 0x800F021F;
+
+	//
+	// MessageId: SPAPI_E_INVALID_MACHINENAME
+	//
+	// MessageText:
+	//
+	// The specified machine name does not conform to UNC naming conventions.
+	//
+	public static final int SPAPI_E_INVALID_MACHINENAME = 0x800F0220;
+
+	//
+	// MessageId: SPAPI_E_REMOTE_COMM_FAILURE
+	//
+	// MessageText:
+	//
+	// A general remote communication error occurred.
+	//
+	public static final int SPAPI_E_REMOTE_COMM_FAILURE = 0x800F0221;
+
+	//
+	// MessageId: SPAPI_E_MACHINE_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The machine selected for remote communication is not available at this
+	// time.
+	//
+	public static final int SPAPI_E_MACHINE_UNAVAILABLE = 0x800F0222;
+
+	//
+	// MessageId: SPAPI_E_NO_CONFIGMGR_SERVICES
+	//
+	// MessageText:
+	//
+	// The Plug and Play service is not available on the remote machine.
+	//
+	public static final int SPAPI_E_NO_CONFIGMGR_SERVICES = 0x800F0223;
+
+	//
+	// MessageId: SPAPI_E_INVALID_PROPPAGE_PROVIDER
+	//
+	// MessageText:
+	//
+	// The property page provider registry entry is invalid.
+	//
+	public static final int SPAPI_E_INVALID_PROPPAGE_PROVIDER = 0x800F0224;
+
+	//
+	// MessageId: SPAPI_E_NO_SUCH_DEVICE_INTERFACE
+	//
+	// MessageText:
+	//
+	// The requested device interface is not present in the system.
+	//
+	public static final int SPAPI_E_NO_SUCH_DEVICE_INTERFACE = 0x800F0225;
+
+	//
+	// MessageId: SPAPI_E_DI_POSTPROCESSING_REQUIRED
+	//
+	// MessageText:
+	//
+	// The device's co-installer has additional work to perform after
+	// installation is complete.
+	//
+	public static final int SPAPI_E_DI_POSTPROCESSING_REQUIRED = 0x800F0226;
+
+	//
+	// MessageId: SPAPI_E_INVALID_COINSTALLER
+	//
+	// MessageText:
+	//
+	// The device's co-installer is invalid.
+	//
+	public static final int SPAPI_E_INVALID_COINSTALLER = 0x800F0227;
+
+	//
+	// MessageId: SPAPI_E_NO_COMPAT_DRIVERS
+	//
+	// MessageText:
+	//
+	// There are no compatible drivers for this device.
+	//
+	public static final int SPAPI_E_NO_COMPAT_DRIVERS = 0x800F0228;
+
+	//
+	// MessageId: SPAPI_E_NO_DEVICE_ICON
+	//
+	// MessageText:
+	//
+	// There is no icon that represents this device or device type.
+	//
+	public static final int SPAPI_E_NO_DEVICE_ICON = 0x800F0229;
+
+	//
+	// MessageId: SPAPI_E_INVALID_INF_LOGCONFIG
+	//
+	// MessageText:
+	//
+	// A logical configuration specified in this INF is invalid.
+	//
+	public static final int SPAPI_E_INVALID_INF_LOGCONFIG = 0x800F022A;
+
+	//
+	// MessageId: SPAPI_E_DI_DONT_INSTALL
+	//
+	// MessageText:
+	//
+	// The class installer has denied the request to install or upgrade this
+	// device.
+	//
+	public static final int SPAPI_E_DI_DONT_INSTALL = 0x800F022B;
+
+	//
+	// MessageId: SPAPI_E_INVALID_FILTER_DRIVER
+	//
+	// MessageText:
+	//
+	// One of the filter drivers installed for this device is invalid.
+	//
+	public static final int SPAPI_E_INVALID_FILTER_DRIVER = 0x800F022C;
+
+	//
+	// MessageId: SPAPI_E_NON_WINDOWS_NT_DRIVER
+	//
+	// MessageText:
+	//
+	// The driver selected for this device does not support Windows Vista.
+	//
+	public static final int SPAPI_E_NON_WINDOWS_NT_DRIVER = 0x800F022D;
+
+	//
+	// MessageId: SPAPI_E_NON_WINDOWS_DRIVER
+	//
+	// MessageText:
+	//
+	// The driver selected for this device does not support Windows.
+	//
+	public static final int SPAPI_E_NON_WINDOWS_DRIVER = 0x800F022E;
+
+	//
+	// MessageId: SPAPI_E_NO_CATALOG_FOR_OEM_INF
+	//
+	// MessageText:
+	//
+	// The third-party INF does not contain digital signature information.
+	//
+	public static final int SPAPI_E_NO_CATALOG_FOR_OEM_INF = 0x800F022F;
+
+	//
+	// MessageId: SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE
+	//
+	// MessageText:
+	//
+	// An invalid attempt was made to use a device installation file queue for
+	// verification of digital signatures relative to other platforms.
+	//
+	public static final int SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE = 0x800F0230;
+
+	//
+	// MessageId: SPAPI_E_NOT_DISABLEABLE
+	//
+	// MessageText:
+	//
+	// The device cannot be disabled.
+	//
+	public static final int SPAPI_E_NOT_DISABLEABLE = 0x800F0231;
+
+	//
+	// MessageId: SPAPI_E_CANT_REMOVE_DEVINST
+	//
+	// MessageText:
+	//
+	// The device could not be dynamically removed.
+	//
+	public static final int SPAPI_E_CANT_REMOVE_DEVINST = 0x800F0232;
+
+	//
+	// MessageId: SPAPI_E_INVALID_TARGET
+	//
+	// MessageText:
+	//
+	// Cannot copy to specified target.
+	//
+	public static final int SPAPI_E_INVALID_TARGET = 0x800F0233;
+
+	//
+	// MessageId: SPAPI_E_DRIVER_NONNATIVE
+	//
+	// MessageText:
+	//
+	// Driver is not intended for this platform.
+	//
+	public static final int SPAPI_E_DRIVER_NONNATIVE = 0x800F0234;
+
+	//
+	// MessageId: SPAPI_E_IN_WOW64
+	//
+	// MessageText:
+	//
+	// Operation not allowed in WOW64.
+	//
+	public static final int SPAPI_E_IN_WOW64 = 0x800F0235;
+
+	//
+	// MessageId: SPAPI_E_SET_SYSTEM_RESTORE_POINT
+	//
+	// MessageText:
+	//
+	// The operation involving unsigned file copying was rolled back, so that a
+	// system restore point could be set.
+	//
+	public static final int SPAPI_E_SET_SYSTEM_RESTORE_POINT = 0x800F0236;
+
+	//
+	// MessageId: SPAPI_E_INCORRECTLY_COPIED_INF
+	//
+	// MessageText:
+	//
+	// An INF was copied into the Windows INF directory in an improper manner.
+	//
+	public static final int SPAPI_E_INCORRECTLY_COPIED_INF = 0x800F0237;
+
+	//
+	// MessageId: SPAPI_E_SCE_DISABLED
+	//
+	// MessageText:
+	//
+	// The Security Configuration Editor (SCE) APIs have been disabled on this
+	// Embedded product.
+	//
+	public static final int SPAPI_E_SCE_DISABLED = 0x800F0238;
+
+	//
+	// MessageId: SPAPI_E_UNKNOWN_EXCEPTION
+	//
+	// MessageText:
+	//
+	// An unknown exception was encountered.
+	//
+	public static final int SPAPI_E_UNKNOWN_EXCEPTION = 0x800F0239;
+
+	//
+	// MessageId: SPAPI_E_PNP_REGISTRY_ERROR
+	//
+	// MessageText:
+	//
+	// A problem was encountered when accessing the Plug and Play registry
+	// database.
+	//
+	public static final int SPAPI_E_PNP_REGISTRY_ERROR = 0x800F023A;
+
+	//
+	// MessageId: SPAPI_E_REMOTE_REQUEST_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// The requested operation is not supported for a remote machine.
+	//
+	public static final int SPAPI_E_REMOTE_REQUEST_UNSUPPORTED = 0x800F023B;
+
+	//
+	// MessageId: SPAPI_E_NOT_AN_INSTALLED_OEM_INF
+	//
+	// MessageText:
+	//
+	// The specified file is not an installed OEM INF.
+	//
+	public static final int SPAPI_E_NOT_AN_INSTALLED_OEM_INF = 0x800F023C;
+
+	//
+	// MessageId: SPAPI_E_INF_IN_USE_BY_DEVICES
+	//
+	// MessageText:
+	//
+	// One or more devices are presently installed using the specified INF.
+	//
+	public static final int SPAPI_E_INF_IN_USE_BY_DEVICES = 0x800F023D;
+
+	//
+	// MessageId: SPAPI_E_DI_FUNCTION_OBSOLETE
+	//
+	// MessageText:
+	//
+	// The requested device install operation is obsolete.
+	//
+	public static final int SPAPI_E_DI_FUNCTION_OBSOLETE = 0x800F023E;
+
+	//
+	// MessageId: SPAPI_E_NO_AUTHENTICODE_CATALOG
+	//
+	// MessageText:
+	//
+	// A file could not be verified because it does not have an associated
+	// catalog signed via Authenticode(tm).
+	//
+	public static final int SPAPI_E_NO_AUTHENTICODE_CATALOG = 0x800F023F;
+
+	//
+	// MessageId: SPAPI_E_AUTHENTICODE_DISALLOWED
+	//
+	// MessageText:
+	//
+	// Authenticode(tm) signature verification is not supported for the
+	// specified INF.
+	//
+	public static final int SPAPI_E_AUTHENTICODE_DISALLOWED = 0x800F0240;
+
+	//
+	// MessageId: SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER
+	//
+	// MessageText:
+	//
+	// The INF was signed with an Authenticode(tm) catalog from a trusted
+	// publisher.
+	//
+	public static final int SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER = 0x800F0241;
+
+	//
+	// MessageId: SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED
+	//
+	// MessageText:
+	//
+	// The publisher of an Authenticode(tm) signed catalog has not yet been
+	// established as trusted.
+	//
+	public static final int SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED = 0x800F0242;
+
+	//
+	// MessageId: SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED
+	//
+	// MessageText:
+	//
+	// The publisher of an Authenticode(tm) signed catalog was not established
+	// as trusted.
+	//
+	public static final int SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED = 0x800F0243;
+
+	//
+	// MessageId: SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH
+	//
+	// MessageText:
+	//
+	// The software was tested for compliance with Windows Logo requirements on
+	// a different version of Windows, and may not be compatible with this
+	// version.
+	//
+	public static final int SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH = 0x800F0244;
+
+	//
+	// MessageId: SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE
+	//
+	// MessageText:
+	//
+	// The file may only be validated by a catalog signed via Authenticode(tm).
+	//
+	public static final int SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE = 0x800F0245;
+
+	//
+	// MessageId: SPAPI_E_DEVICE_INSTALLER_NOT_READY
+	//
+	// MessageText:
+	//
+	// One of the installers for this device cannot perform the installation at
+	// this time.
+	//
+	public static final int SPAPI_E_DEVICE_INSTALLER_NOT_READY = 0x800F0246;
+
+	//
+	// MessageId: SPAPI_E_DRIVER_STORE_ADD_FAILED
+	//
+	// MessageText:
+	//
+	// A problem was encountered while attempting to add the driver to the
+	// store.
+	//
+	public static final int SPAPI_E_DRIVER_STORE_ADD_FAILED = 0x800F0247;
+
+	//
+	// MessageId: SPAPI_E_DEVICE_INSTALL_BLOCKED
+	//
+	// MessageText:
+	//
+	// The installation of this device is forbidden by system policy. Contact
+	// your system administrator.
+	//
+	public static final int SPAPI_E_DEVICE_INSTALL_BLOCKED = 0x800F0248;
+
+	//
+	// MessageId: SPAPI_E_DRIVER_INSTALL_BLOCKED
+	//
+	// MessageText:
+	//
+	// The installation of this driver is forbidden by system policy. Contact
+	// your system administrator.
+	//
+	public static final int SPAPI_E_DRIVER_INSTALL_BLOCKED = 0x800F0249;
+
+	//
+	// MessageId: SPAPI_E_WRONG_INF_TYPE
+	//
+	// MessageText:
+	//
+	// The specified INF is the wrong type for this operation.
+	//
+	public static final int SPAPI_E_WRONG_INF_TYPE = 0x800F024A;
+
+	//
+	// MessageId: SPAPI_E_FILE_HASH_NOT_IN_CATALOG
+	//
+	// MessageText:
+	//
+	// The hash for the file is not present in the specified catalog file. The
+	// file is likely corrupt or the victim of tampering.
+	//
+	public static final int SPAPI_E_FILE_HASH_NOT_IN_CATALOG = 0x800F024B;
+
+	//
+	// MessageId: SPAPI_E_DRIVER_STORE_DELETE_FAILED
+	//
+	// MessageText:
+	//
+	// A problem was encountered while attempting to delete the driver from the
+	// store.
+	//
+	public static final int SPAPI_E_DRIVER_STORE_DELETE_FAILED = 0x800F024C;
+
+	//
+	// MessageId: SPAPI_E_UNRECOVERABLE_STACK_OVERF;OW
+	//
+	// MessageText:
+	//
+	// An unrecoverable stack overF;ow was encountered.
+	//
+	public static final int SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW = 0x800F0300;
+
+	//
+	// MessageId: SPAPI_E_ERROR_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// No installed components were detected.
+	//
+	public static final int SPAPI_E_ERROR_NOT_INSTALLED = 0x800F1000;
+
+	// *****************
+	// FACILITY_SCARD
+	// *****************
+	//
+	// ==
+	// Facility SCARD Error Messages
+	// ==
+	//
+	public static final int SCARD_S_SUCCESS = NO_ERROR;
+	//
+	// MessageId: SCARD_F_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal consistency check failed.
+	//
+	public static final int SCARD_F_INTERNAL_ERROR = 0x80100001;
+
+	//
+	// MessageId: SCARD_E_CANCELLED
+	//
+	// MessageText:
+	//
+	// The action was cancelled by an SCardCancel request.
+	//
+	public static final int SCARD_E_CANCELLED = 0x80100002;
+
+	//
+	// MessageId: SCARD_E_INVALID_HANDLE
+	//
+	// MessageText:
+	//
+	// The supplied handle was invalid.
+	//
+	public static final int SCARD_E_INVALID_HANDLE = 0x80100003;
+
+	//
+	// MessageId: SCARD_E_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// One or more of the supplied parameters could not be properly interpreted.
+	//
+	public static final int SCARD_E_INVALID_PARAMETER = 0x80100004;
+
+	//
+	// MessageId: SCARD_E_INVALID_TARGET
+	//
+	// MessageText:
+	//
+	// Registry startup information is missing or invalid.
+	//
+	public static final int SCARD_E_INVALID_TARGET = 0x80100005;
+
+	//
+	// MessageId: SCARD_E_NO_MEMORY
+	//
+	// MessageText:
+	//
+	// Not enough memory available to complete this command.
+	//
+	public static final int SCARD_E_NO_MEMORY = 0x80100006;
+
+	//
+	// MessageId: SCARD_F_WAITED_TOO_LONG
+	//
+	// MessageText:
+	//
+	// An internal consistency timer has expired.
+	//
+	public static final int SCARD_F_WAITED_TOO_LONG = 0x80100007;
+
+	//
+	// MessageId: SCARD_E_INSUFFICIENT_BUFFER
+	//
+	// MessageText:
+	//
+	// The data buffer to receive returned data is too small for the returned
+	// data.
+	//
+	public static final int SCARD_E_INSUFFICIENT_BUFFER = 0x80100008;
+
+	//
+	// MessageId: SCARD_E_UNKNOWN_READER
+	//
+	// MessageText:
+	//
+	// The specified reader name is not recognized.
+	//
+	public static final int SCARD_E_UNKNOWN_READER = 0x80100009;
+
+	//
+	// MessageId: SCARD_E_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The user-specified timeout value has expired.
+	//
+	public static final int SCARD_E_TIMEOUT = 0x8010000A;
+
+	//
+	// MessageId: SCARD_E_SHARING_VIOLATION
+	//
+	// MessageText:
+	//
+	// The smart card cannot be accessed because of other connections
+	// outstanding.
+	//
+	public static final int SCARD_E_SHARING_VIOLATION = 0x8010000B;
+
+	//
+	// MessageId: SCARD_E_NO_SMARTCARD
+	//
+	// MessageText:
+	//
+	// The operation requires a Smart Card, but no Smart Card is currently in
+	// the device.
+	//
+	public static final int SCARD_E_NO_SMARTCARD = 0x8010000C;
+
+	//
+	// MessageId: SCARD_E_UNKNOWN_CARD
+	//
+	// MessageText:
+	//
+	// The specified smart card name is not recognized.
+	//
+	public static final int SCARD_E_UNKNOWN_CARD = 0x8010000D;
+
+	//
+	// MessageId: SCARD_E_CANT_DISPOSE
+	//
+	// MessageText:
+	//
+	// The system could not dispose of the media in the requested manner.
+	//
+	public static final int SCARD_E_CANT_DISPOSE = 0x8010000E;
+
+	//
+	// MessageId: SCARD_E_PROTO_MISMATCH
+	//
+	// MessageText:
+	//
+	// The requested protocols are incompatible with the protocol currently in
+	// use with the smart card.
+	//
+	public static final int SCARD_E_PROTO_MISMATCH = 0x8010000F;
+
+	//
+	// MessageId: SCARD_E_NOT_READY
+	//
+	// MessageText:
+	//
+	// The reader or smart card is not ready to accept commands.
+	//
+	public static final int SCARD_E_NOT_READY = 0x80100010;
+
+	//
+	// MessageId: SCARD_E_INVALID_VALUE
+	//
+	// MessageText:
+	//
+	// One or more of the supplied parameters values could not be properly
+	// interpreted.
+	//
+	public static final int SCARD_E_INVALID_VALUE = 0x80100011;
+
+	//
+	// MessageId: SCARD_E_SYSTEM_CANCELLED
+	//
+	// MessageText:
+	//
+	// The action was cancelled by the system, presumably to log off or shut
+	// down.
+	//
+	public static final int SCARD_E_SYSTEM_CANCELLED = 0x80100012;
+
+	//
+	// MessageId: SCARD_F_COMM_ERROR
+	//
+	// MessageText:
+	//
+	// An internal communications error has been detected.
+	//
+	public static final int SCARD_F_COMM_ERROR = 0x80100013;
+
+	//
+	// MessageId: SCARD_F_UNKNOWN_ERROR
+	//
+	// MessageText:
+	//
+	// An internal error has been detected, but the source is unknown.
+	//
+	public static final int SCARD_F_UNKNOWN_ERROR = 0x80100014;
+
+	//
+	// MessageId: SCARD_E_INVALID_ATR
+	//
+	// MessageText:
+	//
+	// An ATR obtained from the registry is not a valid ATR string.
+	//
+	public static final int SCARD_E_INVALID_ATR = 0x80100015;
+
+	//
+	// MessageId: SCARD_E_NOT_TRANSACTED
+	//
+	// MessageText:
+	//
+	// An attempt was made to end a non-existent transaction.
+	//
+	public static final int SCARD_E_NOT_TRANSACTED = 0x80100016;
+
+	//
+	// MessageId: SCARD_E_READER_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The specified reader is not currently available for use.
+	//
+	public static final int SCARD_E_READER_UNAVAILABLE = 0x80100017;
+
+	//
+	// MessageId: SCARD_P_SHUTDOWN
+	//
+	// MessageText:
+	//
+	// The operation has been aborted to allow the server application to exit.
+	//
+	public static final int SCARD_P_SHUTDOWN = 0x80100018;
+
+	//
+	// MessageId: SCARD_E_PCI_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The PCI Receive buffer was too small.
+	//
+	public static final int SCARD_E_PCI_TOO_SMALL = 0x80100019;
+
+	//
+	// MessageId: SCARD_E_READER_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// The reader driver does not meet minimal requirements for support.
+	//
+	public static final int SCARD_E_READER_UNSUPPORTED = 0x8010001A;
+
+	//
+	// MessageId: SCARD_E_DUPLICATE_READER
+	//
+	// MessageText:
+	//
+	// The reader driver did not produce a unique reader name.
+	//
+	public static final int SCARD_E_DUPLICATE_READER = 0x8010001B;
+
+	//
+	// MessageId: SCARD_E_CARD_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// The smart card does not meet minimal requirements for support.
+	//
+	public static final int SCARD_E_CARD_UNSUPPORTED = 0x8010001C;
+
+	//
+	// MessageId: SCARD_E_NO_SERVICE
+	//
+	// MessageText:
+	//
+	// The Smart card resource manager is not running.
+	//
+	public static final int SCARD_E_NO_SERVICE = 0x8010001D;
+
+	//
+	// MessageId: SCARD_E_SERVICE_STOPPED
+	//
+	// MessageText:
+	//
+	// The Smart card resource manager has shut down.
+	//
+	public static final int SCARD_E_SERVICE_STOPPED = 0x8010001E;
+
+	//
+	// MessageId: SCARD_E_UNEXPECTED
+	//
+	// MessageText:
+	//
+	// An unexpected card error has occurred.
+	//
+	public static final int SCARD_E_UNEXPECTED = 0x8010001F;
+
+	//
+	// MessageId: SCARD_E_ICC_INSTALLATION
+	//
+	// MessageText:
+	//
+	// No Primary Provider can be found for the smart card.
+	//
+	public static final int SCARD_E_ICC_INSTALLATION = 0x80100020;
+
+	//
+	// MessageId: SCARD_E_ICC_CREATEORDER
+	//
+	// MessageText:
+	//
+	// The requested order of object creation is not supported.
+	//
+	public static final int SCARD_E_ICC_CREATEORDER = 0x80100021;
+
+	//
+	// MessageId: SCARD_E_UNSUPPORTED_FEATURE
+	//
+	// MessageText:
+	//
+	// This smart card does not support the requested feature.
+	//
+	public static final int SCARD_E_UNSUPPORTED_FEATURE = 0x80100022;
+
+	//
+	// MessageId: SCARD_E_DIR_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The identified directory does not exist in the smart card.
+	//
+	public static final int SCARD_E_DIR_NOT_FOUND = 0x80100023;
+
+	//
+	// MessageId: SCARD_E_FILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The identified file does not exist in the smart card.
+	//
+	public static final int SCARD_E_FILE_NOT_FOUND = 0x80100024;
+
+	//
+	// MessageId: SCARD_E_NO_DIR
+	//
+	// MessageText:
+	//
+	// The supplied path does not represent a smart card directory.
+	//
+	public static final int SCARD_E_NO_DIR = 0x80100025;
+
+	//
+	// MessageId: SCARD_E_NO_FILE
+	//
+	// MessageText:
+	//
+	// The supplied path does not represent a smart card file.
+	//
+	public static final int SCARD_E_NO_FILE = 0x80100026;
+
+	//
+	// MessageId: SCARD_E_NO_ACCESS
+	//
+	// MessageText:
+	//
+	// Access is denied to this file.
+	//
+	public static final int SCARD_E_NO_ACCESS = 0x80100027;
+
+	//
+	// MessageId: SCARD_E_WRITE_TOO_MANY
+	//
+	// MessageText:
+	//
+	// The smartcard does not have enough memory to store the information.
+	//
+	public static final int SCARD_E_WRITE_TOO_MANY = 0x80100028;
+
+	//
+	// MessageId: SCARD_E_BAD_SEEK
+	//
+	// MessageText:
+	//
+	// There was an error trying to set the smart card file object pointer.
+	//
+	public static final int SCARD_E_BAD_SEEK = 0x80100029;
+
+	//
+	// MessageId: SCARD_E_INVALID_CHV
+	//
+	// MessageText:
+	//
+	// The supplied PIN is incorrect.
+	//
+	public static final int SCARD_E_INVALID_CHV = 0x8010002A;
+
+	//
+	// MessageId: SCARD_E_UNKNOWN_RES_MNG
+	//
+	// MessageText:
+	//
+	// An unrecognized error code was returned from a layered component.
+	//
+	public static final int SCARD_E_UNKNOWN_RES_MNG = 0x8010002B;
+
+	//
+	// MessageId: SCARD_E_NO_SUCH_CERTIFICATE
+	//
+	// MessageText:
+	//
+	// The requested certificate does not exist.
+	//
+	public static final int SCARD_E_NO_SUCH_CERTIFICATE = 0x8010002C;
+
+	//
+	// MessageId: SCARD_E_CERTIFICATE_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// The requested certificate could not be obtained.
+	//
+	public static final int SCARD_E_CERTIFICATE_UNAVAILABLE = 0x8010002D;
+
+	//
+	// MessageId: SCARD_E_NO_READERS_AVAILABLE
+	//
+	// MessageText:
+	//
+	// Cannot find a smart card reader.
+	//
+	public static final int SCARD_E_NO_READERS_AVAILABLE = 0x8010002E;
+
+	//
+	// MessageId: SCARD_E_COMM_DATA_LOST
+	//
+	// MessageText:
+	//
+	// A communications error with the smart card has been detected. Retry the
+	// operation.
+	//
+	public static final int SCARD_E_COMM_DATA_LOST = 0x8010002F;
+
+	//
+	// MessageId: SCARD_E_NO_KEY_CONTAINER
+	//
+	// MessageText:
+	//
+	// The requested key container does not exist on the smart card.
+	//
+	public static final int SCARD_E_NO_KEY_CONTAINER = 0x80100030;
+
+	//
+	// MessageId: SCARD_E_SERVER_TOO_BUSY
+	//
+	// MessageText:
+	//
+	// The Smart card resource manager is too busy to complete this operation.
+	//
+	public static final int SCARD_E_SERVER_TOO_BUSY = 0x80100031;
+
+	//
+	// These are warning codes.
+	//
+	//
+	// MessageId: SCARD_W_UNSUPPORTED_CARD
+	//
+	// MessageText:
+	//
+	// The reader cannot communicate with the smart card, due to ATR
+	// configuration conF;icts.
+	//
+	public static final int SCARD_W_UNSUPPORTED_CARD = 0x80100065;
+
+	//
+	// MessageId: SCARD_W_UNRESPONSIVE_CARD
+	//
+	// MessageText:
+	//
+	// The smart card is not responding to a reset.
+	//
+	public static final int SCARD_W_UNRESPONSIVE_CARD = 0x80100066;
+
+	//
+	// MessageId: SCARD_W_UNPOWERED_CARD
+	//
+	// MessageText:
+	//
+	// Power has been removed from the smart card, so that further communication
+	// is not possible.
+	//
+	public static final int SCARD_W_UNPOWERED_CARD = 0x80100067;
+
+	//
+	// MessageId: SCARD_W_RESET_CARD
+	//
+	// MessageText:
+	//
+	// The smart card has been reset, so any shared state information is
+	// invalid.
+	//
+	public static final int SCARD_W_RESET_CARD = 0x80100068;
+
+	//
+	// MessageId: SCARD_W_REMOVED_CARD
+	//
+	// MessageText:
+	//
+	// The smart card has been removed, so that further communication is not
+	// possible.
+	//
+	public static final int SCARD_W_REMOVED_CARD = 0x80100069;
+
+	//
+	// MessageId: SCARD_W_SECURITY_VIOLATION
+	//
+	// MessageText:
+	//
+	// Access was denied because of a security violation.
+	//
+	public static final int SCARD_W_SECURITY_VIOLATION = 0x8010006A;
+
+	//
+	// MessageId: SCARD_W_WRONG_CHV
+	//
+	// MessageText:
+	//
+	// The card cannot be accessed because the wrong PIN was presented.
+	//
+	public static final int SCARD_W_WRONG_CHV = 0x8010006B;
+
+	//
+	// MessageId: SCARD_W_CHV_BLOCKED
+	//
+	// MessageText:
+	//
+	// The card cannot be accessed because the maximum number of PIN entry
+	// attempts has been reached.
+	//
+	public static final int SCARD_W_CHV_BLOCKED = 0x8010006C;
+
+	//
+	// MessageId: SCARD_W_EOF
+	//
+	// MessageText:
+	//
+	// The end of the smart card file has been reached.
+	//
+	public static final int SCARD_W_EOF = 0x8010006D;
+
+	//
+	// MessageId: SCARD_W_CANCELLED_BY_USER
+	//
+	// MessageText:
+	//
+	// The action was cancelled by the user.
+	//
+	public static final int SCARD_W_CANCELLED_BY_USER = 0x8010006E;
+
+	//
+	// MessageId: SCARD_W_CARD_NOT_AUTHENTICATED
+	//
+	// MessageText:
+	//
+	// No PIN was presented to the smart card.
+	//
+	public static final int SCARD_W_CARD_NOT_AUTHENTICATED = 0x8010006F;
+
+	//
+	// MessageId: SCARD_W_CACHE_ITEM_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The requested item could not be found in the cache.
+	//
+	public static final int SCARD_W_CACHE_ITEM_NOT_FOUND = 0x80100070;
+
+	//
+	// MessageId: SCARD_W_CACHE_ITEM_STALE
+	//
+	// MessageText:
+	//
+	// The requested cache item is too old and was deleted from the cache.
+	//
+	public static final int SCARD_W_CACHE_ITEM_STALE = 0x80100071;
+
+	//
+	// MessageId: SCARD_W_CACHE_ITEM_TOO_BIG
+	//
+	// MessageText:
+	//
+	// The new cache item exceeds the maximum per-item size defined for the
+	// cache.
+	//
+	public static final int SCARD_W_CACHE_ITEM_TOO_BIG = 0x80100072;
+
+	// *****************
+	// FACILITY_COMPLUS
+	// *****************
+	//
+	// ==
+	// Facility COMPLUS Error Messages
+	// ==
+	//
+	//
+	// The following are the subranges within the COMPLUS facility
+	// 0x400 - 0x4ff=COMADMIN_E_CAT
+	// 0x600 - 0x6ff=COMQC errors
+	// 0x700 - 0x7ff=MSDTC errors
+	// 0x800 - 0x8ff=Other COMADMIN errors
+	//
+	// COMPLUS Admin errors
+	//
+	//
+	// MessageId: COMADMIN_E_OBJECTERRORS
+	//
+	// MessageText:
+	//
+	// Errors occurred accessing one or more objects - the ErrorInfo collection
+	// may have more detail
+	//
+	public static final int COMADMIN_E_OBJECTERRORS = 0x80110401;
+
+	//
+	// MessageId: COMADMIN_E_OBJECTINVALID
+	//
+	// MessageText:
+	//
+	// One or more of the object's properties are missing or invalid
+	//
+	public static final int COMADMIN_E_OBJECTINVALID = 0x80110402;
+
+	//
+	// MessageId: COMADMIN_E_KEYMISSING
+	//
+	// MessageText:
+	//
+	// The object was not found in the catalog
+	//
+	public static final int COMADMIN_E_KEYMISSING = 0x80110403;
+
+	//
+	// MessageId: COMADMIN_E_ALREADYINSTALLED
+	//
+	// MessageText:
+	//
+	// The object is already registered
+	//
+	public static final int COMADMIN_E_ALREADYINSTALLED = 0x80110404;
+
+	//
+	// MessageId: COMADMIN_E_APP_FILE_WRITEFAIL
+	//
+	// MessageText:
+	//
+	// Error occurred writing to the application file
+	//
+	public static final int COMADMIN_E_APP_FILE_WRITEFAIL = 0x80110407;
+
+	//
+	// MessageId: COMADMIN_E_APP_FILE_READFAIL
+	//
+	// MessageText:
+	//
+	// Error occurred reading the application file
+	//
+	public static final int COMADMIN_E_APP_FILE_READFAIL = 0x80110408;
+
+	//
+	// MessageId: COMADMIN_E_APP_FILE_VERSION
+	//
+	// MessageText:
+	//
+	// Invalid version number in application file
+	//
+	public static final int COMADMIN_E_APP_FILE_VERSION = 0x80110409;
+
+	//
+	// MessageId: COMADMIN_E_BADPATH
+	//
+	// MessageText:
+	//
+	// The file path is invalid
+	//
+	public static final int COMADMIN_E_BADPATH = 0x8011040A;
+
+	//
+	// MessageId: COMADMIN_E_APPLICATIONEXISTS
+	//
+	// MessageText:
+	//
+	// The application is already installed
+	//
+	public static final int COMADMIN_E_APPLICATIONEXISTS = 0x8011040B;
+
+	//
+	// MessageId: COMADMIN_E_ROLEEXISTS
+	//
+	// MessageText:
+	//
+	// The role already exists
+	//
+	public static final int COMADMIN_E_ROLEEXISTS = 0x8011040C;
+
+	//
+	// MessageId: COMADMIN_E_CANTCOPYFILE
+	//
+	// MessageText:
+	//
+	// An error occurred copying the file
+	//
+	public static final int COMADMIN_E_CANTCOPYFILE = 0x8011040D;
+
+	//
+	// MessageId: COMADMIN_E_NOUSER
+	//
+	// MessageText:
+	//
+	// One or more users are not valid
+	//
+	public static final int COMADMIN_E_NOUSER = 0x8011040F;
+
+	//
+	// MessageId: COMADMIN_E_INVALIDUSERIDS
+	//
+	// MessageText:
+	//
+	// One or more users in the application file are not valid
+	//
+	public static final int COMADMIN_E_INVALIDUSERIDS = 0x80110410;
+
+	//
+	// MessageId: COMADMIN_E_NOREGISTRYCLSID
+	//
+	// MessageText:
+	//
+	// The component's CLSID is missing or corrupt
+	//
+	public static final int COMADMIN_E_NOREGISTRYCLSID = 0x80110411;
+
+	//
+	// MessageId: COMADMIN_E_BADREGISTRYPROGID
+	//
+	// MessageText:
+	//
+	// The component's progID is missing or corrupt
+	//
+	public static final int COMADMIN_E_BADREGISTRYPROGID = 0x80110412;
+
+	//
+	// MessageId: COMADMIN_E_AUTHENTICATIONLEVEL
+	//
+	// MessageText:
+	//
+	// Unable to set required authentication level for update request
+	//
+	public static final int COMADMIN_E_AUTHENTICATIONLEVEL = 0x80110413;
+
+	//
+	// MessageId: COMADMIN_E_USERPASSWDNOTVALID
+	//
+	// MessageText:
+	//
+	// The identity or password set on the application is not valid
+	//
+	public static final int COMADMIN_E_USERPASSWDNOTVALID = 0x80110414;
+
+	//
+	// MessageId: COMADMIN_E_CLSIDORIIDMISMATCH
+	//
+	// MessageText:
+	//
+	// Application file CLSIDs or IIDs do not match corresponding DLLs
+	//
+	public static final int COMADMIN_E_CLSIDORIIDMISMATCH = 0x80110418;
+
+	//
+	// MessageId: COMADMIN_E_REMOTEINTERFACE
+	//
+	// MessageText:
+	//
+	// Interface information is either missing or changed
+	//
+	public static final int COMADMIN_E_REMOTEINTERFACE = 0x80110419;
+
+	//
+	// MessageId: COMADMIN_E_DLLREGISTERSERVER
+	//
+	// MessageText:
+	//
+	// DllRegisterServer failed on component install
+	//
+	public static final int COMADMIN_E_DLLREGISTERSERVER = 0x8011041A;
+
+	//
+	// MessageId: COMADMIN_E_NOSERVERSHARE
+	//
+	// MessageText:
+	//
+	// No server file share available
+	//
+	public static final int COMADMIN_E_NOSERVERSHARE = 0x8011041B;
+
+	//
+	// MessageId: COMADMIN_E_DLLLOADFAILED
+	//
+	// MessageText:
+	//
+	// DLL could not be loaded
+	//
+	public static final int COMADMIN_E_DLLLOADFAILED = 0x8011041D;
+
+	//
+	// MessageId: COMADMIN_E_BADREGISTRYLIBID
+	//
+	// MessageText:
+	//
+	// The registered TypeLib ID is not valid
+	//
+	public static final int COMADMIN_E_BADREGISTRYLIBID = 0x8011041E;
+
+	//
+	// MessageId: COMADMIN_E_APPDIRNOTFOUND
+	//
+	// MessageText:
+	//
+	// Application install directory not found
+	//
+	public static final int COMADMIN_E_APPDIRNOTFOUND = 0x8011041F;
+
+	//
+	// MessageId: COMADMIN_E_REGISTRARFAILED
+	//
+	// MessageText:
+	//
+	// Errors occurred while in the component registrar
+	//
+	public static final int COMADMIN_E_REGISTRARFAILED = 0x80110423;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_DOESNOTEXIST
+	//
+	// MessageText:
+	//
+	// The file does not exist
+	//
+	public static final int COMADMIN_E_COMPFILE_DOESNOTEXIST = 0x80110424;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_LOADDLLFAIL
+	//
+	// MessageText:
+	//
+	// The DLL could not be loaded
+	//
+	public static final int COMADMIN_E_COMPFILE_LOADDLLFAIL = 0x80110425;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_GETCLASSOBJ
+	//
+	// MessageText:
+	//
+	// GetClassObject failed in the DLL
+	//
+	public static final int COMADMIN_E_COMPFILE_GETCLASSOBJ = 0x80110426;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_CLASSNOTAVAIL
+	//
+	// MessageText:
+	//
+	// The DLL does not support the components listed in the TypeLib
+	//
+	public static final int COMADMIN_E_COMPFILE_CLASSNOTAVAIL = 0x80110427;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_BADTLB
+	//
+	// MessageText:
+	//
+	// The TypeLib could not be loaded
+	//
+	public static final int COMADMIN_E_COMPFILE_BADTLB = 0x80110428;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_NOTINSTALLABLE
+	//
+	// MessageText:
+	//
+	// The file does not contain components or component information
+	//
+	public static final int COMADMIN_E_COMPFILE_NOTINSTALLABLE = 0x80110429;
+
+	//
+	// MessageId: COMADMIN_E_NOTCHANGEABLE
+	//
+	// MessageText:
+	//
+	// Changes to this object and its sub-objects have been disabled
+	//
+	public static final int COMADMIN_E_NOTCHANGEABLE = 0x8011042A;
+
+	//
+	// MessageId: COMADMIN_E_NOTDELETEABLE
+	//
+	// MessageText:
+	//
+	// The delete function has been disabled for this object
+	//
+	public static final int COMADMIN_E_NOTDELETEABLE = 0x8011042B;
+
+	//
+	// MessageId: COMADMIN_E_SESSION
+	//
+	// MessageText:
+	//
+	// The server catalog version is not supported
+	//
+	public static final int COMADMIN_E_SESSION = 0x8011042C;
+
+	//
+	// MessageId: COMADMIN_E_COMP_MOVE_LOCKED
+	//
+	// MessageText:
+	//
+	// The component move was disallowed, because the source or destination
+	// application is either a system application or currently locked against
+	// changes
+	//
+	public static final int COMADMIN_E_COMP_MOVE_LOCKED = 0x8011042D;
+
+	//
+	// MessageId: COMADMIN_E_COMP_MOVE_BAD_DEST
+	//
+	// MessageText:
+	//
+	// The component move failed because the destination application no longer
+	// exists
+	//
+	public static final int COMADMIN_E_COMP_MOVE_BAD_DEST = 0x8011042E;
+
+	//
+	// MessageId: COMADMIN_E_REGISTERTLB
+	//
+	// MessageText:
+	//
+	// The system was unable to register the TypeLib
+	//
+	public static final int COMADMIN_E_REGISTERTLB = 0x80110430;
+
+	//
+	// MessageId: COMADMIN_E_SYSTEMAPP
+	//
+	// MessageText:
+	//
+	// This operation cannot be performed on the system application
+	//
+	public static final int COMADMIN_E_SYSTEMAPP = 0x80110433;
+
+	//
+	// MessageId: COMADMIN_E_COMPFILE_NOREGISTRAR
+	//
+	// MessageText:
+	//
+	// The component registrar referenced in this file is not available
+	//
+	public static final int COMADMIN_E_COMPFILE_NOREGISTRAR = 0x80110434;
+
+	//
+	// MessageId: COMADMIN_E_COREQCOMPINSTALLED
+	//
+	// MessageText:
+	//
+	// A component in the same DLL is already installed
+	//
+	public static final int COMADMIN_E_COREQCOMPINSTALLED = 0x80110435;
+
+	//
+	// MessageId: COMADMIN_E_SERVICENOTINSTALLED
+	//
+	// MessageText:
+	//
+	// The service is not installed
+	//
+	public static final int COMADMIN_E_SERVICENOTINSTALLED = 0x80110436;
+
+	//
+	// MessageId: COMADMIN_E_PROPERTYSAVEFAILED
+	//
+	// MessageText:
+	//
+	// One or more property settings are either invalid or in conF;ict with each
+	// other
+	//
+	public static final int COMADMIN_E_PROPERTYSAVEFAILED = 0x80110437;
+
+	//
+	// MessageId: COMADMIN_E_OBJECTEXISTS
+	//
+	// MessageText:
+	//
+	// The object you are attempting to add or rename already exists
+	//
+	public static final int COMADMIN_E_OBJECTEXISTS = 0x80110438;
+
+	//
+	// MessageId: COMADMIN_E_COMPONENTEXISTS
+	//
+	// MessageText:
+	//
+	// The component already exists
+	//
+	public static final int COMADMIN_E_COMPONENTEXISTS = 0x80110439;
+
+	//
+	// MessageId: COMADMIN_E_REGFILE_CORRUPT
+	//
+	// MessageText:
+	//
+	// The registration file is corrupt
+	//
+	public static final int COMADMIN_E_REGFILE_CORRUPT = 0x8011043B;
+
+	//
+	// MessageId: COMADMIN_E_PROPERTY_OVERF;OW
+	//
+	// MessageText:
+	//
+	// The property value is too large
+	//
+	public static final int COMADMIN_E_PROPERTY_OVERFLOW = 0x8011043C;
+
+	//
+	// MessageId: COMADMIN_E_NOTINREGISTRY
+	//
+	// MessageText:
+	//
+	// Object was not found in registry
+	//
+	public static final int COMADMIN_E_NOTINREGISTRY = 0x8011043E;
+
+	//
+	// MessageId: COMADMIN_E_OBJECTNOTPOOLABLE
+	//
+	// MessageText:
+	//
+	// This object is not poolable
+	//
+	public static final int COMADMIN_E_OBJECTNOTPOOLABLE = 0x8011043F;
+
+	//
+	// MessageId: COMADMIN_E_APPLID_MATCHES_CLSID
+	//
+	// MessageText:
+	//
+	// A CLSID with the same GUID as the new application ID is already installed
+	// on this machine
+	//
+	public static final int COMADMIN_E_APPLID_MATCHES_CLSID = 0x80110446;
+
+	//
+	// MessageId: COMADMIN_E_ROLE_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// A role assigned to a component, interface, or method did not exist in the
+	// application
+	//
+	public static final int COMADMIN_E_ROLE_DOES_NOT_EXIST = 0x80110447;
+
+	//
+	// MessageId: COMADMIN_E_START_APP_NEEDS_COMPONENTS
+	//
+	// MessageText:
+	//
+	// You must have components in an application in order to start the
+	// application
+	//
+	public static final int COMADMIN_E_START_APP_NEEDS_COMPONENTS = 0x80110448;
+
+	//
+	// MessageId: COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM
+	//
+	// MessageText:
+	//
+	// This operation is not enabled on this platform
+	//
+	public static final int COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM = 0x80110449;
+
+	//
+	// MessageId: COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY
+	//
+	// MessageText:
+	//
+	// Application Proxy is not exportable
+	//
+	public static final int COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY = 0x8011044A;
+
+	//
+	// MessageId: COMADMIN_E_CAN_NOT_START_APP
+	//
+	// MessageText:
+	//
+	// Failed to start application because it is either a library application or
+	// an application proxy
+	//
+	public static final int COMADMIN_E_CAN_NOT_START_APP = 0x8011044B;
+
+	//
+	// MessageId: COMADMIN_E_CAN_NOT_EXPORT_SYS_APP
+	//
+	// MessageText:
+	//
+	// System application is not exportable
+	//
+	public static final int COMADMIN_E_CAN_NOT_EXPORT_SYS_APP = 0x8011044C;
+
+	//
+	// MessageId: COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT
+	//
+	// MessageText:
+	//
+	// Cannot subscribe to this component (the component may have been imported)
+	//
+	public static final int COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT = 0x8011044D;
+
+	//
+	// MessageId: COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER
+	//
+	// MessageText:
+	//
+	// An event class cannot also be a subscriber component
+	//
+	public static final int COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER = 0x8011044E;
+
+	//
+	// MessageId: COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE
+	//
+	// MessageText:
+	//
+	// Library applications and application proxies are incompatible
+	//
+	public static final int COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE = 0x8011044F;
+
+	//
+	// MessageId: COMADMIN_E_BASE_PARTITION_ONLY
+	//
+	// MessageText:
+	//
+	// This function is valid for the base partition only
+	//
+	public static final int COMADMIN_E_BASE_PARTITION_ONLY = 0x80110450;
+
+	//
+	// MessageId: COMADMIN_E_START_APP_DISABLED
+	//
+	// MessageText:
+	//
+	// You cannot start an application that has been disabled
+	//
+	public static final int COMADMIN_E_START_APP_DISABLED = 0x80110451;
+
+	//
+	// MessageId: COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME
+	//
+	// MessageText:
+	//
+	// The specified partition name is already in use on this computer
+	//
+	public static final int COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME = 0x80110457;
+
+	//
+	// MessageId: COMADMIN_E_CAT_INVALID_PARTITION_NAME
+	//
+	// MessageText:
+	//
+	// The specified partition name is invalid. Check that the name contains at
+	// least one visible character
+	//
+	public static final int COMADMIN_E_CAT_INVALID_PARTITION_NAME = 0x80110458;
+
+	//
+	// MessageId: COMADMIN_E_CAT_PARTITION_IN_USE
+	//
+	// MessageText:
+	//
+	// The partition cannot be deleted because it is the default partition for
+	// one or more users
+	//
+	public static final int COMADMIN_E_CAT_PARTITION_IN_USE = 0x80110459;
+
+	//
+	// MessageId: COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES
+	//
+	// MessageText:
+	//
+	// The partition cannot be exported, because one or more components in the
+	// partition have the same file name
+	//
+	public static final int COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES = 0x8011045A;
+
+	//
+	// MessageId: COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// Applications that contain one or more imported components cannot be
+	// installed into a non-base partition
+	//
+	public static final int COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED = 0x8011045B;
+
+	//
+	// MessageId: COMADMIN_E_AMBIGUOUS_APPLICATION_NAME
+	//
+	// MessageText:
+	//
+	// The application name is not unique and cannot be resolved to an
+	// application id
+	//
+	public static final int COMADMIN_E_AMBIGUOUS_APPLICATION_NAME = 0x8011045C;
+
+	//
+	// MessageId: COMADMIN_E_AMBIGUOUS_PARTITION_NAME
+	//
+	// MessageText:
+	//
+	// The partition name is not unique and cannot be resolved to a partition id
+	//
+	public static final int COMADMIN_E_AMBIGUOUS_PARTITION_NAME = 0x8011045D;
+
+	//
+	// MessageId: COMADMIN_E_REGDB_NOTINITIALIZED
+	//
+	// MessageText:
+	//
+	// The COM+ registry database has not been initialized
+	//
+	public static final int COMADMIN_E_REGDB_NOTINITIALIZED = 0x80110472;
+
+	//
+	// MessageId: COMADMIN_E_REGDB_NOTOPEN
+	//
+	// MessageText:
+	//
+	// The COM+ registry database is not open
+	//
+	public static final int COMADMIN_E_REGDB_NOTOPEN = 0x80110473;
+
+	//
+	// MessageId: COMADMIN_E_REGDB_SYSTEMERR
+	//
+	// MessageText:
+	//
+	// The COM+ registry database detected a system error
+	//
+	public static final int COMADMIN_E_REGDB_SYSTEMERR = 0x80110474;
+
+	//
+	// MessageId: COMADMIN_E_REGDB_ALREADYRUNNING
+	//
+	// MessageText:
+	//
+	// The COM+ registry database is already running
+	//
+	public static final int COMADMIN_E_REGDB_ALREADYRUNNING = 0x80110475;
+
+	//
+	// MessageId: COMADMIN_E_MIG_VERSIONNOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// This version of the COM+ registry database cannot be migrated
+	//
+	public static final int COMADMIN_E_MIG_VERSIONNOTSUPPORTED = 0x80110480;
+
+	//
+	// MessageId: COMADMIN_E_MIG_SCHEMANOTFOUND
+	//
+	// MessageText:
+	//
+	// The schema version to be migrated could not be found in the COM+ registry
+	// database
+	//
+	public static final int COMADMIN_E_MIG_SCHEMANOTFOUND = 0x80110481;
+
+	//
+	// MessageId: COMADMIN_E_CAT_BITNESSMISMATCH
+	//
+	// MessageText:
+	//
+	// There was a type mismatch between binaries
+	//
+	public static final int COMADMIN_E_CAT_BITNESSMISMATCH = 0x80110482;
+
+	//
+	// MessageId: COMADMIN_E_CAT_UNACCEPTABLEBITNESS
+	//
+	// MessageText:
+	//
+	// A binary of unknown or invalid type was provided
+	//
+	public static final int COMADMIN_E_CAT_UNACCEPTABLEBITNESS = 0x80110483;
+
+	//
+	// MessageId: COMADMIN_E_CAT_WRONGAPPBITNESS
+	//
+	// MessageText:
+	//
+	// There was a type mismatch between a binary and an application
+	//
+	public static final int COMADMIN_E_CAT_WRONGAPPBITNESS = 0x80110484;
+
+	//
+	// MessageId: COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The application cannot be paused or resumed
+	//
+	public static final int COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED = 0x80110485;
+
+	//
+	// MessageId: COMADMIN_E_CAT_SERVERFAULT
+	//
+	// MessageText:
+	//
+	// The COM+ Catalog Server threw an exception during execution
+	//
+	public static final int COMADMIN_E_CAT_SERVERFAULT = 0x80110486;
+
+	//
+	// COMPLUS Queued component errors
+	//
+	//
+	// MessageId: COMQC_E_APPLICATION_NOT_QUEUED
+	//
+	// MessageText:
+	//
+	// Only COM+ Applications marked "queued" can be invoked using the "queue"
+	// moniker
+	//
+	public static final int COMQC_E_APPLICATION_NOT_QUEUED = 0x80110600;
+
+	//
+	// MessageId: COMQC_E_NO_QUEUEABLE_INTERFACES
+	//
+	// MessageText:
+	//
+	// At least one interface must be marked "queued" in order to create a
+	// queued component instance with the "queue" moniker
+	//
+	public static final int COMQC_E_NO_QUEUEABLE_INTERFACES = 0x80110601;
+
+	//
+	// MessageId: COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE
+	//
+	// MessageText:
+	//
+	// MSMQ is required for the requested operation and is not installed
+	//
+	public static final int COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE = 0x80110602;
+
+	//
+	// MessageId: COMQC_E_NO_IPERSISTSTREAM
+	//
+	// MessageText:
+	//
+	// Unable to marshal an interface that does not support IPersistStream
+	//
+	public static final int COMQC_E_NO_IPERSISTSTREAM = 0x80110603;
+
+	//
+	// MessageId: COMQC_E_BAD_MESSAGE
+	//
+	// MessageText:
+	//
+	// The message is improperly formatted or was damaged in transit
+	//
+	public static final int COMQC_E_BAD_MESSAGE = 0x80110604;
+
+	//
+	// MessageId: COMQC_E_UNAUTHENTICATED
+	//
+	// MessageText:
+	//
+	// An unauthenticated message was received by an application that accepts
+	// only authenticated messages
+	//
+	public static final int COMQC_E_UNAUTHENTICATED = 0x80110605;
+
+	//
+	// MessageId: COMQC_E_UNTRUSTED_ENQUEUER
+	//
+	// MessageText:
+	//
+	// The message was requeued or moved by a user not in the "QC Trusted User"
+	// role
+	//
+	public static final int COMQC_E_UNTRUSTED_ENQUEUER = 0x80110606;
+
+	//
+	// The range 0x700-0x7ff is reserved for MSDTC errors.
+	//
+	//
+	// MessageId: MSDTC_E_DUPLICATE_RESOURCE
+	//
+	// MessageText:
+	//
+	// Cannot create a duplicate resource of type Distributed Transaction
+	// Coordinator
+	//
+	public static final int MSDTC_E_DUPLICATE_RESOURCE = 0x80110701;
+
+	//
+	// More COMADMIN errors from 0x8**
+	//
+	//
+	// MessageId: COMADMIN_E_OBJECT_PARENT_MISSING
+	//
+	// MessageText:
+	//
+	// One of the objects being inserted or updated does not belong to a valid
+	// parent collection
+	//
+	public static final int COMADMIN_E_OBJECT_PARENT_MISSING = 0x80110808;
+
+	//
+	// MessageId: COMADMIN_E_OBJECT_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// One of the specified objects cannot be found
+	//
+	public static final int COMADMIN_E_OBJECT_DOES_NOT_EXIST = 0x80110809;
+
+	//
+	// MessageId: COMADMIN_E_APP_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// The specified application is not currently running
+	//
+	public static final int COMADMIN_E_APP_NOT_RUNNING = 0x8011080A;
+
+	//
+	// MessageId: COMADMIN_E_INVALID_PARTITION
+	//
+	// MessageText:
+	//
+	// The partition(s) specified are not valid.
+	//
+	public static final int COMADMIN_E_INVALID_PARTITION = 0x8011080B;
+
+	//
+	// MessageId: COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE
+	//
+	// MessageText:
+	//
+	// COM+ applications that run as NT service may not be pooled or recycled
+	//
+	public static final int COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE = 0x8011080D;
+
+	//
+	// MessageId: COMADMIN_E_USER_IN_SET
+	//
+	// MessageText:
+	//
+	// One or more users are already assigned to a local partition set.
+	//
+	public static final int COMADMIN_E_USER_IN_SET = 0x8011080E;
+
+	//
+	// MessageId: COMADMIN_E_CANTRECYCLELIBRARYAPPS
+	//
+	// MessageText:
+	//
+	// Library applications may not be recycled.
+	//
+	public static final int COMADMIN_E_CANTRECYCLELIBRARYAPPS = 0x8011080F;
+
+	//
+	// MessageId: COMADMIN_E_CANTRECYCLESERVICEAPPS
+	//
+	// MessageText:
+	//
+	// Applications running as NT services may not be recycled.
+	//
+	public static final int COMADMIN_E_CANTRECYCLESERVICEAPPS = 0x80110811;
+
+	//
+	// MessageId: COMADMIN_E_PROCESSALREADYRECYCLED
+	//
+	// MessageText:
+	//
+	// The process has already been recycled.
+	//
+	public static final int COMADMIN_E_PROCESSALREADYRECYCLED = 0x80110812;
+
+	//
+	// MessageId: COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED
+	//
+	// MessageText:
+	//
+	// A paused process may not be recycled.
+	//
+	public static final int COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED = 0x80110813;
+
+	//
+	// MessageId: COMADMIN_E_CANTMAKEINPROCSERVICE
+	//
+	// MessageText:
+	//
+	// Library applications may not be NT services.
+	//
+	public static final int COMADMIN_E_CANTMAKEINPROCSERVICE = 0x80110814;
+
+	//
+	// MessageId: COMADMIN_E_PROGIDINUSEBYCLSID
+	//
+	// MessageText:
+	//
+	// The ProgID provided to the copy operation is invalid. The ProgID is in
+	// use by another registered CLSID.
+	//
+	public static final int COMADMIN_E_PROGIDINUSEBYCLSID = 0x80110815;
+
+	//
+	// MessageId: COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET
+	//
+	// MessageText:
+	//
+	// The partition specified as default is not a member of the partition set.
+	//
+	public static final int COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET = 0x80110816;
+
+	//
+	// MessageId: COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED
+	//
+	// MessageText:
+	//
+	// A recycled process may not be paused.
+	//
+	public static final int COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED = 0x80110817;
+
+	//
+	// MessageId: COMADMIN_E_PARTITION_ACCESSDENIED
+	//
+	// MessageText:
+	//
+	// Access to the specified partition is denied.
+	//
+	public static final int COMADMIN_E_PARTITION_ACCESSDENIED = 0x80110818;
+
+	//
+	// MessageId: COMADMIN_E_PARTITION_MSI_ONLY
+	//
+	// MessageText:
+	//
+	// Only Application Files (*.MSI files) can be installed into partitions.
+	//
+	public static final int COMADMIN_E_PARTITION_MSI_ONLY = 0x80110819;
+
+	//
+	// MessageId: COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT
+	//
+	// MessageText:
+	//
+	// Applications containing one or more legacy components may not be exported
+	// to=1.0 format.
+	//
+	public static final int COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT = 0x8011081A;
+
+	//
+	// MessageId: COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS
+	//
+	// MessageText:
+	//
+	// Legacy components may not exist in non-base partitions.
+	//
+	public static final int COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS = 0x8011081B;
+
+	//
+	// MessageId: COMADMIN_E_COMP_MOVE_SOURCE
+	//
+	// MessageText:
+	//
+	// A component cannot be moved (or copied) from the System Application, an
+	// application proxy or a non-changeable application
+	//
+	public static final int COMADMIN_E_COMP_MOVE_SOURCE = 0x8011081C;
+
+	//
+	// MessageId: COMADMIN_E_COMP_MOVE_DEST
+	//
+	// MessageText:
+	//
+	// A component cannot be moved (or copied) to the System Application, an
+	// application proxy or a non-changeable application
+	//
+	public static final int COMADMIN_E_COMP_MOVE_DEST = 0x8011081D;
+
+	//
+	// MessageId: COMADMIN_E_COMP_MOVE_PRIVATE
+	//
+	// MessageText:
+	//
+	// A private component cannot be moved (or copied) to a library application
+	// or to the base partition
+	//
+	public static final int COMADMIN_E_COMP_MOVE_PRIVATE = 0x8011081E;
+
+	//
+	// MessageId: COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET
+	//
+	// MessageText:
+	//
+	// The Base Application Partition exists in all partition sets and cannot be
+	// removed.
+	//
+	public static final int COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET = 0x8011081F;
+
+	//
+	// MessageId: COMADMIN_E_CANNOT_ALIAS_EVENTCLASS
+	//
+	// MessageText:
+	//
+	// Alas, Event Class components cannot be aliased.
+	//
+	public static final int COMADMIN_E_CANNOT_ALIAS_EVENTCLASS = 0x80110820;
+
+	//
+	// MessageId: COMADMIN_E_PRIVATE_ACCESSDENIED
+	//
+	// MessageText:
+	//
+	// Access is denied because the component is private.
+	//
+	public static final int COMADMIN_E_PRIVATE_ACCESSDENIED = 0x80110821;
+
+	//
+	// MessageId: COMADMIN_E_SAFERINVALID
+	//
+	// MessageText:
+	//
+	// The specified SAFER level is invalid.
+	//
+	public static final int COMADMIN_E_SAFERINVALID = 0x80110822;
+
+	//
+	// MessageId: COMADMIN_E_REGISTRY_ACCESSDENIED
+	//
+	// MessageText:
+	//
+	// The specified user cannot write to the system registry
+	//
+	public static final int COMADMIN_E_REGISTRY_ACCESSDENIED = 0x80110823;
+
+	//
+	// MessageId: COMADMIN_E_PARTITIONS_DISABLED
+	//
+	// MessageText:
+	//
+	// COM+ partitions are currently disabled.
+	//
+	public static final int COMADMIN_E_PARTITIONS_DISABLED = 0x80110824;
+
+	// ***********************
+	// FACILITY_USERMODE_FILTER_MANAGER
+	// ***********************
+	//
+	// Translation macro for converting:
+	// NTSTATUS --> HRESULT
+	//
+	public static final int FILTER_HRESULT_FROM_FLT_NTSTATUS(int x) {
+		int f = FACILITY_USERMODE_FILTER_MANAGER;
+		return (((x) & 0x8000FFFF) | (f <<= 16));
+	}
+
+	//
+	// MessageId: ERROR_FLT_IO_COMPLETE
+	//
+	// MessageText:
+	//
+	// The IO was completed by a filter.
+	//
+	public static final int ERROR_FLT_IO_COMPLETE = 0x001F0001;
+
+	//
+	// MessageId: ERROR_FLT_NO_HANDLER_DEFINED
+	//
+	// MessageText:
+	//
+	// A handler was not defined by the filter for this operation.
+	//
+	public static final int ERROR_FLT_NO_HANDLER_DEFINED = 0x801F0001;
+
+	//
+	// MessageId: ERROR_FLT_CONTEXT_ALREADY_DEFINED
+	//
+	// MessageText:
+	//
+	// A context is already defined for this object.
+	//
+	public static final int ERROR_FLT_CONTEXT_ALREADY_DEFINED = 0x801F0002;
+
+	//
+	// MessageId: ERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST
+	//
+	// MessageText:
+	//
+	// Asynchronous requests are not valid for this operation.
+	//
+	public static final int ERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST = 0x801F0003;
+
+	//
+	// MessageId: ERROR_FLT_DISALLOW_FAST_IO
+	//
+	// MessageText:
+	//
+	// Disallow the Fast IO path for this operation.
+	//
+	public static final int ERROR_FLT_DISALLOW_FAST_IO = 0x801F0004;
+
+	//
+	// MessageId: ERROR_FLT_INVALID_NAME_REQUEST
+	//
+	// MessageText:
+	//
+	// An invalid name request was made. The name requested cannot be retrieved
+	// at this time.
+	//
+	public static final int ERROR_FLT_INVALID_NAME_REQUEST = 0x801F0005;
+
+	//
+	// MessageId: ERROR_FLT_NOT_SAFE_TO_POST_OPERATION
+	//
+	// MessageText:
+	//
+	// Posting this operation to a worker thread for further processing is not
+	// safe at this time because it could lead to a system deadlock.
+	//
+	public static final int ERROR_FLT_NOT_SAFE_TO_POST_OPERATION = 0x801F0006;
+
+	//
+	// MessageId: ERROR_FLT_NOT_INITIALIZED
+	//
+	// MessageText:
+	//
+	// The Filter Manager was not initialized when a filter tried to register.
+	// Make sure that the Filter Manager is getting loaded as a driver.
+	//
+	public static final int ERROR_FLT_NOT_INITIALIZED = 0x801F0007;
+
+	//
+	// MessageId: ERROR_FLT_FILTER_NOT_READY
+	//
+	// MessageText:
+	//
+	// The filter is not ready for attachment to volumes because it has not
+	// finished initializing (FLTStartFiltering has not been called).
+	//
+	public static final int ERROR_FLT_FILTER_NOT_READY = 0x801F0008;
+
+	//
+	// MessageId: ERROR_FLT_POST_OPERATION_CLEANUP
+	//
+	// MessageText:
+	//
+	// The filter must cleanup any operation specific context at this time
+	// because it is being removed from the system before the operation is
+	// completed by the lower drivers.
+	//
+	public static final int ERROR_FLT_POST_OPERATION_CLEANUP = 0x801F0009;
+
+	//
+	// MessageId: ERROR_FLT_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// The Filter Manager had an internal error from which it cannot recover,
+	// therefore the operation has been failed. This is usually the result of a
+	// filter returning an invalid value from a pre-operation callback.
+	//
+	public static final int ERROR_FLT_INTERNAL_ERROR = 0x801F000A;
+
+	//
+	// MessageId: ERROR_FLT_DELETING_OBJECT
+	//
+	// MessageText:
+	//
+	// The object specified for this action is in the process of being deleted,
+	// therefore the action requested cannot be completed at this time.
+	//
+	public static final int ERROR_FLT_DELETING_OBJECT = 0x801F000B;
+
+	//
+	// MessageId: ERROR_FLT_MUST_BE_NONPAGED_POOL
+	//
+	// MessageText:
+	//
+	// Non-paged pool must be used for this type of context.
+	//
+	public static final int ERROR_FLT_MUST_BE_NONPAGED_POOL = 0x801F000C;
+
+	//
+	// MessageId: ERROR_FLT_DUPLICATE_ENTRY
+	//
+	// MessageText:
+	//
+	// A duplicate handler definition has been provided for an operation.
+	//
+	public static final int ERROR_FLT_DUPLICATE_ENTRY = 0x801F000D;
+
+	//
+	// MessageId: ERROR_FLT_CBDQ_DISABLED
+	//
+	// MessageText:
+	//
+	// The callback data queue has been disabled.
+	//
+	public static final int ERROR_FLT_CBDQ_DISABLED = 0x801F000E;
+
+	//
+	// MessageId: ERROR_FLT_DO_NOT_ATTACH
+	//
+	// MessageText:
+	//
+	// Do not attach the filter to the volume at this time.
+	//
+	public static final int ERROR_FLT_DO_NOT_ATTACH = 0x801F000F;
+
+	//
+	// MessageId: ERROR_FLT_DO_NOT_DETACH
+	//
+	// MessageText:
+	//
+	// Do not detach the filter from the volume at this time.
+	//
+	public static final int ERROR_FLT_DO_NOT_DETACH = 0x801F0010;
+
+	//
+	// MessageId: ERROR_FLT_INSTANCE_ALTITUDE_COLLISION
+	//
+	// MessageText:
+	//
+	// An instance already exists at this altitude on the volume specified.
+	//
+	public static final int ERROR_FLT_INSTANCE_ALTITUDE_COLLISION = 0x801F0011;
+
+	//
+	// MessageId: ERROR_FLT_INSTANCE_NAME_COLLISION
+	//
+	// MessageText:
+	//
+	// An instance already exists with this name on the volume specified.
+	//
+	public static final int ERROR_FLT_INSTANCE_NAME_COLLISION = 0x801F0012;
+
+	//
+	// MessageId: ERROR_FLT_FILTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system could not find the filter specified.
+	//
+	public static final int ERROR_FLT_FILTER_NOT_FOUND = 0x801F0013;
+
+	//
+	// MessageId: ERROR_FLT_VOLUME_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system could not find the volume specified.
+	//
+	public static final int ERROR_FLT_VOLUME_NOT_FOUND = 0x801F0014;
+
+	//
+	// MessageId: ERROR_FLT_INSTANCE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The system could not find the instance specified.
+	//
+	public static final int ERROR_FLT_INSTANCE_NOT_FOUND = 0x801F0015;
+
+	//
+	// MessageId: ERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// No registered context allocation definition was found for the given
+	// request.
+	//
+	public static final int ERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND = 0x801F0016;
+
+	//
+	// MessageId: ERROR_FLT_INVALID_CONTEXT_REGISTRATION
+	//
+	// MessageText:
+	//
+	// An invalid parameter was specified during context registration.
+	//
+	public static final int ERROR_FLT_INVALID_CONTEXT_REGISTRATION = 0x801F0017;
+
+	//
+	// MessageId: ERROR_FLT_NAME_CACHE_MISS
+	//
+	// MessageText:
+	//
+	// The name requested was not found in Filter Manager's name cache and could
+	// not be retrieved from the file system.
+	//
+	public static final int ERROR_FLT_NAME_CACHE_MISS = 0x801F0018;
+
+	//
+	// MessageId: ERROR_FLT_NO_DEVICE_OBJECT
+	//
+	// MessageText:
+	//
+	// The requested device object does not exist for the given volume.
+	//
+	public static final int ERROR_FLT_NO_DEVICE_OBJECT = 0x801F0019;
+
+	//
+	// MessageId: ERROR_FLT_VOLUME_ALREADY_MOUNTED
+	//
+	// MessageText:
+	//
+	// The specified volume is already mounted.
+	//
+	public static final int ERROR_FLT_VOLUME_ALREADY_MOUNTED = 0x801F001A;
+
+	//
+	// MessageId: ERROR_FLT_ALREADY_ENLISTED
+	//
+	// MessageText:
+	//
+	// The specified Transaction Context is already enlisted in a transaction
+	//
+	public static final int ERROR_FLT_ALREADY_ENLISTED = 0x801F001B;
+
+	//
+	// MessageId: ERROR_FLT_CONTEXT_ALREADY_LINKED
+	//
+	// MessageText:
+	//
+	// The specifiec context is already attached to another object
+	//
+	public static final int ERROR_FLT_CONTEXT_ALREADY_LINKED = 0x801F001C;
+
+	//
+	// MessageId: ERROR_FLT_NO_WAITER_FOR_REPLY
+	//
+	// MessageText:
+	//
+	// No waiter is present for the filter's reply to this message.
+	//
+	public static final int ERROR_FLT_NO_WAITER_FOR_REPLY = 0x801F0020;
+
+	//
+	// ==
+	// Facility Graphics Error Messages
+	// ==
+	//
+	//
+	// The following are the subranges within the Graphics facility
+	//
+	// 0x0000 - 0x0fff Display Driver Loader driver & Video Port errors
+	// (displdr.sys, videoprt.sys)
+	// 0x1000 - 0x1fff Monitor Class Function driver errors=(monitor.sys)
+	// 0x2000 - 0x2fff Windows Graphics Kernel Subsystem errors=(dxgkrnl.sys)
+	// 0x3000 - 0x3fff=Desktop Window Manager errors
+	// 0x2000 - 0x20ff Common errors
+	// 0x2100 - 0x21ff Video Memory Manager (VidMM) subsystem errors
+	// 0x2200 - 0x22ff Video GPU Scheduler (VidSch) subsystem errors
+	// 0x2300 - 0x23ff Video Display Mode Management (VidDMM) subsystem errors
+	//
+	// Display Driver Loader driver & Video Port errors {0x0000..0x0fff}
+	//
+	//
+	// MessageId: ERROR_HUNG_DISPLAY_DRIVER_THREAD
+	//
+	// MessageText:
+	//
+	// {Display Driver Stopped Responding}
+	// The %hs display driver has stopped working normally. Save your work and
+	// reboot the system to restore full display functionality.
+	// The next time you reboot the machine a dialog will be displayed giving
+	// you a chance to report this failure to Microsoft.
+	//
+	public static final int ERROR_HUNG_DISPLAY_DRIVER_THREAD = 0x80260001;
+
+	//
+	// Desktop Window Manager errors {0x3000..0x3fff}
+	//
+	//
+	// MessageId: DWM_E_COMPOSITIONDISABLED
+	//
+	// MessageText:
+	//
+	// {Desktop composition is disabled}
+	// The operation could not be completed because desktop composition is
+	// disabled.
+	//
+	public static final int DWM_E_COMPOSITIONDISABLED = 0x80263001;
+
+	//
+	// MessageId: DWM_E_REMOTING_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// {Some desktop composition APIs are not supported while remoting}
+	// The operation is not supported while running in a remote session.
+	//
+	public static final int DWM_E_REMOTING_NOT_SUPPORTED = 0x80263002;
+
+	//
+	// MessageId: DWM_E_NO_REDIRECTION_SURFACE_AVAILABLE
+	//
+	// MessageText:
+	//
+	// {No DWM redirection surface is available}
+	// The DWM was unable to provide a redireciton surface to complete the
+	// DirectX present.
+	//
+	public static final int DWM_E_NO_REDIRECTION_SURFACE_AVAILABLE = 0x80263003;
+
+	//
+	// MessageId: DWM_E_NOT_QUEUING_PRESENTS
+	//
+	// MessageText:
+	//
+	// {DWM is not queuing presents for the specified window}
+	// The window specified is not currently using queued presents.
+	//
+	public static final int DWM_E_NOT_QUEUING_PRESENTS = 0x80263004;
+
+	//
+	// Monitor class function driver errors {0x1000..0x1fff}
+	//
+	//
+	// MessageId: ERROR_MONITOR_NO_DESCRIPTOR
+	//
+	// MessageText:
+	//
+	// Monitor descriptor could not be obtained.
+	//
+	public static final int ERROR_MONITOR_NO_DESCRIPTOR = 0x80261001;
+
+	//
+	// MessageId: ERROR_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT
+	//
+	// MessageText:
+	//
+	// Format of the obtained monitor descriptor is not supported by this
+	// release.
+	//
+	public static final int ERROR_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT = 0x80261002;
+
+	//
+	// MessageId: ERROR_MONITOR_INVALID_DESCRIPTOR_CHECKSUM
+	//
+	// MessageText:
+	//
+	// Checksum of the obtained monitor descriptor is invalid.
+	//
+	public static final int ERROR_MONITOR_INVALID_DESCRIPTOR_CHECKSUM = 0xC0261003;
+
+	//
+	// MessageId: ERROR_MONITOR_INVALID_STANDARD_TIMING_BLOCK
+	//
+	// MessageText:
+	//
+	// Monitor descriptor contains an invalid standard timing block.
+	//
+	public static final int ERROR_MONITOR_INVALID_STANDARD_TIMING_BLOCK = 0xC0261004;
+
+	//
+	// MessageId: ERROR_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED
+	//
+	// MessageText:
+	//
+	// WMI data block registration failed for one of the MSMonitorClass WMI
+	// subclasses.
+	//
+	public static final int ERROR_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED = 0xC0261005;
+
+	//
+	// MessageId: ERROR_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK
+	//
+	// MessageText:
+	//
+	// Provided monitor descriptor block is either corrupted or does not contain
+	// monitor's detailed serial number.
+	//
+	public static final int ERROR_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK = 0xC0261006;
+
+	//
+	// MessageId: ERROR_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK
+	//
+	// MessageText:
+	//
+	// Provided monitor descriptor block is either corrupted or does not contain
+	// monitor's user friendly name.
+	//
+	public static final int ERROR_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK = 0xC0261007;
+
+	//
+	// MessageId: ERROR_MONITOR_NO_MORE_DESCRIPTOR_DATA
+	//
+	// MessageText:
+	//
+	// There is no monitor descriptor data at the specified (offset, size)
+	// region.
+	//
+	public static final int ERROR_MONITOR_NO_MORE_DESCRIPTOR_DATA = 0xC0261008;
+
+	//
+	// MessageId: ERROR_MONITOR_INVALID_DETAILED_TIMING_BLOCK
+	//
+	// MessageText:
+	//
+	// Monitor descriptor contains an invalid detailed timing block.
+	//
+	public static final int ERROR_MONITOR_INVALID_DETAILED_TIMING_BLOCK = 0xC0261009;
+
+	//
+	// Windows Graphics Kernel Subsystem errors {0x2000..0x2fff}
+	//
+	// TODO: Add DXG Win32 errors here
+	//
+	// Common errors {0x2000..0x20ff}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER
+	//
+	// MessageText:
+	//
+	// Exclusive mode ownership is needed to create unmanaged primary
+	// allocation.
+	//
+	public static final int ERROR_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER = 0xC0262000;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INSUFFICIENT_DMA_BUFFER
+	//
+	// MessageText:
+	//
+	// The driver needs more DMA buffer space in order to complete the requested
+	// operation.
+	//
+	public static final int ERROR_GRAPHICS_INSUFFICIENT_DMA_BUFFER = 0xC0262001;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER
+	//
+	// MessageText:
+	//
+	// Specified display adapter handle is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER = 0xC0262002;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ADAPTER_WAS_RESET
+	//
+	// MessageText:
+	//
+	// Specified display adapter and all of its state has been reset.
+	//
+	public static final int ERROR_GRAPHICS_ADAPTER_WAS_RESET = 0xC0262003;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_DRIVER_MODEL
+	//
+	// MessageText:
+	//
+	// The driver stack doesn't match the expected driver model.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_DRIVER_MODEL = 0xC0262004;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PRESENT_MODE_CHANGED
+	//
+	// MessageText:
+	//
+	// Present happened but ended up into the changed desktop mode
+	//
+	public static final int ERROR_GRAPHICS_PRESENT_MODE_CHANGED = 0xC0262005;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PRESENT_OCCLUDED
+	//
+	// MessageText:
+	//
+	// Nothing to present due to desktop occlusion
+	//
+	public static final int ERROR_GRAPHICS_PRESENT_OCCLUDED = 0xC0262006;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PRESENT_DENIED
+	//
+	// MessageText:
+	//
+	// Not able to present due to denial of desktop access
+	//
+	public static final int ERROR_GRAPHICS_PRESENT_DENIED = 0xC0262007;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CANNOTCOLORCONVERT
+	//
+	// MessageText:
+	//
+	// Not able to present with color convertion
+	//
+	public static final int ERROR_GRAPHICS_CANNOTCOLORCONVERT = 0xC0262008;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DRIVER_MISMATCH
+	//
+	// MessageText:
+	//
+	// The kernel driver detected a version mismatch between it and the user
+	// mode driver.
+	//
+	public static final int ERROR_GRAPHICS_DRIVER_MISMATCH = 0xC0262009;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PARTIAL_DATA_POPULATED
+	//
+	// MessageText:
+	//
+	// Specified buffer is not big enough to contain entire requested dataset.
+	// Partial data populated upto the size of the buffer.
+	// Caller needs to provide buffer of size as specified in the partially
+	// populated buffer's content (interface specific).
+	//
+	public static final int ERROR_GRAPHICS_PARTIAL_DATA_POPULATED = 0x4026200A;
+
+	//
+	// Video Memory Manager (VidMM) subsystem errors {0x2100..0x21ff}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_NO_VIDEO_MEMORY
+	//
+	// MessageText:
+	//
+	// Not enough video memory available to complete the operation.
+	//
+	public static final int ERROR_GRAPHICS_NO_VIDEO_MEMORY = 0xC0262100;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CANT_LOCK_MEMORY
+	//
+	// MessageText:
+	//
+	// Couldn't probe and lock the underlying memory of an allocation.
+	//
+	public static final int ERROR_GRAPHICS_CANT_LOCK_MEMORY = 0xC0262101;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ALLOCATION_BUSY
+	//
+	// MessageText:
+	//
+	// The allocation is currently busy.
+	//
+	public static final int ERROR_GRAPHICS_ALLOCATION_BUSY = 0xC0262102;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TOO_MANY_REFERENCES
+	//
+	// MessageText:
+	//
+	// An object being referenced has reach the maximum reference count already
+	// and can't be reference further.
+	//
+	public static final int ERROR_GRAPHICS_TOO_MANY_REFERENCES = 0xC0262103;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TRY_AGAIN_LATER
+	//
+	// MessageText:
+	//
+	// A problem couldn't be solved due to some currently existing condition.
+	// The problem should be tried again later.
+	//
+	public static final int ERROR_GRAPHICS_TRY_AGAIN_LATER = 0xC0262104;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TRY_AGAIN_NOW
+	//
+	// MessageText:
+	//
+	// A problem couldn't be solved due to some currently existing condition.
+	// The problem should be tried again immediately.
+	//
+	public static final int ERROR_GRAPHICS_TRY_AGAIN_NOW = 0xC0262105;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ALLOCATION_INVALID
+	//
+	// MessageText:
+	//
+	// The allocation is invalid.
+	//
+	public static final int ERROR_GRAPHICS_ALLOCATION_INVALID = 0xC0262106;
+
+	//
+	// MessageId: ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE
+	//
+	// MessageText:
+	//
+	// No more unswizzling aperture are currently available.
+	//
+	public static final int ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE = 0xC0262107;
+
+	//
+	// MessageId: ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// The current allocation can't be unswizzled by an aperture.
+	//
+	public static final int ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED = 0xC0262108;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION
+	//
+	// MessageText:
+	//
+	// The request failed because a pinned allocation can't be evicted.
+	//
+	public static final int ERROR_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION = 0xC0262109;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_ALLOCATION_USAGE
+	//
+	// MessageText:
+	//
+	// The allocation can't be used from it's current segment location for the
+	// specified operation.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_ALLOCATION_USAGE = 0xC0262110;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION
+	//
+	// MessageText:
+	//
+	// A locked allocation can't be used in the current command buffer.
+	//
+	public static final int ERROR_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION = 0xC0262111;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ALLOCATION_CLOSED
+	//
+	// MessageText:
+	//
+	// The allocation being referenced has been closed permanently.
+	//
+	public static final int ERROR_GRAPHICS_ALLOCATION_CLOSED = 0xC0262112;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_ALLOCATION_INSTANCE
+	//
+	// MessageText:
+	//
+	// An invalid allocation instance is being referenced.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_ALLOCATION_INSTANCE = 0xC0262113;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_ALLOCATION_HANDLE
+	//
+	// MessageText:
+	//
+	// An invalid allocation handle is being referenced.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_ALLOCATION_HANDLE = 0xC0262114;
+
+	//
+	// MessageId: ERROR_GRAPHICS_WRONG_ALLOCATION_DEVICE
+	//
+	// MessageText:
+	//
+	// The allocation being referenced doesn't belong to the current device.
+	//
+	public static final int ERROR_GRAPHICS_WRONG_ALLOCATION_DEVICE = 0xC0262115;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ALLOCATION_CONTENT_LOST
+	//
+	// MessageText:
+	//
+	// The specified allocation lost its content.
+	//
+	public static final int ERROR_GRAPHICS_ALLOCATION_CONTENT_LOST = 0xC0262116;
+
+	//
+	// Video GPU Scheduler (VidSch) subsystem errors {0x2200..0x22ff}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_GPU_EXCEPTION_ON_DEVICE
+	//
+	// MessageText:
+	//
+	// GPU exception is detected on the given device. The device is not able to
+	// be scheduled.
+	//
+	public static final int ERROR_GRAPHICS_GPU_EXCEPTION_ON_DEVICE = 0xC0262200;
+
+	//
+	// Video Present Network Management (VidPNMgr) subsystem errors
+	// {0x2300..0x23ff}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Specified VidPN topology is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY = 0xC0262300;
+
+	//
+	// MessageId: ERROR_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Specified VidPN topology is valid but is not supported by this model of
+	// the display adapter.
+	//
+	public static final int ERROR_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED = 0xC0262301;
+
+	//
+	// MessageId: ERROR_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Specified VidPN topology is valid but is not supported by the display
+	// adapter at this time, due to current allocation of its resources.
+	//
+	public static final int ERROR_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED = 0xC0262302;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN
+	//
+	// MessageText:
+	//
+	// Specified VidPN handle is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN = 0xC0262303;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE
+	//
+	// MessageText:
+	//
+	// Specified video present source is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE = 0xC0262304;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET
+	//
+	// MessageText:
+	//
+	// Specified video present target is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET = 0xC0262305;
+
+	//
+	// MessageId: ERROR_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Specified VidPN modality is not supported (e.g. at least two of the
+	// pinned modes are not cofunctiona;.
+	//
+	public static final int ERROR_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED = 0xC0262306;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MODE_NOT_PINNED
+	//
+	// MessageText:
+	//
+	// No mode is pinned on the specified VidPN source/target.
+	//
+	public static final int ERROR_GRAPHICS_MODE_NOT_PINNED = 0x00262307;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN_SOURCEMODESET
+	//
+	// MessageText:
+	//
+	// Specified VidPN source mode set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN_SOURCEMODESET = 0xC0262308;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN_TARGETMODESET
+	//
+	// MessageText:
+	//
+	// Specified VidPN target mode set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN_TARGETMODESET = 0xC0262309;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_FREQUENCY
+	//
+	// MessageText:
+	//
+	// Specified video signal frequency is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_FREQUENCY = 0xC026230A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_ACTIVE_REGION
+	//
+	// MessageText:
+	//
+	// Specified video signal active region is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_ACTIVE_REGION = 0xC026230B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_TOTAL_REGION
+	//
+	// MessageText:
+	//
+	// Specified video signal total region is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_TOTAL_REGION = 0xC026230C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE
+	//
+	// MessageText:
+	//
+	// Specified video present source mode is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE = 0xC0262310;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE
+	//
+	// MessageText:
+	//
+	// Specified video present target mode is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE = 0xC0262311;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET
+	//
+	// MessageText:
+	//
+	// Pinned mode must remain in the set on VidPN's cofunctional modality
+	// enumeration.
+	//
+	public static final int ERROR_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET = 0xC0262312;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Specified video present path is already in VidPN's topology.
+	//
+	public static final int ERROR_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY = 0xC0262313;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MODE_ALREADY_IN_MODESET
+	//
+	// MessageText:
+	//
+	// Specified mode is already in the mode set.
+	//
+	public static final int ERROR_GRAPHICS_MODE_ALREADY_IN_MODESET = 0xC0262314;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET
+	//
+	// MessageText:
+	//
+	// Specified video present source set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET = 0xC0262315;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET
+	//
+	// MessageText:
+	//
+	// Specified video present target set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET = 0xC0262316;
+
+	//
+	// MessageId: ERROR_GRAPHICS_SOURCE_ALREADY_IN_SET
+	//
+	// MessageText:
+	//
+	// Specified video present source is already in the video present source
+	// set.
+	//
+	public static final int ERROR_GRAPHICS_SOURCE_ALREADY_IN_SET = 0xC0262317;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TARGET_ALREADY_IN_SET
+	//
+	// MessageText:
+	//
+	// Specified video present target is already in the video present target
+	// set.
+	//
+	public static final int ERROR_GRAPHICS_TARGET_ALREADY_IN_SET = 0xC0262318;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN_PRESENT_PATH
+	//
+	// MessageText:
+	//
+	// Specified VidPN present path is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN_PRESENT_PATH = 0xC0262319;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Miniport has no recommendation for augmentation of the specified VidPN's
+	// topology.
+	//
+	public static final int ERROR_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY = 0xC026231A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET
+	//
+	// MessageText:
+	//
+	// Specified monitor frequency range set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET = 0xC026231B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE
+	//
+	// MessageText:
+	//
+	// Specified monitor frequency range is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE = 0xC026231C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET
+	//
+	// MessageText:
+	//
+	// Specified frequency range is not in the specified monitor frequency range
+	// set.
+	//
+	public static final int ERROR_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET = 0xC026231D;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_PREFERRED_MODE
+	//
+	// MessageText:
+	//
+	// Specified mode set does not specify preference for one of its modes.
+	//
+	public static final int ERROR_GRAPHICS_NO_PREFERRED_MODE = 0x0026231E;
+
+	//
+	// MessageId: ERROR_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET
+	//
+	// MessageText:
+	//
+	// Specified frequency range is already in the specified monitor frequency
+	// range set.
+	//
+	public static final int ERROR_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET = 0xC026231F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_STALE_MODESET
+	//
+	// MessageText:
+	//
+	// Specified mode set is stale. Please reacquire the new mode set.
+	//
+	public static final int ERROR_GRAPHICS_STALE_MODESET = 0xC0262320;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITOR_SOURCEMODESET
+	//
+	// MessageText:
+	//
+	// Specified monitor source mode set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITOR_SOURCEMODESET = 0xC0262321;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITOR_SOURCE_MODE
+	//
+	// MessageText:
+	//
+	// Specified monitor source mode is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITOR_SOURCE_MODE = 0xC0262322;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN
+	//
+	// MessageText:
+	//
+	// Miniport does not have any recommendation regarding the request to
+	// provide a functional VidPN given the current display adapter
+	// configuration.
+	//
+	public static final int ERROR_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN = 0xC0262323;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MODE_ID_MUST_BE_UNIQUE
+	//
+	// MessageText:
+	//
+	// ID of the specified mode is already used by another mode in the set.
+	//
+	public static final int ERROR_GRAPHICS_MODE_ID_MUST_BE_UNIQUE = 0xC0262324;
+
+	//
+	// MessageId: ERROR_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION
+	//
+	// MessageText:
+	//
+	// System failed to determine a mode that is supported by both the display
+	// adapter and the monitor connected to it.
+	//
+	public static final int ERROR_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION = 0xC0262325;
+
+	//
+	// MessageId: ERROR_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES
+	//
+	// MessageText:
+	//
+	// Number of video present targets must be greater than or equal to the
+	// number of video present sources.
+	//
+	public static final int ERROR_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES = 0xC0262326;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Specified present path is not in VidPN's topology.
+	//
+	public static final int ERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY = 0xC0262327;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE
+	//
+	// MessageText:
+	//
+	// Display adapter must have at least one video present source.
+	//
+	public static final int ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE = 0xC0262328;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET
+	//
+	// MessageText:
+	//
+	// Display adapter must have at least one video present target.
+	//
+	public static final int ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET = 0xC0262329;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITORDESCRIPTORSET
+	//
+	// MessageText:
+	//
+	// Specified monitor descriptor set is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITORDESCRIPTORSET = 0xC026232A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITORDESCRIPTOR
+	//
+	// MessageText:
+	//
+	// Specified monitor descriptor is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITORDESCRIPTOR = 0xC026232B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET
+	//
+	// MessageText:
+	//
+	// Specified descriptor is not in the specified monitor descriptor set.
+	//
+	public static final int ERROR_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET = 0xC026232C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET
+	//
+	// MessageText:
+	//
+	// Specified descriptor is already in the specified monitor descriptor set.
+	//
+	public static final int ERROR_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET = 0xC026232D;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE
+	//
+	// MessageText:
+	//
+	// ID of the specified monitor descriptor is already used by another
+	// descriptor in the set.
+	//
+	public static final int ERROR_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE = 0xC026232E;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE
+	//
+	// MessageText:
+	//
+	// Specified video present target subset type is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE = 0xC026232F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_RESOURCES_NOT_RELATED
+	//
+	// MessageText:
+	//
+	// Two or more of the specified resources are not related to each other, as
+	// defined by the interface semantics.
+	//
+	public static final int ERROR_GRAPHICS_RESOURCES_NOT_RELATED = 0xC0262330;
+
+	//
+	// MessageId: ERROR_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE
+	//
+	// MessageText:
+	//
+	// ID of the specified video present source is already used by another
+	// source in the set.
+	//
+	public static final int ERROR_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE = 0xC0262331;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE
+	//
+	// MessageText:
+	//
+	// ID of the specified video present target is already used by another
+	// target in the set.
+	//
+	public static final int ERROR_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE = 0xC0262332;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET
+	//
+	// MessageText:
+	//
+	// Specified VidPN source cannot be used because there is no available VidPN
+	// target to connect it to.
+	//
+	public static final int ERROR_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET = 0xC0262333;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER
+	//
+	// MessageText:
+	//
+	// Newly arrived monitor could not be associated with a display adapter.
+	//
+	public static final int ERROR_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER = 0xC0262334;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_VIDPNMGR
+	//
+	// MessageText:
+	//
+	// Display adapter in question does not have an associated VidPN manager.
+	//
+	public static final int ERROR_GRAPHICS_NO_VIDPNMGR = 0xC0262335;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_ACTIVE_VIDPN
+	//
+	// MessageText:
+	//
+	// VidPN manager of the display adapter in question does not have an active
+	// VidPN.
+	//
+	public static final int ERROR_GRAPHICS_NO_ACTIVE_VIDPN = 0xC0262336;
+
+	//
+	// MessageId: ERROR_GRAPHICS_STALE_VIDPN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Specified VidPN topology is stale. Please reacquire the new topology.
+	//
+	public static final int ERROR_GRAPHICS_STALE_VIDPN_TOPOLOGY = 0xC0262337;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MONITOR_NOT_CONNECTED
+	//
+	// MessageText:
+	//
+	// There is no monitor connected on the specified video present target.
+	//
+	public static final int ERROR_GRAPHICS_MONITOR_NOT_CONNECTED = 0xC0262338;
+
+	//
+	// MessageId: ERROR_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Specified source is not part of the specified VidPN's topology.
+	//
+	public static final int ERROR_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY = 0xC0262339;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE
+	//
+	// MessageText:
+	//
+	// Specified primary surface size is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE = 0xC026233A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VISIBLEREGION_SIZE
+	//
+	// MessageText:
+	//
+	// Specified visible region size is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VISIBLEREGION_SIZE = 0xC026233B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_STRIDE
+	//
+	// MessageText:
+	//
+	// Specified stride is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_STRIDE = 0xC026233C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PIXELFORMAT
+	//
+	// MessageText:
+	//
+	// Specified pixel format is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PIXELFORMAT = 0xC026233D;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_COLORBASIS
+	//
+	// MessageText:
+	//
+	// Specified color basis is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_COLORBASIS = 0xC026233E;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PIXELVALUEACCESSMODE
+	//
+	// MessageText:
+	//
+	// Specified pixel value access mode is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PIXELVALUEACCESSMODE = 0xC026233F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TARGET_NOT_IN_TOPOLOGY
+	//
+	// MessageText:
+	//
+	// Specified target is not part of the specified VidPN's topology.
+	//
+	public static final int ERROR_GRAPHICS_TARGET_NOT_IN_TOPOLOGY = 0xC0262340;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT
+	//
+	// MessageText:
+	//
+	// Failed to acquire display mode management interface.
+	//
+	public static final int ERROR_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT = 0xC0262341;
+
+	//
+	// MessageId: ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE
+	//
+	// MessageText:
+	//
+	// Specified VidPN source is already owned by a DMM client and cannot be
+	// used until that client releases it.
+	//
+	public static final int ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE = 0xC0262342;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN
+	//
+	// MessageText:
+	//
+	// Specified VidPN is active and cannot be accessed.
+	//
+	public static final int ERROR_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN = 0xC0262343;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL
+	//
+	// MessageText:
+	//
+	// Specified VidPN present path importance ordinal is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL = 0xC0262344;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION
+	//
+	// MessageText:
+	//
+	// Specified VidPN present path content geometry transformation is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION = 0xC0262345;
+
+	//
+	// MessageId:
+	// ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Specified content geometry transformation is not supported on the
+	// respective VidPN present path.
+	//
+	public static final int ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED = 0xC0262346;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_GAMMA_RAMP
+	//
+	// MessageText:
+	//
+	// Specified gamma ramp is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_GAMMA_RAMP = 0xC0262347;
+
+	//
+	// MessageId: ERROR_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Specified gamma ramp is not supported on the respective VidPN present
+	// path.
+	//
+	public static final int ERROR_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED = 0xC0262348;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Multi-sampling is not supported on the respective VidPN present path.
+	//
+	public static final int ERROR_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED = 0xC0262349;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MODE_NOT_IN_MODESET
+	//
+	// MessageText:
+	//
+	// Specified mode is not in the specified mode set.
+	//
+	public static final int ERROR_GRAPHICS_MODE_NOT_IN_MODESET = 0xC026234A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DATASET_IS_EMPTY
+	//
+	// MessageText:
+	//
+	// Specified data set (e.g. mode set, frequency range set, descriptor set,
+	// topology, etc.) is empty.
+	//
+	public static final int ERROR_GRAPHICS_DATASET_IS_EMPTY = 0x0026234B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET
+	//
+	// MessageText:
+	//
+	// Specified data set (e.g. mode set, frequency range set, descriptor set,
+	// topology, etc.) does not contain any more elements.
+	//
+	public static final int ERROR_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET = 0x0026234C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON
+	//
+	// MessageText:
+	//
+	// Specified VidPN topology recommendation reason is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON = 0xC026234D;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PATH_CONTENT_TYPE
+	//
+	// MessageText:
+	//
+	// Specified VidPN present path content type is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PATH_CONTENT_TYPE = 0xC026234E;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_COPYPROTECTION_TYPE
+	//
+	// MessageText:
+	//
+	// Specified VidPN present path copy protection type is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_COPYPROTECTION_TYPE = 0xC026234F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// No more than one unassigned mode set can exist at any given time for a
+	// given VidPN source/target.
+	//
+	public static final int ERROR_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS = 0xC0262350;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED
+	//
+	// MessageText:
+	//
+	// Specified content transformation is not pinned on the specified VidPN
+	// present path.
+	//
+	public static final int ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED = 0x00262351;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_SCANLINE_ORDERING
+	//
+	// MessageText:
+	//
+	// Specified scanline ordering type is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_SCANLINE_ORDERING = 0xC0262352;
+
+	//
+	// MessageId: ERROR_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// Topology changes are not allowed for the specified VidPN.
+	//
+	public static final int ERROR_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED = 0xC0262353;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS
+	//
+	// MessageText:
+	//
+	// All available importance ordinals are already used in specified topology.
+	//
+	public static final int ERROR_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS = 0xC0262354;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT
+	//
+	// MessageText:
+	//
+	// Specified primary surface has a different private format attribute than
+	// the current primary surface
+	//
+	public static final int ERROR_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT = 0xC0262355;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM
+	//
+	// MessageText:
+	//
+	// Specified mode pruning algorithm is invalid
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM = 0xC0262356;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN
+	//
+	// MessageText:
+	//
+	// Specified monitor capability origin is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN = 0xC0262357;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT
+	//
+	// MessageText:
+	//
+	// Specified monitor frequency range constraint is invalid.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT = 0xC0262358;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MAX_NUM_PATHS_REACHED
+	//
+	// MessageText:
+	//
+	// Maximum supported number of present paths has been reached.
+	//
+	public static final int ERROR_GRAPHICS_MAX_NUM_PATHS_REACHED = 0xC0262359;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION
+	//
+	// MessageText:
+	//
+	// Miniport requested that augmentation be cancelled for the specified
+	// source of the specified VidPN's topology.
+	//
+	public static final int ERROR_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION = 0xC026235A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_CLIENT_TYPE
+	//
+	// MessageText:
+	//
+	// Specified client type was not recognized.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_CLIENT_TYPE = 0xC026235B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CLIENTVIDPN_NOT_SET
+	//
+	// MessageText:
+	//
+	// Client VidPN is not set on this adapter (e.g. no user mode initiated mode
+	// changes took place on this adapter yet).
+	//
+	public static final int ERROR_GRAPHICS_CLIENTVIDPN_NOT_SET = 0xC026235C;
+
+	//
+	// Port specific status codes {0x2400..0x24ff}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED
+	//
+	// MessageText:
+	//
+	// Specified display adapter child device already has an external device
+	// connected to it.
+	//
+	public static final int ERROR_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED = 0xC0262400;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Specified display adapter child device does not support descriptor
+	// exposure.
+	//
+	public static final int ERROR_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED = 0xC0262401;
+
+	//
+	// MessageId: ERROR_GRAPHICS_UNKNOWN_CHILD_STATUS
+	//
+	// MessageText:
+	//
+	// Child device presence was not reliably detected.
+	//
+	public static final int ERROR_GRAPHICS_UNKNOWN_CHILD_STATUS = 0x4026242F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NOT_A_LINKED_ADAPTER
+	//
+	// MessageText:
+	//
+	// The display adapter is not linked to any other adapters.
+	//
+	public static final int ERROR_GRAPHICS_NOT_A_LINKED_ADAPTER = 0xC0262430;
+
+	//
+	// MessageId: ERROR_GRAPHICS_LEADLINK_NOT_ENUMERATED
+	//
+	// MessageText:
+	//
+	// Lead adapter in a linked configuration was not enumerated yet.
+	//
+	public static final int ERROR_GRAPHICS_LEADLINK_NOT_ENUMERATED = 0xC0262431;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CHAINLINKS_NOT_ENUMERATED
+	//
+	// MessageText:
+	//
+	// Some chain adapters in a linked configuration were not enumerated yet.
+	//
+	public static final int ERROR_GRAPHICS_CHAINLINKS_NOT_ENUMERATED = 0xC0262432;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ADAPTER_CHAIN_NOT_READY
+	//
+	// MessageText:
+	//
+	// The chain of linked adapters is not ready to start because of an unknown
+	// failure.
+	//
+	public static final int ERROR_GRAPHICS_ADAPTER_CHAIN_NOT_READY = 0xC0262433;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CHAINLINKS_NOT_STARTED
+	//
+	// MessageText:
+	//
+	// An attempt was made to start a lead link display adapter when the chain
+	// links were not started yet.
+	//
+	public static final int ERROR_GRAPHICS_CHAINLINKS_NOT_STARTED = 0xC0262434;
+
+	//
+	// MessageId: ERROR_GRAPHICS_CHAINLINKS_NOT_POWERED_ON
+	//
+	// MessageText:
+	//
+	// An attempt was made to power up a lead link display adapter when the
+	// chain links were powered down.
+	//
+	public static final int ERROR_GRAPHICS_CHAINLINKS_NOT_POWERED_ON = 0xC0262435;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE
+	//
+	// MessageText:
+	//
+	// The adapter link was found to be in an inconsistent state. Not all
+	// adapters are in an expected PNP/Power state.
+	//
+	public static final int ERROR_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE = 0xC0262436;
+
+	//
+	// MessageId: ERROR_GRAPHICS_LEADLINK_START_DEFERRED
+	//
+	// MessageText:
+	//
+	// Starting the leadlink adapter has been deferred temporarily.
+	//
+	public static final int ERROR_GRAPHICS_LEADLINK_START_DEFERRED = 0x40262437;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NOT_POST_DEVICE_DRIVER
+	//
+	// MessageText:
+	//
+	// The driver trying to start is not the same as the driver for the POSTed
+	// display adapter.
+	//
+	public static final int ERROR_GRAPHICS_NOT_POST_DEVICE_DRIVER = 0xC0262438;
+
+	//
+	// MessageId: ERROR_GRAPHICS_POLLING_TOO_FREQUENTLY
+	//
+	// MessageText:
+	//
+	// The display adapter is being polled for children too frequently at the
+	// same polling level.
+	//
+	public static final int ERROR_GRAPHICS_POLLING_TOO_FREQUENTLY = 0x40262439;
+
+	//
+	// MessageId: ERROR_GRAPHICS_START_DEFERRED
+	//
+	// MessageText:
+	//
+	// Starting the adapter has been deferred temporarily.
+	//
+	public static final int ERROR_GRAPHICS_START_DEFERRED = 0x4026243A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED
+	//
+	// MessageText:
+	//
+	// An operation is being attempted that requires the display adapter to be
+	// in a quiescent state.
+	//
+	public static final int ERROR_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED = 0xC026243B;
+
+	//
+	// OPM, UAB and PVP specific error codes {0x2500..0x257f}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The driver does not support OPM.
+	//
+	public static final int ERROR_GRAPHICS_OPM_NOT_SUPPORTED = 0xC0262500;
+
+	//
+	// MessageId: ERROR_GRAPHICS_COPP_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The driver does not support COPP.
+	//
+	public static final int ERROR_GRAPHICS_COPP_NOT_SUPPORTED = 0xC0262501;
+
+	//
+	// MessageId: ERROR_GRAPHICS_UAB_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The driver does not support UAB.
+	//
+	public static final int ERROR_GRAPHICS_UAB_NOT_SUPPORTED = 0xC0262502;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS
+	//
+	// MessageText:
+	//
+	// The specified encrypted parameters are invalid.
+	//
+	public static final int ERROR_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS = 0xC0262503;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_NO_VIDEO_OUTPUTS_EXIST
+	//
+	// MessageText:
+	//
+	// The GDI display device passed to this function does not have any active
+	// video outputs.
+	//
+	public static final int ERROR_GRAPHICS_OPM_NO_VIDEO_OUTPUTS_EXIST = 0xC0262505;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal error caused this operation to fail.
+	//
+	public static final int ERROR_GRAPHICS_OPM_INTERNAL_ERROR = 0xC026250B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_INVALID_HANDLE
+	//
+	// MessageText:
+	//
+	// The function failed because the caller passed in an invalid OPM user mode
+	// handle.
+	//
+	public static final int ERROR_GRAPHICS_OPM_INVALID_HANDLE = 0xC026250C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH
+	//
+	// MessageText:
+	//
+	// A certificate could not be returned because the certificate buffer passed
+	// to the function was too small.
+	//
+	public static final int ERROR_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH = 0xC026250E;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_SPANNING_MODE_ENABLED
+	//
+	// MessageText:
+	//
+	// A video output could not be created because the frame buffer is in
+	// spanning mode.
+	//
+	public static final int ERROR_GRAPHICS_OPM_SPANNING_MODE_ENABLED = 0xC026250F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_THEATER_MODE_ENABLED
+	//
+	// MessageText:
+	//
+	// A video output could not be created because the frame buffer is in
+	// theater mode.
+	//
+	public static final int ERROR_GRAPHICS_OPM_THEATER_MODE_ENABLED = 0xC0262510;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PVP_HFS_FAILED
+	//
+	// MessageText:
+	//
+	// The function failed because the display adapter's Hardware Functionality
+	// Scan failed to validate the graphics hardware.
+	//
+	public static final int ERROR_GRAPHICS_PVP_HFS_FAILED = 0xC0262511;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_INVALID_SRM
+	//
+	// MessageText:
+	//
+	// The HDCP System Renewability Message passed to this function did not
+	// comply with section=5 of the HDCP=1.1 specification.
+	//
+	public static final int ERROR_GRAPHICS_OPM_INVALID_SRM = 0xC0262512;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP
+	//
+	// MessageText:
+	//
+	// The video output cannot enable the High-bandwidth Digital Content
+	// Protection (HDCP) System because it does not support HDCP.
+	//
+	public static final int ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP = 0xC0262513;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP
+	//
+	// MessageText:
+	//
+	// The video output cannot enable Analogue Copy Protection (ACP) because it
+	// does not support ACP.
+	//
+	public static final int ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP = 0xC0262514;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA
+	//
+	// MessageText:
+	//
+	// The video output cannot enable the Content Generation Management System
+	// Analogue (CGMS-A) protection technology because it does not support
+	// CGMS-A.
+	//
+	public static final int ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA = 0xC0262515;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_HDCP_SRM_NEVER_SET
+	//
+	// MessageText:
+	//
+	// The IOPMVideoOutput::GetInformation method cannot return the version of
+	// the SRM being used because the application never successfully passed an
+	// SRM to the video output.
+	//
+	public static final int ERROR_GRAPHICS_OPM_HDCP_SRM_NEVER_SET = 0xC0262516;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_RESOLUTION_TOO_HIGH
+	//
+	// MessageText:
+	//
+	// The IOPMVideoOutput::Configure method cannot enable the specified output
+	// protection technology because the output's screen resolution is too high.
+	//
+	public static final int ERROR_GRAPHICS_OPM_RESOLUTION_TOO_HIGH = 0xC0262517;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE
+	//
+	// MessageText:
+	//
+	// The IOPMVideoOutput::Configure method cannot enable HDCP because the
+	// display adapter's HDCP hardware is already being used by other physical
+	// outputs.
+	//
+	public static final int ERROR_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE = 0xC0262518;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_NO_LONGER_EXISTS
+	//
+	// MessageText:
+	//
+	// The operating system asynchronously destroyed this OPM video output
+	// because the operating system's state changed. This error typically occurs
+	// because the monitor PDO associated with this video output was removed,
+	// the monitor PDO associated with this video output was stopped, the video
+	// output's session became a non-console session or the video output's
+	// desktop became an inactive desktop.
+	//
+	public static final int ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_NO_LONGER_EXISTS = 0xC026251A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The method failed because the session is changing its type. No
+	// IOPMVideoOutput methods can be called when a session is changing its
+	// type. There are currently three types of sessions: console, disconnected
+	// and remote (RDP or ICA).
+	//
+	public static final int ERROR_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC026251B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS
+	//
+	// MessageText:
+	//
+	// Either the IOPMVideoOutput::COPPCompatibleGetInformation,
+	// IOPMVideoOutput::GetInformation, or IOPMVideoOutput::Configure method
+	// failed. This error is only returned if a video output has OPM semantics.
+	// IOPMVideoOutput::COPPCompatibleGetInformation always returns this error
+	// if a video output has OPM semantics. IOPMVideoOutput::GetInformation
+	// returns this error code if the caller requested COPP specific
+	// information. IOPMVideoOutput::Configure returns this error when the
+	// caller tries to use a COPP specific command.
+	//
+	public static final int ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS = 0xC026251C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST
+	//
+	// MessageText:
+	//
+	// The IOPMVideoOutput::GetInformation and
+	// IOPMVideoOutput::COPPCompatibleGetInformation methods return this error
+	// if the passed in sequence number is not the expected sequence number or
+	// the passed in OMAC value is invalid.
+	//
+	public static final int ERROR_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST = 0xC026251D;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// The method failed because an unexpected error occurred inside of a
+	// display driver.
+	//
+	public static final int ERROR_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR = 0xC026251E;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS
+	//
+	// MessageText:
+	//
+	// Either the IOPMVideoOutput::COPPCompatibleGetInformation,
+	// IOPMVideoOutput::GetInformation, or IOPMVideoOutput::Configure method
+	// failed. This error is only returned if a video output has COPP semantics.
+	// IOPMVideoOutput::COPPCompatibleGetInformation returns this error code if
+	// the caller requested OPM specific information.
+	// IOPMVideoOutput::GetInformation always returns this error if a video
+	// output has COPP semantics. IOPMVideoOutput::Configure returns this error
+	// when the caller tries to use an OPM specific command.
+	//
+	public static final int ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS = 0xC026251F;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The IOPMVideoOutput::COPPCompatibleGetInformation or
+	// IOPMVideoOutput::Configure method failed because the display driver does
+	// not support the OPM_GET_ACP_AND_CGMSA_SIGNALING and
+	// OPM_SET_ACP_AND_CGMSA_SIGNALING GUIDs.
+	//
+	public static final int ERROR_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED = 0xC0262520;
+
+	//
+	// MessageId: ERROR_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST
+	//
+	// MessageText:
+	//
+	// The IOPMVideoOutput::Configure function returns this error code if the
+	// passed in sequence number is not the expected sequence number or the
+	// passed in OMAC value is invalid.
+	//
+	public static final int ERROR_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST = 0xC0262521;
+
+	//
+	// Monitor Configuration API error codes {0x2580..0x25DF}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_I2C_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The monitor connected to the specified video output does not have an I2C
+	// bus.
+	//
+	public static final int ERROR_GRAPHICS_I2C_NOT_SUPPORTED = 0xC0262580;
+
+	//
+	// MessageId: ERROR_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST
+	//
+	// MessageText:
+	//
+	// No device on the I2C bus has the specified address.
+	//
+	public static final int ERROR_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST = 0xC0262581;
+
+	//
+	// MessageId: ERROR_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA
+	//
+	// MessageText:
+	//
+	// An error occurred while transmitting data to the device on the I2C bus.
+	//
+	public static final int ERROR_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA = 0xC0262582;
+
+	//
+	// MessageId: ERROR_GRAPHICS_I2C_ERROR_RECEIVING_DATA
+	//
+	// MessageText:
+	//
+	// An error occurred while receiving data from the device on the I2C bus.
+	//
+	public static final int ERROR_GRAPHICS_I2C_ERROR_RECEIVING_DATA = 0xC0262583;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The monitor does not support the specified VCP code.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED = 0xC0262584;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DDCCI_INVALID_DATA
+	//
+	// MessageText:
+	//
+	// The data received from the monitor is invalid.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_INVALID_DATA = 0xC0262585;
+
+	//
+	// MessageId:
+	// ERROR_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE
+	//
+	// MessageText:
+	//
+	// The function failed because a monitor returned an invalid Timing Status
+	// byte when the operating system used the DDC/CI Get Timing Report & Timing
+	// Message command to get a timing report from a monitor.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE = 0xC0262586;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_INVALID_CAPABILITIES_STRING
+	//
+	// MessageText:
+	//
+	// The monitor returned a DDC/CI capabilities string which did not comply
+	// with the ACCESS.bus=3.0, DDC/CI=1.1, or MCCS=2 Revision=1 specification.
+	//
+	public static final int ERROR_GRAPHICS_MCA_INVALID_CAPABILITIES_STRING = 0xC0262587;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal Monitor Configuration API error occured.
+	//
+	public static final int ERROR_GRAPHICS_MCA_INTERNAL_ERROR = 0xC0262588;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND
+	//
+	// MessageText:
+	//
+	// An operation failed because a DDC/CI message had an invalid value in its
+	// command field.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND = 0xC0262589;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH
+	//
+	// MessageText:
+	//
+	// An error occurred because the field length of a DDC/CI message contained
+	// an invalid value.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH = 0xC026258A;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM
+	//
+	// MessageText:
+	//
+	// An error occurred because the checksum field in a DDC/CI message did not
+	// match the message's computed checksum value. This error implies that the
+	// data was corrupted while it was being transmitted from a monitor to a
+	// computer.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM = 0xC026258B;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE
+	//
+	// MessageText:
+	//
+	// This function failed because an invalid monitor handle was passed to it.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE = 0xC026258C;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MONITOR_NO_LONGER_EXISTS
+	//
+	// MessageText:
+	//
+	// The operating system asynchronously destroyed the monitor which
+	// corresponds to this handle because the operating system's state changed.
+	// This error typically occurs because the monitor PDO associated with this
+	// handle was removed, the monitor PDO associated with this handle was
+	// stopped, or a display mode change occurred. A display mode change occurs
+	// when windows sends a WM_DISPLAYCHANGE windows message to applications.
+	//
+	public static final int ERROR_GRAPHICS_MONITOR_NO_LONGER_EXISTS = 0xC026258D;
+
+	//
+	// MessageId:
+	// ERROR_GRAPHICS_DDCCI_CURRENT_CURRENT_VALUE_GREATER_THAN_MAXIMUM_VALUE
+	//
+	// MessageText:
+	//
+	// A continuous VCP code's current value is greater than its maximum value.
+	// This error code indicates that a monitor returned an invalid value.
+	//
+	public static final int ERROR_GRAPHICS_DDCCI_CURRENT_CURRENT_VALUE_GREATER_THAN_MAXIMUM_VALUE = 0xC02625D8;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_INVALID_VCP_VERSION
+	//
+	// MessageText:
+	//
+	// The monitor's VCP Version (0xDF) VCP code returned an invalid version
+	// value.
+	//
+	public static final int ERROR_GRAPHICS_MCA_INVALID_VCP_VERSION = 0xC02625D9;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION
+	//
+	// MessageText:
+	//
+	// The monitor does not comply with the MCCS specification it claims to
+	// support.
+	//
+	public static final int ERROR_GRAPHICS_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION = 0xC02625DA;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_MCCS_VERSION_MISMATCH
+	//
+	// MessageText:
+	//
+	// The MCCS version in a monitor's mccs_ver capability does not match the
+	// MCCS version the monitor reports when the VCP Version (0xDF) VCP code is
+	// used.
+	//
+	public static final int ERROR_GRAPHICS_MCA_MCCS_VERSION_MISMATCH = 0xC02625DB;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_UNSUPPORTED_MCCS_VERSION
+	//
+	// MessageText:
+	//
+	// The Monitor Configuration API only works with monitors which support the
+	// MCCS=1.0 specification, MCCS=2.0 specification or the MCCS=2.0 Revision=1
+	// specification.
+	//
+	public static final int ERROR_GRAPHICS_MCA_UNSUPPORTED_MCCS_VERSION = 0xC02625DC;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED
+	//
+	// MessageText:
+	//
+	// The monitor returned an invalid monitor technology type. CRT, Plasma and
+	// LCD (TFT) are examples of monitor technology types. This error implies
+	// that the monitor violated the MCCS=2.0 or MCCS=2.0 Revision=1
+	// specification.
+	//
+	public static final int ERROR_GRAPHICS_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED = 0xC02625DE;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MCA_UNSUPPORTED_COLOR_TEMPERATURE
+	//
+	// MessageText:
+	//
+	// SetMonitorColorTemperature()'s caller passed a color temperature to it
+	// which the current monitor did not support. This error implies that the
+	// monitor violated the MCCS=2.0 or MCCS=2.0 Revision=1 specification.
+	//
+	public static final int ERROR_GRAPHICS_MCA_UNSUPPORTED_COLOR_TEMPERATURE = 0xC02625DF;
+
+	//
+	// OPM, UAB, PVP and DDC/CI shared error codes {0x25E0..0x25ff}
+	//
+	//
+	// MessageId: ERROR_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED
+	//
+	// MessageText:
+	//
+	// This function can only be used if a program is running in the local
+	// console session. It cannot be used if the program is running on a remote
+	// desktop session or on a terminal server session.
+	//
+	public static final int ERROR_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED = 0xC02625E0;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME
+	//
+	// MessageText:
+	//
+	// This function cannot find an actual GDI display device which corresponds
+	// to the specified GDI display device name.
+	//
+	public static final int ERROR_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC02625E1;
+
+	//
+	// MessageId: ERROR_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP
+	//
+	// MessageText:
+	//
+	// The function failed because the specified GDI display device was not
+	// attached to the Windows desktop.
+	//
+	public static final int ERROR_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC02625E2;
+
+	//
+	// MessageId: ERROR_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// This function does not support GDI mirroring display devices because GDI
+	// mirroring display devices do not have any physical monitors associated
+	// with them.
+	//
+	public static final int ERROR_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC02625E3;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INVALID_POINTER
+	//
+	// MessageText:
+	//
+	// The function failed because an invalid pointer parameter was passed to
+	// it. A pointer parameter is invalid if it is NULL, points to an invalid
+	// address, points to a kernel mode address, or is not correctly aligned.
+	//
+	public static final int ERROR_GRAPHICS_INVALID_POINTER = 0xC02625E4;
+
+	//
+	// MessageId: ERROR_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE
+	//
+	// MessageText:
+	//
+	// The function failed because the specified GDI device did not have any
+	// monitors associated with it.
+	//
+	public static final int ERROR_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC02625E5;
+
+	//
+	// MessageId: ERROR_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// An array passed to the function cannot hold all of the data that the
+	// function must copy into the array.
+	//
+	public static final int ERROR_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL = 0xC02625E6;
+
+	//
+	// MessageId: ERROR_GRAPHICS_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal error caused an operation to fail.
+	//
+	public static final int ERROR_GRAPHICS_INTERNAL_ERROR = 0xC02625E7;
+
+	//
+	// MessageId: ERROR_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The function failed because the current session is changing its type.
+	// This function cannot be called when the current session is changing its
+	// type. There are currently three types of sessions: console, disconnected
+	// and remote (RDP or ICA).
+	//
+	public static final int ERROR_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC02605E8;
+
+	//
+	// =
+	// TPM Services and TPM Software Error Messages
+	// =
+	//
+	// The TPM services and TPM software facilities are used by the various
+	// TPM software components. There are two facilities because the services
+	// errors are within the TCG-defined error space and the software errors
+	// are not.
+	//
+	// The following are the subranges within the TPM Services facility.
+	// The TPM hardware errors are defined in the document
+	// TPM Main Specification=1.2 Part=2 TPM Structures.
+	// The TBS errors are slotted into the TCG error namespace at the TBS layer.
+	//
+	// 0x0000 - 0x08ff TPM hardware errors
+	// 0x4000 - 0x40ff TPM Base Services errors (tbssvc.dl;
+	//
+	// The following are the subranges within the TPM Software facility. The TBS
+	// has two classes of errors - those that can be returned (the public
+	// errors,
+	// defined in the TBS spec), which are in the TPM services facility, and
+	// those that are internal or implementation specific, which are here in the
+	// TPM software facility.
+	//
+	// 0x0000 - 0x00ff TPM device driver errors (tpm.sys)
+	// 0x0100 - 0x01ff TPM API errors (tpmapi.lib)
+	// 0x0200 - 0x02ff TBS internal errors (tbssvc.dl;
+	// 0x0300 - 0x03ff TPM Physical Presence errors
+	//
+	//
+	// TPM hardware error codes {0x0000..0x08ff}
+	// This space is further subdivided into hardware errors, vendor-specific
+	// errors, and non-fatal errors.
+	//
+	//
+	// TPM hardware errors {0x0000..0x003ff}
+	//
+	//
+	// MessageId: TPM_E_ERROR_MASK
+	//
+	// MessageText:
+	//
+	// This is an error mask to convert TPM hardware errors to win errors.
+	//
+	public static final int TPM_E_ERROR_MASK = 0x80280000;
+
+	//
+	// MessageId: TPM_E_AUTHFAIL
+	//
+	// MessageText:
+	//
+	// Authentication failed.
+	//
+	public static final int TPM_E_AUTHFAIL = 0x80280001;
+
+	//
+	// MessageId: TPM_E_BADINDEX
+	//
+	// MessageText:
+	//
+	// The index to a PCR, DIR or other register is incorrect.
+	//
+	public static final int TPM_E_BADINDEX = 0x80280002;
+
+	//
+	// MessageId: TPM_E_BAD_PARAMETER
+	//
+	// MessageText:
+	//
+	// One or more parameter is bad.
+	//
+	public static final int TPM_E_BAD_PARAMETER = 0x80280003;
+
+	//
+	// MessageId: TPM_E_AUDITFAILURE
+	//
+	// MessageText:
+	//
+	// An operation completed successfully but the auditing of that operation
+	// failed.
+	//
+	public static final int TPM_E_AUDITFAILURE = 0x80280004;
+
+	//
+	// MessageId: TPM_E_CLEAR_DISABLED
+	//
+	// MessageText:
+	//
+	// The clear disable F;ag is set and all clear operations now require
+	// physical access.
+	//
+	public static final int TPM_E_CLEAR_DISABLED = 0x80280005;
+
+	//
+	// MessageId: TPM_E_DEACTIVATED
+	//
+	// MessageText:
+	//
+	// Activate the Trusted Platform Module (TPM).
+	//
+	public static final int TPM_E_DEACTIVATED = 0x80280006;
+
+	//
+	// MessageId: TPM_E_DISABLED
+	//
+	// MessageText:
+	//
+	// Enable the Trusted Platform Module (TPM).
+	//
+	public static final int TPM_E_DISABLED = 0x80280007;
+
+	//
+	// MessageId: TPM_E_DISABLED_CMD
+	//
+	// MessageText:
+	//
+	// The target command has been disabled.
+	//
+	public static final int TPM_E_DISABLED_CMD = 0x80280008;
+
+	//
+	// MessageId: TPM_E_FAIL
+	//
+	// MessageText:
+	//
+	// The operation failed.
+	//
+	public static final int TPM_E_FAIL = 0x80280009;
+
+	//
+	// MessageId: TPM_E_BAD_ORDINAL
+	//
+	// MessageText:
+	//
+	// The ordinal was unknown or inconsistent.
+	//
+	public static final int TPM_E_BAD_ORDINAL = 0x8028000A;
+
+	//
+	// MessageId: TPM_E_INSTALL_DISABLED
+	//
+	// MessageText:
+	//
+	// The ability to install an owner is disabled.
+	//
+	public static final int TPM_E_INSTALL_DISABLED = 0x8028000B;
+
+	//
+	// MessageId: TPM_E_INVALID_KEYHANDLE
+	//
+	// MessageText:
+	//
+	// The key handle cannot be intrepreted.
+	//
+	public static final int TPM_E_INVALID_KEYHANDLE = 0x8028000C;
+
+	//
+	// MessageId: TPM_E_KEYNOTFOUND
+	//
+	// MessageText:
+	//
+	// The key handle points to an invalid key.
+	//
+	public static final int TPM_E_KEYNOTFOUND = 0x8028000D;
+
+	//
+	// MessageId: TPM_E_INAPPROPRIATE_ENC
+	//
+	// MessageText:
+	//
+	// Unacceptable encryption scheme.
+	//
+	public static final int TPM_E_INAPPROPRIATE_ENC = 0x8028000E;
+
+	//
+	// MessageId: TPM_E_MIGRATEFAIL
+	//
+	// MessageText:
+	//
+	// Migration authorization failed.
+	//
+	public static final int TPM_E_MIGRATEFAIL = 0x8028000F;
+
+	//
+	// MessageId: TPM_E_INVALID_PCR_INFO
+	//
+	// MessageText:
+	//
+	// PCR information could not be interpreted.
+	//
+	public static final int TPM_E_INVALID_PCR_INFO = 0x80280010;
+
+	//
+	// MessageId: TPM_E_NOSPACE
+	//
+	// MessageText:
+	//
+	// No room to load key.
+	//
+	public static final int TPM_E_NOSPACE = 0x80280011;
+
+	//
+	// MessageId: TPM_E_NOSRK
+	//
+	// MessageText:
+	//
+	// There is no Storage Root Key (SRK) set.
+	//
+	public static final int TPM_E_NOSRK = 0x80280012;
+
+	//
+	// MessageId: TPM_E_NOTSEALED_BLOB
+	//
+	// MessageText:
+	//
+	// An encrypted blob is invalid or was not created by this TPM.
+	//
+	public static final int TPM_E_NOTSEALED_BLOB = 0x80280013;
+
+	//
+	// MessageId: TPM_E_OWNER_SET
+	//
+	// MessageText:
+	//
+	// The Trusted Platform Module (TPM) already has an owner.
+	//
+	public static final int TPM_E_OWNER_SET = 0x80280014;
+
+	//
+	// MessageId: TPM_E_RESOURCES
+	//
+	// MessageText:
+	//
+	// The TPM has insufficient internal resources to perform the requested
+	// action.
+	//
+	public static final int TPM_E_RESOURCES = 0x80280015;
+
+	//
+	// MessageId: TPM_E_SHORTRANDOM
+	//
+	// MessageText:
+	//
+	// A random string was too short.
+	//
+	public static final int TPM_E_SHORTRANDOM = 0x80280016;
+
+	//
+	// MessageId: TPM_E_SIZE
+	//
+	// MessageText:
+	//
+	// The TPM does not have the space to perform the operation.
+	//
+	public static final int TPM_E_SIZE = 0x80280017;
+
+	//
+	// MessageId: TPM_E_WRONGPCRVAL
+	//
+	// MessageText:
+	//
+	// The named PCR value does not match the current PCR value.
+	//
+	public static final int TPM_E_WRONGPCRVAL = 0x80280018;
+
+	//
+	// MessageId: TPM_E_BAD_PARAM_SIZE
+	//
+	// MessageText:
+	//
+	// The paramSize argument to the command has the incorrect value .
+	//
+	public static final int TPM_E_BAD_PARAM_SIZE = 0x80280019;
+
+	//
+	// MessageId: TPM_E_SHA_THREAD
+	//
+	// MessageText:
+	//
+	// There is no existing SHA-1 thread.
+	//
+	public static final int TPM_E_SHA_THREAD = 0x8028001A;
+
+	//
+	// MessageId: TPM_E_SHA_ERROR
+	//
+	// MessageText:
+	//
+	// The calculation is unable to proceed because the existing SHA-1 thread
+	// has already encountered an error.
+	//
+	public static final int TPM_E_SHA_ERROR = 0x8028001B;
+
+	//
+	// MessageId: TPM_E_FAILEDSELFTEST
+	//
+	// MessageText:
+	//
+	// Self-test has failed and the TPM has shutdown.
+	//
+	public static final int TPM_E_FAILEDSELFTEST = 0x8028001C;
+
+	//
+	// MessageId: TPM_E_AUTH2FAIL
+	//
+	// MessageText:
+	//
+	// The authorization for the second key in a=2 key function failed
+	// authorization.
+	//
+	public static final int TPM_E_AUTH2FAIL = 0x8028001D;
+
+	//
+	// MessageId: TPM_E_BADTAG
+	//
+	// MessageText:
+	//
+	// The tag value sent to for a command is invalid.
+	//
+	public static final int TPM_E_BADTAG = 0x8028001E;
+
+	//
+	// MessageId: TPM_E_IOERROR
+	//
+	// MessageText:
+	//
+	// An IO error occurred transmitting information to the TPM.
+	//
+	public static final int TPM_E_IOERROR = 0x8028001F;
+
+	//
+	// MessageId: TPM_E_ENCRYPT_ERROR
+	//
+	// MessageText:
+	//
+	// The encryption process had a problem.
+	//
+	public static final int TPM_E_ENCRYPT_ERROR = 0x80280020;
+
+	//
+	// MessageId: TPM_E_DECRYPT_ERROR
+	//
+	// MessageText:
+	//
+	// The decryption process did not complete.
+	//
+	public static final int TPM_E_DECRYPT_ERROR = 0x80280021;
+
+	//
+	// MessageId: TPM_E_INVALID_AUTHHANDLE
+	//
+	// MessageText:
+	//
+	// An invalid handle was used.
+	//
+	public static final int TPM_E_INVALID_AUTHHANDLE = 0x80280022;
+
+	//
+	// MessageId: TPM_E_NO_ENDORSEMENT
+	//
+	// MessageText:
+	//
+	// The TPM does not have an Endorsement Key (EK) installed.
+	//
+	public static final int TPM_E_NO_ENDORSEMENT = 0x80280023;
+
+	//
+	// MessageId: TPM_E_INVALID_KEYUSAGE
+	//
+	// MessageText:
+	//
+	// The usage of a key is not allowed.
+	//
+	public static final int TPM_E_INVALID_KEYUSAGE = 0x80280024;
+
+	//
+	// MessageId: TPM_E_WRONG_ENTITYTYPE
+	//
+	// MessageText:
+	//
+	// The submitted entity type is not allowed.
+	//
+	public static final int TPM_E_WRONG_ENTITYTYPE = 0x80280025;
+
+	//
+	// MessageId: TPM_E_INVALID_POSTINIT
+	//
+	// MessageText:
+	//
+	// The command was received in the wrong sequence relative to TPM_Init and a
+	// subsequent TPM_Startup.
+	//
+	public static final int TPM_E_INVALID_POSTINIT = 0x80280026;
+
+	//
+	// MessageId: TPM_E_INAPPROPRIATE_SIG
+	//
+	// MessageText:
+	//
+	// Signed data cannot include additional DER information.
+	//
+	public static final int TPM_E_INAPPROPRIATE_SIG = 0x80280027;
+
+	//
+	// MessageId: TPM_E_BAD_KEY_PROPERTY
+	//
+	// MessageText:
+	//
+	// The key properties in TPM_KEY_PARMs are not supported by this TPM.
+	//
+	public static final int TPM_E_BAD_KEY_PROPERTY = 0x80280028;
+
+	//
+	// MessageId: TPM_E_BAD_MIGRATION
+	//
+	// MessageText:
+	//
+	// The migration properties of this key are incorrect.
+	//
+	public static final int TPM_E_BAD_MIGRATION = 0x80280029;
+
+	//
+	// MessageId: TPM_E_BAD_SCHEME
+	//
+	// MessageText:
+	//
+	// The signature or encryption scheme for this key is incorrect or not
+	// permitted in this situation.
+	//
+	public static final int TPM_E_BAD_SCHEME = 0x8028002A;
+
+	//
+	// MessageId: TPM_E_BAD_DATASIZE
+	//
+	// MessageText:
+	//
+	// The size of the data (or blob) parameter is bad or inconsistent with the
+	// referenced key.
+	//
+	public static final int TPM_E_BAD_DATASIZE = 0x8028002B;
+
+	//
+	// MessageId: TPM_E_BAD_MODE
+	//
+	// MessageText:
+	//
+	// A mode parameter is bad, such as capArea or subCapArea for
+	// TPM_GetCapability, phsicalPresence parameter for TPM_PhysicalPresence, or
+	// migrationType for TPM_CreateMigrationBlob.
+	//
+	public static final int TPM_E_BAD_MODE = 0x8028002C;
+
+	//
+	// MessageId: TPM_E_BAD_PRESENCE
+	//
+	// MessageText:
+	//
+	// Either the physicalPresence or physicalPresenceLock bits have the wrong
+	// value.
+	//
+	public static final int TPM_E_BAD_PRESENCE = 0x8028002D;
+
+	//
+	// MessageId: TPM_E_BAD_VERSION
+	//
+	// MessageText:
+	//
+	// The TPM cannot perform this version of the capability.
+	//
+	public static final int TPM_E_BAD_VERSION = 0x8028002E;
+
+	//
+	// MessageId: TPM_E_NO_WRAP_TRANSPORT
+	//
+	// MessageText:
+	//
+	// The TPM does not allow for wrapped transport sessions.
+	//
+	public static final int TPM_E_NO_WRAP_TRANSPORT = 0x8028002F;
+
+	//
+	// MessageId: TPM_E_AUDITFAIL_UNSUCCESSFUL
+	//
+	// MessageText:
+	//
+	// TPM audit construction failed and the underlying command was returning a
+	// failure code also.
+	//
+	public static final int TPM_E_AUDITFAIL_UNSUCCESSFUL = 0x80280030;
+
+	//
+	// MessageId: TPM_E_AUDITFAIL_SUCCESSFUL
+	//
+	// MessageText:
+	//
+	// TPM audit construction failed and the underlying command was returning
+	// success.
+	//
+	public static final int TPM_E_AUDITFAIL_SUCCESSFUL = 0x80280031;
+
+	//
+	// MessageId: TPM_E_NOTRESETABLE
+	//
+	// MessageText:
+	//
+	// Attempt to reset a PCR register that does not have the resettable
+	// attribute.
+	//
+	public static final int TPM_E_NOTRESETABLE = 0x80280032;
+
+	//
+	// MessageId: TPM_E_NOTLOCAL
+	//
+	// MessageText:
+	//
+	// Attempt to reset a PCR register that requires locality and locality
+	// modifier not part of command transport.
+	//
+	public static final int TPM_E_NOTLOCAL = 0x80280033;
+
+	//
+	// MessageId: TPM_E_BAD_TYPE
+	//
+	// MessageText:
+	//
+	// Make identity blob not properly typed.
+	//
+	public static final int TPM_E_BAD_TYPE = 0x80280034;
+
+	//
+	// MessageId: TPM_E_INVALID_RESOURCE
+	//
+	// MessageText:
+	//
+	// When saving context identified resource type does not match actual
+	// resource.
+	//
+	public static final int TPM_E_INVALID_RESOURCE = 0x80280035;
+
+	//
+	// MessageId: TPM_E_NOTFIPS
+	//
+	// MessageText:
+	//
+	// The TPM is attempting to execute a command only available when in FIPS
+	// mode.
+	//
+	public static final int TPM_E_NOTFIPS = 0x80280036;
+
+	//
+	// MessageId: TPM_E_INVALID_FAMILY
+	//
+	// MessageText:
+	//
+	// The command is attempting to use an invalid family ID.
+	//
+	public static final int TPM_E_INVALID_FAMILY = 0x80280037;
+
+	//
+	// MessageId: TPM_E_NO_NV_PERMISSION
+	//
+	// MessageText:
+	//
+	// The permission to manipulate the NV storage is not available.
+	//
+	public static final int TPM_E_NO_NV_PERMISSION = 0x80280038;
+
+	//
+	// MessageId: TPM_E_REQUIRES_SIGN
+	//
+	// MessageText:
+	//
+	// The operation requires a signed command.
+	//
+	public static final int TPM_E_REQUIRES_SIGN = 0x80280039;
+
+	//
+	// MessageId: TPM_E_KEY_NOTSUPPORTED
+	//
+	// MessageText:
+	//
+	// Wrong operation to load an NV key.
+	//
+	public static final int TPM_E_KEY_NOTSUPPORTED = 0x8028003A;
+
+	//
+	// MessageId: TPM_E_AUTH_CONF;ICT
+	//
+	// MessageText:
+	//
+	// NV_LoadKey blob requires both owner and blob authorization.
+	//
+	public static final int TPM_E_AUTH_CONFLICT = 0x8028003B;
+
+	//
+	// MessageId: TPM_E_AREA_LOCKED
+	//
+	// MessageText:
+	//
+	// The NV area is locked and not writtable.
+	//
+	public static final int TPM_E_AREA_LOCKED = 0x8028003C;
+
+	//
+	// MessageId: TPM_E_BAD_LOCALITY
+	//
+	// MessageText:
+	//
+	// The locality is incorrect for the attempted operation.
+	//
+	public static final int TPM_E_BAD_LOCALITY = 0x8028003D;
+
+	//
+	// MessageId: TPM_E_READ_ONLY
+	//
+	// MessageText:
+	//
+	// The NV area is read only and can't be written to.
+	//
+	public static final int TPM_E_READ_ONLY = 0x8028003E;
+
+	//
+	// MessageId: TPM_E_PER_NOWRITE
+	//
+	// MessageText:
+	//
+	// There is no protection on the write to the NV area.
+	//
+	public static final int TPM_E_PER_NOWRITE = 0x8028003F;
+
+	//
+	// MessageId: TPM_E_FAMILYCOUNT
+	//
+	// MessageText:
+	//
+	// The family count value does not match.
+	//
+	public static final int TPM_E_FAMILYCOUNT = 0x80280040;
+
+	//
+	// MessageId: TPM_E_WRITE_LOCKED
+	//
+	// MessageText:
+	//
+	// The NV area has already been written to.
+	//
+	public static final int TPM_E_WRITE_LOCKED = 0x80280041;
+
+	//
+	// MessageId: TPM_E_BAD_ATTRIBUTES
+	//
+	// MessageText:
+	//
+	// The NV area attributes conFLIct.
+	//
+	public static final int TPM_E_BAD_ATTRIBUTES = 0x80280042;
+
+	//
+	// MessageId: TPM_E_INVALID_STRUCTURE
+	//
+	// MessageText:
+	//
+	// The structure tag and version are invalid or inconsistent.
+	//
+	public static final int TPM_E_INVALID_STRUCTURE = 0x80280043;
+
+	//
+	// MessageId: TPM_E_KEY_OWNER_CONTROL
+	//
+	// MessageText:
+	//
+	// The key is under control of the TPM Owner and can only be evicted by the
+	// TPM Owner.
+	//
+	public static final int TPM_E_KEY_OWNER_CONTROL = 0x80280044;
+
+	//
+	// MessageId: TPM_E_BAD_COUNTER
+	//
+	// MessageText:
+	//
+	// The counter handle is incorrect.
+	//
+	public static final int TPM_E_BAD_COUNTER = 0x80280045;
+
+	//
+	// MessageId: TPM_E_NOT_FULLWRITE
+	//
+	// MessageText:
+	//
+	// The write is not a complete write of the area.
+	//
+	public static final int TPM_E_NOT_FULLWRITE = 0x80280046;
+
+	//
+	// MessageId: TPM_E_CONTEXT_GAP
+	//
+	// MessageText:
+	//
+	// The gap between saved context counts is too large.
+	//
+	public static final int TPM_E_CONTEXT_GAP = 0x80280047;
+
+	//
+	// MessageId: TPM_E_MAXNVWRITES
+	//
+	// MessageText:
+	//
+	// The maximum number of NV writes without an owner has been exceeded.
+	//
+	public static final int TPM_E_MAXNVWRITES = 0x80280048;
+
+	//
+	// MessageId: TPM_E_NOOPERATOR
+	//
+	// MessageText:
+	//
+	// No operator AuthData value is set.
+	//
+	public static final int TPM_E_NOOPERATOR = 0x80280049;
+
+	//
+	// MessageId: TPM_E_RESOURCEMISSING
+	//
+	// MessageText:
+	//
+	// The resource pointed to by context is not loaded.
+	//
+	public static final int TPM_E_RESOURCEMISSING = 0x8028004A;
+
+	//
+	// MessageId: TPM_E_DELEGATE_LOCK
+	//
+	// MessageText:
+	//
+	// The delegate administration is locked.
+	//
+	public static final int TPM_E_DELEGATE_LOCK = 0x8028004B;
+
+	//
+	// MessageId: TPM_E_DELEGATE_FAMILY
+	//
+	// MessageText:
+	//
+	// Attempt to manage a family other then the delegated family.
+	//
+	public static final int TPM_E_DELEGATE_FAMILY = 0x8028004C;
+
+	//
+	// MessageId: TPM_E_DELEGATE_ADMIN
+	//
+	// MessageText:
+	//
+	// Delegation table management not enabled.
+	//
+	public static final int TPM_E_DELEGATE_ADMIN = 0x8028004D;
+
+	//
+	// MessageId: TPM_E_TRANSPORT_NOTEXCLUSIVE
+	//
+	// MessageText:
+	//
+	// There was a command executed outside of an exclusive transport session.
+	//
+	public static final int TPM_E_TRANSPORT_NOTEXCLUSIVE = 0x8028004E;
+
+	//
+	// MessageId: TPM_E_OWNER_CONTROL
+	//
+	// MessageText:
+	//
+	// Attempt to context save a owner evict controlled key.
+	//
+	public static final int TPM_E_OWNER_CONTROL = 0x8028004F;
+
+	//
+	// MessageId: TPM_E_DAA_RESOURCES
+	//
+	// MessageText:
+	//
+	// The DAA command has no resources availble to execute the command.
+	//
+	public static final int TPM_E_DAA_RESOURCES = 0x80280050;
+
+	//
+	// MessageId: TPM_E_DAA_INPUT_DATA0
+	//
+	// MessageText:
+	//
+	// The consistency check on DAA parameter inputData0 has failed.
+	//
+	public static final int TPM_E_DAA_INPUT_DATA0 = 0x80280051;
+
+	//
+	// MessageId: TPM_E_DAA_INPUT_DATA1
+	//
+	// MessageText:
+	//
+	// The consistency check on DAA parameter inputData1 has failed.
+	//
+	public static final int TPM_E_DAA_INPUT_DATA1 = 0x80280052;
+
+	//
+	// MessageId: TPM_E_DAA_ISSUER_SETTINGS
+	//
+	// MessageText:
+	//
+	// The consistency check on DAA_issuerSettings has failed.
+	//
+	public static final int TPM_E_DAA_ISSUER_SETTINGS = 0x80280053;
+
+	//
+	// MessageId: TPM_E_DAA_TPM_SETTINGS
+	//
+	// MessageText:
+	//
+	// The consistency check on DAA_tpmSpecific has failed.
+	//
+	public static final int TPM_E_DAA_TPM_SETTINGS = 0x80280054;
+
+	//
+	// MessageId: TPM_E_DAA_STAGE
+	//
+	// MessageText:
+	//
+	// The atomic process indicated by the submitted DAA command is not the
+	// expected process.
+	//
+	public static final int TPM_E_DAA_STAGE = 0x80280055;
+
+	//
+	// MessageId: TPM_E_DAA_ISSUER_VALIDITY
+	//
+	// MessageText:
+	//
+	// The issuer's validity check has detected an inconsistency.
+	//
+	public static final int TPM_E_DAA_ISSUER_VALIDITY = 0x80280056;
+
+	//
+	// MessageId: TPM_E_DAA_WRONG_W
+	//
+	// MessageText:
+	//
+	// The consistency check on w has failed.
+	//
+	public static final int TPM_E_DAA_WRONG_W = 0x80280057;
+
+	//
+	// MessageId: TPM_E_BAD_HANDLE
+	//
+	// MessageText:
+	//
+	// The handle is incorrect.
+	//
+	public static final int TPM_E_BAD_HANDLE = 0x80280058;
+
+	//
+	// MessageId: TPM_E_BAD_DELEGATE
+	//
+	// MessageText:
+	//
+	// Delegation is not correct.
+	//
+	public static final int TPM_E_BAD_DELEGATE = 0x80280059;
+
+	//
+	// MessageId: TPM_E_BADCONTEXT
+	//
+	// MessageText:
+	//
+	// The context blob is invalid.
+	//
+	public static final int TPM_E_BADCONTEXT = 0x8028005A;
+
+	//
+	// MessageId: TPM_E_TOOMANYCONTEXTS
+	//
+	// MessageText:
+	//
+	// Too many contexts held by the TPM.
+	//
+	public static final int TPM_E_TOOMANYCONTEXTS = 0x8028005B;
+
+	//
+	// MessageId: TPM_E_MA_TICKET_SIGNATURE
+	//
+	// MessageText:
+	//
+	// Migration authority signature validation failure.
+	//
+	public static final int TPM_E_MA_TICKET_SIGNATURE = 0x8028005C;
+
+	//
+	// MessageId: TPM_E_MA_DESTINATION
+	//
+	// MessageText:
+	//
+	// Migration destination not authenticated.
+	//
+	public static final int TPM_E_MA_DESTINATION = 0x8028005D;
+
+	//
+	// MessageId: TPM_E_MA_SOURCE
+	//
+	// MessageText:
+	//
+	// Migration source incorrect.
+	//
+	public static final int TPM_E_MA_SOURCE = 0x8028005E;
+
+	//
+	// MessageId: TPM_E_MA_AUTHORITY
+	//
+	// MessageText:
+	//
+	// Incorrect migration authority.
+	//
+	public static final int TPM_E_MA_AUTHORITY = 0x8028005F;
+
+	//
+	// MessageId: TPM_E_PERMANENTEK
+	//
+	// MessageText:
+	//
+	// Attempt to revoke the EK and the EK is not revocable.
+	//
+	public static final int TPM_E_PERMANENTEK = 0x80280061;
+
+	//
+	// MessageId: TPM_E_BAD_SIGNATURE
+	//
+	// MessageText:
+	//
+	// Bad signature of CMK ticket.
+	//
+	public static final int TPM_E_BAD_SIGNATURE = 0x80280062;
+
+	//
+	// MessageId: TPM_E_NOCONTEXTSPACE
+	//
+	// MessageText:
+	//
+	// There is no room in the context list for additional contexts.
+	//
+	public static final int TPM_E_NOCONTEXTSPACE = 0x80280063;
+
+	//
+	// TPM vendor specific hardware errors {0x0400..0x04ff}
+	//
+	//
+	// MessageId: TPM_E_COMMAND_BLOCKED
+	//
+	// MessageText:
+	//
+	// The command was blocked.
+	//
+	public static final int TPM_E_COMMAND_BLOCKED = 0x80280400;
+
+	//
+	// MessageId: TPM_E_INVALID_HANDLE
+	//
+	// MessageText:
+	//
+	// The specified handle was not found.
+	//
+	public static final int TPM_E_INVALID_HANDLE = 0x80280401;
+
+	//
+	// MessageId: TPM_E_DUPLICATE_VHANDLE
+	//
+	// MessageText:
+	//
+	// The TPM returned a duplicate handle and the command needs to be
+	// resubmitted.
+	//
+	public static final int TPM_E_DUPLICATE_VHANDLE = 0x80280402;
+
+	//
+	// MessageId: TPM_E_EMBEDDED_COMMAND_BLOCKED
+	//
+	// MessageText:
+	//
+	// The command within the transport was blocked.
+	//
+	public static final int TPM_E_EMBEDDED_COMMAND_BLOCKED = 0x80280403;
+
+	//
+	// MessageId: TPM_E_EMBEDDED_COMMAND_UNSUPPORTED
+	//
+	// MessageText:
+	//
+	// The command within the transport is not supported.
+	//
+	public static final int TPM_E_EMBEDDED_COMMAND_UNSUPPORTED = 0x80280404;
+
+	//
+	// TPM non-fatal hardware errors {0x0800..0x08ff}
+	//
+	//
+	// MessageId: TPM_E_RETRY
+	//
+	// MessageText:
+	//
+	// The TPM is too busy to respond to the command immediately, but the
+	// command could be resubmitted at a later time.
+	//
+	public static final int TPM_E_RETRY = 0x80280800;
+
+	//
+	// MessageId: TPM_E_NEEDS_SELFTEST
+	//
+	// MessageText:
+	//
+	// SelfTestFull has not been run.
+	//
+	public static final int TPM_E_NEEDS_SELFTEST = 0x80280801;
+
+	//
+	// MessageId: TPM_E_DOING_SELFTEST
+	//
+	// MessageText:
+	//
+	// The TPM is currently executing a full selftest.
+	//
+	public static final int TPM_E_DOING_SELFTEST = 0x80280802;
+
+	//
+	// MessageId: TPM_E_DEFEND_LOCK_RUNNING
+	//
+	// MessageText:
+	//
+	// The TPM is defending against dictionary attacks and is in a time-out
+	// period.
+	//
+	public static final int TPM_E_DEFEND_LOCK_RUNNING = 0x80280803;
+
+	//
+	// TPM Base Services error codes {0x4000..0x40ff}
+	//
+	//
+	// MessageId: TBS_E_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal software error has been detected.
+	//
+	public static final int TBS_E_INTERNAL_ERROR = 0x80284001;
+
+	//
+	// MessageId: TBS_E_BAD_PARAMETER
+	//
+	// MessageText:
+	//
+	// One or more input parameters is bad.
+	//
+	public static final int TBS_E_BAD_PARAMETER = 0x80284002;
+
+	//
+	// MessageId: TBS_E_INVALID_OUTPUT_POINTER
+	//
+	// MessageText:
+	//
+	// A specified output pointer is bad.
+	//
+	public static final int TBS_E_INVALID_OUTPUT_POINTER = 0x80284003;
+
+	//
+	// MessageId: TBS_E_INVALID_CONTEXT
+	//
+	// MessageText:
+	//
+	// The specified context handle does not refer to a valid context.
+	//
+	public static final int TBS_E_INVALID_CONTEXT = 0x80284004;
+
+	//
+	// MessageId: TBS_E_INSUFFICIENT_BUFFER
+	//
+	// MessageText:
+	//
+	// A specified output buffer is too small.
+	//
+	public static final int TBS_E_INSUFFICIENT_BUFFER = 0x80284005;
+
+	//
+	// MessageId: TBS_E_IOERROR
+	//
+	// MessageText:
+	//
+	// An error occurred while communicating with the TPM.
+	//
+	public static final int TBS_E_IOERROR = 0x80284006;
+
+	//
+	// MessageId: TBS_E_INVALID_CONTEXT_PARAM
+	//
+	// MessageText:
+	//
+	// One or more context parameters is invalid.
+	//
+	public static final int TBS_E_INVALID_CONTEXT_PARAM = 0x80284007;
+
+	//
+	// MessageId: TBS_E_SERVICE_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// The TBS service is not running and could not be started.
+	//
+	public static final int TBS_E_SERVICE_NOT_RUNNING = 0x80284008;
+
+	//
+	// MessageId: TBS_E_TOO_MANY_TBS_CONTEXTS
+	//
+	// MessageText:
+	//
+	// A new context could not be created because there are too many open
+	// contexts.
+	//
+	public static final int TBS_E_TOO_MANY_TBS_CONTEXTS = 0x80284009;
+
+	//
+	// MessageId: TBS_E_TOO_MANY_RESOURCES
+	//
+	// MessageText:
+	//
+	// A new virtual resource could not be created because there are too many
+	// open
+	// virtual resources.
+	//
+	public static final int TBS_E_TOO_MANY_RESOURCES = 0x8028400A;
+
+	//
+	// MessageId: TBS_E_SERVICE_START_PENDING
+	//
+	// MessageText:
+	//
+	// The TBS service has been started but is not yet running.
+	//
+	public static final int TBS_E_SERVICE_START_PENDING = 0x8028400B;
+
+	//
+	// MessageId: TBS_E_PPI_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The physical presence interface is not supported.
+	//
+	public static final int TBS_E_PPI_NOT_SUPPORTED = 0x8028400C;
+
+	//
+	// MessageId: TBS_E_COMMAND_CANCELED
+	//
+	// MessageText:
+	//
+	// The command was canceled.
+	//
+	public static final int TBS_E_COMMAND_CANCELED = 0x8028400D;
+
+	//
+	// MessageId: TBS_E_BUFFER_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// The input or output buffer is too large.
+	//
+	public static final int TBS_E_BUFFER_TOO_LARGE = 0x8028400E;
+
+	//
+	// MessageId: TBS_E_TPM_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// A compatible Trusted Platform Module (TPM) Security Device cannot be
+	// found on this computer.
+	//
+	public static final int TBS_E_TPM_NOT_FOUND = 0x8028400F;
+
+	//
+	// MessageId: TBS_E_SERVICE_DISABLED
+	//
+	// MessageText:
+	//
+	// The TBS service has been disabled.
+	//
+	public static final int TBS_E_SERVICE_DISABLED = 0x80284010;
+
+	//
+	// TPM API error codes {0x0100..0x01ff}
+	//
+	//
+	// MessageId: TPMAPI_E_INVALID_STATE
+	//
+	// MessageText:
+	//
+	// The command buffer is not in the correct state.
+	//
+	public static final int TPMAPI_E_INVALID_STATE = 0x80290100;
+
+	//
+	// MessageId: TPMAPI_E_NOT_ENOUGH_DATA
+	//
+	// MessageText:
+	//
+	// The command buffer does not contain enough data to satisfy the request.
+	//
+	public static final int TPMAPI_E_NOT_ENOUGH_DATA = 0x80290101;
+
+	//
+	// MessageId: TPMAPI_E_TOO_MUCH_DATA
+	//
+	// MessageText:
+	//
+	// The command buffer cannot contain any more data.
+	//
+	public static final int TPMAPI_E_TOO_MUCH_DATA = 0x80290102;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_OUTPUT_POINTER
+	//
+	// MessageText:
+	//
+	// One or more output parameters was NULL or invalid.
+	//
+	public static final int TPMAPI_E_INVALID_OUTPUT_POINTER = 0x80290103;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// One or more input parameters is invalid.
+	//
+	public static final int TPMAPI_E_INVALID_PARAMETER = 0x80290104;
+
+	//
+	// MessageId: TPMAPI_E_OUT_OF_MEMORY
+	//
+	// MessageText:
+	//
+	// Not enough memory was available to satisfy the request.
+	//
+	public static final int TPMAPI_E_OUT_OF_MEMORY = 0x80290105;
+
+	//
+	// MessageId: TPMAPI_E_BUFFER_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The specified buffer was too small.
+	//
+	public static final int TPMAPI_E_BUFFER_TOO_SMALL = 0x80290106;
+
+	//
+	// MessageId: TPMAPI_E_INTERNAL_ERROR
+	//
+	// MessageText:
+	//
+	// An internal error was detected.
+	//
+	public static final int TPMAPI_E_INTERNAL_ERROR = 0x80290107;
+
+	//
+	// MessageId: TPMAPI_E_ACCESS_DENIED
+	//
+	// MessageText:
+	//
+	// The caller does not have the appropriate rights to perform the requested
+	// operation.
+	//
+	public static final int TPMAPI_E_ACCESS_DENIED = 0x80290108;
+
+	//
+	// MessageId: TPMAPI_E_AUTHORIZATION_FAILED
+	//
+	// MessageText:
+	//
+	// The specified authorization information was invalid.
+	//
+	public static final int TPMAPI_E_AUTHORIZATION_FAILED = 0x80290109;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_CONTEXT_HANDLE
+	//
+	// MessageText:
+	//
+	// The specified context handle was not valid.
+	//
+	public static final int TPMAPI_E_INVALID_CONTEXT_HANDLE = 0x8029010A;
+
+	//
+	// MessageId: TPMAPI_E_TBS_COMMUNICATION_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred while communicating with the TBS.
+	//
+	public static final int TPMAPI_E_TBS_COMMUNICATION_ERROR = 0x8029010B;
+
+	//
+	// MessageId: TPMAPI_E_TPM_COMMAND_ERROR
+	//
+	// MessageText:
+	//
+	// The TPM returned an unexpected result.
+	//
+	public static final int TPMAPI_E_TPM_COMMAND_ERROR = 0x8029010C;
+
+	//
+	// MessageId: TPMAPI_E_MESSAGE_TOO_LARGE
+	//
+	// MessageText:
+	//
+	// The message was too large for the encoding scheme.
+	//
+	public static final int TPMAPI_E_MESSAGE_TOO_LARGE = 0x8029010D;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_ENCODING
+	//
+	// MessageText:
+	//
+	// The encoding in the blob was not recognized.
+	//
+	public static final int TPMAPI_E_INVALID_ENCODING = 0x8029010E;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_KEY_SIZE
+	//
+	// MessageText:
+	//
+	// The key size is not valid.
+	//
+	public static final int TPMAPI_E_INVALID_KEY_SIZE = 0x8029010F;
+
+	//
+	// MessageId: TPMAPI_E_ENCRYPTION_FAILED
+	//
+	// MessageText:
+	//
+	// The encryption operation failed.
+	//
+	public static final int TPMAPI_E_ENCRYPTION_FAILED = 0x80290110;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_KEY_PARAMS
+	//
+	// MessageText:
+	//
+	// The key parameters structure was not valid
+	//
+	public static final int TPMAPI_E_INVALID_KEY_PARAMS = 0x80290111;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_MIGRATION_AUTHORIZATION_BLOB
+	//
+	// MessageText:
+	//
+	// The requested supplied data does not appear to be a valid migration
+	// authorization blob.
+	//
+	public static final int TPMAPI_E_INVALID_MIGRATION_AUTHORIZATION_BLOB = 0x80290112;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_PCR_INDEX
+	//
+	// MessageText:
+	//
+	// The specified PCR index was invalid
+	//
+	public static final int TPMAPI_E_INVALID_PCR_INDEX = 0x80290113;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_DELEGATE_BLOB
+	//
+	// MessageText:
+	//
+	// The data given does not appear to be a valid delegate blob.
+	//
+	public static final int TPMAPI_E_INVALID_DELEGATE_BLOB = 0x80290114;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_CONTEXT_PARAMS
+	//
+	// MessageText:
+	//
+	// One or more of the specified context parameters was not valid.
+	//
+	public static final int TPMAPI_E_INVALID_CONTEXT_PARAMS = 0x80290115;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_KEY_BLOB
+	//
+	// MessageText:
+	//
+	// The data given does not appear to be a valid key blob
+	//
+	public static final int TPMAPI_E_INVALID_KEY_BLOB = 0x80290116;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_PCR_DATA
+	//
+	// MessageText:
+	//
+	// The specified PCR data was invalid.
+	//
+	public static final int TPMAPI_E_INVALID_PCR_DATA = 0x80290117;
+
+	//
+	// MessageId: TPMAPI_E_INVALID_OWNER_AUTH
+	//
+	// MessageText:
+	//
+	// The format of the owner auth data was invalid.
+	//
+	public static final int TPMAPI_E_INVALID_OWNER_AUTH = 0x80290118;
+
+	//
+	// MessageId: TPMAPI_E_FIPS_RNG_CHECK_FAILED
+	//
+	// MessageText:
+	//
+	// The random number generated did not pass FIPS RNG check.
+	//
+	public static final int TPMAPI_E_FIPS_RNG_CHECK_FAILED = 0x80290119;
+
+	//
+	// TBS implementation error codes {0x0200..0x02ff}
+	//
+	//
+	// MessageId: TBSIMP_E_BUFFER_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The specified buffer was too small.
+	//
+	public static final int TBSIMP_E_BUFFER_TOO_SMALL = 0x80290200;
+
+	//
+	// MessageId: TBSIMP_E_CLEANUP_FAILED
+	//
+	// MessageText:
+	//
+	// The context could not be cleaned up.
+	//
+	public static final int TBSIMP_E_CLEANUP_FAILED = 0x80290201;
+
+	//
+	// MessageId: TBSIMP_E_INVALID_CONTEXT_HANDLE
+	//
+	// MessageText:
+	//
+	// The specified context handle is invalid.
+	//
+	public static final int TBSIMP_E_INVALID_CONTEXT_HANDLE = 0x80290202;
+
+	//
+	// MessageId: TBSIMP_E_INVALID_CONTEXT_PARAM
+	//
+	// MessageText:
+	//
+	// An invalid context parameter was specified.
+	//
+	public static final int TBSIMP_E_INVALID_CONTEXT_PARAM = 0x80290203;
+
+	//
+	// MessageId: TBSIMP_E_TPM_ERROR
+	//
+	// MessageText:
+	//
+	// An error occurred while communicating with the TPM
+	//
+	public static final int TBSIMP_E_TPM_ERROR = 0x80290204;
+
+	//
+	// MessageId: TBSIMP_E_HASH_BAD_KEY
+	//
+	// MessageText:
+	//
+	// No entry with the specified key was found.
+	//
+	public static final int TBSIMP_E_HASH_BAD_KEY = 0x80290205;
+
+	//
+	// MessageId: TBSIMP_E_DUPLICATE_VHANDLE
+	//
+	// MessageText:
+	//
+	// The specified virtual handle matches a virtual handle already in use.
+	//
+	public static final int TBSIMP_E_DUPLICATE_VHANDLE = 0x80290206;
+
+	//
+	// MessageId: TBSIMP_E_INVALID_OUTPUT_POINTER
+	//
+	// MessageText:
+	//
+	// The pointer to the returned handle location was NULL or invalid
+	//
+	public static final int TBSIMP_E_INVALID_OUTPUT_POINTER = 0x80290207;
+
+	//
+	// MessageId: TBSIMP_E_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// One or more parameters is invalid
+	//
+	public static final int TBSIMP_E_INVALID_PARAMETER = 0x80290208;
+
+	//
+	// MessageId: TBSIMP_E_RPC_INIT_FAILED
+	//
+	// MessageText:
+	//
+	// The RPC subsystem could not be initialized.
+	//
+	public static final int TBSIMP_E_RPC_INIT_FAILED = 0x80290209;
+
+	//
+	// MessageId: TBSIMP_E_SCHEDULER_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// The TBS scheduler is not running.
+	//
+	public static final int TBSIMP_E_SCHEDULER_NOT_RUNNING = 0x8029020A;
+
+	//
+	// MessageId: TBSIMP_E_COMMAND_CANCELED
+	//
+	// MessageText:
+	//
+	// The command was canceled.
+	//
+	public static final int TBSIMP_E_COMMAND_CANCELED = 0x8029020B;
+
+	//
+	// MessageId: TBSIMP_E_OUT_OF_MEMORY
+	//
+	// MessageText:
+	//
+	// There was not enough memory to fulfill the request
+	//
+	public static final int TBSIMP_E_OUT_OF_MEMORY = 0x8029020C;
+
+	//
+	// MessageId: TBSIMP_E_LIST_NO_MORE_ITEMS
+	//
+	// MessageText:
+	//
+	// The specified list is empty, or the iteration has reached the end of the
+	// list.
+	//
+	public static final int TBSIMP_E_LIST_NO_MORE_ITEMS = 0x8029020D;
+
+	//
+	// MessageId: TBSIMP_E_LIST_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified item was not found in the list.
+	//
+	public static final int TBSIMP_E_LIST_NOT_FOUND = 0x8029020E;
+
+	//
+	// MessageId: TBSIMP_E_NOT_ENOUGH_SPACE
+	//
+	// MessageText:
+	//
+	// The TPM does not have enough space to load the requested resource.
+	//
+	public static final int TBSIMP_E_NOT_ENOUGH_SPACE = 0x8029020F;
+
+	//
+	// MessageId: TBSIMP_E_NOT_ENOUGH_TPM_CONTEXTS
+	//
+	// MessageText:
+	//
+	// There are too many TPM contexts in use.
+	//
+	public static final int TBSIMP_E_NOT_ENOUGH_TPM_CONTEXTS = 0x80290210;
+
+	//
+	// MessageId: TBSIMP_E_COMMAND_FAILED
+	//
+	// MessageText:
+	//
+	// The TPM command failed.
+	//
+	public static final int TBSIMP_E_COMMAND_FAILED = 0x80290211;
+
+	//
+	// MessageId: TBSIMP_E_UNKNOWN_ORDINAL
+	//
+	// MessageText:
+	//
+	// The TBS does not recognize the specified ordinal.
+	//
+	public static final int TBSIMP_E_UNKNOWN_ORDINAL = 0x80290212;
+
+	//
+	// MessageId: TBSIMP_E_RESOURCE_EXPIRED
+	//
+	// MessageText:
+	//
+	// The requested resource is no longer available.
+	//
+	public static final int TBSIMP_E_RESOURCE_EXPIRED = 0x80290213;
+
+	//
+	// MessageId: TBSIMP_E_INVALID_RESOURCE
+	//
+	// MessageText:
+	//
+	// The resource type did not match.
+	//
+	public static final int TBSIMP_E_INVALID_RESOURCE = 0x80290214;
+
+	//
+	// MessageId: TBSIMP_E_NOTHING_TO_UNLOAD
+	//
+	// MessageText:
+	//
+	// No resources can be unloaded.
+	//
+	public static final int TBSIMP_E_NOTHING_TO_UNLOAD = 0x80290215;
+
+	//
+	// MessageId: TBSIMP_E_HASH_TABLE_FULL
+	//
+	// MessageText:
+	//
+	// No new entries can be added to the hash table.
+	//
+	public static final int TBSIMP_E_HASH_TABLE_FULL = 0x80290216;
+
+	//
+	// MessageId: TBSIMP_E_TOO_MANY_TBS_CONTEXTS
+	//
+	// MessageText:
+	//
+	// A new TBS context could not be created because there are too many open
+	// contexts.
+	//
+	public static final int TBSIMP_E_TOO_MANY_TBS_CONTEXTS = 0x80290217;
+
+	//
+	// MessageId: TBSIMP_E_TOO_MANY_RESOURCES
+	//
+	// MessageText:
+	//
+	// A new virtual resource could not be created because there are too many
+	// open virtual resources.
+	//
+	public static final int TBSIMP_E_TOO_MANY_RESOURCES = 0x80290218;
+
+	//
+	// MessageId: TBSIMP_E_PPI_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The physical presence interface is not supported.
+	//
+	public static final int TBSIMP_E_PPI_NOT_SUPPORTED = 0x80290219;
+
+	//
+	// MessageId: TBSIMP_E_TPM_INCOMPATIBLE
+	//
+	// MessageText:
+	//
+	// TBS is not compatible with the version of TPM found on the system.
+	//
+	public static final int TBSIMP_E_TPM_INCOMPATIBLE = 0x8029021A;
+
+	//
+	// TPM Physical Presence implementation error codes {0x0300..0x03ff}
+	//
+	//
+	// MessageId: TPM_E_PPI_ACPI_FAILURE
+	//
+	// MessageText:
+	//
+	// A general error was detected when attempting to acquire the BIOS's
+	// response to a Physical Presence command.
+	//
+	public static final int TPM_E_PPI_ACPI_FAILURE = 0x80290300;
+
+	//
+	// MessageId: TPM_E_PPI_USER_ABORT
+	//
+	// MessageText:
+	//
+	// The user failed to confirm the TPM operation request.
+	//
+	public static final int TPM_E_PPI_USER_ABORT = 0x80290301;
+
+	//
+	// MessageId: TPM_E_PPI_BIOS_FAILURE
+	//
+	// MessageText:
+	//
+	// The BIOS failure prevented the successful execution of the requested TPM
+	// operation (e.g. invalid TPM operation request, BIOS communication error
+	// with the TPM).
+	//
+	public static final int TPM_E_PPI_BIOS_FAILURE = 0x80290302;
+
+	//
+	// MessageId: TPM_E_PPI_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// The BIOS does not support the physical presence interface.
+	//
+	public static final int TPM_E_PPI_NOT_SUPPORTED = 0x80290303;
+
+	//
+	// ==
+	// Facility Performance Logs & Alerts (PLA) Error Messages
+	// ==
+	//
+	//
+	// MessageId: PLA_E_DCS_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Data Collector Set was not found.
+	//
+	public static final int PLA_E_DCS_NOT_FOUND = 0x80300002;
+
+	//
+	// MessageId: PLA_E_DCS_IN_USE
+	//
+	// MessageText:
+	//
+	// The Data Collector Set or one of its dependencies is already in use.
+	//
+	public static final int PLA_E_DCS_IN_USE = 0x803000AA;
+
+	//
+	// MessageId: PLA_E_TOO_MANY_FOLDERS
+	//
+	// MessageText:
+	//
+	// Unable to start Data Collector Set because there are too many folders.
+	//
+	public static final int PLA_E_TOO_MANY_FOLDERS = 0x80300045;
+
+	//
+	// MessageId: PLA_E_NO_MIN_DISK
+	//
+	// MessageText:
+	//
+	// Not enough free disk space to start Data Collector Set.
+	//
+	public static final int PLA_E_NO_MIN_DISK = 0x80300070;
+
+	//
+	// MessageId: PLA_E_DCS_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// Data Collector Set already exists.
+	//
+	public static final int PLA_E_DCS_ALREADY_EXISTS = 0x803000B7;
+
+	//
+	// MessageId: PLA_S_PROPERTY_IGNORED
+	//
+	// MessageText:
+	//
+	// Property value will be ignored.
+	//
+	public static final int PLA_S_PROPERTY_IGNORED = 0x00300100;
+
+	//
+	// MessageId: PLA_E_PROPERTY_CONFLICT
+	//
+	// MessageText:
+	//
+	// Property value conFLIct.
+	//
+	public static final int PLA_E_PROPERTY_CONFLICT = 0x80300101;
+
+	//
+	// MessageId: PLA_E_DCS_SINGLETON_REQUIRED
+	//
+	// MessageText:
+	//
+	// The current configuration for this Data Collector Set requires that it
+	// contain exactly one Data Collector.
+	//
+	public static final int PLA_E_DCS_SINGLETON_REQUIRED = 0x80300102;
+
+	//
+	// MessageId: PLA_E_CREDENTIALS_REQUIRED
+	//
+	// MessageText:
+	//
+	// A user account is required in order to commit the current Data Collector
+	// Set properties.
+	//
+	public static final int PLA_E_CREDENTIALS_REQUIRED = 0x80300103;
+
+	//
+	// MessageId: PLA_E_DCS_NOT_RUNNING
+	//
+	// MessageText:
+	//
+	// Data Collector Set is not running.
+	//
+	public static final int PLA_E_DCS_NOT_RUNNING = 0x80300104;
+
+	//
+	// MessageId: PLA_E_CONFLICT_INCL_EXCL_API
+	//
+	// MessageText:
+	//
+	// A conFLIct was detected in the list of include/exclude APIs. Do not
+	// specify the same API in both the include list and the exclude list.
+	//
+	public static final int PLA_E_CONFLICT_INCL_EXCL_API = 0x80300105;
+
+	//
+	// MessageId: PLA_E_NETWORK_EXE_NOT_VALID
+	//
+	// MessageText:
+	//
+	// The executable path you have specified refers to a network share or UNC
+	// path.
+	//
+	public static final int PLA_E_NETWORK_EXE_NOT_VALID = 0x80300106;
+
+	//
+	// MessageId: PLA_E_EXE_ALREADY_CONFIGURED
+	//
+	// MessageText:
+	//
+	// The executable path you have specified is already configured for API
+	// tracing.
+	//
+	public static final int PLA_E_EXE_ALREADY_CONFIGURED = 0x80300107;
+
+	//
+	// MessageId: PLA_E_EXE_PATH_NOT_VALID
+	//
+	// MessageText:
+	//
+	// The executable path you have specified does not exist. Verify that the
+	// specified path is correct.
+	//
+	public static final int PLA_E_EXE_PATH_NOT_VALID = 0x80300108;
+
+	//
+	// MessageId: PLA_E_DC_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// Data Collector already exists.
+	//
+	public static final int PLA_E_DC_ALREADY_EXISTS = 0x80300109;
+
+	//
+	// MessageId: PLA_E_DCS_START_WAIT_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The wait for the Data Collector Set start notification has timed out.
+	//
+	public static final int PLA_E_DCS_START_WAIT_TIMEOUT = 0x8030010A;
+
+	//
+	// MessageId: PLA_E_DC_START_WAIT_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The wait for the Data Collector to start has timed out.
+	//
+	public static final int PLA_E_DC_START_WAIT_TIMEOUT = 0x8030010B;
+
+	//
+	// MessageId: PLA_E_REPORT_WAIT_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The wait for the report generation tool to finish has timed out.
+	//
+	public static final int PLA_E_REPORT_WAIT_TIMEOUT = 0x8030010C;
+
+	//
+	// MessageId: PLA_E_NO_DUPLICATES
+	//
+	// MessageText:
+	//
+	// Duplicate items are not allowed.
+	//
+	public static final int PLA_E_NO_DUPLICATES = 0x8030010D;
+
+	//
+	// MessageId: PLA_E_EXE_FULL_PATH_REQUIRED
+	//
+	// MessageText:
+	//
+	// When specifying the executable that you want to trace, you must specify a
+	// full path to the executable and not just a filename.
+	//
+	public static final int PLA_E_EXE_FULL_PATH_REQUIRED = 0x8030010E;
+
+	//
+	// MessageId: PLA_E_INVALID_SESSION_NAME
+	//
+	// MessageText:
+	//
+	// The session name provided is invalid.
+	//
+	public static final int PLA_E_INVALID_SESSION_NAME = 0x8030010F;
+
+	//
+	// MessageId: PLA_E_PLA_CHANNEL_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// The Event Log channel Microsoft-Windows-Diagnosis-PLA/Operational must be
+	// enabled to perform this operation.
+	//
+	public static final int PLA_E_PLA_CHANNEL_NOT_ENABLED = 0x80300110;
+
+	//
+	// MessageId: PLA_E_TASKSCHED_CHANNEL_NOT_ENABLED
+	//
+	// MessageText:
+	//
+	// The Event Log channel Microsoft-Windows-TaskScheduler must be enabled to
+	// perform this operation.
+	//
+	public static final int PLA_E_TASKSCHED_CHANNEL_NOT_ENABLED = 0x80300111;
+
+	//
+	// MessageId: PLA_E_RULES_MANAGER_FAILED
+	//
+	// MessageText:
+	//
+	// The execution of the Rules Manager failed.
+	//
+	public static final int PLA_E_RULES_MANAGER_FAILED = 0x80300112;
+
+	//
+	// MessageId: PLA_E_CABAPI_FAILURE
+	//
+	// MessageText:
+	//
+	// An error occured while attemption to compress or extract the data.
+	//
+	public static final int PLA_E_CABAPI_FAILURE = 0x80300113;
+
+	//
+	// ==
+	// Full Volume Encryption Error Messages
+	// ==
+	//
+	//
+	// MessageId: FVE_E_LOCKED_VOLUME
+	//
+	// MessageText:
+	//
+	// This volume is locked by BitLocker Drive Encryption. Return to the
+	// control panel to unlock volume.
+	//
+	public static final int FVE_E_LOCKED_VOLUME = 0x80310000;
+
+	//
+	// MessageId: FVE_E_NOT_ENCRYPTED
+	//
+	// MessageText:
+	//
+	// The volume is not encrypted, no key is available.
+	//
+	public static final int FVE_E_NOT_ENCRYPTED = 0x80310001;
+
+	//
+	// MessageId: FVE_E_NO_TPM_BIOS
+	//
+	// MessageText:
+	//
+	// The BIOS did not correctly communicate with the TPM. Contact the computer
+	// manufacturer for BIOS upgrade instructions.
+	//
+	public static final int FVE_E_NO_TPM_BIOS = 0x80310002;
+
+	//
+	// MessageId: FVE_E_NO_MBR_METRIC
+	//
+	// MessageText:
+	//
+	// The BIOS did not correctly communicate with the Master Boot Record (MBR).
+	// Contact the computer manufacturer for BIOS upgrade instructions.
+	//
+	public static final int FVE_E_NO_MBR_METRIC = 0x80310003;
+
+	//
+	// MessageId: FVE_E_NO_BOOTSECTOR_METRIC
+	//
+	// MessageText:
+	//
+	// If there is a bootable CD or DVD in your computer, remove it, restart the
+	// computer and turn on BitLocker again. If the problem persists contact the
+	// computer manufacturer for BIOS upgrade instructions.
+	//
+	public static final int FVE_E_NO_BOOTSECTOR_METRIC = 0x80310004;
+
+	//
+	// MessageId: FVE_E_NO_BOOTMGR_METRIC
+	//
+	// MessageText:
+	//
+	// You have an incompatible boot sector. Update the boot manager (BOOTMGR).
+	//
+	public static final int FVE_E_NO_BOOTMGR_METRIC = 0x80310005;
+
+	//
+	// MessageId: FVE_E_WRONG_BOOTMGR
+	//
+	// MessageText:
+	//
+	// You have an incompatible boot manager. Update the boot manager (BOOTMGR).
+	//
+	public static final int FVE_E_WRONG_BOOTMGR = 0x80310006;
+
+	//
+	// MessageId: FVE_E_SECURE_KEY_REQUIRED
+	//
+	// MessageText:
+	//
+	// No secure key protector has been defined.
+	//
+	public static final int FVE_E_SECURE_KEY_REQUIRED = 0x80310007;
+
+	//
+	// MessageId: FVE_E_NOT_ACTIVATED
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption is not enabled on this volume. Turn on
+	// BitLocker.
+	//
+	public static final int FVE_E_NOT_ACTIVATED = 0x80310008;
+
+	//
+	// MessageId: FVE_E_ACTION_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption could not perform requested action. This
+	// condition may occur when two requests are issued at the same time.
+	//
+	public static final int FVE_E_ACTION_NOT_ALLOWED = 0x80310009;
+
+	//
+	// MessageId: FVE_E_AD_SCHEMA_NOT_INSTALLED
+	//
+	// MessageText:
+	//
+	// The Active Directory Domain Services forest does not contain the required
+	// attributes and classes to host BitLocker Drive Encryption or Trusted
+	// Platform Module information.
+	//
+	public static final int FVE_E_AD_SCHEMA_NOT_INSTALLED = 0x8031000A;
+
+	//
+	// MessageId: FVE_E_AD_INVALID_DATATYPE
+	//
+	// MessageText:
+	//
+	// The type of the data obtained from Active Directory was not expected.
+	//
+	public static final int FVE_E_AD_INVALID_DATATYPE = 0x8031000B;
+
+	//
+	// MessageId: FVE_E_AD_INVALID_DATASIZE
+	//
+	// MessageText:
+	//
+	// The size of the data obtained from Active Directory was not expected.
+	//
+	public static final int FVE_E_AD_INVALID_DATASIZE = 0x8031000C;
+
+	//
+	// MessageId: FVE_E_AD_NO_VALUES
+	//
+	// MessageText:
+	//
+	// The attribute read from Active Directory has no (zero) values.
+	//
+	public static final int FVE_E_AD_NO_VALUES = 0x8031000D;
+
+	//
+	// MessageId: FVE_E_AD_ATTR_NOT_SET
+	//
+	// MessageText:
+	//
+	// The attribute was not set.
+	//
+	public static final int FVE_E_AD_ATTR_NOT_SET = 0x8031000E;
+
+	//
+	// MessageId: FVE_E_AD_GUID_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified GUID could not be found.
+	//
+	public static final int FVE_E_AD_GUID_NOT_FOUND = 0x8031000F;
+
+	//
+	// MessageId: FVE_E_BAD_INFORMATION
+	//
+	// MessageText:
+	//
+	// The control block for the encrypted volume is not valid.
+	//
+	public static final int FVE_E_BAD_INFORMATION = 0x80310010;
+
+	//
+	// MessageId: FVE_E_TOO_SMALL
+	//
+	// MessageText:
+	//
+	// The volume cannot be encrypted because it does not have enough free
+	// space.
+	//
+	public static final int FVE_E_TOO_SMALL = 0x80310011;
+
+	//
+	// MessageId: FVE_E_SYSTEM_VOLUME
+	//
+	// MessageText:
+	//
+	// The volume cannot be encrypted because it contains system boot
+	// information.
+	//
+	public static final int FVE_E_SYSTEM_VOLUME = 0x80310012;
+
+	//
+	// MessageId: FVE_E_FAILED_WRONG_FS
+	//
+	// MessageText:
+	//
+	// The volume cannot be encrypted because the file system is not supported.
+	//
+	public static final int FVE_E_FAILED_WRONG_FS = 0x80310013;
+
+	//
+	// MessageId: FVE_E_FAILED_BAD_FS
+	//
+	// MessageText:
+	//
+	// The file system is corrupt. Run CHKDSK.
+	//
+	public static final int FVE_E_FAILED_BAD_FS = 0x80310014;
+
+	//
+	// MessageId: FVE_E_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// This volume cannot be encrypted.
+	//
+	public static final int FVE_E_NOT_SUPPORTED = 0x80310015;
+
+	//
+	// MessageId: FVE_E_BAD_DATA
+	//
+	// MessageText:
+	//
+	// Data supplied is malformed.
+	//
+	public static final int FVE_E_BAD_DATA = 0x80310016;
+
+	//
+	// MessageId: FVE_E_VOLUME_NOT_BOUND
+	//
+	// MessageText:
+	//
+	// Volume is not bound to the system.
+	//
+	public static final int FVE_E_VOLUME_NOT_BOUND = 0x80310017;
+
+	//
+	// MessageId: FVE_E_TPM_NOT_OWNED
+	//
+	// MessageText:
+	//
+	// You must take ownership of the Trusted Platform Module (TPM).
+	//
+	public static final int FVE_E_TPM_NOT_OWNED = 0x80310018;
+
+	//
+	// MessageId: FVE_E_NOT_DATA_VOLUME
+	//
+	// MessageText:
+	//
+	// The volume specified is not a data volume.
+	//
+	public static final int FVE_E_NOT_DATA_VOLUME = 0x80310019;
+
+	//
+	// MessageId: FVE_E_AD_INSUFFICIENT_BUFFER
+	//
+	// MessageText:
+	//
+	// The buffer supplied to a function was insufficient to contain the
+	// returned data.
+	//
+	public static final int FVE_E_AD_INSUFFICIENT_BUFFER = 0x8031001A;
+
+	//
+	// MessageId: FVE_E_CONV_READ
+	//
+	// MessageText:
+	//
+	// A read operation failed while converting the volume.
+	//
+	public static final int FVE_E_CONV_READ = 0x8031001B;
+
+	//
+	// MessageId: FVE_E_CONV_WRITE
+	//
+	// MessageText:
+	//
+	// A write operation failed while converting the volume.
+	//
+	public static final int FVE_E_CONV_WRITE = 0x8031001C;
+
+	//
+	// MessageId: FVE_E_KEY_REQUIRED
+	//
+	// MessageText:
+	//
+	// One or more key protectors are required for this volume.
+	//
+	public static final int FVE_E_KEY_REQUIRED = 0x8031001D;
+
+	//
+	// MessageId: FVE_E_CLUSTERING_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Cluster configurations are not supported.
+	//
+	public static final int FVE_E_CLUSTERING_NOT_SUPPORTED = 0x8031001E;
+
+	//
+	// MessageId: FVE_E_VOLUME_BOUND_ALREADY
+	//
+	// MessageText:
+	//
+	// The volume is already bound to the system.
+	//
+	public static final int FVE_E_VOLUME_BOUND_ALREADY = 0x8031001F;
+
+	//
+	// MessageId: FVE_E_OS_NOT_PROTECTED
+	//
+	// MessageText:
+	//
+	// The operating system volume is not protected by BitLocker Drive
+	// Encryption.
+	//
+	public static final int FVE_E_OS_NOT_PROTECTED = 0x80310020;
+
+	//
+	// MessageId: FVE_E_PROTECTION_DISABLED
+	//
+	// MessageText:
+	//
+	// All protectors are effectively disabled (clear key exists).
+	//
+	public static final int FVE_E_PROTECTION_DISABLED = 0x80310021;
+
+	//
+	// MessageId: FVE_E_RECOVERY_KEY_REQUIRED
+	//
+	// MessageText:
+	//
+	// A recovery key protector is required.
+	//
+	public static final int FVE_E_RECOVERY_KEY_REQUIRED = 0x80310022;
+
+	//
+	// MessageId: FVE_E_FOREIGN_VOLUME
+	//
+	// MessageText:
+	//
+	// This volume cannot be bound to a TPM.
+	//
+	public static final int FVE_E_FOREIGN_VOLUME = 0x80310023;
+
+	//
+	// MessageId: FVE_E_OVERLAPPED_UPDATE
+	//
+	// MessageText:
+	//
+	// The control block for the encrypted volume was updated by another thread.
+	// Try again.
+	//
+	public static final int FVE_E_OVERLAPPED_UPDATE = 0x80310024;
+
+	//
+	// MessageId: FVE_E_TPM_SRK_AUTH_NOT_ZERO
+	//
+	// MessageText:
+	//
+	// The authorization data for the Storage Root Key (SRK) of the Trusted
+	// Platform Module (TPM) is not zero and is therefore incompatible with
+	// BitLocker.
+	//
+	public static final int FVE_E_TPM_SRK_AUTH_NOT_ZERO = 0x80310025;
+
+	//
+	// MessageId: FVE_E_FAILED_SECTOR_SIZE
+	//
+	// MessageText:
+	//
+	// The volume encryption algorithm cannot be used on this sector size.
+	//
+	public static final int FVE_E_FAILED_SECTOR_SIZE = 0x80310026;
+
+	//
+	// MessageId: FVE_E_FAILED_AUTHENTICATION
+	//
+	// MessageText:
+	//
+	// The recovery information provided does not match required recovery
+	// information to unlock the volume. Confirm the information and try again.
+	//
+	public static final int FVE_E_FAILED_AUTHENTICATION = 0x80310027;
+
+	//
+	// MessageId: FVE_E_NOT_OS_VOLUME
+	//
+	// MessageText:
+	//
+	// The volume specified is not the operating system volume.
+	//
+	public static final int FVE_E_NOT_OS_VOLUME = 0x80310028;
+
+	//
+	// MessageId: FVE_E_AUTOUNLOCK_ENABLED
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption cannot be turned off. Please turn off the auto
+	// unlock on all other volumes before turning off BitLocker on the current
+	// volume.
+	//
+	public static final int FVE_E_AUTOUNLOCK_ENABLED = 0x80310029;
+
+	//
+	// MessageId: FVE_E_WRONG_BOOTSECTOR
+	//
+	// MessageText:
+	//
+	// The system partition boot sector does not perform TPM measurements.
+	//
+	public static final int FVE_E_WRONG_BOOTSECTOR = 0x8031002A;
+
+	//
+	// MessageId: FVE_E_WRONG_SYSTEM_FS
+	//
+	// MessageText:
+	//
+	// BitLocker requires the file system to be NTFS. Convert the volume to
+	// NTFS, then enable BitLocker.
+	//
+	public static final int FVE_E_WRONG_SYSTEM_FS = 0x8031002B;
+
+	//
+	// MessageId: FVE_E_POLICY_PASSWORD_REQUIRED
+	//
+	// MessageText:
+	//
+	// Group policy requires a recovery password before encryption may begin.
+	//
+	public static final int FVE_E_POLICY_PASSWORD_REQUIRED = 0x8031002C;
+
+	//
+	// MessageId: FVE_E_CANNOT_SET_FVEK_ENCRYPTED
+	//
+	// MessageText:
+	//
+	// The volume encryption algorithm and key cannot be set on an encrypted
+	// volume.
+	//
+	public static final int FVE_E_CANNOT_SET_FVEK_ENCRYPTED = 0x8031002D;
+
+	//
+	// MessageId: FVE_E_CANNOT_ENCRYPT_NO_KEY
+	//
+	// MessageText:
+	//
+	// A key must be specified before encryption may begin.
+	//
+	public static final int FVE_E_CANNOT_ENCRYPT_NO_KEY = 0x8031002E;
+
+	//
+	// MessageId: FVE_E_BOOTABLE_CDDVD
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption detected bootable media (CD, DVD, or USB) in
+	// the computer. Remove the media and restart the computer.
+	//
+	public static final int FVE_E_BOOTABLE_CDDVD = 0x80310030;
+
+	//
+	// MessageId: FVE_E_PROTECTOR_EXISTS
+	//
+	// MessageText:
+	//
+	// An instance of this key protector already exists on the volume.
+	//
+	public static final int FVE_E_PROTECTOR_EXISTS = 0x80310031;
+
+	//
+	// MessageId: FVE_E_RELATIVE_PATH
+	//
+	// MessageText:
+	//
+	// The file cannot be saved to a relative path.
+	//
+	public static final int FVE_E_RELATIVE_PATH = 0x80310032;
+
+	//
+	// MessageId: FVE_E_PROTECTOR_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The specified key protector was not found on the volume. Try another key
+	// protector.
+	//
+	public static final int FVE_E_PROTECTOR_NOT_FOUND = 0x80310033;
+
+	//
+	// MessageId: FVE_E_INVALID_KEY_FORMAT
+	//
+	// MessageText:
+	//
+	// The recovery password file on the USB device is corrupt. Try another USB
+	// device.
+	//
+	public static final int FVE_E_INVALID_KEY_FORMAT = 0x80310034;
+
+	//
+	// MessageId: FVE_E_INVALID_PASSWORD_FORMAT
+	//
+	// MessageText:
+	//
+	// The format of the recovery password file is invalid. Select another
+	// recovery password and try again.
+	//
+	public static final int FVE_E_INVALID_PASSWORD_FORMAT = 0x80310035;
+
+	//
+	// MessageId: FVE_E_FIPS_RNG_CHECK_FAILED
+	//
+	// MessageText:
+	//
+	// The random number generator check test failed.
+	//
+	public static final int FVE_E_FIPS_RNG_CHECK_FAILED = 0x80310036;
+
+	//
+	// MessageId: FVE_E_FIPS_PREVENTS_RECOVERY_PASSWORD
+	//
+	// MessageText:
+	//
+	// The group policy setting requiring FIPS compliance prevented the recovery
+	// password from being generated or used. Please contact your domain
+	// administrator for more information.
+	//
+	public static final int FVE_E_FIPS_PREVENTS_RECOVERY_PASSWORD = 0x80310037;
+
+	//
+	// MessageId: FVE_E_FIPS_PREVENTS_EXTERNAL_KEY_EXPORT
+	//
+	// MessageText:
+	//
+	// The group policy setting requiring FIPS compliance prevented the recovery
+	// password from being saved. Please contact your domain administrator for
+	// more information.
+	//
+	public static final int FVE_E_FIPS_PREVENTS_EXTERNAL_KEY_EXPORT = 0x80310038;
+
+	//
+	// MessageId: FVE_E_NOT_DECRYPTED
+	//
+	// MessageText:
+	//
+	// The volume must be fully decrypted to complete this operation.
+	//
+	public static final int FVE_E_NOT_DECRYPTED = 0x80310039;
+
+	//
+	// MessageId: FVE_E_INVALID_PROTECTOR_TYPE
+	//
+	// MessageText:
+	//
+	// The specified key protector is not of the correct type.
+	//
+	public static final int FVE_E_INVALID_PROTECTOR_TYPE = 0x8031003A;
+
+	//
+	// MessageId: FVE_E_NO_PROTECTORS_TO_TEST
+	//
+	// MessageText:
+	//
+	// No TPM protectors exist on the volume to perform the hardware test.
+	//
+	public static final int FVE_E_NO_PROTECTORS_TO_TEST = 0x8031003B;
+
+	//
+	// MessageId: FVE_E_KEYFILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The BitLocker startup key or recovery password could not be read from the
+	// USB device. Ensure the USB device is plugged into the computer, then turn
+	// on BitLocker and try again. If the problem persists contact the computer
+	// manufacturer for BIOS upgrade instructions.
+	//
+	public static final int FVE_E_KEYFILE_NOT_FOUND = 0x8031003C;
+
+	//
+	// MessageId: FVE_E_KEYFILE_INVALID
+	//
+	// MessageText:
+	//
+	// The BitLocker startup key or recovery password file is corrupt or
+	// invalid.
+	//
+	public static final int FVE_E_KEYFILE_INVALID = 0x8031003D;
+
+	//
+	// MessageId: FVE_E_KEYFILE_NO_VMK
+	//
+	// MessageText:
+	//
+	// The BitLocker encryption key could not be obtained from the startup key
+	// or recovery password.
+	//
+	public static final int FVE_E_KEYFILE_NO_VMK = 0x8031003E;
+
+	//
+	// MessageId: FVE_E_TPM_DISABLED
+	//
+	// MessageText:
+	//
+	// The Trusted Platform Module (TPM) is disabled.
+	//
+	public static final int FVE_E_TPM_DISABLED = 0x8031003F;
+
+	//
+	// MessageId: FVE_E_NOT_ALLOWED_IN_SAFE_MODE
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption can only be used for recovery purposes in
+	// Safe-Mode.
+	//
+	public static final int FVE_E_NOT_ALLOWED_IN_SAFE_MODE = 0x80310040;
+
+	//
+	// MessageId: FVE_E_TPM_INVALID_PCR
+	//
+	// MessageText:
+	//
+	// The Trusted Platform Module (TPM) was not able to unlock the volume
+	// because the system boot information changed.
+	//
+	public static final int FVE_E_TPM_INVALID_PCR = 0x80310041;
+
+	//
+	// MessageId: FVE_E_TPM_NO_VMK
+	//
+	// MessageText:
+	//
+	// The BitLocker encryption key could not be obtained from the Trusted
+	// Platform Module (TPM).
+	//
+	public static final int FVE_E_TPM_NO_VMK = 0x80310042;
+
+	//
+	// MessageId: FVE_E_PIN_INVALID
+	//
+	// MessageText:
+	//
+	// The BitLocker encryption key could not be obtained from the Trusted
+	// Platform Module (TPM) and PIN.
+	//
+	public static final int FVE_E_PIN_INVALID = 0x80310043;
+
+	//
+	// MessageId: FVE_E_AUTH_INVALID_APPLICATION
+	//
+	// MessageText:
+	//
+	// A boot application has changed since BitLocker was enabled.
+	//
+	public static final int FVE_E_AUTH_INVALID_APPLICATION = 0x80310044;
+
+	//
+	// MessageId: FVE_E_AUTH_INVALID_CONFIG
+	//
+	// MessageText:
+	//
+	// The Boot Configuration Data (BCD) settings have changed since BitLocker
+	// was enabled.
+	//
+	public static final int FVE_E_AUTH_INVALID_CONFIG = 0x80310045;
+
+	//
+	// MessageId: FVE_E_FIPS_DISABLE_PROTECTION_NOT_ALLOWED
+	//
+	// MessageText:
+	//
+	// The group policy setting requiring FIPS compliance prevented BitLocker
+	// from being disabled. Please contact your domain administrator for more
+	// information.
+	//
+	public static final int FVE_E_FIPS_DISABLE_PROTECTION_NOT_ALLOWED = 0x80310046;
+
+	//
+	// MessageId: FVE_E_FS_NOT_EXTENDED
+	//
+	// MessageText:
+	//
+	// The file system does not extend to the end of the volume.
+	//
+	public static final int FVE_E_FS_NOT_EXTENDED = 0x80310047;
+
+	//
+	// MessageId: FVE_E_FIRMWARE_TYPE_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption cannot be enabled on this computer. Contact
+	// the computer manufacturer for BIOS upgrade instructions.
+	//
+	public static final int FVE_E_FIRMWARE_TYPE_NOT_SUPPORTED = 0x80310048;
+
+	//
+	// MessageId: FVE_E_NO_LICENSE
+	//
+	// MessageText:
+	//
+	// This Windows license does not support BitLocker Drive Encryption. To use
+	// BitLocker Drive Encryption, please upgrade your Windows license.
+	//
+	public static final int FVE_E_NO_LICENSE = 0x80310049;
+
+	//
+	// MessageId: FVE_E_NOT_ON_STACK
+	//
+	// MessageText:
+	//
+	// Critical BitLocker Drive Encryption system files are not available. Use
+	// Windows Startup Repair to restore files.
+	//
+	public static final int FVE_E_NOT_ON_STACK = 0x8031004A;
+
+	//
+	// MessageId: FVE_E_FS_MOUNTED
+	//
+	// MessageText:
+	//
+	// This operation cannot be performed while the volume is in use.
+	//
+	public static final int FVE_E_FS_MOUNTED = 0x8031004B;
+
+	//
+	// MessageId: FVE_E_TOKEN_NOT_IMPERSONATED
+	//
+	// MessageText:
+	//
+	// The access token associated with the current thread is not an
+	// impersonated token.
+	//
+	public static final int FVE_E_TOKEN_NOT_IMPERSONATED = 0x8031004C;
+
+	//
+	// MessageId: FVE_E_DRY_RUN_FAILED
+	//
+	// MessageText:
+	//
+	// The BitLocker encryption key could not be obtained.
+	//
+	public static final int FVE_E_DRY_RUN_FAILED = 0x8031004D;
+
+	//
+	// MessageId: FVE_E_REBOOT_REQUIRED
+	//
+	// MessageText:
+	//
+	// No action was taken as a system reboot is required.
+	//
+	public static final int FVE_E_REBOOT_REQUIRED = 0x8031004E;
+
+	//
+	// MessageId: FVE_E_DEBUGGER_ENABLED
+	//
+	// MessageText:
+	//
+	// Boot debugging is enabled. Run bcdedit to turn it off.
+	//
+	public static final int FVE_E_DEBUGGER_ENABLED = 0x8031004F;
+
+	//
+	// MessageId: FVE_E_RAW_ACCESS
+	//
+	// MessageText:
+	//
+	// No action was taken as BitLocker Drive Encryption is in raw access mode.
+	//
+	public static final int FVE_E_RAW_ACCESS = 0x80310050;
+
+	//
+	// MessageId: FVE_E_RAW_BLOCKED
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption cannot enter raw access mode for this volume.
+	//
+	public static final int FVE_E_RAW_BLOCKED = 0x80310051;
+
+	//
+	// MessageId: FVE_E_BCD_APPLICATIONS_PATH_INCORRECT
+	//
+	// MessageText:
+	//
+	// The path specified in the Boot Configuration Data (BCD) for a BitLocker
+	// Drive Encryption integrity-protected application is incorrect. Please
+	// verify and correct your BCD settings and try again.
+	//
+	public static final int FVE_E_BCD_APPLICATIONS_PATH_INCORRECT = 0x80310052;
+
+	//
+	// MessageId: FVE_E_NOT_ALLOWED_IN_VERSION
+	//
+	// MessageText:
+	//
+	// BitLocker Drive Encryption can only be used for recovery purposes in this
+	// version of Windows.
+	//
+	public static final int FVE_E_NOT_ALLOWED_IN_VERSION = 0x80310053;
+
+	//
+	// ==
+	// Windows Filtering Platform Error Messages
+	// ==
+	//
+	//
+	// MessageId: FWP_E_CALLOUT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The callout does not exist.
+	//
+	public static final int FWP_E_CALLOUT_NOT_FOUND = 0x80320001;
+
+	//
+	// MessageId: FWP_E_CONDITION_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The filter condition does not exist.
+	//
+	public static final int FWP_E_CONDITION_NOT_FOUND = 0x80320002;
+
+	//
+	// MessageId: FWP_E_FILTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The filter does not exist.
+	//
+	public static final int FWP_E_FILTER_NOT_FOUND = 0x80320003;
+
+	//
+	// MessageId: FWP_E_LAYER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The layer does not exist.
+	//
+	public static final int FWP_E_LAYER_NOT_FOUND = 0x80320004;
+
+	//
+	// MessageId: FWP_E_PROVIDER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The provider does not exist.
+	//
+	public static final int FWP_E_PROVIDER_NOT_FOUND = 0x80320005;
+
+	//
+	// MessageId: FWP_E_PROVIDER_CONTEXT_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The provider context does not exist.
+	//
+	public static final int FWP_E_PROVIDER_CONTEXT_NOT_FOUND = 0x80320006;
+
+	//
+	// MessageId: FWP_E_SUBLAYER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The sublayer does not exist.
+	//
+	public static final int FWP_E_SUBLAYER_NOT_FOUND = 0x80320007;
+
+	//
+	// MessageId: FWP_E_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// The object does not exist.
+	//
+	public static final int FWP_E_NOT_FOUND = 0x80320008;
+
+	//
+	// MessageId: FWP_E_ALREADY_EXISTS
+	//
+	// MessageText:
+	//
+	// An object with that GUID or LUID already exists.
+	//
+	public static final int FWP_E_ALREADY_EXISTS = 0x80320009;
+
+	//
+	// MessageId: FWP_E_IN_USE
+	//
+	// MessageText:
+	//
+	// The object is referenced by other objects so cannot be deleted.
+	//
+	public static final int FWP_E_IN_USE = 0x8032000A;
+
+	//
+	// MessageId: FWP_E_DYNAMIC_SESSION_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The call is not allowed from within a dynamic session.
+	//
+	public static final int FWP_E_DYNAMIC_SESSION_IN_PROGRESS = 0x8032000B;
+
+	//
+	// MessageId: FWP_E_WRONG_SESSION
+	//
+	// MessageText:
+	//
+	// The call was made from the wrong session so cannot be completed.
+	//
+	public static final int FWP_E_WRONG_SESSION = 0x8032000C;
+
+	//
+	// MessageId: FWP_E_NO_TXN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The call must be made from within an explicit transaction.
+	//
+	public static final int FWP_E_NO_TXN_IN_PROGRESS = 0x8032000D;
+
+	//
+	// MessageId: FWP_E_TXN_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// The call is not allowed from within an explicit transaction.
+	//
+	public static final int FWP_E_TXN_IN_PROGRESS = 0x8032000E;
+
+	//
+	// MessageId: FWP_E_TXN_ABORTED
+	//
+	// MessageText:
+	//
+	// The explicit transaction has been forcibly cancelled.
+	//
+	public static final int FWP_E_TXN_ABORTED = 0x8032000F;
+
+	//
+	// MessageId: FWP_E_SESSION_ABORTED
+	//
+	// MessageText:
+	//
+	// The session has been cancelled.
+	//
+	public static final int FWP_E_SESSION_ABORTED = 0x80320010;
+
+	//
+	// MessageId: FWP_E_INCOMPATIBLE_TXN
+	//
+	// MessageText:
+	//
+	// The call is not allowed from within a read-only transaction.
+	//
+	public static final int FWP_E_INCOMPATIBLE_TXN = 0x80320011;
+
+	//
+	// MessageId: FWP_E_TIMEOUT
+	//
+	// MessageText:
+	//
+	// The call timed out while waiting to acquire the transaction lock.
+	//
+	public static final int FWP_E_TIMEOUT = 0x80320012;
+
+	//
+	// MessageId: FWP_E_NET_EVENTS_DISABLED
+	//
+	// MessageText:
+	//
+	// Collection of network diagnostic events is disabled.
+	//
+	public static final int FWP_E_NET_EVENTS_DISABLED = 0x80320013;
+
+	//
+	// MessageId: FWP_E_INCOMPATIBLE_LAYER
+	//
+	// MessageText:
+	//
+	// The operation is not supported by the specified layer.
+	//
+	public static final int FWP_E_INCOMPATIBLE_LAYER = 0x80320014;
+
+	//
+	// MessageId: FWP_E_KM_CLIENTS_ONLY
+	//
+	// MessageText:
+	//
+	// The call is allowed for kernel-mode callers only.
+	//
+	public static final int FWP_E_KM_CLIENTS_ONLY = 0x80320015;
+
+	//
+	// MessageId: FWP_E_LIFETIME_MISMATCH
+	//
+	// MessageText:
+	//
+	// The call tried to associate two objects with incompatible lifetimes.
+	//
+	public static final int FWP_E_LIFETIME_MISMATCH = 0x80320016;
+
+	//
+	// MessageId: FWP_E_BUILTIN_OBJECT
+	//
+	// MessageText:
+	//
+	// The object is built in so cannot be deleted.
+	//
+	public static final int FWP_E_BUILTIN_OBJECT = 0x80320017;
+
+	//
+	// MessageId: FWP_E_TOO_MANY_CALLOUTS
+	//
+	// MessageText:
+	//
+	// The maximum number of callouts has been reached.
+	//
+	public static final int FWP_E_TOO_MANY_CALLOUTS = 0x80320018;
+
+	//
+	// MessageId: FWP_E_NOTIFICATION_DROPPED
+	//
+	// MessageText:
+	//
+	// A notification could not be delivered because a message queue is at its
+	// maximum capacity.
+	//
+	public static final int FWP_E_NOTIFICATION_DROPPED = 0x80320019;
+
+	//
+	// MessageId: FWP_E_TRAFFIC_MISMATCH
+	//
+	// MessageText:
+	//
+	// The traffic parameters do not match those for the security association
+	// context.
+	//
+	public static final int FWP_E_TRAFFIC_MISMATCH = 0x8032001A;
+
+	//
+	// MessageId: FWP_E_INCOMPATIBLE_SA_STATE
+	//
+	// MessageText:
+	//
+	// The call is not allowed for the current security association state.
+	//
+	public static final int FWP_E_INCOMPATIBLE_SA_STATE = 0x8032001B;
+
+	//
+	// MessageId: FWP_E_NULL_POINTER
+	//
+	// MessageText:
+	//
+	// A required pointer is null.
+	//
+	public static final int FWP_E_NULL_POINTER = 0x8032001C;
+
+	//
+	// MessageId: FWP_E_INVALID_ENUMERATOR
+	//
+	// MessageText:
+	//
+	// An enumerator is not valid.
+	//
+	public static final int FWP_E_INVALID_ENUMERATOR = 0x8032001D;
+
+	//
+	// MessageId: FWP_E_INVALID_F;AGS
+	//
+	// MessageText:
+	//
+	// The F;ags field contains an invalid value.
+	//
+	public static final int FWP_E_INVALID_FLAGS = 0x8032001E;
+
+	//
+	// MessageId: FWP_E_INVALID_NET_MASK
+	//
+	// MessageText:
+	//
+	// A network mask is not valid.
+	//
+	public static final int FWP_E_INVALID_NET_MASK = 0x8032001F;
+
+	//
+	// MessageId: FWP_E_INVALID_RANGE
+	//
+	// MessageText:
+	//
+	// An FWP_RANGE is not valid.
+	//
+	public static final int FWP_E_INVALID_RANGE = 0x80320020;
+
+	//
+	// MessageId: FWP_E_INVALID_INTERVAL
+	//
+	// MessageText:
+	//
+	// The time interval is not valid.
+	//
+	public static final int FWP_E_INVALID_INTERVAL = 0x80320021;
+
+	//
+	// MessageId: FWP_E_ZERO_LENGTH_ARRAY
+	//
+	// MessageText:
+	//
+	// An array that must contain at least one element is zero length.
+	//
+	public static final int FWP_E_ZERO_LENGTH_ARRAY = 0x80320022;
+
+	//
+	// MessageId: FWP_E_NULL_DISPLAY_NAME
+	//
+	// MessageText:
+	//
+	// The displayData.name field cannot be null.
+	//
+	public static final int FWP_E_NULL_DISPLAY_NAME = 0x80320023;
+
+	//
+	// MessageId: FWP_E_INVALID_ACTION_TYPE
+	//
+	// MessageText:
+	//
+	// The action type is not one of the allowed action types for a filter.
+	//
+	public static final int FWP_E_INVALID_ACTION_TYPE = 0x80320024;
+
+	//
+	// MessageId: FWP_E_INVALID_WEIGHT
+	//
+	// MessageText:
+	//
+	// The filter weight is not valid.
+	//
+	public static final int FWP_E_INVALID_WEIGHT = 0x80320025;
+
+	//
+	// MessageId: FWP_E_MATCH_TYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// A filter condition contains a match type that is not compatible with the
+	// operands.
+	//
+	public static final int FWP_E_MATCH_TYPE_MISMATCH = 0x80320026;
+
+	//
+	// MessageId: FWP_E_TYPE_MISMATCH
+	//
+	// MessageText:
+	//
+	// An FWP_VALUE or FWPM_CONDITION_VALUE is of the wrong type.
+	//
+	public static final int FWP_E_TYPE_MISMATCH = 0x80320027;
+
+	//
+	// MessageId: FWP_E_OUT_OF_BOUNDS
+	//
+	// MessageText:
+	//
+	// An integer value is outside the allowed range.
+	//
+	public static final int FWP_E_OUT_OF_BOUNDS = 0x80320028;
+
+	//
+	// MessageId: FWP_E_RESERVED
+	//
+	// MessageText:
+	//
+	// A reserved field is non-zero.
+	//
+	public static final int FWP_E_RESERVED = 0x80320029;
+
+	//
+	// MessageId: FWP_E_DUPLICATE_CONDITION
+	//
+	// MessageText:
+	//
+	// A filter cannot contain multiple conditions operating on a single field.
+	//
+	public static final int FWP_E_DUPLICATE_CONDITION = 0x8032002A;
+
+	//
+	// MessageId: FWP_E_DUPLICATE_KEYMOD
+	//
+	// MessageText:
+	//
+	// A policy cannot contain the same keying module more than once.
+	//
+	public static final int FWP_E_DUPLICATE_KEYMOD = 0x8032002B;
+
+	//
+	// MessageId: FWP_E_ACTION_INCOMPATIBLE_WITH_LAYER
+	//
+	// MessageText:
+	//
+	// The action type is not compatible with the layer.
+	//
+	public static final int FWP_E_ACTION_INCOMPATIBLE_WITH_LAYER = 0x8032002C;
+
+	//
+	// MessageId: FWP_E_ACTION_INCOMPATIBLE_WITH_SUBLAYER
+	//
+	// MessageText:
+	//
+	// The action type is not compatible with the sublayer.
+	//
+	public static final int FWP_E_ACTION_INCOMPATIBLE_WITH_SUBLAYER = 0x8032002D;
+
+	//
+	// MessageId: FWP_E_CONTEXT_INCOMPATIBLE_WITH_LAYER
+	//
+	// MessageText:
+	//
+	// The raw context or the provider context is not compatible with the layer.
+	//
+	public static final int FWP_E_CONTEXT_INCOMPATIBLE_WITH_LAYER = 0x8032002E;
+
+	//
+	// MessageId: FWP_E_CONTEXT_INCOMPATIBLE_WITH_CALLOUT
+	//
+	// MessageText:
+	//
+	// The raw context or the provider context is not compatible with the
+	// callout.
+	//
+	public static final int FWP_E_CONTEXT_INCOMPATIBLE_WITH_CALLOUT = 0x8032002F;
+
+	//
+	// MessageId: FWP_E_INCOMPATIBLE_AUTH_METHOD
+	//
+	// MessageText:
+	//
+	// The authentication method is not compatible with the policy type.
+	//
+	public static final int FWP_E_INCOMPATIBLE_AUTH_METHOD = 0x80320030;
+
+	//
+	// MessageId: FWP_E_INCOMPATIBLE_DH_GROUP
+	//
+	// MessageText:
+	//
+	// The Diffie-Hellman group is not compatible with the policy type.
+	//
+	public static final int FWP_E_INCOMPATIBLE_DH_GROUP = 0x80320031;
+
+	//
+	// MessageId: FWP_E_EM_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// An IKE policy cannot contain an Extended Mode policy.
+	//
+	public static final int FWP_E_EM_NOT_SUPPORTED = 0x80320032;
+
+	//
+	// MessageId: FWP_E_NEVER_MATCH
+	//
+	// MessageText:
+	//
+	// The enumeration template or subscription will never match any objects.
+	//
+	public static final int FWP_E_NEVER_MATCH = 0x80320033;
+
+	//
+	// MessageId: FWP_E_PROVIDER_CONTEXT_MISMATCH
+	//
+	// MessageText:
+	//
+	// The provider context is of the wrong type.
+	//
+	public static final int FWP_E_PROVIDER_CONTEXT_MISMATCH = 0x80320034;
+
+	//
+	// MessageId: FWP_E_INVALID_PARAMETER
+	//
+	// MessageText:
+	//
+	// The parameter is incorrect.
+	//
+	public static final int FWP_E_INVALID_PARAMETER = 0x80320035;
+
+	//
+	// MessageId: FWP_E_TOO_MANY_SUBLAYERS
+	//
+	// MessageText:
+	//
+	// The maximum number of sublayers has been reached.
+	//
+	public static final int FWP_E_TOO_MANY_SUBLAYERS = 0x80320036;
+
+	//
+	// MessageId: FWP_E_CALLOUT_NOTIFICATION_FAILED
+	//
+	// MessageText:
+	//
+	// The notification function for a callout returned an error.
+	//
+	public static final int FWP_E_CALLOUT_NOTIFICATION_FAILED = 0x80320037;
+
+	//
+	// MessageId: FWP_E_INVALID_AUTH_TRANSFORM
+	//
+	// MessageText:
+	//
+	// The IPsec authentication transform is not valid.
+	//
+	public static final int FWP_E_INVALID_AUTH_TRANSFORM = 0x80320038;
+
+	//
+	// MessageId: FWP_E_INVALID_CIPHER_TRANSFORM
+	//
+	// MessageText:
+	//
+	// The IPsec cipher transform is not valid.
+	//
+	public static final int FWP_E_INVALID_CIPHER_TRANSFORM = 0x80320039;
+
+	//
+	// NDIS error codes (ndis.sys)
+	//
+
+	//
+	// MessageId: ERROR_NDIS_INTERFACE_CLOSING
+	//
+	// MessageText:
+	//
+	// The binding to the network interface is being closed.
+	//
+	public static final int ERROR_NDIS_INTERFACE_CLOSING = 0x80340002;
+
+	//
+	// MessageId: ERROR_NDIS_BAD_VERSION
+	//
+	// MessageText:
+	//
+	// An invalid version was specified.
+	//
+	public static final int ERROR_NDIS_BAD_VERSION = 0x80340004;
+
+	//
+	// MessageId: ERROR_NDIS_BAD_CHARACTERISTICS
+	//
+	// MessageText:
+	//
+	// An invalid characteristics table was used.
+	//
+	public static final int ERROR_NDIS_BAD_CHARACTERISTICS = 0x80340005;
+
+	//
+	// MessageId: ERROR_NDIS_ADAPTER_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Failed to find the network interface or network interface is not ready.
+	//
+	public static final int ERROR_NDIS_ADAPTER_NOT_FOUND = 0x80340006;
+
+	//
+	// MessageId: ERROR_NDIS_OPEN_FAILED
+	//
+	// MessageText:
+	//
+	// Failed to open the network interface.
+	//
+	public static final int ERROR_NDIS_OPEN_FAILED = 0x80340007;
+
+	//
+	// MessageId: ERROR_NDIS_DEVICE_FAILED
+	//
+	// MessageText:
+	//
+	// Network interface has encountered an internal unrecoverable failure.
+	//
+	public static final int ERROR_NDIS_DEVICE_FAILED = 0x80340008;
+
+	//
+	// MessageId: ERROR_NDIS_MULTICAST_FULL
+	//
+	// MessageText:
+	//
+	// The multicast list on the network interface is full.
+	//
+	public static final int ERROR_NDIS_MULTICAST_FULL = 0x80340009;
+
+	//
+	// MessageId: ERROR_NDIS_MULTICAST_EXISTS
+	//
+	// MessageText:
+	//
+	// An attempt was made to add a duplicate multicast address to the list.
+	//
+	public static final int ERROR_NDIS_MULTICAST_EXISTS = 0x8034000A;
+
+	//
+	// MessageId: ERROR_NDIS_MULTICAST_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// At attempt was made to remove a multicast address that was never added.
+	//
+	public static final int ERROR_NDIS_MULTICAST_NOT_FOUND = 0x8034000B;
+
+	//
+	// MessageId: ERROR_NDIS_REQUEST_ABORTED
+	//
+	// MessageText:
+	//
+	// Netowork interface aborted the request.
+	//
+	public static final int ERROR_NDIS_REQUEST_ABORTED = 0x8034000C;
+
+	//
+	// MessageId: ERROR_NDIS_RESET_IN_PROGRESS
+	//
+	// MessageText:
+	//
+	// Network interface can not process the request because it is being reset.
+	//
+	public static final int ERROR_NDIS_RESET_IN_PROGRESS = 0x8034000D;
+
+	//
+	// MessageId: ERROR_NDIS_NOT_SUPPORTED
+	//
+	// MessageText:
+	//
+	// Netword interface does not support this request.
+	//
+	public static final int ERROR_NDIS_NOT_SUPPORTED = 0x803400BB;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_PACKET
+	//
+	// MessageText:
+	//
+	// An attempt was made to send an invalid packet on a network interface.
+	//
+	public static final int ERROR_NDIS_INVALID_PACKET = 0x8034000F;
+
+	//
+	// MessageId: ERROR_NDIS_ADAPTER_NOT_READY
+	//
+	// MessageText:
+	//
+	// Network interface is not ready to complete this operation.
+	//
+	public static final int ERROR_NDIS_ADAPTER_NOT_READY = 0x80340011;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_LENGTH
+	//
+	// MessageText:
+	//
+	// The length of the buffer submitted for this operation is not valid.
+	//
+	public static final int ERROR_NDIS_INVALID_LENGTH = 0x80340014;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_DATA
+	//
+	// MessageText:
+	//
+	// The data used for this operation is not valid.
+	//
+	public static final int ERROR_NDIS_INVALID_DATA = 0x80340015;
+
+	//
+	// MessageId: ERROR_NDIS_BUFFER_TOO_SHORT
+	//
+	// MessageText:
+	//
+	// The length of buffer submitted for this operation is too small.
+	//
+	public static final int ERROR_NDIS_BUFFER_TOO_SHORT = 0x80340016;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_OID
+	//
+	// MessageText:
+	//
+	// Network interface does not support this OID (Object Identifier)
+	//
+	public static final int ERROR_NDIS_INVALID_OID = 0x80340017;
+
+	//
+	// MessageId: ERROR_NDIS_ADAPTER_REMOVED
+	//
+	// MessageText:
+	//
+	// The network interface has been removed.
+	//
+	public static final int ERROR_NDIS_ADAPTER_REMOVED = 0x80340018;
+
+	//
+	// MessageId: ERROR_NDIS_UNSUPPORTED_MEDIA
+	//
+	// MessageText:
+	//
+	// Network interface does not support this media type.
+	//
+	public static final int ERROR_NDIS_UNSUPPORTED_MEDIA = 0x80340019;
+
+	//
+	// MessageId: ERROR_NDIS_GROUP_ADDRESS_IN_USE
+	//
+	// MessageText:
+	//
+	// An attempt was made to remove a token ring group address that is in use
+	// by other components.
+	//
+	public static final int ERROR_NDIS_GROUP_ADDRESS_IN_USE = 0x8034001A;
+
+	//
+	// MessageId: ERROR_NDIS_FILE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// An attempt was made to map a file that can not be found.
+	//
+	public static final int ERROR_NDIS_FILE_NOT_FOUND = 0x8034001B;
+
+	//
+	// MessageId: ERROR_NDIS_ERROR_READING_FILE
+	//
+	// MessageText:
+	//
+	// An error occured while NDIS tried to map the file.
+	//
+	public static final int ERROR_NDIS_ERROR_READING_FILE = 0x8034001C;
+
+	//
+	// MessageId: ERROR_NDIS_ALREADY_MAPPED
+	//
+	// MessageText:
+	//
+	// An attempt was made to map a file that is alreay mapped.
+	//
+	public static final int ERROR_NDIS_ALREADY_MAPPED = 0x8034001D;
+
+	//
+	// MessageId: ERROR_NDIS_RESOURCE_CONFLICT
+	//
+	// MessageText:
+	//
+	// An attempt to allocate a hardware resource failed because the resource is
+	// used by another component.
+	//
+	public static final int ERROR_NDIS_RESOURCE_CONFLICT = 0x8034001E;
+
+	//
+	// MessageId: ERROR_NDIS_MEDIA_DISCONNECTED
+	//
+	// MessageText:
+	//
+	// The I/O operation failed because network media is disconnected or
+	// wireless access point is out of range.
+	//
+	public static final int ERROR_NDIS_MEDIA_DISCONNECTED = 0x8034001F;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_ADDRESS
+	//
+	// MessageText:
+	//
+	// The network address used in the request is invalid.
+	//
+	public static final int ERROR_NDIS_INVALID_ADDRESS = 0x80340022;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_DEVICE_REQUEST
+	//
+	// MessageText:
+	//
+	// The specified request is not a valid operation for the target device.
+	//
+	public static final int ERROR_NDIS_INVALID_DEVICE_REQUEST = 0x80340010;
+
+	//
+	// MessageId: ERROR_NDIS_PAUSED
+	//
+	// MessageText:
+	//
+	// The ofF;oad operation on the network interface has been paused.
+	//
+	public static final int ERROR_NDIS_PAUSED = 0x8034002A;
+
+	//
+	// MessageId: ERROR_NDIS_INTERFACE_NOT_FOUND
+	//
+	// MessageText:
+	//
+	// Network interface was not found.
+	//
+	public static final int ERROR_NDIS_INTERFACE_NOT_FOUND = 0x8034002B;
+
+	//
+	// MessageId: ERROR_NDIS_UNSUPPORTED_REVISION
+	//
+	// MessageText:
+	//
+	// The revision number specified in the structure is not supported.
+	//
+	public static final int ERROR_NDIS_UNSUPPORTED_REVISION = 0x8034002C;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_PORT
+	//
+	// MessageText:
+	//
+	// The specified port does not exist on this network interface.
+	//
+	public static final int ERROR_NDIS_INVALID_PORT = 0x8034002D;
+
+	//
+	// MessageId: ERROR_NDIS_INVALID_PORT_STATE
+	//
+	// MessageText:
+	//
+	// The current state of the specified port on this network interface does
+	// not support the requested operation.
+	//
+	public static final int ERROR_NDIS_INVALID_PORT_STATE = 0x8034002E;
+
+	//
+	// MessageId: ERROR_NDIS_LOW_POWER_STATE
+	//
+	// MessageText:
+	//
+	// The miniport adapter is in low power state.
+	//
+	public static final int ERROR_NDIS_LOW_POWER_STATE = 0x8034002F;
+
+	//
+	// NDIS error codes (802.11 wireless LAN)
+	//
+
+	//
+	// MessageId: ERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED
+	//
+	// MessageText:
+	//
+	// The wireless local area network interface is in auto configuration mode
+	// and doesn't support the requested parameter change operation.
+	//
+	public static final int ERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED = 0x80342000;
+
+	//
+	// MessageId: ERROR_NDIS_DOT11_MEDIA_IN_USE
+	//
+	// MessageText:
+	//
+	// The wireless local area network interface is busy and can not perform the
+	// requested operation.
+	//
+	public static final int ERROR_NDIS_DOT11_MEDIA_IN_USE = 0x80342001;
+
+	//
+	// MessageId: ERROR_NDIS_DOT11_POWER_STATE_INVALID
+	//
+	// MessageText:
+	//
+	// The wireless local area network interface is power down and doesn't
+	// support the requested operation.
+	//
+	public static final int ERROR_NDIS_DOT11_POWER_STATE_INVALID = 0x80342002;
+
+	//
+	// NDIS informational code (ndis.sys)
+	//
+
+	//
+	// MessageId: ERROR_NDIS_INDICATION_REQUIRED
+	//
+	// MessageText:
+	//
+	// The request will be completed later by NDIS status indication.
+	//
+	public static final int ERROR_NDIS_INDICATION_REQUIRED = 0x00340001;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/W32FileMonitor.java b/contrib/platform/src/com/sun/jna/platform/win32/W32FileMonitor.java
new file mode 100644
index 0000000..094ea7e
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/W32FileMonitor.java
@@ -0,0 +1,258 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.sun.jna.platform.FileMonitor;
+import com.sun.jna.platform.win32.WinBase.OVERLAPPED;
+import com.sun.jna.platform.win32.WinNT.FILE_NOTIFY_INFORMATION;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+public class W32FileMonitor extends FileMonitor {
+    
+    private static final int BUFFER_SIZE = 4096;
+    
+    private class FileInfo {
+        public final File file;
+        public final HANDLE handle;
+        public final int notifyMask;
+        public final boolean recursive;
+        public final FILE_NOTIFY_INFORMATION info = new FILE_NOTIFY_INFORMATION(BUFFER_SIZE);
+        public final IntByReference infoLength = new IntByReference();
+        public final OVERLAPPED overlapped = new OVERLAPPED();
+        public FileInfo(File f, HANDLE h, int mask, boolean recurse) {
+            this.file = f;
+            this.handle = h;
+            this.notifyMask = mask;
+            this.recursive = recurse;
+        }
+    }
+    private Thread watcher;
+    private HANDLE port;
+    private final Map<File, FileInfo> fileMap = new HashMap<File, FileInfo>();
+    private final Map<HANDLE, FileInfo> handleMap = new HashMap<HANDLE, FileInfo>();
+    private boolean disposing = false;
+    
+    private void handleChanges(FileInfo finfo) throws IOException {
+        Kernel32 klib = Kernel32.INSTANCE;
+        FILE_NOTIFY_INFORMATION fni = finfo.info;
+        // Need an explicit read, since data was filled in asynchronously
+        fni.read();
+        do {
+            FileEvent event = null;
+            File file = new File(finfo.file, fni.getFilename());
+            switch(fni.Action) {
+            case 0:
+            	break;
+            case WinNT.FILE_ACTION_MODIFIED:
+                event = new FileEvent(file, FILE_MODIFIED); 
+                break;
+            case WinNT.FILE_ACTION_ADDED:
+                event = new FileEvent(file, FILE_CREATED); 
+                break;
+            case WinNT.FILE_ACTION_REMOVED:
+                event = new FileEvent(file, FILE_DELETED); 
+                break;
+            case WinNT.FILE_ACTION_RENAMED_OLD_NAME:
+                event = new FileEvent(file, FILE_NAME_CHANGED_OLD); 
+                break;
+            case WinNT.FILE_ACTION_RENAMED_NEW_NAME:
+                event = new FileEvent(file, FILE_NAME_CHANGED_NEW); 
+                break;
+            default:
+                // TODO: other actions...
+                System.err.println("Unrecognized file action '" + fni.Action + "'");
+            }
+        
+            if (event != null) {
+                notify(event);
+            }
+            
+            fni = fni.next();
+        } while (fni != null);
+        
+        // trigger the next read
+        if (!finfo.file.exists()) {
+            unwatch(finfo.file);
+            return;
+        }
+        
+        if (!klib.ReadDirectoryChangesW(finfo.handle, finfo.info, 
+        		finfo.info.size(), finfo.recursive, finfo.notifyMask, 
+        		finfo.infoLength, finfo.overlapped, null)) {        	
+        	if (! disposing) {
+        		int err = klib.GetLastError();
+        		throw new IOException("ReadDirectoryChangesW failed on "
+                                  + finfo.file + ": '" 
+                                  + Kernel32Util.formatMessageFromLastErrorCode(err)
+                                  + "' (" + err + ")");
+        	}
+        }
+    }
+    
+    private FileInfo waitForChange() {
+        Kernel32 klib = Kernel32.INSTANCE;
+        IntByReference rcount = new IntByReference();
+        HANDLEByReference rkey = new HANDLEByReference();
+        PointerByReference roverlap = new PointerByReference();
+        klib.GetQueuedCompletionStatus(port, rcount, rkey, roverlap, WinBase.INFINITE);
+        
+        synchronized (this) { 
+            return (FileInfo)handleMap.get(rkey.getValue());
+        }
+    }
+    
+    private int convertMask(int mask) {
+        int result = 0;
+        if ((mask & FILE_CREATED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_CREATION;
+        }
+        if ((mask & FILE_DELETED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_NAME;
+        }
+        if ((mask & FILE_MODIFIED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_LAST_WRITE;
+        }
+        if ((mask & FILE_RENAMED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_NAME;
+        }
+        if ((mask & FILE_SIZE_CHANGED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_SIZE;
+        }
+        if ((mask & FILE_ACCESSED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_LAST_ACCESS;
+        }
+        if ((mask & FILE_ATTRIBUTES_CHANGED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_ATTRIBUTES;
+        }
+        if ((mask & FILE_SECURITY_CHANGED) != 0) {
+            result |= WinNT.FILE_NOTIFY_CHANGE_SECURITY;
+        }
+        return result;
+    }
+
+    private static int watcherThreadID;
+
+    protected synchronized void watch(File file, int eventMask, boolean recursive) throws IOException {
+        File dir = file;
+        if (!dir.isDirectory()) {
+            recursive = false;
+            dir = file.getParentFile();
+        }
+        while (dir != null && !dir.exists()) {
+            recursive = true;
+            dir = dir.getParentFile();
+        }
+        if (dir == null) {
+            throw new FileNotFoundException("No ancestor found for " + file);
+        }
+        Kernel32 klib = Kernel32.INSTANCE;
+        int mask = WinNT.FILE_SHARE_READ
+            | WinNT.FILE_SHARE_WRITE | WinNT.FILE_SHARE_DELETE;
+        int flags = WinNT.FILE_FLAG_BACKUP_SEMANTICS
+            | WinNT.FILE_FLAG_OVERLAPPED;
+        HANDLE handle = klib.CreateFile(file.getAbsolutePath(), 
+        		WinNT.FILE_LIST_DIRECTORY,
+        		mask, null, WinNT.OPEN_EXISTING,
+                flags, null);
+        if (WinBase.INVALID_HANDLE_VALUE.equals(handle)) {
+            throw new IOException("Unable to open " + file + " (" 
+                                  + klib.GetLastError() + ")");
+        }
+        int notifyMask = convertMask(eventMask);
+        FileInfo finfo = new FileInfo(file, handle, notifyMask, recursive);
+        fileMap.put(file, finfo);
+        handleMap.put(handle, finfo);
+        // Existing port is returned
+        port = klib.CreateIoCompletionPort(handle, port, handle.getPointer(), 0);
+        if (WinBase.INVALID_HANDLE_VALUE.equals(port)) {
+            throw new IOException("Unable to create/use I/O Completion port "
+                    + "for " + file + " ("
+                    + klib.GetLastError() + ")");
+        }
+        // TODO: use FileIOCompletionRoutine callback method instead of a 
+        // dedicated thread
+        if (!klib.ReadDirectoryChangesW(handle, finfo.info, finfo.info.size(), 
+                                        recursive, notifyMask, finfo.infoLength, 
+                                        finfo.overlapped, null)) {
+            int err = klib.GetLastError();
+            throw new IOException("ReadDirectoryChangesW failed on "
+                                  + finfo.file + ", handle " + handle
+                                  + ": '" + Kernel32Util.formatMessageFromLastErrorCode(err)
+                                  + "' (" + err + ")");
+        }
+        if (watcher == null) {
+            watcher = new Thread("W32 File Monitor-" + (watcherThreadID++)) {
+                public void run() {
+                    FileInfo finfo;
+                    while (true) {
+                       finfo = waitForChange();
+                       if (finfo == null) {
+                          synchronized(W32FileMonitor.this) {
+                             if (fileMap.isEmpty()) {
+                                watcher = null;
+                                break;
+                             }
+                          }
+                          continue;
+                        }
+                       
+                        try {
+                            handleChanges(finfo);
+                        }
+                        catch(IOException e) {
+                            // TODO: how is this best handled?
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            };
+            watcher.setDaemon(true);
+            watcher.start();
+        }
+    }
+
+    protected synchronized void unwatch(File file) {
+        FileInfo finfo = (FileInfo)fileMap.remove(file);
+        if (finfo != null) {
+            handleMap.remove(finfo.handle);
+            Kernel32 klib = Kernel32.INSTANCE;
+            // bug: the watcher may still be processing this file
+            klib.CloseHandle(finfo.handle);
+        }
+    }
+    
+    public synchronized void dispose() {
+    	disposing = true;
+    	
+        // unwatch any remaining files in map, allows watcher thread to exit
+        int i = 0;
+        for (Object[] keys = fileMap.keySet().toArray(); !fileMap.isEmpty();) {
+            unwatch((File)keys[i++]);
+        }
+        
+        Kernel32 klib = Kernel32.INSTANCE;
+        klib.PostQueuedCompletionStatus(port, 0, null, null);
+        klib.CloseHandle(port);
+        port = null;
+        watcher = null;
+    }
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/W32FileUtils.java b/contrib/platform/src/com/sun/jna/platform/win32/W32FileUtils.java
new file mode 100644
index 0000000..8e52df7
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/W32FileUtils.java
@@ -0,0 +1,46 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import java.io.File;
+import java.io.IOException;
+
+import com.sun.jna.WString;
+import com.sun.jna.platform.FileUtils;
+
+public class W32FileUtils extends FileUtils {
+
+    public boolean hasTrash() { 
+    	return true; 
+	}
+
+    public void moveToTrash(File[] files) throws IOException {
+        Shell32 shell = Shell32.INSTANCE;
+        ShellAPI.SHFILEOPSTRUCT fileop = new ShellAPI.SHFILEOPSTRUCT();
+        fileop.wFunc = ShellAPI.FO_DELETE;
+        String[] paths = new String[files.length];
+        for (int i=0;i < paths.length;i++) {
+            paths[i] = files[i].getAbsolutePath();
+        }
+        fileop.pFrom = new WString(fileop.encodePaths(paths));
+        fileop.fFlags = ShellAPI.FOF_ALLOWUNDO|ShellAPI.FOF_NOCONFIRMATION|ShellAPI.FOF_SILENT;
+        int ret = shell.SHFileOperation(fileop);
+        if (ret != 0) {
+            throw new IOException("Move to trash failed: " + 
+            		Kernel32Util.formatMessageFromLastErrorCode(ret));
+        }
+        if (fileop.fAnyOperationsAborted) {
+            throw new IOException("Move to trash aborted");
+        }
+    }
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WTypes.java b/contrib/platform/src/com/sun/jna/platform/win32/WTypes.java
new file mode 100644
index 0000000..145552d
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WTypes.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2010 Digital Rapids Corp.
+ */
+
+/* Copyright (c) 2010 Timothy Wall, All Rights Reserved
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+/**
+ * Constant defined in WTypes.h
+ * @author scott.palmer
+ */
+public interface WTypes {
+    public static final int CLSCTX_INPROC_SERVER = 0x1;
+    public static final int CLSCTX_INPROC_HANDLER = 0x2;
+    public static final int CLSCTX_LOCAL_SERVER = 0x4;
+    public static final int CLSCTX_INPROC_SERVER16 = 0x8;
+    public static final int CLSCTX_REMOTE_SERVER = 0x10;
+    public static final int CLSCTX_INPROC_HANDLER16 = 0x20;
+    public static final int CLSCTX_RESERVED1 = 0x40;
+    public static final int CLSCTX_RESERVED2 = 0x80;
+    public static final int CLSCTX_RESERVED3 = 0x100;
+    public static final int CLSCTX_RESERVED4 = 0x200;
+    public static final int CLSCTX_NO_CODE_DOWNLOAD = 0x400;
+    public static final int CLSCTX_RESERVED5 = 0x800;
+    public static final int CLSCTX_NO_CUSTOM_MARSHAL = 0x1000;
+    public static final int CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000;
+    public static final int CLSCTX_NO_FAILURE_LOG = 0x4000;
+    public static final int CLSCTX_DISABLE_AAA = 0x8000;
+    public static final int CLSCTX_ENABLE_AAA = 0x10000;
+    public static final int CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000;
+    public static final int CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000;
+    public static final int CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Wdm.java b/contrib/platform/src/com/sun/jna/platform/win32/Wdm.java
new file mode 100644
index 0000000..eed3e96
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Wdm.java
@@ -0,0 +1,91 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from Wdm.h.
+ * Microsoft Windows DDK.
+ * @author dblock[at]dblock.org
+ */
+public interface Wdm extends StdCallLibrary {
+	
+	/**
+	 * The KEY_BASIC_INFORMATION structure defines a subset of 
+	 * the full information that is available for a registry key.
+	 */
+	public static class KEY_BASIC_INFORMATION extends Structure {		
+		public KEY_BASIC_INFORMATION() {
+			super();
+		}
+
+		public KEY_BASIC_INFORMATION(int size) {
+			NameLength = size - 16; // write time, title index and name length
+			Name = new char[NameLength];
+			allocateMemory();
+		}
+		
+		public KEY_BASIC_INFORMATION(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+				
+		/**
+		 * The last time the key or any of its values changed. 
+		 */
+		public long LastWriteTime;
+		/**
+		 * Device and intermediate drivers should ignore this member.
+		 */
+		public int TitleIndex;
+		/**
+		 * Specifies the size in bytes of the following name. 
+		 */
+		public int NameLength;
+		/**
+		 * A string of Unicode characters naming the key. 
+		 * The string is not null-terminated.
+		 */
+		public char[] Name;
+		/**
+		 * Name of the key.
+		 * @return String.
+		 */
+		public String getName() {
+			return Native.toString(Name);
+		}
+		
+		public void read() {
+			super.read();
+			Name = new char[NameLength / 2];
+			readField("Name");			
+		}
+	}
+	
+	/**
+	 * The KEY_INFORMATION_CLASS enumeration type represents 
+	 * the type of information to supply about a registry key.
+	 */
+	public abstract class KEY_INFORMATION_CLASS { 
+		public static final int KeyBasicInformation = 0;
+		public static final int KeyNodeInformation = 1;
+		public static final int KeyFullInformation = 2;
+		public static final int KeyNameInformation = 3;
+		public static final int KeyCachedInformation = 4;
+		public static final int KeyVirtualizationInformation = 5;
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Win32Exception.java b/contrib/platform/src/com/sun/jna/platform/win32/Win32Exception.java
new file mode 100644
index 0000000..f8e98a6
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Win32Exception.java
@@ -0,0 +1,54 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+
+/**
+ * Win32 exception.
+ * @author dblock[at]dblock[dot]org
+ */
+public class Win32Exception extends RuntimeException {
+	
+	private static final long serialVersionUID = 1L;
+	
+	private HRESULT _hr;
+    
+    /**
+     * Returns the error code of the error.
+     * @return
+     *  Error code.
+     */
+    public HRESULT getHR() {
+    	return _hr;
+    }
+
+    /**
+     * New Win32 exception from HRESULT.
+     * @param hr
+     *  HRESULT
+     */
+    public Win32Exception(HRESULT hr) {
+        super(Kernel32Util.formatMessageFromHR(hr));
+        _hr = hr;    	
+    }
+
+    /**
+     * New Win32 exception from an error code, usually obtained from GetLastError.
+     * @param code
+     *  Error code.
+     */
+    public Win32Exception(int code) {
+    	this(W32Errors.HRESULT_FROM_WIN32(code));
+    }
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinBase.java b/contrib/platform/src/com/sun/jna/platform/win32/WinBase.java
new file mode 100644
index 0000000..2fd3a76
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinBase.java
@@ -0,0 +1,469 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.util.Date;
+
+import com.sun.jna.Platform;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.Union;
+import com.sun.jna.platform.win32.BaseTSD.DWORD_PTR;
+import com.sun.jna.platform.win32.BaseTSD.ULONG_PTR;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinDef.DWORDLONG;
+import com.sun.jna.platform.win32.WinDef.WORD;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+
+/**
+ * Ported from Winbase.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public abstract class WinBase {
+
+    /** Constant value representing an invalid HANDLE. */
+    public static HANDLE INVALID_HANDLE_VALUE = new HANDLE(Pointer.createConstant(
+    		Pointer.SIZE == 8 ? -1 : 0xFFFFFFFFL));
+
+	public static final int WAIT_FAILED = 0xFFFFFFFF;
+	public static final int WAIT_OBJECT_0 = ((NTStatus.STATUS_WAIT_0 ) + 0 );
+	public static final int WAIT_ABANDONED = ((NTStatus.STATUS_ABANDONED_WAIT_0 ) + 0 );
+	public static final int WAIT_ABANDONED_0 = ((NTStatus.STATUS_ABANDONED_WAIT_0 ) + 0 );
+	
+	/**
+	 * Maximum computer name length.
+	 * @return 15 on MAC, 31 on everything else.
+	 */
+	public static int MAX_COMPUTERNAME_LENGTH() {
+		if (Platform.isMac()) {
+			return 15;
+		} else {
+			return 31;			
+		}
+	}
+	
+	/**
+	 * This logon type is intended for users who will be interactively using the computer, such 
+	 * as a user being logged on by a terminal server, remote shell, or similar process. This 
+	 * logon type has the additional expense of caching logon information for disconnected operations; 
+	 * therefore, it is inappropriate for some client/server applications, such as a mail server. 
+	 */
+	public static final int LOGON32_LOGON_INTERACTIVE = 2;
+	/**
+	 * This logon type is intended for high performance servers to authenticate plaintext passwords. 
+	 * The LogonUser function does not cache credentials for this logon type.
+	 */
+	public static final int LOGON32_LOGON_NETWORK = 3;
+	/**
+	 * This logon type is intended for batch servers, where processes may be executing on behalf 
+	 * of a user without their direct intervention. This type is also for higher performance servers 
+	 * that process many plaintext authentication attempts at a time, such as mail or Web servers. 
+	 * The LogonUser function does not cache credentials for this logon type.
+	 */
+	public static final int LOGON32_LOGON_BATCH = 4;
+	/**
+	 * Indicates a service-type logon. The account provided must have the service privilege enabled.
+	 */
+	public static final int LOGON32_LOGON_SERVICE = 5;
+	/**
+	 * This logon type is for GINA DLLs that log on users who will be interactively using the computer. 
+	 * This logon type can generate a unique audit record that shows when the workstation was unlocked.
+	 */
+	public static final int LOGON32_LOGON_UNLOCK = 7;
+	/**
+	 * This logon type preserves the name and password in the authentication package, which allows the 
+	 * server to make connections to other network servers while impersonating the client. A server can 
+	 * accept plaintext credentials from a client, call LogonUser, verify that the user can access the 
+	 * system across the network, and still communicate with other servers.
+	 */
+	public static final int LOGON32_LOGON_NETWORK_CLEARTEXT = 8;
+	/**
+	 * This logon type allows the caller to clone its current token and specify new credentials for 
+	 * outbound connections. The new logon session has the same local identifier but uses different 
+	 * credentials for other network connections. This logon type is supported only by the 
+	 * LOGON32_PROVIDER_WINNT50 logon provider.
+	 */
+	public static final int LOGON32_LOGON_NEW_CREDENTIALS = 9;
+
+	/**
+	 * Use the standard logon provider for the system. The default security provider is negotiate, 
+	 * unless you pass NULL for the domain name and the user name is not in UPN format. In this case, 
+	 * the default provider is NTLM. 
+	 */
+	public static final int LOGON32_PROVIDER_DEFAULT = 0;
+	
+	/**
+	 * Use the Windows NT 3.5 logon provider.
+	 */
+	public static final int LOGON32_PROVIDER_WINNT35 = 1;
+	/**
+	 * Use the NTLM logon provider.
+	 */
+	public static final int LOGON32_PROVIDER_WINNT40 = 2;
+	/**
+	 * Use the negotiate logon provider.
+	 */
+	public static final int LOGON32_PROVIDER_WINNT50 = 3;	
+	
+	
+    /**
+    * The FILETIME structure is a 64-bit value representing the number of 
+    * 100-nanosecond intervals since January 1, 1601 (UTC).
+    * Conversion code in this class Copyright 2002-2004 Apache Software Foundation.
+    * @author Rainer Klute (klute at rainer-klute.de) for the Apache Software Foundation (org.apache.poi.hpsf)
+    */
+	public static class FILETIME extends Structure {
+		public int dwLowDateTime;
+		public int dwHighDateTime;
+	
+		 /**
+		  * <p>The difference between the Windows epoch (1601-01-01
+		  * 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in
+		  * milliseconds: 11644473600000L. (Use your favorite spreadsheet
+		  * program to verify the correctness of this value. By the way,
+		  * did you notice that you can tell from the epochs which
+		  * operating system is the modern one? :-))</p>
+		  */
+		 private static final long EPOCH_DIFF = 11644473600000L;
+		
+		 /**
+		  * <p>Converts a Windows FILETIME into a {@link Date}. The Windows
+		  * FILETIME structure holds a date and time associated with a
+		  * file. The structure identifies a 64-bit integer specifying the
+		  * number of 100-nanosecond intervals which have passed since
+		  * January 1, 1601. This 64-bit value is split into the two double
+		  * words stored in the structure.</p>
+		  *
+		  * @param high The higher double word of the FILETIME structure.
+		  * @param low The lower double word of the FILETIME structure.
+		  * @return The Windows FILETIME as a {@link Date}.
+		  */
+		 public static Date filetimeToDate(final int high, final int low) {
+		   final long filetime = (long) high << 32 | low & 0xffffffffL;
+		   final long ms_since_16010101 = filetime / (1000 * 10);
+		   final long ms_since_19700101 = ms_since_16010101 - EPOCH_DIFF;
+		   return new Date(ms_since_19700101);
+		 }
+		
+		 /**
+		  * <p>Converts a {@link Date} into a filetime.</p>
+		  *
+		  * @param date The date to be converted
+		  * @return The filetime
+		  *
+		  * @see #filetimeToDate
+		  */
+		 public static long dateToFileTime(final Date date) {
+		   final long ms_since_19700101 = date.getTime();
+		   final long ms_since_16010101 = ms_since_19700101 + EPOCH_DIFF;
+		   return ms_since_16010101 * 1000 * 10;
+		 }
+		
+		 public Date toDate() {
+		   return filetimeToDate(dwHighDateTime, dwLowDateTime);
+		 }
+		
+		 public long toLong() {
+		   return toDate().getTime();
+		 }
+		
+		 public String toString() {
+		   return super.toString() + ": " + toDate().toString(); //$NON-NLS-1$
+		 }
+	}
+	
+	/* Local Memory Flags */
+	public static final int  LMEM_FIXED = 0x0000;
+	public static final int  LMEM_MOVEABLE = 0x0002;
+	public static final int  LMEM_NOCOMPACT = 0x0010;
+	public static final int  LMEM_NODISCARD = 0x0020;
+	public static final int  LMEM_ZEROINIT = 0x0040;
+	public static final int  LMEM_MODIFY = 0x0080;
+	public static final int  LMEM_DISCARDABLE = 0x0F00;
+	public static final int  LMEM_VALID_FLAGS = 0x0F72;
+	public static final int  LMEM_INVALID_HANDLE = 0x8000;
+
+	public static final int  LHND = (LMEM_MOVEABLE | LMEM_ZEROINIT);
+	public static final int  LPTR = (LMEM_FIXED | LMEM_ZEROINIT);
+
+	/* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) */
+	public static final int  LMEM_DISCARDED = 0x4000;
+	public static final int  LMEM_LOCKCOUNT = 0x00FF;	
+	
+	/**
+	 * Specifies a date and time, using individual members for the month, 
+	 * day, year, weekday, hour, minute, second, and millisecond. The time 
+	 * is either in coordinated universal time (UTC) or local time, depending 
+	 * on the function that is being called.
+	 * http://msdn.microsoft.com/en-us/library/ms724950(VS.85).aspx
+	 */
+    public static class SYSTEMTIME extends Structure {
+    	// The year. The valid values for this member are 1601 through 30827.
+        public short wYear;
+        // The month. The valid values for this member are 1 through 12.
+        public short wMonth;
+        // The day of the week. The valid values for this member are 0 through 6.
+        public short wDayOfWeek;
+        // The day of the month. The valid values for this member are 1 through 31.
+        public short wDay;
+        // The hour. The valid values for this member are 0 through 23.
+        public short wHour;
+        // The minute. The valid values for this member are 0 through 59.
+        public short wMinute;
+        // The second. The valid values for this member are 0 through 59.
+        public short wSecond;
+        // The millisecond. The valid values for this member are 0 through 999.
+        public short wMilliseconds;
+    }
+    
+    /**
+     * The lpBuffer parameter is a pointer to a PVOID pointer, and that the nSize 
+     * parameter specifies the minimum number of TCHARs to allocate for an output 
+     * message buffer. The function allocates a buffer large enough to hold the 
+     * formatted message, and places a pointer to the allocated buffer at the address 
+     * specified by lpBuffer. The caller should use the LocalFree function to free 
+     * the buffer when it is no longer needed.
+     */
+    public static final int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100;
+    /**
+     * Insert sequences in the message definition are to be ignored and passed through
+     * to the output buffer unchanged. This flag is useful for fetching a message for 
+     * later formatting. If this flag is set, the Arguments parameter is ignored.
+     */
+    public static final int FORMAT_MESSAGE_IGNORE_INSERTS  = 0x00000200;
+    /**
+     * The lpSource parameter is a pointer to a null-terminated message definition.
+     * The message definition may contain insert sequences, just as the message text 
+     * in a message table resource may. Cannot be used with FORMAT_MESSAGE_FROM_HMODULE
+     * or FORMAT_MESSAGE_FROM_SYSTEM.
+     */
+    public static final int FORMAT_MESSAGE_FROM_STRING     = 0x00000400;
+    /**
+     * The lpSource parameter is a module handle containing the message-table 
+     * resource(s) to search. If this lpSource handle is NULL, the current process's
+     * application image file will be searched. Cannot be used with 
+     * FORMAT_MESSAGE_FROM_STRING.
+     */
+    public static final int FORMAT_MESSAGE_FROM_HMODULE    = 0x00000800;
+    /**
+     * The function should search the system message-table resource(s) for the 
+     * requested message. If this flag is specified with FORMAT_MESSAGE_FROM_HMODULE,
+     * the function searches the system message table if the message is not found in 
+     * the module specified by lpSource. Cannot be used with FORMAT_MESSAGE_FROM_STRING. 
+     * If this flag is specified, an application can pass the result of the 
+     * GetLastError function to retrieve the message text for a system-defined error.
+     */
+    public static final int FORMAT_MESSAGE_FROM_SYSTEM     = 0x00001000;
+    /**
+     * The Arguments parameter is not a va_list structure, but is a pointer to an array
+     * of values that represent the arguments. This flag cannot be used with 64-bit 
+     * argument values. If you are using 64-bit values, you must use the va_list 
+     * structure.
+     */
+    public static final int FORMAT_MESSAGE_ARGUMENT_ARRAY  = 0x00002000;
+
+    /**
+     * The drive type cannot be determined.
+     */
+    public static final int DRIVE_UNKNOWN = 0;
+    /**
+     * The root path is invalid, for example, no volume is mounted at the path.
+     */
+    public static final int DRIVE_NO_ROOT_DIR = 1;
+    /**
+     * The drive is a type that has removable media, for example, a floppy drive 
+     * or removable hard disk.
+     */
+    public static final int DRIVE_REMOVABLE = 2;
+    /**
+     * The drive is a type that cannot be removed, for example, a fixed hard drive.
+     */
+    public static final int DRIVE_FIXED = 3;
+    /**
+     * The drive is a remote (network) drive.
+     */
+    public static final int DRIVE_REMOTE = 4;
+    /**
+     * The drive is a CD-ROM drive.
+     */
+    public static final int DRIVE_CDROM = 5;
+    /**
+     * The drive is a RAM disk.
+     */
+    public static final int DRIVE_RAMDISK = 6;    
+    
+    /**
+     * The OVERLAPPED structure contains information used in 
+     * asynchronous (or overlapped) input and output (I/O).
+     */
+    public static class OVERLAPPED extends Structure {
+        public ULONG_PTR Internal;
+        public ULONG_PTR InternalHigh;
+        public int Offset;
+        public int OffsetHigh;
+        public HANDLE hEvent;
+    }        
+    
+    public static final int INFINITE = 0xFFFFFFFF;
+
+    /**
+     * Contains information about the current computer system. This includes the architecture and 
+     * type of the processor, the number of processors in the system, the page size, and other such
+     * information.
+     */
+    public static class SYSTEM_INFO extends Structure {
+    	
+    	public static class PI extends Structure {
+    		
+        	public static class ByReference extends PI implements Structure.ByReference {
+        		
+        	}
+
+    		/**
+    		 * System's processor architecture. 
+    		 * This value can be one of the following values:
+    		 *  
+    		 * 	PROCESSOR_ARCHITECTURE_UNKNOWN
+    		 * 	PROCESSOR_ARCHITECTURE_INTEL
+    		 * 	PROCESSOR_ARCHITECTURE_IA64
+    		 * 	PROCESSOR_ARCHITECTURE_AMD64
+    		 */
+    		public WORD wProcessorArchitecture;
+    		/**
+    		 * Reserved for future use.
+    		 */
+    		public WORD wReserved;
+    	}
+    	
+		public static class UNION extends Union {
+			
+	    	public static class ByReference extends UNION implements Structure.ByReference {
+	    		
+	    	}
+
+			/**
+			 * An obsolete member that is retained for compatibility with Windows NT 3.5 and earlier.
+			 * New applications should use the wProcessorArchitecture branch of the union.
+			 * Windows Me/98/95: The system always sets this member to zero, the value defined 
+			 * for PROCESSOR_ARCHITECTURE_INTEL.
+			 */
+			public DWORD dwOemID;
+			/**
+			 * Processor architecture.
+			 */
+			public PI.ByReference pi;
+		}
+		
+		/**
+		 * Processor architecture.
+		 */
+		public UNION.ByReference processorArchitecture;
+		/**
+		 * Page size and the granularity of page protection and commitment.
+		 */
+		public DWORD dwPageSize;
+		/**
+		 * Pointer to the lowest memory address accessible to applications and dynamic-link libraries (DLLs). 
+		 */
+		public Pointer lpMinimumApplicationAddress;
+		/**
+		 * Pointer to the highest memory address accessible to applications and DLLs. 
+		 */
+		public Pointer lpMaximumApplicationAddress;
+		/**
+		 * Mask representing the set of processors configured into the system. Bit 0 is processor 0; bit 31 is processor 31. 
+		 */
+		public DWORD_PTR dwActiveProcessorMask;
+		/**
+		 * Number of processors in the system. 
+		 */
+		public DWORD dwNumberOfProcessors;
+		/**
+		 * An obsolete member that is retained for compatibility with Windows NT 3.5 and Windows Me/98/95. 
+		 * Use the wProcessorArchitecture, wProcessorLevel, and wProcessorRevision members to determine 
+		 * the type of processor. 
+		 * 	PROCESSOR_INTEL_386
+		 * 	PROCESSOR_INTEL_486
+		 * 	PROCESSOR_INTEL_PENTIUM
+		 */
+		public DWORD dwProcessorType; 
+		/**
+		 * Granularity for the starting address at which virtual memory can be allocated.
+		 */
+		public DWORD dwAllocationGranularity;
+		/**
+		 * System's architecture-dependent processor level. It should be used only for display purposes. 
+		 * To determine the feature set of a processor, use the IsProcessorFeaturePresent function.
+		 * If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_INTEL, wProcessorLevel is defined by the CPU vendor.
+		 * If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_IA64, wProcessorLevel is set to 1.
+		 */
+		public WORD wProcessorLevel;
+		/**
+		 * Architecture-dependent processor revision.
+		 */
+		public WORD wProcessorRevision;
+    }
+    
+    /**
+     * Contains information about the current state of both physical and virtual memory, including 
+     * extended memory. The GlobalMemoryStatusEx function stores information in this structure.
+     */
+    public static class MEMORYSTATUSEX extends Structure {
+    	/**
+    	 * The size of the structure, in bytes.
+    	 */
+        public DWORD dwLength;
+        /**
+         * A number between 0 and 100 that specifies the approximate percentage of physical memory 
+         * that is in use (0 indicates no memory use and 100 indicates full memory use).
+         */
+        public DWORD dwMemoryLoad;
+        /**
+         * The amount of actual physical memory, in bytes.
+         */
+        public DWORDLONG ullTotalPhys;
+        /**
+         * The amount of physical memory currently available, in bytes. This is the amount of physical
+         * memory that can be immediately reused without having to write its contents to disk first. 
+         * It is the sum of the size of the standby, free, and zero lists.
+         */
+        public DWORDLONG ullAvailPhys;
+        /**
+         * The current committed memory limit for the system or the current process, whichever is smaller, in bytes. 
+         */
+        public DWORDLONG ullTotalPageFile;
+        /**
+         * The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller
+         * than the system-wide available commit value.
+         */
+        public DWORDLONG ullAvailPageFile;
+        /**
+         * The size of the user-mode portion of the virtual address space of the calling process, in bytes.
+         */
+        public DWORDLONG ullTotalVirtual;
+        /**
+         * The amount of unreserved and uncommitted memory currently in the user-mode portion of the 
+         * virtual address space of the calling process, in bytes.
+         */
+        public DWORDLONG ullAvailVirtual;
+        /**
+         * Reserved. This value is always 0.
+         */
+        public DWORDLONG ullAvailExtendedVirtual;
+        
+        public MEMORYSTATUSEX() {
+        	dwLength = new DWORD(size());
+        }
+    };
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinCrypt.java b/contrib/platform/src/com/sun/jna/platform/win32/WinCrypt.java
new file mode 100644
index 0000000..51b7532
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinCrypt.java
@@ -0,0 +1,165 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Memory;
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from WinCrypt.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface WinCrypt extends StdCallLibrary {
+	
+	/**
+	 * The CryptoAPI CRYPTOAPI_BLOB structure is used for an arbitrary array of bytes.
+	 */
+	public static class DATA_BLOB extends Structure {
+		public DATA_BLOB() {
+			super();
+		}
+		
+		public DATA_BLOB(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+
+		public DATA_BLOB(byte [] data) {
+			pbData = new Memory(data.length);
+			pbData.write(0, data, 0, data.length);
+			cbData = data.length;
+			allocateMemory();
+		}
+		
+		public DATA_BLOB(String s) {
+			this(Native.toByteArray(s));
+		}
+		
+		/**
+		 * The count of bytes in the buffer pointed to by pbData. 
+		 */
+        public int cbData;
+        /**
+         * A pointer to a block of data bytes. 
+         */
+        public Pointer pbData;
+        
+        /**
+         * Get byte data.
+         * @return
+         *  Byte data or null.
+         */
+        public byte[] getData() {
+        	return pbData == null ? null : pbData.getByteArray(0, cbData);
+        }
+	} 
+	
+	/**
+	 * The CRYPTPROTECT_PROMPTSTRUCT structure provides the text of a prompt and 
+	 * information about when and where that prompt is to be displayed when using
+	 * the CryptProtectData and CryptUnprotectData functions. 
+	 */
+	public static class CRYPTPROTECT_PROMPTSTRUCT extends Structure {
+		public CRYPTPROTECT_PROMPTSTRUCT() {
+			super();
+		}
+
+		public CRYPTPROTECT_PROMPTSTRUCT(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+		
+		/**
+		 * Size of this structure in bytes.
+		 */
+	    public int cbSize;
+	    /**
+	     * DWORD flags that indicate when prompts to the user are to be displayed.
+	     */
+	    public int dwPromptFlags;
+	    /**
+	     * Window handle to the parent window. 
+	     */
+	    public HWND hwndApp;
+	    /**
+	     * A string containing the text of a prompt to be displayed. 
+	     */
+	    public String szPrompt;
+	}
+	
+	//
+	// CryptProtect PromptStruct dwPromtFlags
+	//
+
+	/**
+	 * Prompt on unprotect.
+	 */
+	public static final int CRYPTPROTECT_PROMPT_ON_UNPROTECT = 0x1; // 1<<0
+	/**
+	 * Prompt on protect.
+	 */
+	public static final int CRYPTPROTECT_PROMPT_ON_PROTECT = 0x2; // 1<<1
+	/**
+	 * Reserved, don't use.
+	 */
+	public static final int CRYPTPROTECT_PROMPT_RESERVED = 0x04; 
+	/**
+	 * Default to strong variant UI protection (user supplied password currently).
+	 */
+	public static final int CRYPTPROTECT_PROMPT_STRONG = 0x08; // 1<<3
+	/**
+	 * Require strong variant UI protection (user supplied password currently).
+	 */
+	public static final int CRYPTPROTECT_PROMPT_REQUIRE_STRONG = 0x10; // 1<<4
+
+	//
+	// CryptProtectData and CryptUnprotectData dwFlags
+	//
+	/**
+	 * For remote-access situations where ui is not an option, if UI was specified 
+	 * on protect or unprotect operation, the call will fail and GetLastError() will 
+	 * indicate ERROR_PASSWORD_RESTRICTION.
+	 */
+	public static final int CRYPTPROTECT_UI_FORBIDDEN = 0x1;
+	/**
+	 * Per machine protected data -- any user on machine where CryptProtectData 
+	 * took place may CryptUnprotectData.
+	 */
+	public static final int CRYPTPROTECT_LOCAL_MACHINE = 0x4;
+	/**
+	 * Force credential synchronize during CryptProtectData() 
+	 * Synchronize is only operation that occurs during this operation.
+	 */
+	public static final int CRYPTPROTECT_CRED_SYNC = 0x8;
+	/**
+	 * Generate an Audit on protect and unprotect operations.
+	 */
+	public static final int CRYPTPROTECT_AUDIT = 0x10;
+	/**
+	 * Protect data with a non-recoverable key.
+	 */
+	public static final int CRYPTPROTECT_NO_RECOVERY = 0x20;
+	/**
+	 * Verify the protection of a protected blob.
+	 */
+	public static final int CRYPTPROTECT_VERIFY_PROTECTION = 0x40;
+	/**
+	 * Regenerate the local machine protection.
+	 */
+	public static final int CRYPTPROTECT_CRED_REGENERATE = 0x80;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinDef.java b/contrib/platform/src/com/sun/jna/platform/win32/WinDef.java
new file mode 100644
index 0000000..2289653
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinDef.java
@@ -0,0 +1,345 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.awt.Rectangle;
+
+import com.sun.jna.IntegerType;
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.BaseTSD.LONG_PTR;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from Windef.h. 
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+ at SuppressWarnings("serial")
+public interface WinDef extends StdCallLibrary {
+
+	public static final int MAX_PATH = 260;
+
+	/**
+	 * 16-bit unsigned integer.
+	 */
+	public static class WORD extends IntegerType {
+		public WORD() {
+			this(0);
+		}
+
+		public WORD(long value) {
+			super(2, value);
+		}
+	}
+
+	/**
+	 * 32-bit unsigned integer.
+	 */
+	public static class DWORD extends IntegerType {
+		public DWORD() {
+			this(0);
+		}
+
+		public DWORD(long value) {
+			super(4, value);
+		}
+		
+		/**
+		 * Low WORD.
+		 * @return
+		 *  Low WORD.
+		 */
+		public WORD getLow() {
+			return new WORD(longValue() & 0xFF);
+		}
+				
+		/**
+		 * High WORD.
+		 * @return
+		 *  High WORD.
+		 */
+		public WORD getHigh() {
+			return new WORD((longValue() >> 8) & 0xFF);
+		}
+	}
+
+	/**
+	 * 32-bit signed integer.
+	 */
+	public static class LONG extends IntegerType {
+		public LONG() {
+			this(0);
+		}
+
+		public LONG(long value) {
+			super(Native.LONG_SIZE, value);
+		}
+	}
+
+	/**
+	 * Handle to a device context (DC).
+	 */
+	public static class HDC extends HANDLE {
+		public HDC() {
+
+		}
+
+		public HDC(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to an icon.
+	 */
+	public static class HICON extends HANDLE {
+		public HICON() {
+
+		}
+
+		public HICON(Pointer p) {
+			super(p);
+		}
+	}
+	
+	/**
+	 * Handle to a cursor. 
+	 */
+	public static class HCURSOR extends HICON {
+		public HCURSOR() {
+
+		}
+
+		public HCURSOR(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to a cursor. 
+	 */
+	public static class HMENU extends HANDLE {
+		public HMENU() {
+
+		}
+
+		public HMENU(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to a pen.
+	 */
+	public static class HPEN extends HANDLE {
+		public HPEN() {
+
+		}
+
+		public HPEN(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to a resource. 
+	 */
+	public static class HRSRC extends HANDLE {
+		public HRSRC() {
+
+		}
+
+		public HRSRC(Pointer p) {
+			super(p);
+		}
+	}
+	
+	/**
+	 * Handle to a palette. 
+	 */
+	public static class HPALETTE extends HANDLE {
+		public HPALETTE() {
+
+		}
+
+		public HPALETTE(Pointer p) {
+			super(p);
+		}
+	}
+	
+	/**
+	 * Handle to a bitmap.
+	 */
+	public static class HBITMAP extends HANDLE {
+		public HBITMAP() {
+
+		}
+
+		public HBITMAP(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to a region.
+	 */
+	public static class HRGN extends HANDLE {
+		public HRGN() {
+
+		}
+
+		public HRGN(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to a window.
+	 */
+	public static class HWND extends HANDLE {
+		public HWND() {
+
+		}
+
+		public HWND(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Handle to an instance.
+	 */
+	public static class HINSTANCE extends HANDLE {
+
+	}
+
+	/**
+	 * Handle to a module. The value is the base address of the module.
+	 */
+	public static class HMODULE extends HINSTANCE {
+
+	}
+
+	/**
+	 * Handle to a font.
+	 */
+	public static class HFONT extends HANDLE {
+		public HFONT() {
+
+		}
+
+		public HFONT(Pointer p) {
+			super(p);
+		}
+	}
+
+	/**
+	 * Message parameter. 
+	 */
+	public static class LPARAM extends LONG_PTR {
+		public LPARAM() {
+			this(0);
+		}
+
+		public LPARAM(long value) {
+			super(value);
+		}
+	}
+
+	/**
+	 * Signed result of message processing. 
+	 */
+	public static class LRESULT extends LONG_PTR {
+		public LRESULT() {
+			this(0);
+		}
+
+		public LRESULT(long value) {
+			super(value);
+		}
+	}
+
+	/**
+	 * Unsigned INT_PTR.
+	 */
+	public static class UINT_PTR extends IntegerType {
+		public UINT_PTR() {
+			super(Pointer.SIZE);
+		}
+
+		public UINT_PTR(long value) {
+			super(Pointer.SIZE, value);
+		}
+
+		public Pointer toPointer() {
+			return Pointer.createConstant(longValue());
+		}
+	}
+
+	/**
+	 * Message parameter. 
+	 */
+	public static class WPARAM extends UINT_PTR {
+		public WPARAM() {
+			this(0);
+		}
+
+		public WPARAM(long value) {
+			super(value);
+		}
+	}
+	
+    public class RECT extends Structure {
+        public int left;
+        public int top;
+        public int right;
+        public int bottom;
+        
+        public Rectangle toRectangle() {
+            return new Rectangle(left, top, right-left, bottom-top);
+        }
+        
+        public String toString() {
+            return "[(" + left + "," + top + ")(" + right + "," + bottom + ")]";
+        }
+    }
+    
+	/**
+	 * 64-bit unsigned integer.
+	 */
+	public static class ULONGLONG extends IntegerType {
+		public ULONGLONG() {
+			this(0);
+		}
+
+		public ULONGLONG(long value) {
+			super(8, value);
+		}
+	}
+	
+	/**
+	 * 64-bit unsigned integer.
+	 */
+	public static class DWORDLONG extends IntegerType {
+		public DWORDLONG() {
+			this(0);
+		}
+
+		public DWORDLONG(long value) {
+			super(8, value);
+		}
+	}
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinGDI.java b/contrib/platform/src/com/sun/jna/platform/win32/WinGDI.java
new file mode 100644
index 0000000..2f54d43
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinGDI.java
@@ -0,0 +1,97 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.WinDef.RECT;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from WinGDI.h. 
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface WinGDI extends StdCallLibrary {
+    public int RDH_RECTANGLES = 1;
+
+    public class RGNDATAHEADER extends Structure {
+        public int dwSize = size();
+        public int iType = RDH_RECTANGLES; // required
+        public int nCount;
+        public int nRgnSize;
+        public RECT rcBound;
+    }
+    
+    public class RGNDATA extends Structure {
+        public RGNDATAHEADER rdh;
+        public byte[] Buffer;
+        public RGNDATA(int bufferSize) {
+            Buffer = new byte[bufferSize];
+            allocateMemory();
+        }
+    }
+
+    public int RGN_AND = 1;
+    public int RGN_OR = 2;
+    public int RGN_XOR = 3;
+    public int RGN_DIFF = 4;
+    public int RGN_COPY = 5;
+    
+    public int ERROR = 0;
+    public int NULLREGION = 1;
+    public int SIMPLEREGION = 2;
+    public int COMPLEXREGION = 3;
+
+    public int ALTERNATE = 1;
+    public int WINDING = 2;
+    
+    public int BI_RGB = 0;
+    public int BI_RLE8 = 1;
+    public int BI_RLE4 = 2;
+    public int BI_BITFIELDS = 3;
+    public int BI_JPEG = 4;
+    public int BI_PNG = 5;
+    
+    public class BITMAPINFOHEADER extends Structure {
+        public int biSize = size();
+        public int biWidth;
+        public int biHeight;
+        public short biPlanes;
+        public short biBitCount;
+        public int biCompression;
+        public int biSizeImage;
+        public int biXPelsPerMeter;
+        public int biYPelsPerMeter;
+        public int biClrUsed;
+        public int biClrImportant;
+    }
+    
+    public class RGBQUAD extends Structure {
+        public byte rgbBlue;
+        public byte rgbGreen;
+        public byte rgbRed;
+        public byte rgbReserved = 0;
+    }
+    
+    public class BITMAPINFO extends Structure {
+        public BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
+        public RGBQUAD[] bmiColors = new RGBQUAD[1];
+        public BITMAPINFO() { this(1); }
+        public BITMAPINFO(int size) {
+            bmiColors = new RGBQUAD[size];
+        }
+    }
+    
+    public int DIB_RGB_COLORS = 0;
+    public int DIB_PAL_COLORS = 1;
+}
\ No newline at end of file
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinNT.java b/contrib/platform/src/com/sun/jna/platform/win32/WinNT.java
new file mode 100644
index 0000000..fb354a9
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinNT.java
@@ -0,0 +1,1388 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.Memory;
+import com.sun.jna.NativeLong;
+import com.sun.jna.Pointer;
+import com.sun.jna.PointerType;
+import com.sun.jna.Structure;
+import com.sun.jna.Union;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinDef.WORD;
+import com.sun.jna.ptr.ByReference;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * This module defines the 32-Bit Windows types and constants that are defined
+ * by NT, but exposed through the Win32 API.
+ * Ported from WinNT.h.
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+ at SuppressWarnings("serial")
+public interface WinNT extends StdCallLibrary {
+
+	//
+	// The following are masks for the predefined standard access types
+	//
+
+	public static final int DELETE = 0x00010000;
+	public static final int READ_CONTROL = 0x00020000;
+	public static final int WRITE_DAC = 0x00040000;
+	public static final int WRITE_OWNER = 0x00080000;
+	public static final int SYNCHRONIZE = 0x00100000;
+
+	public static final int STANDARD_RIGHTS_REQUIRED = 0x000F0000;
+
+	public static final int STANDARD_RIGHTS_READ = READ_CONTROL;
+	public static final int STANDARD_RIGHTS_WRITE = READ_CONTROL;
+	public static final int STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
+
+	public static final int STANDARD_RIGHTS_ALL = 0x001F0000;
+
+	public static final int SPECIFIC_RIGHTS_ALL = 0x0000FFFF;
+
+	//
+	// Token Specific Access Rights.
+	//
+
+	/**
+	 * Required to attach a primary token to a process. The
+	 * SE_ASSIGNPRIMARYTOKEN_NAME privilege is also required to accomplish this
+	 * task.
+	 */
+	public static final int TOKEN_ASSIGN_PRIMARY = 0x0001;
+	/**
+	 * Required to duplicate an access token.
+	 */
+	public static final int TOKEN_DUPLICATE = 0x0002;
+	/**
+	 * Required to attach an impersonation access token to a process.
+	 */
+	public static final int TOKEN_IMPERSONATE = 0x0004;
+	/**
+	 * Required to query an access token.
+	 */
+	public static final int TOKEN_QUERY = 0x0008;
+	/**
+	 * Required to query the source of an access token.
+	 */
+	public static final int TOKEN_QUERY_SOURCE = 0x0010;
+	/**
+	 * Required to enable or disable the privileges in an access token.
+	 */
+	public static final int TOKEN_ADJUST_PRIVILEGES = 0x0020;
+	/**
+	 * Required to adjust the attributes of the groups in an access token.
+	 */
+	public static final int TOKEN_ADJUST_GROUPS = 0x0040;
+	/**
+	 * Required to change the default owner, primary group, or DACL of an access
+	 * token.
+	 */
+	public static final int TOKEN_ADJUST_DEFAULT = 0x0080;
+	/**
+	 * Required to adjust the session ID of an access token. The SE_TCB_NAME
+	 * privilege is required.
+	 */
+	public static final int TOKEN_ADJUST_SESSIONID = 0x0100;
+
+	public static final int TOKEN_ALL_ACCESS_P = STANDARD_RIGHTS_REQUIRED
+			| TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE
+			| TOKEN_QUERY | TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES
+			| TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT;
+
+	/**
+	 * Combines all possible access rights for a token.
+	 */
+	public static final int TOKEN_ALL_ACCESS = TOKEN_ALL_ACCESS_P
+			| TOKEN_ADJUST_SESSIONID;
+
+	/**
+	 * Combines STANDARD_RIGHTS_READ and TOKEN_QUERY.
+	 */
+	public static final int TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY;
+
+	/**
+	 * Combines STANDARD_RIGHTS_WRITE, TOKEN_ADJUST_PRIVILEGES,
+	 * TOKEN_ADJUST_GROUPS, and TOKEN_ADJUST_DEFAULT.
+	 */
+	public static final int TOKEN_WRITE = STANDARD_RIGHTS_WRITE
+			| TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS
+			| TOKEN_ADJUST_DEFAULT;
+
+	/**
+	 * Combines STANDARD_RIGHTS_EXECUTE and TOKEN_IMPERSONATE.
+	 */
+	public static final int TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE;
+
+	public static final int THREAD_TERMINATE = 0x0001;
+	public static final int THREAD_SUSPEND_RESUME = 0x0002;
+	public static final int THREAD_GET_CONTEXT = 0x0008;
+	public static final int THREAD_SET_CONTEXT = 0x0010;
+	public static final int THREAD_QUERY_INFORMATION = 0x0040;
+	public static final int THREAD_SET_INFORMATION = 0x0020;
+	public static final int THREAD_SET_THREAD_TOKEN = 0x0080;
+	public static final int THREAD_IMPERSONATE = 0x0100;
+	public static final int THREAD_DIRECT_IMPERSONATION = 0x0200;
+	public static final int THREAD_SET_LIMITED_INFORMATION = 0x0400;
+	public static final int THREAD_QUERY_LIMITED_INFORMATION = 0x0800;
+	public static final int THREAD_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3FF;
+	
+	/**
+	 * The SECURITY_IMPERSONATION_LEVEL enumeration type contains values that specify security 
+	 * impersonation levels. Security impersonation levels govern the degree to which a server 
+	 * process can act on behalf of a client process.
+	 */
+	public abstract class SECURITY_IMPERSONATION_LEVEL {
+		/**
+		 * The server process cannot obtain identification information about the client,
+		 * and it cannot impersonate the client. It is defined with no value given, and 
+		 * thus, by ANSI C rules, defaults to a value of zero. 
+		 */
+		public static final int SecurityAnonymous = 0;
+		/**
+		 * The server process can obtain information about the client, such as security 
+		 * identifiers and privileges, but it cannot impersonate the client. This is useful
+		 * for servers that export their own objects, for example, database products that 
+		 * export tables and views. Using the retrieved client-security information, the 
+		 * server can make access-validation decisions without being able to use other 
+		 * services that are using the client's security context. 
+		 */
+		public static final int SecurityIdentification = 1;
+		/**
+		 * The server process can impersonate the client's security context on its local system. 
+		 * The server cannot impersonate the client on remote systems. 
+		 */
+		public static final int SecurityImpersonation = 2;
+		/**
+		 * The server process can impersonate the client's security context on remote systems. 
+		 */
+		public static final int SecurityDelegation = 3;
+	}
+	
+	/**
+	 * The TOKEN_INFORMATION_CLASS enumeration type contains values that specify the type of 
+	 * information being assigned to or retrieved from an access token. 
+	 */
+	public abstract class TOKEN_INFORMATION_CLASS {
+		public static final int TokenUser = 1;
+	    public static final int  TokenGroups = 2; 
+	    public static final int  TokenPrivileges = 3; 
+	    public static final int  TokenOwner = 4;
+	    public static final int  TokenPrimaryGroup = 5; 
+	    public static final int  TokenDefaultDacl = 6;
+	    public static final int  TokenSource = 7;
+	    public static final int  TokenType = 8;
+	    public static final int  TokenImpersonationLevel = 9; 
+	    public static final int  TokenStatistics = 10;
+	    public static final int  TokenRestrictedSids = 11; 
+	    public static final int  TokenSessionId = 12;
+	    public static final int  TokenGroupsAndPrivileges = 13; 
+	    public static final int  TokenSessionReference = 14;
+	    public static final int  TokenSandBoxInert = 15;
+	    public static final int  TokenAuditPolicy = 16;
+	    public static final int  TokenOrigin = 17;
+	    public static final int  TokenElevationType = 18;
+	    public static final int  TokenLinkedToken = 19; 
+	    public static final int  TokenElevation = 20;
+	    public static final int  TokenHasRestrictions = 21;
+	    public static final int  TokenAccessInformation = 22;
+	    public static final int  TokenVirtualizationAllowed = 23; 
+	    public static final int  TokenVirtualizationEnabled = 24; 
+	    public static final int  TokenIntegrityLevel = 25;
+	    public static final int  TokenUIAccess = 26;
+	    public static final int  TokenMandatoryPolicy = 27; 
+	    public static final int  TokenLogonSid = 28;
+	}
+	
+	/**
+	 * The SID_AND_ATTRIBUTES structure represents a security identifier (SID) and its 
+	 * attributes. SIDs are used to uniquely identify users or groups.
+	 */
+	public static class SID_AND_ATTRIBUTES extends Structure {
+		public SID_AND_ATTRIBUTES() {
+			super();
+		}
+		
+		public SID_AND_ATTRIBUTES(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+		
+		/**
+		 * Pointer to a SID structure. 
+		 */
+		public PSID.ByReference Sid;
+		
+		/**
+		 * Specifies attributes of the SID. This value contains up to 32 one-bit flags.
+		 * Its meaning depends on the definition and use of the SID. 
+		 */
+		public int Attributes;
+	}
+	
+	/**
+	 * The TOKEN_OWNER structure contains the default owner 
+	 * security identifier (SID) that will be applied to newly created objects.
+	 */
+	public static class TOKEN_OWNER extends Structure {
+		public TOKEN_OWNER() {
+			super();
+		}
+
+		public TOKEN_OWNER(Pointer memory) {
+			super(memory);
+			read();
+		}
+
+		/**
+		 * Pointer to a SID structure representing a user who will become the owner of any 
+		 * objects created by a process using this access token. The SID must be one of the 
+		 * user or group SIDs already in the token. 
+		 */
+		public PSID.ByReference Owner; // PSID
+	}
+
+	public static class PSID extends Structure {
+		
+    	public static class ByReference extends PSID implements Structure.ByReference {
+    		
+    	}
+		
+		public PSID() {
+			super();
+		}
+		
+		public PSID(byte[] data) {
+			super();
+			Memory memory = new Memory(data.length);
+			memory.write(0, data, 0, data.length);
+			setPointer(memory);
+		}
+		
+		public PSID(int size) {
+			super(new Memory(size));
+		}
+		
+		public PSID(Pointer memory) {
+			super(memory);
+			read();
+		}
+
+        public void setPointer(Pointer p) {
+            useMemory(p);
+            read();
+        }
+		
+        public byte[] getBytes() {
+        	int len = Advapi32.INSTANCE.GetLengthSid(this);
+        	return getPointer().getByteArray(0, len);
+        }
+        
+        public Pointer sid;                
+	}
+	
+    public static class PSIDByReference extends ByReference {
+        public PSIDByReference() {
+            this(null);
+        }
+        public PSIDByReference(PSID h) {
+            super(Pointer.SIZE);
+            setValue(h);
+        }
+        public void setValue(PSID h) {
+            getPointer().setPointer(0, h != null ? h.getPointer() : null);
+        }
+        public PSID getValue() {
+            Pointer p = getPointer().getPointer(0);
+            if (p == null)
+                return null;
+            PSID h = new PSID();
+            h.setPointer(p);
+            return h;
+        }
+    }	
+	
+	/**
+	 * The TOKEN_USER structure identifies the user associated with an access token.
+	 */
+	public static class TOKEN_USER extends Structure {
+		public TOKEN_USER() {
+			super();
+		}
+		
+		public TOKEN_USER(Pointer memory) {
+			super(memory);
+			read();
+		}
+		
+		public TOKEN_USER(int size) {
+			super(new Memory(size));
+		}
+
+		/**
+		 * Specifies a SID_AND_ATTRIBUTES structure representing the user associated with 
+		 * the access token. There are currently no attributes defined for user security 
+		 * identifiers (SIDs). 
+		 */
+		public SID_AND_ATTRIBUTES User;
+	}
+	
+	/**
+	 * The TOKEN_GROUPS structure contains information about the group security identifiers 
+	 * (SIDs) in an access token.
+	 */
+	public static class TOKEN_GROUPS extends Structure {
+		public TOKEN_GROUPS() {
+			super();
+		}
+		
+		public TOKEN_GROUPS(Pointer memory) {
+			super(memory);
+			read();
+		}
+		
+		public TOKEN_GROUPS(int size) {
+			super(new Memory(size));
+		}
+
+		/**
+		 * Specifies the number of groups in the access token. 
+		 */
+		public int GroupCount;
+		public SID_AND_ATTRIBUTES Group0;
+		
+		/**
+		 * Specifies an array of SID_AND_ATTRIBUTES structures that contain a set of SIDs 
+		 * and corresponding attributes. 
+		 */
+		public SID_AND_ATTRIBUTES[] getGroups() {
+			return (SID_AND_ATTRIBUTES[]) Group0.toArray(GroupCount);
+		}
+	}
+
+	/**
+	 * The SID_NAME_USE enumeration type contains values that specify the type of a security identifier (SID).
+	 */
+	public abstract class SID_NAME_USE { 
+		/**
+		 * Indicates a user SID. 
+		 */
+	    public static final int SidTypeUser = 1;
+	    /**
+	     * Indicates a group SID. 
+	     */
+	    public static final int SidTypeGroup = 2;
+	    /**
+	     * Indicates a domain SID. 
+	     */
+	    public static final int SidTypeDomain = 3;
+	    /**
+	     * Indicates an alias SID. 
+	     */
+	    public static final int SidTypeAlias = 4;
+	    /**
+	     * Indicates a SID for a well-known group. 
+	     */
+	    public static final int SidTypeWellKnownGroup = 5;
+	    /**
+	     * Indicates a SID for a deleted account. 
+	     */
+	    public static final int SidTypeDeletedAccount = 6;
+	    /**
+	     * Indicates an invalid SID. 
+	     */
+	    public static final int SidTypeInvalid = 7;
+	    /**
+	     * Indicates an unknown SID type. 
+	     */
+	    public static final int SidTypeUnknown = 8;
+	    /**
+	     * Indicates a SID for a computer. 
+	     */
+	    public static final int SidTypeComputer = 9;
+	    /**
+	     * ?
+	     */
+	    public static final int SidTypeLabel = 10;
+	}	
+	
+    public static final int FILE_LIST_DIRECTORY = 0x00000001;
+
+    public static final int CREATE_NEW =         1;
+    public static final int CREATE_ALWAYS =      2;
+    public static final int OPEN_EXISTING =      3;
+    public static final int OPEN_ALWAYS =        4;
+    public static final int TRUNCATE_EXISTING =  5;
+
+    public static final int FILE_FLAG_WRITE_THROUGH =        0x80000000;
+    public static final int FILE_FLAG_OVERLAPPED =           0x40000000;
+    public static final int FILE_FLAG_NO_BUFFERING =         0x20000000;
+    public static final int FILE_FLAG_RANDOM_ACCESS =        0x10000000;
+    public static final int FILE_FLAG_SEQUENTIAL_SCAN =      0x08000000;
+    public static final int FILE_FLAG_DELETE_ON_CLOSE =      0x04000000;
+    public static final int FILE_FLAG_BACKUP_SEMANTICS =     0x02000000;
+    public static final int FILE_FLAG_POSIX_SEMANTICS =      0x01000000;
+    public static final int FILE_FLAG_OPEN_REPARSE_POINT =   0x00200000;
+    public static final int FILE_FLAG_OPEN_NO_RECALL =       0x00100000;
+
+    public static final int GENERIC_WRITE = 0x40000000;
+    
+    public static class SECURITY_ATTRIBUTES extends Structure {
+        public final int nLength = size();
+        public Pointer lpSecurityDescriptor;
+        public boolean bInheritHandle;
+    }	
+    
+    public static final int PAGE_READONLY = 0x02;
+    public static final int PAGE_READWRITE = 0x04;
+    public static final int PAGE_WRITECOPY = 0x08;
+    public static final int PAGE_EXECUTE = 0x10;
+    public static final int PAGE_EXECUTE_READ = 0x20;
+    public static final int PAGE_EXECUTE_READWRITE = 0x40;    
+    
+    public static final int SECTION_QUERY = 0x0001;
+    public static final int SECTION_MAP_WRITE = 0x0002;
+    public static final int SECTION_MAP_READ = 0x0004;
+    public static final int SECTION_MAP_EXECUTE = 0x0008;
+    public static final int SECTION_EXTEND_SIZE = 0x0010;    
+    
+	public static final int FILE_SHARE_READ  = 0x00000001;
+	public static final int FILE_SHARE_WRITE = 0x00000002; 
+	public static final int FILE_SHARE_DELETE = 0x00000004; 
+	public static final int FILE_ATTRIBUTE_READONLY = 0x00000001; 
+	public static final int FILE_ATTRIBUTE_HIDDEN = 0x00000002; 
+	public static final int FILE_ATTRIBUTE_SYSTEM = 0x00000004; 
+	public static final int FILE_ATTRIBUTE_DIRECTORY = 0x00000010; 
+	public static final int FILE_ATTRIBUTE_ARCHIVE = 0x00000020; 
+	public static final int FILE_ATTRIBUTE_DEVICE = 0x00000040; 
+	public static final int FILE_ATTRIBUTE_NORMAL = 0x00000080; 
+	public static final int FILE_ATTRIBUTE_TEMPORARY = 0x00000100; 
+	public static final int FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200; 
+	public static final int FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400; 
+	public static final int FILE_ATTRIBUTE_COMPRESSED = 0x00000800; 
+	public static final int FILE_ATTRIBUTE_OFFLINE = 0x00001000; 
+	public static final int FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000; 
+	public static final int FILE_ATTRIBUTE_ENCRYPTED = 0x00004000;
+	public static final int FILE_ATTRIBUTE_VIRTUAL = 0x00010000;
+	public static final int FILE_NOTIFY_CHANGE_FILE_NAME = 0x00000001; 
+	public static final int FILE_NOTIFY_CHANGE_DIR_NAME = 0x00000002; 
+	public static final int FILE_NOTIFY_CHANGE_NAME = 0x00000003;
+	public static final int FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x00000004; 
+	public static final int FILE_NOTIFY_CHANGE_SIZE = 0x00000008; 
+	public static final int FILE_NOTIFY_CHANGE_LAST_WRITE = 0x00000010; 
+	public static final int FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020; 
+	public static final int FILE_NOTIFY_CHANGE_CREATION = 0x00000040; 
+	public static final int FILE_NOTIFY_CHANGE_SECURITY = 0x00000100; 
+	public static final int FILE_ACTION_ADDED  = 0x00000001; 
+	public static final int FILE_ACTION_REMOVED  = 0x00000002; 
+	public static final int FILE_ACTION_MODIFIED = 0x00000003; 
+	public static final int FILE_ACTION_RENAMED_OLD_NAME = 0x00000004; 
+	public static final int FILE_ACTION_RENAMED_NEW_NAME = 0x00000005;
+	public static final int FILE_CASE_SENSITIVE_SEARCH = 0x00000001; 
+	public static final int FILE_CASE_PRESERVED_NAMES = 0x00000002;
+	public static final int FILE_UNICODE_ON_DISK = 0x00000004;
+	public static final int FILE_PERSISTENT_ACLS = 0x00000008;
+	public static final int FILE_FILE_COMPRESSION = 0x00000010; 
+	public static final int FILE_VOLUME_QUOTAS = 0x00000020;
+	public static final int FILE_SUPPORTS_SPARSE_FILES = 0x00000040; 
+	public static final int FILE_SUPPORTS_REPARSE_POINTS = 0x00000080; 
+	public static final int FILE_SUPPORTS_REMOTE_STORAGE = 0x00000100; 
+	public static final int FILE_VOLUME_IS_COMPRESSED = 0x00008000; 
+	public static final int FILE_SUPPORTS_OBJECT_IDS = 0x00010000; 
+	public static final int FILE_SUPPORTS_ENCRYPTION = 0x00020000; 
+	public static final int FILE_NAMED_STREAMS = 0x00040000; 
+	public static final int FILE_READ_ONLY_VOLUME = 0x00080000; 
+	public static final int FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000; 
+	public static final int FILE_SUPPORTS_TRANSACTIONS = 0x00200000; 
+	
+
+    /** 
+     * The FILE_NOTIFY_INFORMATION structure describes the changes found by the 
+     * ReadDirectoryChangesW function.
+     * 
+     * This structure is non-trivial since it is a pattern stamped into a large 
+     * block of result memory rather than something that stands alone or is used 
+     * for input.
+     */
+	public static class FILE_NOTIFY_INFORMATION extends Structure {
+		public int NextEntryOffset;
+	    public int Action;
+	    public int FileNameLength;
+	    // filename is not nul-terminated, so we can't use a String/WString
+	    public char[] FileName = new char[1];
+	    
+	    private FILE_NOTIFY_INFORMATION() { 
+	    	
+	    }
+	    
+	    public FILE_NOTIFY_INFORMATION(int size) {
+	    	if (size < size()) {
+	           throw new IllegalArgumentException("Size must greater than "	
+	        		   + size() + ", requested " + size);
+	    	}
+	    	allocateMemory(size);
+	    }
+	   
+	    /** WARNING: this filename may be either the short or long form of the filename. */
+	    public String getFilename() {
+	    	return new String(FileName, 0, FileNameLength/2);
+	    }
+	    
+	    public void read() {
+	    	// avoid reading filename until we know how long it is
+	    	FileName = new char[0];
+	    	super.read();
+	    	FileName = getPointer().getCharArray(12, FileNameLength/2);
+	    }
+	    
+	    public FILE_NOTIFY_INFORMATION next() {
+	    	if (NextEntryOffset == 0)
+	    		return null;
+	    	FILE_NOTIFY_INFORMATION next = new FILE_NOTIFY_INFORMATION();
+	    	next.useMemory(getPointer(), NextEntryOffset);
+	    	next.read();
+	    	return next;
+	    }
+	}	
+	
+	/**
+	 * Registry options.
+	 */
+	
+	public static final int KEY_QUERY_VALUE = 0x0001;
+	public static final int KEY_SET_VALUE = 0x0002;
+	public static final int KEY_CREATE_SUB_KEY = 0x0004;
+	public static final int KEY_ENUMERATE_SUB_KEYS = 0x0008;
+	public static final int KEY_NOTIFY = 0x0010;
+	public static final int KEY_CREATE_LINK = 0x0020;
+	public static final int KEY_WOW64_32KEY = 0x0200;
+	public static final int KEY_WOW64_64KEY = 0x0100;
+	public static final int KEY_WOW64_RES = 0x0300;
+
+	public static final int KEY_READ = STANDARD_RIGHTS_READ |
+		KEY_QUERY_VALUE |
+		KEY_ENUMERATE_SUB_KEYS |
+		KEY_NOTIFY
+		& (~SYNCHRONIZE);
+
+	public static final int KEY_WRITE = STANDARD_RIGHTS_WRITE |
+	  	KEY_SET_VALUE |
+	  	KEY_CREATE_SUB_KEY
+	  	& (~SYNCHRONIZE);	
+
+	public static final int KEY_EXECUTE = KEY_READ
+	  	& (~SYNCHRONIZE);
+
+	public static final int KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL |
+	  	KEY_QUERY_VALUE |
+	  	KEY_SET_VALUE |
+	  	KEY_CREATE_SUB_KEY |
+	  	KEY_ENUMERATE_SUB_KEYS |
+	  	KEY_NOTIFY |
+	  	KEY_CREATE_LINK
+	  	& (~SYNCHRONIZE);
+
+	//
+	// Open/Create Options
+	//
+
+	/**
+	 * Parameter is reserved.
+	 */
+	public static final int REG_OPTION_RESERVED = 0x00000000;
+	/**
+	 * Key is preserved when system is rebooted.
+	 */
+	public static final int REG_OPTION_NON_VOLATILE = 0x00000000; 
+	/**
+	 * Key is not preserved when system is rebooted.
+	 */
+	public static final int REG_OPTION_VOLATILE = 0x00000001;
+	/**
+	 * Created key is a symbolic link.
+	 */
+	public static final int REG_OPTION_CREATE_LINK = 0x00000002;
+	/**
+	 * Open for backup or restore special access rules privilege required.
+	 */
+	public static final int REG_OPTION_BACKUP_RESTORE = 0x00000004;
+	/**
+	 * Open symbolic link.
+	 */
+	public static final int REG_OPTION_OPEN_LINK = 0x00000008;
+
+	public static final int REG_LEGAL_OPTION = REG_OPTION_RESERVED |
+	 	REG_OPTION_NON_VOLATILE |
+	 	REG_OPTION_VOLATILE |
+	 	REG_OPTION_CREATE_LINK |
+	 	REG_OPTION_BACKUP_RESTORE |
+	 	REG_OPTION_OPEN_LINK;
+
+	//
+	// Key creation/open disposition
+	//
+
+	/**
+	 * New Registry Key created.
+	 */
+	public static final int REG_CREATED_NEW_KEY = 0x00000001;
+	/**
+	 * Existing Key opened.
+	 */
+	public static final int REG_OPENED_EXISTING_KEY = 0x00000002;
+
+	public static final int REG_STANDARD_FORMAT = 1;
+	public static final int REG_LATEST_FORMAT = 2;
+	public static final int REG_NO_COMPRESSION = 4;
+
+	//
+	// Key restore & hive load flags
+	//
+
+	/**
+	 * Restore whole hive volatile.
+	 */
+	public static final int REG_WHOLE_HIVE_VOLATILE = 0x00000001;
+	/**
+	 * Unwind changes to last flush.
+	 */
+	public static final int REG_REFRESH_HIVE = 0x00000002;
+	/**
+	 * Never lazy flush this hive.
+	 */
+	public static final int REG_NO_LAZY_FLUSH = 0x00000004;
+	/**
+	 * Force the restore process even when we have open handles on subkeys.
+	 */
+	public static final int REG_FORCE_RESTORE = 0x00000008;
+	/**
+	 * Loads the hive visible to the calling process.
+	 */
+	public static final int REG_APP_HIVE = 0x00000010;
+	/**
+	 * Hive cannot be mounted by any other process while in use.
+	 */
+	public static final int REG_PROCESS_PRIVATE = 0x00000020;
+	/**
+	 * Starts Hive Journal.
+	 */
+	public static final int REG_START_JOURNAL = 0x00000040;
+	/**
+	 * Grow hive file in exact 4k increments.
+	 */
+	public static final int REG_HIVE_EXACT_FILE_GROWTH = 0x00000080;
+	/**
+	 * No RM is started for this hive = no transactions.
+	 */
+	public static final int REG_HIVE_NO_RM = 0x00000100;
+	/**
+	 * Legacy single logging is used for this hive.
+	 */
+	public static final int REG_HIVE_SINGLE_LOG = 0x00000200;
+
+	//
+	// Unload Flags
+	//
+	
+	public static final int REG_FORCE_UNLOAD = 1;
+
+	//
+	// Notify filter values
+	//
+	
+	public static final int REG_NOTIFY_CHANGE_NAME = 0x00000001;
+	public static final int REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002;
+	public static final int REG_NOTIFY_CHANGE_LAST_SET = 0x00000004;
+	public static final int REG_NOTIFY_CHANGE_SECURITY = 0x00000008;
+
+	public static final int REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME |
+		REG_NOTIFY_CHANGE_ATTRIBUTES |
+		REG_NOTIFY_CHANGE_LAST_SET |
+		REG_NOTIFY_CHANGE_SECURITY;
+
+	//
+	// Predefined Value Types.
+	//
+
+	/**
+	 * No value type.
+	 */
+	public static final int REG_NONE = 0 ;
+	/**
+	 * Unicode null-terminated string.
+	 */
+	public static final int REG_SZ = 1;
+	/**
+	 * Unicode null-terminated string with environment variable references.
+	 */
+	public static final int REG_EXPAND_SZ = 2;
+	/**
+	 * Free-formed binary.
+	 */
+	public static final int REG_BINARY = 3;
+	/**
+	 * 32-bit number.
+	 */
+	public static final int REG_DWORD = 4;
+	/**
+	 * 32-bit number, same as REG_DWORD.
+	 */
+	public static final int REG_DWORD_LITTLE_ENDIAN = 4;
+	/**
+	 * 32-bit number.
+	 */
+	public static final int REG_DWORD_BIG_ENDIAN = 5;
+	/**
+	 * Symbolic link (unicode).
+	 */
+	public static final int REG_LINK = 6;
+	/**
+	 * Multiple unicode strings.
+	 */
+	public static final int REG_MULTI_SZ = 7;
+	/**
+	 * Resource list in the resource map.
+	 */
+	public static final int REG_RESOURCE_LIST = 8;
+	/**
+	 * Resource list in the hardware description.
+	 */
+	public static final int REG_FULL_RESOURCE_DESCRIPTOR = 9;
+	/**
+	 * 
+	 */
+	public static final int REG_RESOURCE_REQUIREMENTS_LIST = 10 ;
+	/**
+	 * 64-bit number.
+	 */
+	public static final int REG_QWORD = 11 ;
+	/**
+	 * 64-bit number, same as REG_QWORD.
+	 */
+	public static final int REG_QWORD_LITTLE_ENDIAN = 11;
+
+	/**
+	 * A 64-bit value that is guaranteed to be unique on the operating system 
+	 * that generated it until the system is restarted. 
+	 */
+	public static class LUID extends Structure {
+		int LowPart;
+		int HighPart;
+	}
+	
+	/**
+	 * A 64-bit integer;
+	 */
+	public static class LARGE_INTEGER extends Structure {
+		public static class ByReference extends LARGE_INTEGER 
+			implements Structure.ByReference {
+
+		}
+		
+		public static class LowHigh extends Structure {
+			public DWORD LowPart;
+			public DWORD HighPart;
+		}
+		
+		public static class UNION extends Union {
+			public LowHigh lh;
+			public long value;
+		}
+		
+		public UNION u;
+		
+		/**
+		 * Low DWORD.
+		 * @return
+		 *  DWORD.
+		 */
+		public DWORD getLow() {
+			return u.lh.LowPart;
+		}
+		
+		/**
+		 * High DWORD.
+		 * @return
+		 *  DWORD.
+		 */
+		public DWORD getHigh() {
+			return u.lh.HighPart;
+		}
+
+		/**
+		 * 64-bit value.
+		 * @return
+		 *  64-bit value.
+		 */
+		public long getValue() {
+			return u.value;
+		}
+	}
+	
+	/**
+	 * Handle to an object.
+	 */
+    public static class HANDLE extends PointerType {
+        private boolean immutable;
+        public HANDLE() { }
+        public HANDLE(Pointer p) { setPointer(p); immutable = true; }
+        
+        /** Override to the appropriate object for INVALID_HANDLE_VALUE. */
+        public Object fromNative(Object nativeValue, FromNativeContext context) {
+            Object o = super.fromNative(nativeValue, context);
+            if (WinBase.INVALID_HANDLE_VALUE.equals(o))
+                return WinBase.INVALID_HANDLE_VALUE;
+            return o;
+        }
+        
+        public void setPointer(Pointer p) {
+            if (immutable) {
+                throw new UnsupportedOperationException("immutable reference");
+            }
+ 
+            super.setPointer(p);
+        }
+    }
+
+    /**
+     * LPHANDLE
+     */
+    public static class HANDLEByReference extends ByReference {
+        
+    	public HANDLEByReference() {
+            this(null);
+        }
+        
+        public HANDLEByReference(HANDLE h) {
+            super(Pointer.SIZE);
+            setValue(h);
+        }
+        
+        public void setValue(HANDLE h) {
+            getPointer().setPointer(0, h != null ? h.getPointer() : null);
+        }
+        
+        public HANDLE getValue() {
+            Pointer p = getPointer().getPointer(0);
+            if (p == null)
+                return null;
+            if (WinBase.INVALID_HANDLE_VALUE.getPointer().equals(p)) 
+                return WinBase.INVALID_HANDLE_VALUE;
+            HANDLE h = new HANDLE();
+            h.setPointer(p);
+            return h;
+        }
+    }
+    
+
+    /**
+     * Return code used by interfaces. It is zero upon success and 
+     * nonzero to represent an error code or status information. 
+     */
+    class HRESULT extends NativeLong {
+    	public HRESULT() {
+    		
+    	}
+    	
+    	public HRESULT(int value) {
+    		super(value);
+    	}
+    }
+    
+    /**
+     * The WELL_KNOWN_SID_TYPE enumeration type is a list of commonly used security identifiers 
+     * (SIDs). Programs can pass these values to the CreateWellKnownSid function to create a SID 
+     * from this list.
+     */
+    public abstract class WELL_KNOWN_SID_TYPE {
+    	/**
+    	 * Indicates a null SID.
+    	 */
+    	public static final int WinNullSid = 0;
+    	/**
+    	 * Indicates a SID that matches everyone.
+    	 */
+    	public static final int WinWorldSid = 1;
+    	/**
+    	 * Indicates a local SID. 
+    	 */
+    	public static final int WinLocalSid = 2;
+    	/**
+    	 * Indicates a SID that matches the owner or creator of an object.
+    	 */
+    	public static final int WinCreatorOwnerSid = 3;
+    	/**
+    	 * Indicates a SID that matches the creator group of an object. 
+    	 */
+    	public static final int WinCreatorGroupSid = 4;
+    	/**
+    	 * Indicates a creator owner server SID.
+    	 */
+    	public static final int WinCreatorOwnerServerSid = 5;
+    	/**
+    	 * Indicates a creator group server SID. 
+    	 */
+    	public static final int WinCreatorGroupServerSid = 6;
+    	/**
+    	 * Indicates a SID for the Windows NT authority. 
+    	 */
+    	public static final int WinNtAuthoritySid = 7;
+    	/**
+    	 * Indicates a SID for a dial-up account.
+    	 */
+    	public static final int WinDialupSid = 8;
+    	/**
+    	 * Indicates a SID for a network account. This SID is added to the process of a token 
+    	 * when it logs on across a network. The corresponding logon type is 
+    	 * LOGON32_LOGON_NETWORK. 
+    	 */
+    	public static final int WinNetworkSid = 9;
+    	/**
+    	 * Indicates a SID for a batch process. This SID is added to the process of a token 
+    	 * when it logs on as a batch job. The corresponding logon type is LOGON32_LOGON_BATCH. 
+    	 */
+    	public static final int WinBatchSid = 10;
+    	/**
+    	 * Indicates a SID for an interactive account. This SID is added to the process of a 
+    	 * token when it logs on interactively. The corresponding logon type is
+    	 * LOGON32_LOGON_INTERACTIVE. 
+    	 */
+    	public static final int WinInteractiveSid = 11;
+    	/**
+    	 * Indicates a SID for a service. This SID is added to the process of a token when it 
+    	 * logs on as a service. The corresponding logon type is LOGON32_LOGON_bSERVICE.
+    	 */
+    	public static final int WinServiceSid = 12;
+    	/**
+    	 * Indicates a SID for the anonymous account. 
+    	 */
+    	public static final int WinAnonymousSid = 13;
+    	/**
+    	 * Indicates a proxy SID. 
+    	 */
+    	public static final int WinProxySid = 14;
+    	/**
+    	 * Indicates a SID for an enterprise controller. 
+    	 */
+    	public static final int WinEnterpriseControllersSid = 15;
+    	/**
+    	 * Indicates a SID for self.
+    	 */
+    	public static final int WinSelfSid = 16;
+    	/**
+    	 * Indicates a SID that matches any authenticated user. 
+    	 */
+    	public static final int WinAuthenticatedUserSid = 17;
+    	/**
+    	 * Indicates a SID for restricted code. 
+    	 */
+    	public static final int WinRestrictedCodeSid = 18;
+    	/**
+    	 * Indicates a SID that matches a terminal server account. 
+    	 */
+    	public static final int WinTerminalServerSid = 19;
+    	/**
+    	 * Indicates a SID that matches remote logons. 
+    	 */
+    	public static final int WinRemoteLogonIdSid = 20;
+    	/**
+    	 * Indicates a SID that matches logon IDs. 
+    	 */
+    	public static final int WinLogonIdsSid = 21;
+    	/**
+    	 * Indicates a SID that matches the local system. 
+    	 */
+    	public static final int WinLocalSystemSid = 22;
+    	/**
+    	 * Indicates a SID that matches a local service. 
+    	 */
+    	public static final int WinLocalServiceSid = 23;
+    	/**
+    	 * Indicates a SID that matches a network service. 
+    	 */
+    	public static final int WinNetworkServiceSid = 24;
+    	/**
+    	 * Indicates a SID that matches the domain account. 
+    	 */
+    	public static final int WinBuiltinDomainSid = 25;
+    	/**
+    	 * Indicates a SID that matches the administrator account. 
+    	 */
+    	public static final int WinBuiltinAdministratorsSid = 26;
+    	/**
+    	 * Indicates a SID that matches built-in user accounts. 
+    	 */
+    	public static final int WinBuiltinUsersSid = 27;
+    	/**
+    	 * Indicates a SID that matches the guest account. 
+    	 */
+    	public static final int WinBuiltinGuestsSid = 28;
+    	/**
+    	 * Indicates a SID that matches the power users group. 
+    	 */
+    	public static final int WinBuiltinPowerUsersSid = 29;
+    	/**
+    	 * Indicates a SID that matches the account operators account. 
+    	 */
+    	public static final int WinBuiltinAccountOperatorsSid = 30;
+    	/**
+    	 * Indicates a SID that matches the system operators group. 
+    	 */
+    	public static final int WinBuiltinSystemOperatorsSid = 31;
+    	/**
+    	 * Indicates a SID that matches the print operators group. 
+    	 */
+    	public static final int WinBuiltinPrintOperatorsSid = 32;
+    	/**
+    	 * Indicates a SID that matches the backup operators group. 
+    	 */
+    	public static final int WinBuiltinBackupOperatorsSid = 33;
+    	/**
+    	 * Indicates a SID that matches the replicator account. 
+    	 */
+    	public static final int WinBuiltinReplicatorSid = 34;
+    	/**
+    	 * Indicates a SID that matches pre-Windows 2000 compatible accounts. 
+    	 */
+    	public static final int WinBuiltinPreWindows2000CompatibleAccessSid = 35;
+    	/**
+    	 * Indicates a SID that matches remote desktop users. 
+    	 */
+    	public static final int WinBuiltinRemoteDesktopUsersSid = 36;
+    	/**
+    	 * Indicates a SID that matches the network operators group.
+    	 */
+    	public static final int WinBuiltinNetworkConfigurationOperatorsSid = 37;
+    	/**
+    	 * Indicates a SID that matches the account administrators group. 
+    	 */
+    	public static final int WinAccountAdministratorSid = 38;
+    	/**
+    	 * Indicates a SID that matches the account guest group. 
+    	 */
+    	public static final int WinAccountGuestSid = 39;
+    	/**
+    	 * Indicates a SID that matches account Kerberos target group. 
+    	 */
+    	public static final int WinAccountKrbtgtSid = 40;
+    	/**
+    	 * Indicates a SID that matches the account domain administrator group. 
+    	 */
+    	public static final int WinAccountDomainAdminsSid = 41;
+    	/**
+    	 * Indicates a SID that matches the account domain users group. 
+    	 */
+    	public static final int WinAccountDomainUsersSid = 42;
+    	/**
+    	 * Indicates a SID that matches the account domain guests group. 
+    	 */
+    	public static final int WinAccountDomainGuestsSid = 43;
+    	/**
+    	 * Indicates a SID that matches the account computer group. 
+    	 */
+    	public static final int WinAccountComputersSid = 44;
+    	/**
+    	 * Indicates a SID that matches the account controller group. 
+    	 */
+    	public static final int WinAccountControllersSid = 45;
+    	/**
+    	 * Indicates a SID that matches the certificate administrators group.
+    	 */
+    	public static final int WinAccountCertAdminsSid = 46;
+    	/**
+    	 * Indicates a SID that matches the schema administrators group. 
+    	 */
+    	public static final int WinAccountSchemaAdminsSid = 47;
+    	/**
+    	 * Indicates a SID that matches the enterprise administrators group. 
+    	 */
+    	public static final int WinAccountEnterpriseAdminsSid = 48;
+    	/**
+    	 * Indicates a SID that matches the policy administrators group. 
+    	 */
+    	public static final int WinAccountPolicyAdminsSid = 49;
+    	/**
+    	 * Indicates a SID that matches the RAS and IAS server account. 
+    	 */
+    	public static final int WinAccountRasAndIasServersSid = 50;
+    	/**
+    	 * Indicates a SID present when the Microsoft NTLM authentication package 
+    	 * authenticated the client. 
+    	 */
+    	public static final int WinNTLMAuthenticationSid = 51;
+    	/**
+    	 * Indicates a SID present when the Microsoft Digest authentication package 
+    	 * authenticated the client. 
+    	 */
+    	public static final int WinDigestAuthenticationSid = 52;
+    	/**
+    	 * Indicates a SID present when the Secure Channel (SSL/TLS) authentication 
+    	 * package authenticated the client. 
+    	 */
+    	public static final int WinSChannelAuthenticationSid = 53;
+    	/**
+    	 * Indicates a SID present when the user authenticated from within the forest 
+    	 * or across a trust that does not have the selective authentication option 
+    	 * enabled. If this SID is present, then WinOtherOrganizationSid cannot be present. 
+    	 */
+    	public static final int WinThisOrganizationSid = 54;
+    	/**
+    	 * Indicates a SID present when the user authenticated across a forest with the
+    	 * selective authentication option enabled. If this SID is present, then 
+    	 * WinThisOrganizationSid cannot be present. 
+    	 */
+    	public static final int WinOtherOrganizationSid = 55;
+    	/**
+    	 * Indicates a SID that allows a user to create incoming forest trusts. It is added 
+    	 * to the token of users who are a member of the Incoming Forest Trust Builders 
+    	 * built-in group in the root domain of the forest. 
+    	 */
+    	public static final int WinBuiltinIncomingForestTrustBuildersSid = 56;
+    	/**
+    	 * Indicates a SID that matches the performance monitor user group. 
+    	 */
+    	public static final int WinBuiltinPerfMonitoringUsersSid = 57;
+    	/**
+    	 * Indicates a SID that matches the performance log user group. 
+    	 */
+    	public static final int WinBuiltinPerfLoggingUsersSid = 58;
+    	/**
+    	 * Indicates a SID that matches the Windows Authorization Access group.
+    	 */
+    	public static final int WinBuiltinAuthorizationAccessSid = 59;
+    	/**
+    	 * Indicates a SID is present in a server that can issue Terminal Server licenses. 
+    	 */
+    	public static final int WinBuiltinTerminalServerLicenseServersSid = 60;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinBuiltinDCOMUsersSid = 61;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinBuiltinIUsersSid = 62;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinIUserSid = 63;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinBuiltinCryptoOperatorsSid = 64;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinUntrustedLabelSid = 65;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinLowLabelSid = 66;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinMediumLabelSid = 67;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinHighLabelSid = 68;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinSystemLabelSid = 69;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinWriteRestrictedCodeSid = 70;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinCreatorOwnerRightsSid = 71;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinCacheablePrincipalsGroupSid = 72;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinNonCacheablePrincipalsGroupSid = 73;
+    	/**
+    	 * 
+    	 */
+    	public static final int WinEnterpriseReadonlyControllersSid = 74;
+    	/**
+    	 * Indicates a SID that matches a read-only enterprise domain controller.
+    	 */
+    	public static final int WinAccountReadonlyControllersSid = 75;
+    	/**
+    	 * Indicates a SID that matches the built-in DCOM certification services access group.
+    	 */
+    	public static final int WinBuiltinEventLogReadersGroup = 76;
+    }
+    
+    /**
+     * Current SID revision level.
+     */
+    public static final int SID_REVISION = 1;
+    public static final int SID_MAX_SUB_AUTHORITIES = 15;
+    public static final int SID_RECOMMENDED_SUB_AUTHORITIES = 1;
+    
+    /**
+     * Maximum bytes used by a SID.
+     * (sizeof(SID) - sizeof(DWORD) + (SID_MAX_SUB_AUTHORITIES * sizeof(DWORD)))
+     */
+    public static final int SECURITY_MAX_SID_SIZE = 68;
+    
+    /**
+     * The OSVERSIONINFO data structure contains operating system version information. 
+     * The information includes major and minor version numbers, a build number, a 
+     * platform identifier, and descriptive text about the operating system. This structure 
+     * is used with the GetVersionEx function.
+     */
+    public static class OSVERSIONINFO extends Structure {
+    	/**
+    	 * Size of this data structure, in bytes. Set this member to sizeof(OSVERSIONINFO) 
+    	 * before calling the GetVersionEx function.
+    	 */
+        public DWORD dwOSVersionInfoSize;      
+        /**
+         * Major version number of the operating system. 
+         */
+        public DWORD dwMajorVersion;
+        /**
+         * Minor version number of the operating system.
+         */
+        public DWORD dwMinorVersion;
+        /**
+         * Build number of the operating system.
+         */
+        public DWORD dwBuildNumber;
+        /**
+         * Operating system platform.
+         */
+        public DWORD dwPlatformId;
+        /**
+         * Pointer to a null-terminated string, such as "Service Pack 3", 
+         * that indicates the latest Service Pack installed on the system.
+         */
+        public char szCSDVersion[];
+        
+        public OSVERSIONINFO() {
+        	szCSDVersion = new char[128];
+        	dwOSVersionInfoSize = new DWORD(size()); // sizeof(OSVERSIONINFO)
+        }
+
+		public OSVERSIONINFO(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+    };
+    
+    /**
+     * Contains operating system version information. The information includes major and minor version numbers, 
+     * a build number, a platform identifier, and information about product suites and the latest Service Pack 
+     * installed on the system.
+     */
+    public static class OSVERSIONINFOEX extends Structure {
+    	/**
+    	 * The size of this data structure, in bytes.
+    	 */
+        public DWORD dwOSVersionInfoSize;
+        /**
+         * The major version number of the operating system.
+         */
+        public DWORD dwMajorVersion;
+        /**
+         * The minor version number of the operating system.
+         */
+        public DWORD dwMinorVersion;
+        /**
+         * The build number of the operating system.
+         */
+        public DWORD dwBuildNumber;
+        /**
+         * The operating system platform. This member can be VER_PLATFORM_WIN32_NT.
+         */
+        public DWORD dwPlatformId;
+        /**
+         * A null-terminated string, such as "Service Pack 3", that indicates the latest Service Pack 
+         * installed on the system. If no Service Pack has been installed, the string is empty.
+         */
+        public char szCSDVersion[];
+        /**
+         * The major version number of the latest Service Pack installed on the system. For example, for 
+         * Service Pack 3, the major version number is 3. If no Service Pack has been installed, the value 
+         * is zero.
+         */
+        public WORD wServicePackMajor;
+        /**
+         * The minor version number of the latest Service Pack installed on the system. For example, for 
+         * Service Pack 3, the minor version number is 0.
+         */
+        public WORD wServicePackMinor;
+        /**
+         * A bit mask that identifies the product suites available on the system.
+         */
+        public WORD wSuiteMask;
+        /**
+         * Any additional information about the system. 
+         */
+        public byte wProductType;
+        /**
+         * Reserved for future use.
+         */
+        public byte wReserved;
+        
+        public OSVERSIONINFOEX() {
+        	szCSDVersion = new char[128];
+        	dwOSVersionInfoSize = new DWORD(size()); // sizeof(OSVERSIONINFOEX)
+        }
+
+		public OSVERSIONINFOEX(Pointer memory) {
+			useMemory(memory);
+			read();
+		}
+    };
+
+    public static final int VER_EQUAL = 1;
+    public static final int VER_GREATER = 2;
+    public static final int VER_GREATER_EQUAL = 3;
+    public static final int VER_LESS = 4;
+    public static final int VER_LESS_EQUAL = 5;
+    public static final int VER_AND = 6;
+    public static final int VER_OR = 7;
+    
+    public static final int VER_CONDITION_MASK = 7;
+    public static final int VER_NUM_BITS_PER_CONDITION_MASK = 3;
+
+    public static final int VER_MINORVERSION  = 0x0000001;
+    public static final int VER_MAJORVERSION = 0x0000002;
+    public static final int VER_BUILDNUMBER = 0x0000004;
+    public static final int VER_PLATFORMID = 0x0000008;
+    public static final int VER_SERVICEPACKMINOR = 0x0000010;
+    public static final int VER_SERVICEPACKMAJOR = 0x0000020;
+    public static final int VER_SUITENAME = 0x0000040;
+    public static final int VER_PRODUCT_TYPE = 0x0000080;
+
+    public static final int VER_NT_WORKSTATION = 0x0000001;
+    public static final int VER_NT_DOMAIN_CONTROLLER = 0x0000002;
+    public static final int VER_NT_SERVER = 0x0000003;
+
+    public static final int VER_PLATFORM_WIN32s = 0;
+    public static final int VER_PLATFORM_WIN32_WINDOWS = 1;
+    public static final int VER_PLATFORM_WIN32_NT = 2;
+}
\ No newline at end of file
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinReg.java b/contrib/platform/src/com/sun/jna/platform/win32/WinReg.java
new file mode 100644
index 0000000..9f7f26e
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinReg.java
@@ -0,0 +1,70 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.ptr.ByReference;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * This module contains the function prototypes and constant, type and structure 
+ * definitions for the Windows 32-Bit Registry API.
+ * Ported from WinReg.h
+ * Microsoft Windows SDK 6.0A.
+ * @author dblock[at]dblock.org
+ */
+public interface WinReg extends StdCallLibrary {
+	
+	public static class HKEY extends HANDLE {
+        public HKEY() { }
+        public HKEY(Pointer p) { super(p); }
+        public HKEY(int value) { super(new Pointer(value)); }
+	}
+	
+    public static class HKEYByReference extends ByReference {
+        public HKEYByReference() {
+            this(null);
+        }
+        
+        public HKEYByReference(HKEY h) {
+            super(Pointer.SIZE);
+            setValue(h);
+        }
+        
+        public void setValue(HKEY h) {
+            getPointer().setPointer(0, h != null ? h.getPointer() : null);
+        }
+        
+        public HKEY getValue() {
+            Pointer p = getPointer().getPointer(0);
+            if (p == null)
+                return null;
+            if (WinBase.INVALID_HANDLE_VALUE.getPointer().equals(p)) 
+                return (HKEY) WinBase.INVALID_HANDLE_VALUE;
+            HKEY h = new HKEY();
+            h.setPointer(p);
+            return h;
+        }
+    }
+	
+	public static final HKEY HKEY_CLASSES_ROOT = new HKEY(0x80000000);
+	public static final HKEY HKEY_CURRENT_USER = new HKEY(0x80000001);
+	public static final HKEY HKEY_LOCAL_MACHINE = new HKEY(0x80000002);
+	public static final HKEY HKEY_USERS = new HKEY(0x80000003);
+	public static final HKEY HKEY_PERFORMANCE_DATA= new HKEY(0x80000004);
+	public static final HKEY HKEY_PERFORMANCE_TEXT= new HKEY(0x80000050);
+	public static final HKEY HKEY_PERFORMANCE_NLSTEXT = new HKEY(0x80000060);
+	public static final HKEY HKEY_CURRENT_CONFIG  = new HKEY(0x80000005);
+	public static final HKEY HKEY_DYN_DATA = new HKEY(0x80000006);
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinUser.java b/contrib/platform/src/com/sun/jna/platform/win32/WinUser.java
new file mode 100644
index 0000000..3685a52
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinUser.java
@@ -0,0 +1,298 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.platform.win32.BaseTSD.ULONG_PTR;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinDef.LPARAM;
+import com.sun.jna.platform.win32.WinDef.LRESULT;
+import com.sun.jna.platform.win32.WinDef.RECT;
+import com.sun.jna.platform.win32.WinDef.WPARAM;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.win32.StdCallLibrary;
+
+/**
+ * Ported from WinUser.h Microsoft Windows SDK 6.0A.
+ * 
+ * @author dblock[at]dblock.org
+ */
+public interface WinUser extends StdCallLibrary {
+	public HWND HWND_BROADCAST = new HWND(Pointer.createConstant(0xFFFF));
+
+	public int FLASHW_STOP = 0;
+	public int FLASHW_CAPTION = 1;
+	public int FLASHW_TRAY = 2;
+	public int FLASHW_ALL = (FLASHW_CAPTION | FLASHW_TRAY);
+	public int FLASHW_TIMER = 4;
+	public int FLASHW_TIMERNOFG = 12;
+
+	public int IMAGE_BITMAP = 0;
+	public int IMAGE_ICON = 1;
+	public int IMAGE_CURSOR = 2;
+	public int IMAGE_ENHMETAFILE = 3;
+
+	public int LR_DEFAULTCOLOR = 0x0000;
+	public int LR_MONOCHROME = 0x0001;
+	public int LR_COLOR = 0x0002;
+	public int LR_COPYRETURNORG = 0x0004;
+	public int LR_COPYDELETEORG = 0x0008;
+	public int LR_LOADFROMFILE = 0x0010;
+	public int LR_LOADTRANSPARENT = 0x0020;
+	public int LR_DEFAULTSIZE = 0x0040;
+	public int LR_VGACOLOR = 0x0080;
+	public int LR_LOADMAP3DCOLORS = 0x1000;
+	public int LR_CREATEDIBSECTION = 0x2000;
+	public int LR_COPYFROMRESOURCE = 0x4000;
+	public int LR_SHARED = 0x8000;
+
+    public class GUITHREADINFO extends Structure {
+        public int cbSize = size();
+        public int flags;
+        public HWND hwndActive;
+        public HWND hwndFocus;
+        public HWND hwndCapture;
+        public HWND hwndMenuOwner;
+        public HWND hwndMoveSize;
+        public HWND hwndCaret;
+        public RECT rcCaret;
+    }
+
+    public class WINDOWINFO extends Structure {
+        public int cbSize = size();
+        public RECT rcWindow;
+        public RECT rcClient;
+        public int dwStyle;
+        public int dwExStyle;
+        public int dwWindowStatus;
+        public int cxWindowBorders;
+        public int cyWindowBorders;
+        public short atomWindowType;
+        public short wCreatorVersion;
+    }
+
+    public int GWL_EXSTYLE = -20;
+    public int GWL_STYLE = -16;
+    public int GWL_WNDPROC = -4;
+    public int GWL_HINSTANCE = -6;
+    public int GWL_ID = -12;
+    public int GWL_USERDATA = -21;
+    public int DWL_DLGPROC = 4;
+    
+    public int DWL_MSGRESULT = 0;
+    public int DWL_USER = 8;
+    
+    public int WS_EX_COMPOSITED = 0x20000000;
+    public int WS_EX_LAYERED = 0x80000;
+    public int WS_EX_TRANSPARENT = 32;
+
+    public int LWA_COLORKEY = 1;
+    public int LWA_ALPHA = 2;
+    public int ULW_COLORKEY = 1;
+    public int ULW_ALPHA = 2;
+    public int ULW_OPAQUE = 4;
+    
+    /** Defines the x- and y-coordinates of a point. */
+    public class POINT extends Structure {
+        public int x, y;
+        public POINT() { }
+        public POINT(int x, int y) { 
+        	this.x = x; 
+        	this.y = y; 
+        }
+    }
+    
+    public class MSG extends Structure {
+        public HWND hWnd;
+        public int message;
+        public WPARAM wParam;
+        public LPARAM lParam;
+        public int time;
+        public POINT pt;
+    }
+
+	public class FLASHWINFO extends Structure {
+		public int cbSize;
+		public HANDLE hWnd;
+		public int dwFlags;
+		public int uCount;
+		public int dwTimeout;
+	}
+
+	public interface WNDENUMPROC extends StdCallCallback {
+		/** Return whether to continue enumeration. */
+		boolean callback(HWND hWnd, Pointer data);
+	}
+
+	public interface LowLevelKeyboardProc extends HOOKPROC {
+		LRESULT callback(int nCode, WPARAM wParam, KBDLLHOOKSTRUCT lParam);
+	}
+	
+    /** Specifies the width and height of a rectangle. */
+    public class SIZE extends Structure {
+        public int cx, cy;
+        public SIZE() { }
+        public SIZE(int w, int h) { 
+        	this.cx = w; 
+        	this.cy = h; 
+        }
+    }
+    
+    public int AC_SRC_OVER = 0x00;
+    public int AC_SRC_ALPHA = 0x01;
+    public int AC_SRC_NO_PREMULT_ALPHA = 0x01;
+    public int AC_SRC_NO_ALPHA = 0x02;
+
+    public class BLENDFUNCTION extends Structure {
+        public byte BlendOp = AC_SRC_OVER; // only valid value
+        public byte BlendFlags = 0; // only valid value
+        public byte SourceConstantAlpha;
+        public byte AlphaFormat;
+    }
+
+    public int VK_SHIFT = 16;
+    public int VK_LSHIFT = 0xA0;
+    public int VK_RSHIFT = 0xA1;
+    public int VK_CONTROL = 17;
+    public int VK_LCONTROL = 0xA2;
+    public int VK_RCONTROL = 0xA3;
+    public int VK_MENU = 18;
+    public int VK_LMENU = 0xA4;
+    public int VK_RMENU = 0xA5;
+
+    public int WH_KEYBOARD = 2;
+    public int WH_MOUSE = 7;
+    public int WH_KEYBOARD_LL = 13;
+    public int WH_MOUSE_LL = 14;
+    
+    public class HHOOK extends HANDLE {
+    	
+    }
+    
+    public interface HOOKPROC extends StdCallCallback { 
+    	
+    }
+    
+    public int WM_KEYDOWN = 256;
+    public int WM_KEYUP = 257;
+    public int WM_SYSKEYDOWN = 260;
+    public int WM_SYSKEYUP = 261;
+    
+    public class KBDLLHOOKSTRUCT extends Structure {
+        public int vkCode;
+        public int scanCode;
+        public int flags;
+        public int time;
+        public ULONG_PTR dwExtraInfo;
+    }
+
+    public int SM_CXSCREEN = 0;
+	public int SM_CYSCREEN = 1;
+	public int SM_CXVSCROLL = 2;
+	public int SM_CYHSCROLL = 3;
+	public int SM_CYCAPTION = 4;
+	public int SM_CXBORDER = 5;
+	public int SM_CYBORDER = 6;
+	public int SM_CXDLGFRAME = 7;
+	public int SM_CYDLGFRAME = 8;
+	public int SM_CYVTHUMB = 9;
+	public int SM_CXHTHUMB = 10;
+	public int SM_CXICON = 11;
+	public int SM_CYICON = 12;
+	public int SM_CXCURSOR = 13;
+	public int SM_CYCURSOR = 14;
+	public int SM_CYMENU = 15;
+	public int SM_CXFULLSCREEN = 16;
+	public int SM_CYFULLSCREEN = 17;
+	public int SM_CYKANJIWINDOW = 18;
+	public int SM_MOUSEPRESENT = 19;
+	public int SM_CYVSCROLL = 20;
+	public int SM_CXHSCROLL = 21;
+	public int SM_DEBUG = 22;
+	public int SM_SWAPBUTTON = 23;
+	public int SM_RESERVED1 = 24;
+	public int SM_RESERVED2 = 25;
+	public int SM_RESERVED3 = 26;
+	public int SM_RESERVED4 = 27;
+	public int SM_CXMIN = 28;
+	public int SM_CYMIN = 29;
+	public int SM_CXSIZE = 30;
+	public int SM_CYSIZE = 31;
+	public int SM_CXFRAME = 32;
+	public int SM_CYFRAME = 33;
+	public int SM_CXMINTRACK = 34;
+	public int SM_CYMINTRACK = 35;
+	public int SM_CXDOUBLECLK = 36;
+	public int SM_CYDOUBLECLK = 37;
+	public int SM_CXICONSPACING = 38;
+	public int SM_CYICONSPACING = 39;
+	public int SM_MENUDROPALIGNMENT = 40;
+	public int SM_PENWINDOWS = 41;
+	public int SM_DBCSENABLED = 42;
+	public int SM_CMOUSEBUTTONS = 43;
+
+	public int SM_CXFIXEDFRAME = SM_CXDLGFRAME; /* ;win40 name change */
+	public int SM_CYFIXEDFRAME = SM_CYDLGFRAME; /* ;win40 name change */
+	public int SM_CXSIZEFRAME = SM_CXFRAME; /* ;win40 name change */
+	public int SM_CYSIZEFRAME = SM_CYFRAME; /* ;win40 name change */
+
+	public int SM_SECURE = 44;
+	public int SM_CXEDGE = 45;
+	public int SM_CYEDGE = 46;
+	public int SM_CXMINSPACING = 47;
+	public int SM_CYMINSPACING = 48;
+	public int SM_CXSMICON = 49;
+	public int SM_CYSMICON = 50;
+	public int SM_CYSMCAPTION = 51;
+	public int SM_CXSMSIZE = 52;
+	public int SM_CYSMSIZE = 53;
+	public int SM_CXMENUSIZE = 54;
+	public int SM_CYMENUSIZE = 55;
+	public int SM_ARRANGE = 56;
+	public int SM_CXMINIMIZED = 57;
+	public int SM_CYMINIMIZED = 58;
+	public int SM_CXMAXTRACK = 59;
+	public int SM_CYMAXTRACK = 60;
+	public int SM_CXMAXIMIZED = 61;
+	public int SM_CYMAXIMIZED = 62;
+	public int SM_NETWORK = 63;
+	public int SM_CLEANBOOT = 67;
+	public int SM_CXDRAG = 68;
+	public int SM_CYDRAG = 69;
+	public int SM_SHOWSOUNDS = 70;
+	public int SM_CXMENUCHECK = 71;
+	public int SM_CYMENUCHECK = 72;
+	public int SM_SLOWMACHINE = 73;
+	public int SM_MIDEASTENABLED = 74;
+	public int SM_MOUSEWHEELPRESENT = 75;
+	public int SM_XVIRTUALSCREEN = 76;
+	public int SM_YVIRTUALSCREEN = 77;
+	public int SM_CXVIRTUALSCREEN = 78;
+	public int SM_CYVIRTUALSCREEN = 79;
+	public int SM_CMONITORS = 80;
+	public int SM_SAMEDISPLAYFORMAT = 81;
+	public int SM_IMMENABLED = 82;
+	public int SM_CXFOCUSBORDER = 83;
+	public int SM_CYFOCUSBORDER = 84;
+	public int SM_TABLETPC = 86;
+	public int SM_MEDIACENTER = 87;
+	public int SM_STARTER = 88;
+	public int SM_SERVERR2 = 89;
+	public int SM_MOUSEHORIZONTALWHEELPRESENT = 91;
+	public int SM_CXPADDEDBORDER = 92;
+	public int SM_REMOTESESSION = 0x1000;
+	public int SM_SHUTTINGDOWN = 0x2000;
+	public int SM_REMOTECONTROL = 0x2001;
+	public int SM_CARETBLINKINGENABLED = 0x2002;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Winspool.java b/contrib/platform/src/com/sun/jna/platform/win32/Winspool.java
new file mode 100644
index 0000000..c5d51ae
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/Winspool.java
@@ -0,0 +1,121 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.Memory;
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.WString;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.win32.StdCallLibrary;
+import com.sun.jna.win32.W32APIOptions;
+
+/**
+ * Ported from Winspool.h.
+ * Windows SDK 6.0a
+ * @author dblock[at]dblock.org 
+ */
+public interface Winspool extends StdCallLibrary {
+
+	Winspool INSTANCE = (Winspool) Native.loadLibrary("Winspool.drv", Winspool.class, 
+    		W32APIOptions.UNICODE_OPTIONS);
+
+    /**
+     * The EnumPrinters function enumerates available printers, print servers, domains, or print providers.
+     * @param Flags
+     *  The types of print objects that the function should enumerate.
+     * @param Name
+     *  If Level is 1, Flags contains PRINTER_ENUM_NAME, and Name is non-NULL, then Name is a pointer 
+     *  to a null-terminated string that specifies the name of the object to enumerate. This string can 
+     *  be the name of a server, a domain, or a print provider.
+     *  If Level is 1, Flags contains PRINTER_ENUM_NAME, and Name is NULL, then the function enumerates 
+     *  the available print providers.
+     *  If Level is 1, Flags contains PRINTER_ENUM_REMOTE, and Name is NULL, then the function enumerates 
+     *  the printers in the user's domain.
+     *  If Level is 2 or 5,Name is a pointer to a null-terminated string that specifies the name of a 
+     *  server whose printers are to be enumerated. If this string is NULL, then the function enumerates
+     *  the printers installed on the local computer.
+     *  If Level is 4, Name should be NULL. The function always queries on the local computer.
+     *  When Name is NULL, setting Flags to PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS enumerates
+     *  printers that are installed on the local machine. These printers include those that are physically
+     *  attached to the local machine as well as remote printers to which it has a network connection.
+     *  When Name is not NULL, setting Flags to PRINTER_ENUM_LOCAL | PRINTER_ENUM_NAME enumerates the 
+     *  local printers that are installed on the server Name.
+     * @param Level
+     *  The type of data structures pointed to by pPrinterEnum. Valid values are 1, 2, 4, and 5, which 
+     *  correspond to the PRINTER_INFO_1, PRINTER_INFO_2 , PRINTER_INFO_4, and PRINTER_INFO_5 data 
+     *  structures.
+     * @param pPrinterEnum
+     *  A pointer to a buffer that receives an array of PRINTER_INFO_1, PRINTER_INFO_2, PRINTER_INFO_4, 
+     *  or PRINTER_INFO_5 structures. Each structure contains data that describes an available print 
+     *  object.
+     *  If Level is 1, the array contains PRINTER_INFO_1 structures. If Level is 2, the array contains 
+     *  PRINTER_INFO_2 structures. If Level is 4, the array contains PRINTER_INFO_4 structures. If Level 
+     *  is 5, the array contains PRINTER_INFO_5 structures.
+     *  The buffer must be large enough to receive the array of data structures and any strings or other 
+     *  data to which the structure members point. If the buffer is too small, the pcbNeeded parameter 
+     *  returns the required buffer size.
+     * @param cbBuf
+     *  The size, in bytes, of the buffer pointed to by pPrinterEnum.
+     * @param pcbNeeded
+     *  A pointer to a value that receives the number of bytes copied if the function succeeds or the
+     *  number of bytes required if cbBuf is too small.
+     * @param pcReturned
+     *  A pointer to a value that receives the number of PRINTER_INFO_1, PRINTER_INFO_2 , PRINTER_INFO_4, 
+     *  or PRINTER_INFO_5 structures that the function returns in the array to which pPrinterEnum points.
+     * @return
+     *  If the function succeeds, the return value is a nonzero value.
+     *  If the function fails, the return value is zero. 
+     */
+    boolean EnumPrinters(int Flags, WString Name, int Level, Pointer pPrinterEnum,
+    		int cbBuf, IntByReference pcbNeeded, IntByReference pcReturned);
+	
+	public static class PRINTER_INFO_1 extends Structure {
+	    public int Flags;
+	    public String pDescription;
+	    public String pName;
+	    public String pComment;
+	    
+	    public PRINTER_INFO_1() {
+	    	
+	    }
+	    
+	    public PRINTER_INFO_1(int size) {
+	    	super(new Memory(size));
+	    }
+	}
+	
+	public static final int PRINTER_ENUM_DEFAULT = 0x00000001;
+	public static final int PRINTER_ENUM_LOCAL = 0x00000002;
+	public static final int PRINTER_ENUM_CONNECTIONS = 0x00000004;
+	public static final int PRINTER_ENUM_FAVORITE = 0x00000004;
+	public static final int PRINTER_ENUM_NAME = 0x00000008;
+	public static final int PRINTER_ENUM_REMOTE = 0x00000010;
+	public static final int PRINTER_ENUM_SHARED = 0x00000020;
+	public static final int PRINTER_ENUM_NETWORK = 0x00000040;
+
+	public static final int PRINTER_ENUM_EXPAND = 0x00004000;
+	public static final int PRINTER_ENUM_CONTAINER = 0x00008000;
+
+	public static final int PRINTER_ENUM_ICONMASK = 0x00ff0000;
+	public static final int PRINTER_ENUM_ICON1 = 0x00010000;
+	public static final int PRINTER_ENUM_ICON2 = 0x00020000;
+	public static final int PRINTER_ENUM_ICON3 = 0x00040000;
+	public static final int PRINTER_ENUM_ICON4 = 0x00080000;
+	public static final int PRINTER_ENUM_ICON5 = 0x00100000;
+	public static final int PRINTER_ENUM_ICON6 = 0x00200000;
+	public static final int PRINTER_ENUM_ICON7 = 0x00400000;
+	public static final int PRINTER_ENUM_ICON8 = 0x00800000;
+	public static final int PRINTER_ENUM_HIDE = 0x01000000;
+}
diff --git a/contrib/platform/src/com/sun/jna/platform/win32/WinspoolUtil.java b/contrib/platform/src/com/sun/jna/platform/win32/WinspoolUtil.java
new file mode 100644
index 0000000..308e100
--- /dev/null
+++ b/contrib/platform/src/com/sun/jna/platform/win32/WinspoolUtil.java
@@ -0,0 +1,41 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.Winspool.PRINTER_INFO_1;
+import com.sun.jna.ptr.IntByReference;
+
+/**
+ * Winspool Utility API.
+ * @author dblock[at]dblock.org
+ */
+public abstract class WinspoolUtil {
+	
+	public static PRINTER_INFO_1[] getPrinterInfo1() {
+    	IntByReference pcbNeeded = new IntByReference();
+    	IntByReference pcReturned = new IntByReference();
+    	Winspool.INSTANCE.EnumPrinters(Winspool.PRINTER_ENUM_LOCAL, 
+    			null, 1, null, 0, pcbNeeded, pcReturned);
+    	if (pcbNeeded.getValue() <= 0) {
+    		return new PRINTER_INFO_1[0];
+    	}
+    	
+    	PRINTER_INFO_1 pPrinterEnum = new PRINTER_INFO_1(pcbNeeded.getValue());
+    	if(! Winspool.INSTANCE.EnumPrinters(Winspool.PRINTER_ENUM_LOCAL, 
+    			null, 1, pPrinterEnum.getPointer(), pcbNeeded.getValue(), pcbNeeded, pcReturned)) {
+    		throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
+    	}
+    	
+    	return (PRINTER_INFO_1[]) pPrinterEnum.toArray(pcReturned.getValue());
+	}
+}
\ No newline at end of file
diff --git a/test/com/sun/jna/examples/FileUtilsTest.java b/contrib/platform/test/com/sun/jna/platform/FileUtilsTest.java
similarity index 98%
rename from test/com/sun/jna/examples/FileUtilsTest.java
rename to contrib/platform/test/com/sun/jna/platform/FileUtilsTest.java
index e0fd2f5..9a21d72 100644
--- a/test/com/sun/jna/examples/FileUtilsTest.java
+++ b/contrib/platform/test/com/sun/jna/platform/FileUtilsTest.java
@@ -10,10 +10,11 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform;
 
 import java.io.File;
 import java.io.IOException;
+
 import junit.framework.TestCase;
 
 public class FileUtilsTest extends TestCase {
diff --git a/test/com/sun/jna/examples/KeyboardUtilsTest.java b/contrib/platform/test/com/sun/jna/platform/KeyboardUtilsTest.java
similarity index 98%
rename from test/com/sun/jna/examples/KeyboardUtilsTest.java
rename to contrib/platform/test/com/sun/jna/platform/KeyboardUtilsTest.java
index 36ce46d..859dc18 100644
--- a/test/com/sun/jna/examples/KeyboardUtilsTest.java
+++ b/contrib/platform/test/com/sun/jna/platform/KeyboardUtilsTest.java
@@ -10,14 +10,16 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform;
 
 import java.awt.GraphicsEnvironment;
 import java.awt.Robot;
 import java.awt.event.KeyEvent;
-import com.sun.jna.Platform;
+
 import junit.framework.TestCase;
 
+import com.sun.jna.Platform;
+
 public class KeyboardUtilsTest extends TestCase {
     
     public void testIsPressed() throws Exception {
diff --git a/test/com/sun/jna/examples/RasterRangesUtilsTest.java b/contrib/platform/test/com/sun/jna/platform/RasterRangesUtilsTest.java
similarity index 88%
rename from test/com/sun/jna/examples/RasterRangesUtilsTest.java
rename to contrib/platform/test/com/sun/jna/platform/RasterRangesUtilsTest.java
index 4f1b021..84d1d2a 100644
--- a/test/com/sun/jna/examples/RasterRangesUtilsTest.java
+++ b/contrib/platform/test/com/sun/jna/platform/RasterRangesUtilsTest.java
@@ -10,8 +10,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  */
-package com.sun.jna.examples;
-
+package com.sun.jna.platform;
 import java.awt.Graphics2D;
 import java.awt.Rectangle;
 import java.awt.Shape;
@@ -23,11 +22,11 @@ import java.util.Set;
 
 import junit.framework.TestCase;
 
-import com.sun.jna.examples.RasterRangesUtils.RangesOutput;
+import com.sun.jna.platform.RasterRangesUtils.RangesOutput;
 
 public class RasterRangesUtilsTest extends TestCase {
 
-    Set rects = new HashSet();
+    Set<Rectangle> rects = new HashSet<Rectangle>();
 
     RangesOutput out = new RangesOutput() {
         public boolean outputRange(int x, int y, int w, int h) {
@@ -45,11 +44,12 @@ public class RasterRangesUtilsTest extends TestCase {
     }
 
     public void testDecomposeRectangles() {
-        Set EXPECTED = new HashSet() {
+        Set<Rectangle> EXPECTED = new HashSet<Rectangle>() {
             {
                 add(new Rectangle(0, 0, 100, 50));
                 add(new Rectangle(0, 50, 50, 50));
             }
+    		private static final long serialVersionUID = 1L;
         };
 
         Area mask = new Area(new Rectangle(0, 0, 100, 100));
@@ -61,13 +61,14 @@ public class RasterRangesUtilsTest extends TestCase {
     }
 
     public void testDecomposeRectanglesWithHole() {
-        Set EXPECTED = new HashSet() {
+        Set<Rectangle> EXPECTED = new HashSet<Rectangle>() {
             {
                 add(new Rectangle(0, 0, 100, 25));
                 add(new Rectangle(0, 25, 25, 50));
                 add(new Rectangle(75, 25, 25, 50));
                 add(new Rectangle(0, 75, 100, 25));
             }
+    		private static final long serialVersionUID = 1L;
         };
 
         Area mask = new Area(new Rectangle(0, 0, 100, 100));
diff --git a/test/com/sun/jna/examples/WindowUtilsTest.java b/contrib/platform/test/com/sun/jna/platform/WindowUtilsTest.java
similarity index 97%
rename from test/com/sun/jna/examples/WindowUtilsTest.java
rename to contrib/platform/test/com/sun/jna/platform/WindowUtilsTest.java
index 48f79fc..5dccc2d 100644
--- a/test/com/sun/jna/examples/WindowUtilsTest.java
+++ b/contrib/platform/test/com/sun/jna/platform/WindowUtilsTest.java
@@ -10,7 +10,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform;
 
 import java.awt.AlphaComposite;
 import java.awt.BorderLayout;
@@ -43,10 +43,10 @@ import javax.swing.JWindow;
 import javax.swing.SwingUtilities;
 import javax.swing.event.MouseInputAdapter;
 
-import com.sun.jna.Platform;
-
 import junit.framework.TestCase;
 
+import com.sun.jna.Platform;
+
 // NOTE: java.awt.Robot can't properly capture transparent pixels
 // Transparency tests are disabled until this can be resolved
 // TODO: test method invocations before/after pack, before/after setvisible
@@ -114,8 +114,7 @@ public class WindowUtilsTest extends TestCase {
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             content = frame.getContentPane();
             w = frame;
-        }
-        else {
+        } else {
             Frame frame = JOptionPane.getRootFrame();
             JWindow window = new JWindow(frame, gconfig);
             content = window.getContentPane();
@@ -124,7 +123,8 @@ public class WindowUtilsTest extends TestCase {
         final Window f = w;
         WindowUtils.setWindowTransparent(f, true);
         content.add(new JButton("Quit") {
-            {
+			private static final long serialVersionUID = 1L;
+			{
                 addActionListener(new ActionListener() {
                     public void actionPerformed(ActionEvent e) {
                         System.exit(0);
@@ -133,6 +133,7 @@ public class WindowUtilsTest extends TestCase {
             }
         }, BorderLayout.SOUTH);
         content.add(new JComponent() {
+			private static final long serialVersionUID = 1L;
             public Dimension getPreferredSize() {
                 return new Dimension(SIZE, SIZE);
             }
@@ -188,7 +189,8 @@ public class WindowUtilsTest extends TestCase {
         transparent.setLocation(X, Y);
         ((JComponent)transparent.getContentPane()).setOpaque(false);
         transparent.getContentPane().add(new JComponent() {
-            public Dimension getPreferredSize() {
+			private static final long serialVersionUID = 1L;
+			public Dimension getPreferredSize() {
                 return new Dimension(W, H);
             }
             protected void paintComponent(Graphics g) {
@@ -281,6 +283,7 @@ public class WindowUtilsTest extends TestCase {
                      transparent.getBackground(), sample);
     }
     
+    /*
     public void testWindowRegion() throws Exception {
         if (GraphicsEnvironment.isHeadless())
             return;
@@ -339,6 +342,7 @@ public class WindowUtilsTest extends TestCase {
             sample = robot.getPixelColor(where.x, where.y);
         }
     }
+    */
     
     public void testDisposeHeavyweightForcer() throws Exception {
 		if (GraphicsEnvironment.isHeadless())
@@ -360,10 +364,10 @@ public class WindowUtilsTest extends TestCase {
 		});
 		try {
 			Window[] owned = w.getOwnedWindows();
-			WeakReference ref = null;
+			WeakReference<Window> ref = null;
 			for (int i = 0; i < owned.length; i++) {
 				if (owned[i].getClass().getName().indexOf("Heavy") != -1) {
-					ref = new WeakReference(owned[i]);
+					ref = new WeakReference<Window>(owned[i]);
 					break;
 				}
 			}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Advapi32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Advapi32Test.java
new file mode 100644
index 0000000..633e680
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Advapi32Test.java
@@ -0,0 +1,475 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Memory;
+import com.sun.jna.Native;
+import com.sun.jna.WString;
+import com.sun.jna.platform.win32.LMAccess.USER_INFO_1;
+import com.sun.jna.platform.win32.WinBase.FILETIME;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.platform.win32.WinNT.PSIDByReference;
+import com.sun.jna.platform.win32.WinNT.SID_AND_ATTRIBUTES;
+import com.sun.jna.platform.win32.WinNT.SID_NAME_USE;
+import com.sun.jna.platform.win32.WinNT.WELL_KNOWN_SID_TYPE;
+import com.sun.jna.platform.win32.WinReg.HKEYByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Advapi32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Advapi32Test.class);
+    }
+    
+    public void testGetUserName() {    	
+		IntByReference len = new IntByReference();
+		assertFalse(Advapi32.INSTANCE.GetUserNameW(null, len));
+		assertEquals(W32Errors.ERROR_INSUFFICIENT_BUFFER, Kernel32.INSTANCE.GetLastError());
+		char[] buffer = new char[len.getValue()];
+		assertTrue(Advapi32.INSTANCE.GetUserNameW(buffer, len));
+		String username = Native.toString(buffer);
+		assertTrue(username.length() > 0);
+    }
+    
+    public void testLookupAccountName() {
+		IntByReference pSid = new IntByReference(0);
+		IntByReference pDomain = new IntByReference(0);
+		PointerByReference peUse = new PointerByReference();
+		String accountName = "Administrator";
+		assertFalse(Advapi32.INSTANCE.LookupAccountName(
+				null, accountName, null, pSid, null, pDomain, peUse));
+		assertEquals(W32Errors.ERROR_INSUFFICIENT_BUFFER, Kernel32.INSTANCE.GetLastError());
+		assertTrue(pSid.getValue() > 0);
+		Memory sidMemory = new Memory(pSid.getValue());
+		PSID pSidMemory = new PSID(sidMemory);
+		char[] referencedDomainName = new char[pDomain.getValue() + 1]; 
+		assertTrue(Advapi32.INSTANCE.LookupAccountName(
+				null, accountName, pSidMemory, pSid, referencedDomainName, pDomain, peUse));
+		assertEquals(SID_NAME_USE.SidTypeUser, peUse.getPointer().getInt(0));
+		assertTrue(Native.toString(referencedDomainName).length() > 0);
+    }
+    
+    public void testIsValidSid() {
+    	String sidString = "S-1-1-0"; // Everyone
+    	PSIDByReference sid = new PSIDByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertStringSidToSid(sidString, sid));
+    	assertTrue(Advapi32.INSTANCE.IsValidSid(sid.getValue()));
+    	int sidLength = Advapi32.INSTANCE.GetLengthSid(sid.getValue());
+    	assertTrue(sidLength > 0);
+    	assertTrue(Advapi32.INSTANCE.IsValidSid(sid.getValue()));
+    }
+
+    public void testGetSidLength() {
+    	String sidString = "S-1-1-0"; // Everyone
+    	PSIDByReference sid = new PSIDByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertStringSidToSid(sidString, sid));
+    	assertTrue(12 == Advapi32.INSTANCE.GetLengthSid(sid.getValue()));
+    }
+    
+    public void testLookupAccountSid() {
+    	// get SID bytes
+    	String sidString = "S-1-1-0"; // Everyone
+    	PSIDByReference sid = new PSIDByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertStringSidToSid(sidString, sid));
+    	int sidLength = Advapi32.INSTANCE.GetLengthSid(sid.getValue());
+    	assertTrue(sidLength > 0);
+    	// lookup account
+    	IntByReference cchName = new IntByReference();
+    	IntByReference cchReferencedDomainName = new IntByReference();
+    	PointerByReference peUse = new PointerByReference();
+    	assertFalse(Advapi32.INSTANCE.LookupAccountSid(null, sid.getValue(), 
+    			null, cchName, null, cchReferencedDomainName, peUse));
+		assertEquals(W32Errors.ERROR_INSUFFICIENT_BUFFER, Kernel32.INSTANCE.GetLastError());
+    	assertTrue(cchName.getValue() > 0);
+    	assertTrue(cchReferencedDomainName.getValue() > 0);
+		char[] referencedDomainName = new char[cchReferencedDomainName.getValue()];
+		char[] name = new char[cchName.getValue()];
+    	assertTrue(Advapi32.INSTANCE.LookupAccountSid(null, sid.getValue(), 
+    			name, cchName, referencedDomainName, cchReferencedDomainName, peUse));
+		assertEquals(5, peUse.getPointer().getInt(0)); // SidTypeWellKnownGroup
+		String nameString = Native.toString(name);
+		String referencedDomainNameString = Native.toString(referencedDomainName);
+		assertTrue(nameString.length() > 0);
+		assertEquals("Everyone", nameString);
+		assertTrue(referencedDomainNameString.length() == 0);
+    	assertEquals(null, Kernel32.INSTANCE.LocalFree(sid.getValue().getPointer()));
+    }
+    
+    public void testConvertSid() {
+    	String sidString = "S-1-1-0"; // Everyone
+    	PSIDByReference sid = new PSIDByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertStringSidToSid(
+    			sidString, sid));
+    	PointerByReference convertedSidStringPtr = new PointerByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertSidToStringSid(
+    			sid.getValue(), convertedSidStringPtr));
+    	String convertedSidString = convertedSidStringPtr.getValue().getString(0, true);
+    	assertEquals(convertedSidString, sidString);
+    	assertEquals(null, Kernel32.INSTANCE.LocalFree(convertedSidStringPtr.getValue()));
+    	assertEquals(null, Kernel32.INSTANCE.LocalFree(sid.getValue().getPointer()));
+    }
+    
+    public void testLogonUser() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	assertFalse(Advapi32.INSTANCE.LogonUser("AccountDoesntExist", ".", "passwordIsInvalid", 
+    			WinBase.LOGON32_LOGON_NETWORK, WinBase.LOGON32_PROVIDER_DEFAULT, phToken));
+    	assertTrue(W32Errors.ERROR_SUCCESS != Kernel32.INSTANCE.GetLastError());
+    }
+    
+    public void testOpenThreadTokenNoToken() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLE threadHandle = Kernel32.INSTANCE.GetCurrentThread();
+    	assertNotNull(threadHandle);
+    	assertFalse(Advapi32.INSTANCE.OpenThreadToken(threadHandle, 
+    			WinNT.TOKEN_READ, false, phToken));
+    	assertEquals(W32Errors.ERROR_NO_TOKEN, Kernel32.INSTANCE.GetLastError());
+    }
+    
+    public void testOpenProcessToken() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+    	assertTrue(Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+    			WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken));
+    	assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));    	
+    }
+    
+    public void testOpenThreadOrProcessToken() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLE threadHandle = Kernel32.INSTANCE.GetCurrentThread();
+    	if (! Advapi32.INSTANCE.OpenThreadToken(threadHandle, 
+    			WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, true, phToken)) {
+        	assertEquals(W32Errors.ERROR_NO_TOKEN, Kernel32.INSTANCE.GetLastError());
+        	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+        	assertTrue(Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+        			WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken));
+    	}
+    	assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));
+    }
+    
+    public void testDuplicateToken() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLEByReference phTokenDup = new HANDLEByReference();
+    	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+        assertTrue(Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+        		WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken));
+        assertTrue(Advapi32.INSTANCE.DuplicateToken(phToken.getValue(), 
+        		WinNT.SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation, phTokenDup));
+    	assertTrue(Kernel32.INSTANCE.CloseHandle(phTokenDup.getValue()));
+    	assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));
+    }
+    
+    public void testGetTokenOwnerInformation() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+        assertTrue(Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+        		WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken));
+        IntByReference tokenInformationLength = new IntByReference();
+        assertFalse(Advapi32.INSTANCE.GetTokenInformation(phToken.getValue(), 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenOwner, null, 0, tokenInformationLength));
+        assertEquals(W32Errors.ERROR_INSUFFICIENT_BUFFER, Kernel32.INSTANCE.GetLastError());
+        Memory tokenInformationBuffer = new Memory(tokenInformationLength.getValue());
+		WinNT.TOKEN_OWNER owner = new WinNT.TOKEN_OWNER(tokenInformationBuffer);
+        assertTrue(Advapi32.INSTANCE.GetTokenInformation(phToken.getValue(), 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenOwner, owner, 
+        		tokenInformationLength.getValue(), tokenInformationLength));
+        assertTrue(tokenInformationLength.getValue() > 0);
+        assertTrue(Advapi32.INSTANCE.IsValidSid(owner.Owner));
+        int sidLength = Advapi32.INSTANCE.GetLengthSid(owner.Owner);
+        assertTrue(sidLength < tokenInformationLength.getValue());
+        assertTrue(sidLength > 0);
+    	// System.out.println(Advapi32Util.convertSidToStringSid(owner.Owner));
+        assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));    	
+    }
+    
+    public void testGetTokenUserInformation() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+        assertTrue(Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+        		WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken));
+        IntByReference tokenInformationLength = new IntByReference();
+        assertFalse(Advapi32.INSTANCE.GetTokenInformation(phToken.getValue(), 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenUser, null, 0, tokenInformationLength));
+        assertEquals(W32Errors.ERROR_INSUFFICIENT_BUFFER, Kernel32.INSTANCE.GetLastError());
+		WinNT.TOKEN_USER user = new WinNT.TOKEN_USER(tokenInformationLength.getValue());
+        assertTrue(Advapi32.INSTANCE.GetTokenInformation(phToken.getValue(), 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenUser, user, 
+        		tokenInformationLength.getValue(), tokenInformationLength));
+        assertTrue(tokenInformationLength.getValue() > 0);
+        assertTrue(Advapi32.INSTANCE.IsValidSid(user.User.Sid));
+        int sidLength = Advapi32.INSTANCE.GetLengthSid(user.User.Sid);
+        assertTrue(sidLength > 0);
+        assertTrue(sidLength < tokenInformationLength.getValue());
+    	// System.out.println(Advapi32Util.convertSidToStringSid(user.User.Sid));
+        assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));
+    }    
+    
+    public void testGetTokenGroupsInformation() {
+    	HANDLEByReference phToken = new HANDLEByReference();
+    	HANDLE processHandle = Kernel32.INSTANCE.GetCurrentProcess();
+        assertTrue(Advapi32.INSTANCE.OpenProcessToken(processHandle, 
+        		WinNT.TOKEN_DUPLICATE | WinNT.TOKEN_QUERY, phToken));
+        IntByReference tokenInformationLength = new IntByReference();
+        assertFalse(Advapi32.INSTANCE.GetTokenInformation(phToken.getValue(), 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenGroups, null, 0, tokenInformationLength));
+        assertEquals(W32Errors.ERROR_INSUFFICIENT_BUFFER, Kernel32.INSTANCE.GetLastError());
+		WinNT.TOKEN_GROUPS groups = new WinNT.TOKEN_GROUPS(tokenInformationLength.getValue());
+        assertTrue(Advapi32.INSTANCE.GetTokenInformation(phToken.getValue(), 
+        		WinNT.TOKEN_INFORMATION_CLASS.TokenGroups, groups, 
+        		tokenInformationLength.getValue(), tokenInformationLength));
+        assertTrue(tokenInformationLength.getValue() > 0);
+        assertTrue(groups.GroupCount > 0);
+    	for (SID_AND_ATTRIBUTES sidAndAttribute : groups.getGroups()) {
+    		assertTrue(Advapi32.INSTANCE.IsValidSid(sidAndAttribute.Sid));
+    		// System.out.println(Advapi32Util.convertSidToStringSid(sidAndAttribute.Sid));
+    	}
+        assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));
+    }
+    
+    public void testImpersonateLoggedOnUser() {
+    	USER_INFO_1 userInfo = new USER_INFO_1();
+    	userInfo.usri1_name = new WString("JNAAdvapi32TestImp");
+    	userInfo.usri1_password = new WString("!JNAP$$Wrd0");
+    	userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserAdd(null, 1, userInfo, null));
+		try {
+			HANDLEByReference phUser = new HANDLEByReference();
+			try {
+				assertTrue(Advapi32.INSTANCE.LogonUser(userInfo.usri1_name.toString(),
+						null, userInfo.usri1_password.toString(), WinBase.LOGON32_LOGON_NETWORK, 
+						WinBase.LOGON32_PROVIDER_DEFAULT, phUser));
+				assertTrue(Advapi32.INSTANCE.ImpersonateLoggedOnUser(phUser.getValue()));
+				assertTrue(Advapi32.INSTANCE.RevertToSelf());
+			} finally {
+				if (phUser.getValue() != WinBase.INVALID_HANDLE_VALUE) {
+					Kernel32.INSTANCE.CloseHandle(phUser.getValue());
+				}				
+			}
+		} finally {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserDel(
+	    			null, userInfo.usri1_name.toString()));			
+		}
+    }
+    
+    public void testRegOpenKeyEx() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft", 0, WinNT.KEY_READ, phKey));
+    	assertTrue(WinBase.INVALID_HANDLE_VALUE != phKey.getValue());
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	
+    }
+    
+    public void testRegQueryValueEx() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", 0, WinNT.KEY_READ, phKey));
+    	IntByReference lpcbData = new IntByReference();
+    	IntByReference lpType = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryValueEx(
+    			phKey.getValue(), "User Agent", 0, lpType, (char[]) null, lpcbData));
+    	assertEquals(WinNT.REG_SZ, lpType.getValue());
+    	assertTrue(lpcbData.getValue() > 0);
+    	char[] buffer = new char[lpcbData.getValue()];
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryValueEx(
+    			phKey.getValue(), "User Agent", 0, lpType, buffer, lpcbData)); 
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	
+    }
+    
+    public void testRegDeleteValue() {
+    	assertEquals(W32Errors.ERROR_FILE_NOT_FOUND, Advapi32.INSTANCE.RegDeleteValue(
+    			WinReg.HKEY_CURRENT_USER, "JNAAdvapi32TestDoesntExist"));
+    }
+    
+    public void testRegSetValueEx_REG_SZ() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	// create parent key
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software", 0, WinNT.KEY_WRITE | WinNT.KEY_READ, phKey));
+    	HKEYByReference phkTest = new HKEYByReference();
+    	IntByReference lpdwDisposition = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCreateKeyEx(
+    			phKey.getValue(), "JNAAdvapi32Test", 0, null, 0, WinNT.KEY_ALL_ACCESS, 
+    			null, phkTest, lpdwDisposition));
+    	// write a REG_SZ value
+    	char[] lpData = Native.toCharArray("Test");
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegSetValueEx(
+    			phkTest.getValue(), "REG_SZ", 0, WinNT.REG_SZ, lpData, lpData.length * 2));
+    	// re-read the REG_SZ value
+    	IntByReference lpType = new IntByReference();
+    	IntByReference lpcbData = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryValueEx(
+    			phkTest.getValue(), "REG_SZ", 0, lpType, (char[]) null, lpcbData));
+    	assertEquals(WinNT.REG_SZ, lpType.getValue());
+    	assertTrue(lpcbData.getValue() > 0);
+    	char[] buffer = new char[lpcbData.getValue()];
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryValueEx(
+    			phkTest.getValue(), "REG_SZ", 0, lpType, buffer, lpcbData)); 
+    	assertEquals("Test", Native.toString(buffer));
+    	// delete the test key
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(
+    			phkTest.getValue()));    	    	    	
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegDeleteKey(
+    			phKey.getValue(), "JNAAdvapi32Test"));
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	    	    	
+    }
+    
+    public void testRegSetValueEx_DWORD() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	// create parent key
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software", 0, WinNT.KEY_WRITE | WinNT.KEY_READ, phKey));
+    	HKEYByReference phkTest = new HKEYByReference();
+    	IntByReference lpdwDisposition = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCreateKeyEx(
+    			phKey.getValue(), "JNAAdvapi32Test", 0, null, 0, WinNT.KEY_ALL_ACCESS, 
+    			null, phkTest, lpdwDisposition));
+    	// write a REG_DWORD value
+    	int value = 42145;
+        byte[] data = new byte[4];
+        data[0] = (byte)(value & 0xff);
+        data[1] = (byte)((value >> 8) & 0xff);
+        data[2] = (byte)((value >> 16) & 0xff);
+        data[3] = (byte)((value >> 24) & 0xff);
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegSetValueEx(
+    			phkTest.getValue(), "DWORD", 0, WinNT.REG_DWORD, data, 4));    	
+    	// re-read the REG_DWORD value
+    	IntByReference lpType = new IntByReference();
+    	IntByReference lpcbData = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryValueEx(
+    			phkTest.getValue(), "DWORD", 0, lpType, (char[]) null, lpcbData));
+    	assertEquals(WinNT.REG_DWORD, lpType.getValue());
+    	assertEquals(4, lpcbData.getValue());
+    	IntByReference valueRead = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryValueEx(
+    			phkTest.getValue(), "DWORD", 0, lpType, valueRead, lpcbData));
+    	assertEquals(value, valueRead.getValue());
+    	// delete the test key
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(
+    			phkTest.getValue()));    	    	    	
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegDeleteKey(
+    			phKey.getValue(), "JNAAdvapi32Test"));
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	    	    	
+    }
+    
+    public void testRegCreateKeyEx() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software", 0, WinNT.KEY_WRITE | WinNT.KEY_READ, phKey));
+    	HKEYByReference phkResult = new HKEYByReference();
+    	IntByReference lpdwDisposition = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCreateKeyEx(
+    			phKey.getValue(), "JNAAdvapi32Test", 0, null, 0, WinNT.KEY_ALL_ACCESS, 
+    			null, phkResult, lpdwDisposition));
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phkResult.getValue()));    	    	    	
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegDeleteKey(
+    			phKey.getValue(), "JNAAdvapi32Test"));
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	    	
+    }
+    
+    public void testRegDeleteKey() {
+    	assertEquals(W32Errors.ERROR_FILE_NOT_FOUND, Advapi32.INSTANCE.RegDeleteKey(
+    			WinReg.HKEY_CURRENT_USER, "JNAAdvapi32TestDoesntExist"));
+    }
+    
+    public void testRegEnumKeyEx() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", 
+    			0, WinNT.KEY_READ, phKey));
+    	IntByReference lpcSubKeys = new IntByReference();
+    	IntByReference lpcMaxSubKeyLen = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryInfoKey(
+    			phKey.getValue(), null, null, null, lpcSubKeys, lpcMaxSubKeyLen, null, null, 
+    			null, null, null, null));
+    	char[] name = new char[lpcMaxSubKeyLen.getValue() + 1];
+    	for (int i = 0; i < lpcSubKeys.getValue(); i++) {
+    		IntByReference lpcchValueName = new IntByReference(lpcMaxSubKeyLen.getValue() + 1);
+        	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegEnumKeyEx(
+        			phKey.getValue(), i, name, lpcchValueName, null, null, null, null));
+        	assertEquals(Native.toString(name).length(), lpcchValueName.getValue());
+    	}
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	    	
+    }
+    
+    public void testRegEnumValue() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", 
+    			0, WinNT.KEY_READ, phKey));
+    	IntByReference lpcValues = new IntByReference();
+    	IntByReference lpcMaxValueNameLen = new IntByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryInfoKey(
+    			phKey.getValue(), null, null, null, null, null, null, lpcValues, 
+    			lpcMaxValueNameLen, null, null, null));
+    	char[] name = new char[lpcMaxValueNameLen.getValue() + 1];
+    	for (int i = 0; i < lpcValues.getValue(); i++) {
+    		IntByReference lpcchValueName = new IntByReference(lpcMaxValueNameLen.getValue() + 1);
+    		IntByReference lpType = new IntByReference(); 
+        	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegEnumValue(
+        			phKey.getValue(), i, name, lpcchValueName, null, 
+        			lpType, null, null));
+        	assertEquals(Native.toString(name).length(), lpcchValueName.getValue());
+    	}
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	
+    }
+    
+    public void testRegQueryInfoKey() {
+    	IntByReference lpcClass = new IntByReference();
+    	IntByReference lpcSubKeys = new IntByReference();
+    	IntByReference lpcMaxSubKeyLen = new IntByReference();
+    	IntByReference lpcValues = new IntByReference();
+    	IntByReference lpcMaxClassLen = new IntByReference();
+    	IntByReference lpcMaxValueNameLen = new IntByReference();
+    	IntByReference lpcMaxValueLen = new IntByReference();
+    	IntByReference lpcbSecurityDescriptor = new IntByReference();
+    	FILETIME lpftLastWriteTime = new FILETIME();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegQueryInfoKey(
+    			WinReg.HKEY_LOCAL_MACHINE, null, lpcClass, null, 
+    			lpcSubKeys, lpcMaxSubKeyLen, lpcMaxClassLen, lpcValues, 
+    			lpcMaxValueNameLen, lpcMaxValueLen, lpcbSecurityDescriptor, 
+    			lpftLastWriteTime));
+    	assertTrue(lpcSubKeys.getValue() > 0);
+    }
+    
+    public void testIsWellKnownSid() {
+    	String sidString = "S-1-1-0"; // Everyone
+    	PSIDByReference sid = new PSIDByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertStringSidToSid(sidString, sid));
+    	assertTrue(Advapi32.INSTANCE.IsWellKnownSid(sid.getValue(), 
+    			WELL_KNOWN_SID_TYPE.WinWorldSid));
+    	assertFalse(Advapi32.INSTANCE.IsWellKnownSid(sid.getValue(), 
+    			WELL_KNOWN_SID_TYPE.WinAccountAdministratorSid));
+    }
+    
+    public void testCreateWellKnownSid() {
+    	PSID pSid = new PSID(WinNT.SECURITY_MAX_SID_SIZE);
+    	IntByReference cbSid = new IntByReference(WinNT.SECURITY_MAX_SID_SIZE);
+    	assertTrue(Advapi32.INSTANCE.CreateWellKnownSid(WELL_KNOWN_SID_TYPE.WinWorldSid,
+    			null, pSid, cbSid));
+    	assertTrue(Advapi32.INSTANCE.IsWellKnownSid(pSid, 
+    			WELL_KNOWN_SID_TYPE.WinWorldSid));
+    	assertTrue(cbSid.getValue() <= WinNT.SECURITY_MAX_SID_SIZE);
+    	PointerByReference convertedSidStringPtr = new PointerByReference();
+    	assertTrue(Advapi32.INSTANCE.ConvertSidToStringSid(
+    			pSid, convertedSidStringPtr));
+    	String convertedSidString = convertedSidStringPtr.getValue().getString(0, true);
+    	assertEquals("S-1-1-0", convertedSidString);
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Advapi32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Advapi32UtilTest.java
new file mode 100644
index 0000000..8e9cf79
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Advapi32UtilTest.java
@@ -0,0 +1,244 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import java.util.TreeMap;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.WString;
+import com.sun.jna.platform.win32.Advapi32Util.Account;
+import com.sun.jna.platform.win32.LMAccess.USER_INFO_1;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.platform.win32.WinNT.PSID;
+import com.sun.jna.platform.win32.WinNT.SID_NAME_USE;
+import com.sun.jna.platform.win32.WinNT.WELL_KNOWN_SID_TYPE;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Advapi32UtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Advapi32UtilTest.class);
+        String currentUserName = Advapi32Util.getUserName();
+        System.out.println("GetUserName: " + currentUserName);
+		
+        for(Account group : Advapi32Util.getCurrentUserGroups()) {
+			System.out.println(" " + group.fqn + " [" + group.sidString + "]");
+		}
+		
+		Account accountByName = Advapi32Util.getAccountByName(currentUserName);
+		System.out.println("AccountByName: " + currentUserName);
+        System.out.println(" Fqn: " + accountByName.fqn);
+        System.out.println(" Domain: " + accountByName.domain);
+        System.out.println(" Sid: " + accountByName.sidString);
+        
+        Account accountBySid = Advapi32Util.getAccountBySid(new PSID(accountByName.sid));
+		System.out.println("AccountBySid: " + accountByName.sidString);
+        System.out.println(" Fqn: " + accountBySid.fqn);
+        System.out.println(" Name: " + accountBySid.name);
+        System.out.println(" Domain: " + accountBySid.domain);
+    }
+    
+	public void testGetUsername() {
+		String username = Advapi32Util.getUserName();
+		assertTrue(username.length() > 0);
+	}
+	
+	public void testGetAccountBySid() {		
+		String accountName = Advapi32Util.getUserName();
+		Account currentUser = Advapi32Util.getAccountByName(accountName);
+		Account account = Advapi32Util.getAccountBySid(new PSID(currentUser.sid));
+		assertEquals(SID_NAME_USE.SidTypeUser, account.accountType);
+		assertEquals(currentUser.fqn.toLowerCase(), account.fqn.toLowerCase());
+		assertEquals(currentUser.name.toLowerCase(), account.name.toLowerCase());
+		assertEquals(currentUser.domain.toLowerCase(), account.domain.toLowerCase());
+		assertEquals(currentUser.sidString, account.sidString);		
+	}
+
+	public void testGetAccountByName() {		
+		String accountName = Advapi32Util.getUserName();
+		Account account = Advapi32Util.getAccountByName(accountName);
+		assertEquals(SID_NAME_USE.SidTypeUser, account.accountType);
+	}
+	
+	public void testGetAccountNameFromSid() {
+        assertEquals("Everyone", Advapi32Util.getAccountBySid("S-1-1-0").name);		
+	}
+
+	public void testGetAccountSidFromName() {
+        assertEquals("S-1-1-0", Advapi32Util.getAccountByName("Everyone").sidString);
+	}
+	
+	public void testConvertSid() {
+    	String sidString = "S-1-1-0"; // Everyone
+    	byte[] sidBytes = Advapi32Util.convertStringSidToSid(sidString);
+    	assertTrue(sidBytes.length > 0);
+    	String convertedSidString = Advapi32Util.convertSidToStringSid(new PSID(sidBytes));
+    	assertEquals(convertedSidString, sidString);
+	}
+	
+	public void testGetCurrentUserGroups() {
+		Account[] groups = Advapi32Util.getCurrentUserGroups();
+		assertTrue(groups.length > 0);
+		for(Account group : groups) {
+			assertTrue(group.name.length() > 0);
+			assertTrue(group.sidString.length() > 0);
+			assertTrue(group.sid.length > 0);
+		}
+	}
+	
+	public void testGetUserGroups() {
+    	USER_INFO_1 userInfo = new USER_INFO_1();
+    	userInfo.usri1_name = new WString("JNANetapi32TestUser");
+    	userInfo.usri1_password = new WString("!JNAP$$Wrd0");
+    	userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
+		try {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserAdd(
+	    			null, 1, userInfo, null));
+			HANDLEByReference phUser = new HANDLEByReference();
+			try {
+				assertTrue(Advapi32.INSTANCE.LogonUser(userInfo.usri1_name.toString(),
+						null, userInfo.usri1_password.toString(), WinBase.LOGON32_LOGON_NETWORK, 
+						WinBase.LOGON32_PROVIDER_DEFAULT, phUser));
+				Account[] groups = Advapi32Util.getTokenGroups(phUser.getValue());
+				assertTrue(groups.length > 0);
+				for(Account group : groups) {
+					assertTrue(group.name.length() > 0);
+					assertTrue(group.sidString.length() > 0);
+					assertTrue(group.sid.length > 0);
+				}
+			} finally {
+				if (phUser.getValue() != WinBase.INVALID_HANDLE_VALUE) {
+					Kernel32.INSTANCE.CloseHandle(phUser.getValue());
+				}				
+			}
+		} finally {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserDel(
+	    			null, userInfo.usri1_name.toString()));			
+		}
+	}
+	
+	public void testGetUserAccount() {
+    	USER_INFO_1 userInfo = new USER_INFO_1();
+    	userInfo.usri1_name = new WString("JNANetapi32TestUser");
+    	userInfo.usri1_password = new WString("!JNAP$$Wrd0");
+    	userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
+		try {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserAdd(
+	    			null, 1, userInfo, null));
+			HANDLEByReference phUser = new HANDLEByReference();
+			try {
+				assertTrue(Advapi32.INSTANCE.LogonUser(userInfo.usri1_name.toString(),
+						null, userInfo.usri1_password.toString(), WinBase.LOGON32_LOGON_NETWORK, 
+						WinBase.LOGON32_PROVIDER_DEFAULT, phUser));
+				Advapi32Util.Account account = Advapi32Util.getTokenAccount(phUser.getValue());
+				assertTrue(account.name.length() > 0);
+				assertEquals(userInfo.usri1_name.toString(), account.name);
+			} finally {
+				if (phUser.getValue() != WinBase.INVALID_HANDLE_VALUE) {
+					Kernel32.INSTANCE.CloseHandle(phUser.getValue());
+				}
+			}
+		} finally {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserDel(
+	    			null, userInfo.usri1_name.toString()));			
+		}
+	}	
+	
+	public void testRegistryKeyExists() {
+		assertTrue(Advapi32Util.registryKeyExists(WinReg.HKEY_LOCAL_MACHINE, 
+				""));
+		assertTrue(Advapi32Util.registryKeyExists(WinReg.HKEY_LOCAL_MACHINE, 
+				"Software\\Microsoft"));
+		assertFalse(Advapi32Util.registryKeyExists(WinReg.HKEY_LOCAL_MACHINE, 
+				"KeyDoesNotExist\\SubKeyDoesNotExist"));
+	}
+	
+	public void testRegistryValueExists() {
+		assertFalse(Advapi32Util.registryValueExists(WinReg.HKEY_LOCAL_MACHINE, 
+				"Software\\Microsoft", ""));
+		assertFalse(Advapi32Util.registryValueExists(WinReg.HKEY_LOCAL_MACHINE, 
+				"Software\\Microsoft", "KeyDoesNotExist"));
+		assertTrue(Advapi32Util.registryValueExists(WinReg.HKEY_LOCAL_MACHINE, 
+				"SYSTEM\\CurrentControlSet\\Control", "SystemBootDevice"));
+	}	
+	
+	public void testRegistryCreateDeleteKey() {
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		assertTrue(Advapi32Util.registryKeyExists(WinReg.HKEY_CURRENT_USER, "Software\\JNA"));
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		assertFalse(Advapi32Util.registryKeyExists(WinReg.HKEY_CURRENT_USER, "Software\\JNA"));
+	}
+
+	public void testRegistryDeleteValue() {
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		Advapi32Util.registrySetIntValue(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "IntValue", 42);
+		assertTrue(Advapi32Util.registryValueExists(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "IntValue"));
+		Advapi32Util.registryDeleteValue(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "IntValue");		
+		assertFalse(Advapi32Util.registryValueExists(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "IntValue"));
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+	}
+	
+	public void testRegistrySetGetIntValue() {
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		Advapi32Util.registrySetIntValue(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "IntValue", 42);
+		assertEquals(42, Advapi32Util.registryGetIntValue(WinReg.HKEY_CURRENT_USER, 
+				"Software\\JNA", "IntValue"));
+		assertTrue(Advapi32Util.registryValueExists(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "IntValue"));
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+	}
+	
+	public void testRegistrySetGetStringValue() {
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		Advapi32Util.registrySetStringValue(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "StringValue", "Hello World");
+		assertEquals("Hello World", Advapi32Util.registryGetStringValue(WinReg.HKEY_CURRENT_USER, 
+				"Software\\JNA", "StringValue"));
+		assertTrue(Advapi32Util.registryValueExists(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "StringValue"));
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");		
+	}
+
+	public void testRegistryGetKeys() {
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "Key1");
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "Key2");
+		String[] subKeys = Advapi32Util.registryGetKeys(WinReg.HKEY_CURRENT_USER, "Software\\JNA");
+		assertEquals(2, subKeys.length);
+		assertEquals(subKeys[0], "Key1");
+		assertEquals(subKeys[1], "Key2");
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "Key1");
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "Key2");
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");				
+	}
+	
+	public void testRegistryGetValues() {
+		Advapi32Util.registryCreateKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");
+		Advapi32Util.registrySetIntValue(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "FourtyTwo", 42);
+		Advapi32Util.registrySetStringValue(WinReg.HKEY_CURRENT_USER, "Software\\JNA", "42", "FourtyTwo");
+		TreeMap<String, Object> values = Advapi32Util.registryGetValues(WinReg.HKEY_CURRENT_USER, "Software\\JNA");
+		assertEquals(2, values.keySet().size());
+		assertEquals("FourtyTwo", values.get("42"));
+		assertEquals(42, values.get("FourtyTwo"));
+		Advapi32Util.registryDeleteKey(WinReg.HKEY_CURRENT_USER, "Software", "JNA");						
+	}
+	
+	public void testIsWellKnownSid() {		
+		String everyoneString = "S-1-1-0";
+        assertTrue(Advapi32Util.isWellKnownSid(everyoneString, WELL_KNOWN_SID_TYPE.WinWorldSid));		
+        assertFalse(Advapi32Util.isWellKnownSid(everyoneString, WELL_KNOWN_SID_TYPE.WinAccountAdministratorSid));
+        byte[] everyoneBytes = Advapi32Util.convertStringSidToSid(everyoneString);
+        assertTrue(Advapi32Util.isWellKnownSid(everyoneBytes, WELL_KNOWN_SID_TYPE.WinWorldSid));		
+        assertFalse(Advapi32Util.isWellKnownSid(everyoneBytes, WELL_KNOWN_SID_TYPE.WinAccountAdministratorSid));
+	}
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Crypt32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Crypt32Test.java
new file mode 100644
index 0000000..2f43924
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Crypt32Test.java
@@ -0,0 +1,65 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.WinCrypt.DATA_BLOB;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Crypt32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Crypt32Test.class);
+    }
+    
+    public void testCryptProtectUnprotectData() {
+    	DATA_BLOB pDataIn = new DATA_BLOB("hello world");
+    	DATA_BLOB pDataEncrypted = new DATA_BLOB();
+    	assertTrue(Crypt32.INSTANCE.CryptProtectData(pDataIn, "description", 
+    			null, null, null, 0, pDataEncrypted));
+    	PointerByReference pDescription = new PointerByReference();
+    	DATA_BLOB pDataDecrypted = new DATA_BLOB();
+    	assertTrue(Crypt32.INSTANCE.CryptUnprotectData(pDataEncrypted, pDescription, 
+    			null, null, null, 0, pDataDecrypted));
+    	assertEquals("description", pDescription.getValue().getString(0, true));
+    	assertEquals("hello world", pDataDecrypted.pbData.getString(0));
+    	Kernel32.INSTANCE.LocalFree(pDataEncrypted.pbData);
+    	Kernel32.INSTANCE.LocalFree(pDataDecrypted.pbData);
+    	Kernel32.INSTANCE.LocalFree(pDescription.getValue());
+    }
+    
+    public void testCryptProtectUnprotectDataWithEntropy() {
+    	DATA_BLOB pDataIn = new DATA_BLOB("hello world");
+    	DATA_BLOB pDataEncrypted = new DATA_BLOB();
+    	DATA_BLOB pEntropy = new DATA_BLOB("entropy");
+    	assertTrue(Crypt32.INSTANCE.CryptProtectData(pDataIn, "description", 
+    			pEntropy, null, null, 0, pDataEncrypted));
+    	PointerByReference pDescription = new PointerByReference();
+    	DATA_BLOB pDataDecrypted = new DATA_BLOB();
+    	// can't decrypt without entropy
+    	assertFalse(Crypt32.INSTANCE.CryptUnprotectData(pDataEncrypted, pDescription, 
+    			null, null, null, 0, pDataDecrypted));
+    	// decrypt with entropy
+    	assertTrue(Crypt32.INSTANCE.CryptUnprotectData(pDataEncrypted, pDescription, 
+    			pEntropy, null, null, 0, pDataDecrypted));
+    	assertEquals("description", pDescription.getValue().getString(0, true));
+    	assertEquals("hello world", pDataDecrypted.pbData.getString(0));
+    	Kernel32.INSTANCE.LocalFree(pDataEncrypted.pbData);
+    	Kernel32.INSTANCE.LocalFree(pDataDecrypted.pbData);
+    	Kernel32.INSTANCE.LocalFree(pDescription.getValue());
+    }    
+}
\ No newline at end of file
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Crypt32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Crypt32UtilTest.java
new file mode 100644
index 0000000..83b43da
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Crypt32UtilTest.java
@@ -0,0 +1,49 @@
+/* Copyright (c) Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Native;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Crypt32UtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Crypt32UtilTest.class);
+    }
+    
+    public void testCryptProtectUnprotectData() {
+    	byte[] data = new byte[2];
+    	data[0] = 42;
+    	data[1] = 12;
+    	byte[] protectedData = Crypt32Util.cryptProtectData(data);
+    	byte[] unprotectedData = Crypt32Util.cryptUnprotectData(protectedData);
+    	assertEquals(data.length, unprotectedData.length);
+    	assertEquals(data[0], unprotectedData[0]);
+    	assertEquals(data[1], unprotectedData[1]);
+    }
+    
+    public void testCryptProtectUnprotectMachineKey() {
+    	String s = "Hello World";
+    	byte[] data = Native.toByteArray(s);
+    	byte[] protectedData = Crypt32Util.cryptProtectData(data, 
+    			WinCrypt.CRYPTPROTECT_LOCAL_MACHINE | WinCrypt.CRYPTPROTECT_UI_FORBIDDEN);
+    	byte[] unprotectedData = Crypt32Util.cryptUnprotectData(protectedData, 
+    			WinCrypt.CRYPTPROTECT_LOCAL_MACHINE);
+    	String unprotectedString = Native.toString(unprotectedData);
+    	assertEquals(s, unprotectedString);
+    }
+}
\ No newline at end of file
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/GDI32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/GDI32Test.java
new file mode 100644
index 0000000..576705c
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/GDI32Test.java
@@ -0,0 +1,40 @@
+/* Copyright (c) 2010 Timothy Wall, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.*;
+import com.sun.jna.platform.win32.WinGDI.BITMAPINFO;
+import com.sun.jna.platform.win32.WinGDI.RGBQUAD;
+
+/**
+ * @author twalljava[at]dev[dot]java[dot]net
+ */
+public class GDI32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(GDI32Test.class);
+    }
+    
+    public void testBITMAPINFO() {    	
+        BITMAPINFO info = new BITMAPINFO();
+        assertEquals("Wrong size for BITMAPINFO()", 44, info.size());
+
+        info = new BITMAPINFO(2);
+        assertEquals("Wrong size for BITMAPINFO(2)", 48, info.size());
+
+        info = new BITMAPINFO(16);
+        assertEquals("Wrong size for BITMAPINFO(16)", 104, info.size());
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Kernel32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Kernel32Test.java
new file mode 100644
index 0000000..6da32d3
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Kernel32Test.java
@@ -0,0 +1,262 @@
+/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+import java.util.Calendar;
+import java.util.TimeZone;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Native;
+import com.sun.jna.NativeMappedConverter;
+import com.sun.jna.Platform;
+import com.sun.jna.platform.win32.WinBase.MEMORYSTATUSEX;
+import com.sun.jna.platform.win32.WinBase.SYSTEM_INFO;
+import com.sun.jna.platform.win32.WinDef.DWORD;
+import com.sun.jna.platform.win32.WinDef.HWND;
+import com.sun.jna.platform.win32.WinNT.HANDLE;
+import com.sun.jna.platform.win32.WinNT.LARGE_INTEGER;
+import com.sun.jna.platform.win32.WinNT.OSVERSIONINFO;
+import com.sun.jna.platform.win32.WinNT.OSVERSIONINFOEX;
+import com.sun.jna.ptr.IntByReference;
+
+public class Kernel32Test extends TestCase {
+    
+    public static void main(String[] args) {
+    	OSVERSIONINFO lpVersionInfo = new OSVERSIONINFO(); 
+    	assertTrue(Kernel32.INSTANCE.GetVersionEx(lpVersionInfo));
+    	System.out.println("Operating system: " 
+    			+ lpVersionInfo.dwMajorVersion.longValue() + "." + lpVersionInfo.dwMinorVersion.longValue()
+    			+ " (" + lpVersionInfo.dwBuildNumber + ")"
+    			+ " [" + Native.toString(lpVersionInfo.szCSDVersion) + "]");
+        junit.textui.TestRunner.run(Kernel32Test.class);
+    }
+    
+    public void testGetDriveType() {
+        if (!Platform.isWindows()) return;
+        
+        Kernel32 kernel = Kernel32.INSTANCE;
+        assertEquals("Wrong drive type.", WinBase.DRIVE_FIXED, kernel.GetDriveType("c:"));
+    }
+    
+    public void testStructureOutArgument() {
+        Kernel32 kernel = Kernel32.INSTANCE;
+        WinBase.SYSTEMTIME time = new WinBase.SYSTEMTIME();
+        kernel.GetSystemTime(time);
+        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
+        assertEquals("Hour not properly set",
+                     cal.get(Calendar.HOUR_OF_DAY), time.wHour);
+        assertEquals("Day not properly set",
+                     cal.get(Calendar.DAY_OF_WEEK)-1,
+                     time.wDayOfWeek);
+        assertEquals("Year not properly set", 
+                     cal.get(Calendar.YEAR), time.wYear);
+    }
+    
+    public void testGetLastError() {
+        Kernel32 kernel = Kernel32.INSTANCE;
+        int ERRCODE  = 8;
+        
+        kernel.SetLastError(ERRCODE);
+        int code = kernel.GetLastError();
+        assertEquals("Wrong error value after SetLastError", ERRCODE, code);
+        
+        if (kernel.GetProcessVersion(-1) == 0) {
+            final int INVALID_PARAMETER = 87;
+            code = kernel.GetLastError();
+            assertEquals("Wrong error value after failed syscall", INVALID_PARAMETER, code);
+        }
+        else {
+            fail("GetProcessId(NULL) should fail");
+        }
+    }
+    
+    public void testConvertHWND_BROADCAST() {
+        HWND hwnd = WinUser.HWND_BROADCAST;
+        NativeMappedConverter.getInstance(hwnd.getClass()).toNative(hwnd, null);
+    }
+    
+    public void testGetComputerName() {
+    	IntByReference lpnSize = new IntByReference(0);
+    	assertFalse(Kernel32.INSTANCE.GetComputerName(null, lpnSize));
+    	assertEquals(W32Errors.ERROR_BUFFER_OVERFLOW, Kernel32.INSTANCE.GetLastError());
+    	char buffer[] = new char[WinBase.MAX_COMPUTERNAME_LENGTH() + 1];
+    	lpnSize.setValue(buffer.length);
+    	assertTrue(Kernel32.INSTANCE.GetComputerName(buffer, lpnSize));
+    }
+
+    public void testWaitForSingleObject() {
+		HANDLE handle = Kernel32.INSTANCE.CreateEvent(null, false, false, null);
+		
+		// handle runs into timeout since it is not triggered
+		// WAIT_TIMEOUT = 0x00000102 
+		assertEquals(W32Errors.WAIT_TIMEOUT, Kernel32.INSTANCE.WaitForSingleObject(
+				handle, 1000));
+		
+		Kernel32.INSTANCE.CloseHandle(handle);
+	}
+    
+    public void testWaitForMultipleObjects(){    	
+    	HANDLE[] handles = new HANDLE[2];
+    	
+		handles[0] = Kernel32.INSTANCE.CreateEvent(null, false, false, null);
+		handles[1] = Kernel32.INSTANCE.CreateEvent(null, false, false, null);
+		
+		// handle runs into timeout since it is not triggered
+		// WAIT_TIMEOUT = 0x00000102
+		assertEquals(W32Errors.WAIT_TIMEOUT, Kernel32.INSTANCE.WaitForMultipleObjects(
+				handles.length, handles, false, 1000));
+		
+		Kernel32.INSTANCE.CloseHandle(handles[0]);
+		Kernel32.INSTANCE.CloseHandle(handles[1]);
+		
+		// invalid Handle
+		handles[0] = WinBase.INVALID_HANDLE_VALUE;
+		handles[1] = Kernel32.INSTANCE.CreateEvent(null, false, false, null);
+		
+		// returns WAIT_FAILED since handle is invalid
+		assertEquals(WinBase.WAIT_FAILED, Kernel32.INSTANCE.WaitForMultipleObjects(
+				handles.length, handles, false, 5000));
+
+		Kernel32.INSTANCE.CloseHandle(handles[1]);
+    }   
+    
+    public void testGetCurrentThreadId() {
+    	assertTrue(Kernel32.INSTANCE.GetCurrentThreadId() > 0);
+    }
+    
+    public void testGetCurrentThread() {
+    	HANDLE h = Kernel32.INSTANCE.GetCurrentThread();
+    	assertNotNull(h);
+    	assertFalse(h.equals(0));
+    	// CloseHandle does not need to be called for a thread handle
+    	assertFalse(Kernel32.INSTANCE.CloseHandle(h));
+    	assertEquals(W32Errors.ERROR_INVALID_HANDLE, Kernel32.INSTANCE.GetLastError());
+    }
+
+    public void testOpenThread() {
+    	HANDLE h = Kernel32.INSTANCE.OpenThread(WinNT.THREAD_ALL_ACCESS, false, 
+    			Kernel32.INSTANCE.GetCurrentThreadId());
+    	assertNotNull(h);
+    	assertFalse(h.equals(0));
+    	assertTrue(Kernel32.INSTANCE.CloseHandle(h));
+    }
+    
+    public void testGetCurrentProcessId() {
+    	assertTrue(Kernel32.INSTANCE.GetCurrentProcessId() > 0);
+    }
+    
+    public void testGetCurrentProcess() {
+    	HANDLE h = Kernel32.INSTANCE.GetCurrentProcess();
+    	assertNotNull(h);
+    	assertFalse(h.equals(0));
+    	// CloseHandle does not need to be called for a process handle
+    	assertFalse(Kernel32.INSTANCE.CloseHandle(h));
+    	assertEquals(W32Errors.ERROR_INVALID_HANDLE, Kernel32.INSTANCE.GetLastError());
+    }    
+    
+    public void testOpenProcess() {
+    	HANDLE h = Kernel32.INSTANCE.OpenProcess(0, false, 
+    			Kernel32.INSTANCE.GetCurrentProcessId());
+    	assertNull(h);
+    	// opening your own process fails with access denied
+    	assertEquals(W32Errors.ERROR_ACCESS_DENIED, Kernel32.INSTANCE.GetLastError());
+    }
+    
+    public void testGetTempPath() {
+    	char[] buffer = new char[WinDef.MAX_PATH]; 
+    	assertTrue(Kernel32.INSTANCE.GetTempPath(new DWORD(WinDef.MAX_PATH), buffer).intValue() > 0);    	
+    }
+    
+    public void testGetVersion() {
+    	DWORD version = Kernel32.INSTANCE.GetVersion();
+    	assertTrue(version.getHigh().intValue() != 0);
+    	assertTrue(version.getLow().intValue() >= 0);
+    }
+    
+    public void testGetVersionEx_OSVERSIONINFO() {
+    	OSVERSIONINFO lpVersionInfo = new OSVERSIONINFO(); 
+    	assertEquals(lpVersionInfo.size(), lpVersionInfo.dwOSVersionInfoSize.longValue());
+    	assertTrue(Kernel32.INSTANCE.GetVersionEx(lpVersionInfo));
+    	assertTrue(lpVersionInfo.dwMajorVersion.longValue() > 0);
+    	assertTrue(lpVersionInfo.dwMinorVersion.longValue() >= 0);
+    	assertEquals(lpVersionInfo.size(), lpVersionInfo.dwOSVersionInfoSize.longValue());
+    	assertTrue(lpVersionInfo.dwPlatformId.longValue() > 0);
+    	assertTrue(lpVersionInfo.dwBuildNumber.longValue() > 0);
+    	assertTrue(Native.toString(lpVersionInfo.szCSDVersion).length() >= 0);    	
+    }
+    
+    public void testGetVersionEx_OSVERSIONINFOEX() {
+    	OSVERSIONINFOEX lpVersionInfo = new OSVERSIONINFOEX(); 
+    	assertEquals(lpVersionInfo.size(), lpVersionInfo.dwOSVersionInfoSize.longValue());
+    	assertTrue(Kernel32.INSTANCE.GetVersionEx(lpVersionInfo));
+    	assertTrue(lpVersionInfo.dwMajorVersion.longValue() > 0);
+    	assertTrue(lpVersionInfo.dwMinorVersion.longValue() >= 0);
+    	assertEquals(lpVersionInfo.size(), lpVersionInfo.dwOSVersionInfoSize.longValue());
+    	assertTrue(lpVersionInfo.dwPlatformId.longValue() > 0);
+    	assertTrue(lpVersionInfo.dwBuildNumber.longValue() > 0);
+    	assertTrue(Native.toString(lpVersionInfo.szCSDVersion).length() >= 0);    	
+    	assertTrue(lpVersionInfo.wProductType >= 0);
+    }
+    
+    public void testGetSystemInfo() {
+    	SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
+    	Kernel32.INSTANCE.GetSystemInfo(lpSystemInfo);
+    	assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
+    }
+    
+    public void testIsWow64Process() {
+    	try {
+	    	IntByReference isWow64 = new IntByReference(42);
+	    	HANDLE hProcess = Kernel32.INSTANCE.GetCurrentProcess();
+	    	assertTrue(Kernel32.INSTANCE.IsWow64Process(hProcess, isWow64));
+	    	assertTrue(0 == isWow64.getValue() || 1 == isWow64.getValue());
+    	} catch (UnsatisfiedLinkError e) {
+    		// IsWow64Process is not available on this OS
+    	}
+    }
+    
+    public void testGetNativeSystemInfo() {
+    	try {
+        	SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
+        	Kernel32.INSTANCE.GetNativeSystemInfo(lpSystemInfo);
+        	assertTrue(lpSystemInfo.dwNumberOfProcessors.intValue() > 0);
+    	} catch (UnsatisfiedLinkError e) {
+    		// only available under WOW64
+    	}
+    }
+    
+    public void testGlobalMemoryStatusEx() {
+    	MEMORYSTATUSEX lpBuffer = new MEMORYSTATUSEX();
+    	assertTrue(Kernel32.INSTANCE.GlobalMemoryStatusEx(lpBuffer));
+    	assertTrue(lpBuffer.ullTotalPhys.longValue() > 0);
+    	assertTrue(lpBuffer.dwMemoryLoad.intValue() >= 0 && lpBuffer.dwMemoryLoad.intValue() <= 100);
+    	assertEquals(0, lpBuffer.ullAvailExtendedVirtual.intValue());
+    }
+
+    public void testGetLogicalDriveStrings() {
+    	DWORD dwSize = Kernel32.INSTANCE.GetLogicalDriveStrings(new DWORD(0), null);
+    	assertTrue(dwSize.intValue() > 0);
+    	char buf[] = new char[dwSize.intValue()];
+    	assertTrue(Kernel32.INSTANCE.GetLogicalDriveStrings(dwSize, buf).intValue() > 0);
+    }
+    
+    public void testGetDiskFreeSpaceEx() {
+    	LARGE_INTEGER.ByReference lpFreeBytesAvailable = new LARGE_INTEGER.ByReference(); 
+    	LARGE_INTEGER.ByReference lpTotalNumberOfBytes = new LARGE_INTEGER.ByReference(); 
+    	LARGE_INTEGER.ByReference lpTotalNumberOfFreeBytes = new LARGE_INTEGER.ByReference(); 
+    	assertTrue(Kernel32.INSTANCE.GetDiskFreeSpaceEx(null, 
+    			lpFreeBytesAvailable, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes));
+    	assertTrue(lpTotalNumberOfFreeBytes.getValue() > 0);
+    	assertTrue(lpTotalNumberOfFreeBytes.getValue() < lpTotalNumberOfBytes.getValue());
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Kernel32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Kernel32UtilTest.java
new file mode 100644
index 0000000..0e11fa9
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Kernel32UtilTest.java
@@ -0,0 +1,105 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.WinNT.LARGE_INTEGER;
+
+import junit.framework.TestCase;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Kernel32UtilTest extends TestCase {
+	
+    public static void main(String[] args) throws Exception {
+        System.out.println("Computer name: " + Kernel32Util.getComputerName());
+        System.out.println("Temp path: " + Kernel32Util.getTempPath());
+        // logical drives
+        System.out.println("Logical drives: ");
+		String[] logicalDrives = Kernel32Util.getLogicalDriveStrings();
+		for(String logicalDrive : logicalDrives) {
+			// drive type
+			System.out.println(" " + logicalDrive + " (" 
+					+ Kernel32.INSTANCE.GetDriveType(logicalDrive) + ")");
+			// free space
+	    	LARGE_INTEGER.ByReference lpFreeBytesAvailable = new LARGE_INTEGER.ByReference(); 
+	    	LARGE_INTEGER.ByReference lpTotalNumberOfBytes = new LARGE_INTEGER.ByReference(); 
+	    	LARGE_INTEGER.ByReference lpTotalNumberOfFreeBytes = new LARGE_INTEGER.ByReference(); 
+	    	if (Kernel32.INSTANCE.GetDiskFreeSpaceEx(logicalDrive, lpFreeBytesAvailable, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes)) {
+		    	System.out.println("  Total: " + formatBytes(lpTotalNumberOfBytes.getValue()));
+		    	System.out.println("   Free: " + formatBytes(lpTotalNumberOfFreeBytes.getValue()));
+	    	}
+		}
+
+		junit.textui.TestRunner.run(Kernel32UtilTest.class);
+    }
+
+	/**
+	 * Format bytes.
+	 * @param bytes
+	 *  Bytes.
+	 * @return
+	 *  Rounded string representation of the byte size.
+	 */
+    private static String formatBytes(long bytes) {
+		if (bytes == 1) { // bytes
+			return String.format("%d byte", bytes);
+		} else if (bytes < 1024) { // bytes
+			return String.format("%d bytes", bytes);
+		} else if (bytes < 1048576 && bytes % 1024 == 0) { // Kb
+			return String.format("%.0f KB", (double) bytes / 1024);
+		} else if (bytes < 1048576) { // Kb
+			return String.format("%.1f KB", (double) bytes / 1024);
+		} else if (bytes % 1048576 == 0 && bytes < 1073741824) { // Mb
+			return String.format("%.0f MB", (double) bytes / 1048576);
+		} else if (bytes < 1073741824) { // Mb
+			return String.format("%.1f MB", (double) bytes / 1048576);
+		} else if (bytes % 1073741824 == 0 && bytes < 1099511627776L) { // GB
+			return String.format("%.0f GB", (double) bytes / 1073741824);
+		} else if (bytes < 1099511627776L ) {
+			return String.format("%.1f GB", (double) bytes / 1073741824);
+		} else if (bytes % 1099511627776L == 0 && bytes < 1125899906842624L) { // TB
+			return String.format("%.0f TB", (double) bytes / 1099511627776L);
+		} else if (bytes < 1125899906842624L ) {
+			return String.format("%.1f TB", (double) bytes / 1099511627776L);
+		} else {
+			return String.format("%d bytes", bytes);
+		}
+    }
+    
+	public void testGetComputerName() {
+		assertTrue(Kernel32Util.getComputerName().length() > 0);
+	}
+	
+	public void testFormatMessageFromLastErrorCode() {
+	    assertEquals("The remote server has been paused or is in the process of being started.",
+	    		Kernel32Util.formatMessageFromLastErrorCode(W32Errors.ERROR_SHARING_PAUSED));	
+	}
+
+	public void testFormatMessageFromHR() {
+		assertEquals("The operation completed successfully.",
+				Kernel32Util.formatMessageFromHR(W32Errors.S_OK));
+	}
+	
+	public void testGetTempPath() {
+		assertTrue(Kernel32Util.getTempPath().length() > 0);
+	}
+	
+	public void testGetLogicalDriveStrings() {
+		String[] logicalDrives = Kernel32Util.getLogicalDriveStrings();
+		assertTrue(logicalDrives.length > 0);
+		for(String logicalDrive : logicalDrives) {
+			assertTrue(logicalDrive.length() > 0);
+		}
+	}
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Netapi32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Netapi32Test.java
new file mode 100644
index 0000000..50c488f
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Netapi32Test.java
@@ -0,0 +1,258 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.NativeLong;
+import com.sun.jna.WString;
+import com.sun.jna.platform.win32.DsGetDC.DS_DOMAIN_TRUSTS;
+import com.sun.jna.platform.win32.DsGetDC.PDOMAIN_CONTROLLER_INFO;
+import com.sun.jna.platform.win32.DsGetDC.PDS_DOMAIN_TRUSTS;
+import com.sun.jna.platform.win32.LMAccess.GROUP_INFO_2;
+import com.sun.jna.platform.win32.LMAccess.GROUP_USERS_INFO_0;
+import com.sun.jna.platform.win32.LMAccess.LOCALGROUP_USERS_INFO_0;
+import com.sun.jna.platform.win32.LMAccess.USER_INFO_1;
+import com.sun.jna.platform.win32.NTSecApi.LSA_FOREST_TRUST_RECORD;
+import com.sun.jna.platform.win32.NTSecApi.PLSA_FOREST_TRUST_INFORMATION;
+import com.sun.jna.platform.win32.NTSecApi.PLSA_FOREST_TRUST_RECORD;
+import com.sun.jna.platform.win32.Netapi32Util.User;
+import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.NativeLongByReference;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Netapi32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Netapi32Test.class);
+    }
+
+    public void testNetGetJoinInformation() {
+		IntByReference bufferType = new IntByReference();
+    	assertEquals(W32Errors.ERROR_INVALID_PARAMETER, Netapi32.INSTANCE.NetGetJoinInformation(
+    			null, null, bufferType));
+    	PointerByReference lpNameBuffer = new PointerByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetGetJoinInformation(
+    			null, lpNameBuffer, bufferType));
+    	assertTrue(lpNameBuffer.getValue().getString(0).length() > 0);
+    	assertTrue(bufferType.getValue() > 0);
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(
+    			lpNameBuffer.getValue()));
+    }
+    
+    public void testNetGetLocalGroups() {
+    	for(int i = 0; i < 2; i++) {
+			PointerByReference bufptr = new PointerByReference();
+			IntByReference entriesRead = new IntByReference();
+			IntByReference totalEntries = new IntByReference();		
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetLocalGroupEnum(null, i, bufptr, 
+	    			LMCons.MAX_PREFERRED_LENGTH, 
+	    			entriesRead, 
+	    			totalEntries, 
+	    			null));
+	    	assertTrue(entriesRead.getValue() > 0);
+	    	assertEquals(totalEntries.getValue(), entriesRead.getValue());
+	    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(
+	    			bufptr.getValue()));
+    	}
+    }
+    
+    public void testNetGetDCName() {
+    	PointerByReference lpNameBuffer = new PointerByReference();
+    	IntByReference BufferType = new IntByReference();
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetGetJoinInformation(null, lpNameBuffer, BufferType));    	
+    	if (BufferType.getValue() == LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName) {
+	    	PointerByReference bufptr = new PointerByReference();
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetGetDCName(null, null, bufptr));
+	    	String dc = bufptr.getValue().getString(0);
+	    	assertTrue(dc.length() > 0);
+	    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
+    	}
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(lpNameBuffer.getValue()));
+    }
+    
+    public void testNetUserGetGroups() {
+    	User[] users = Netapi32Util.getUsers();
+    	assertTrue(users.length >= 1);
+    	PointerByReference bufptr = new PointerByReference();
+    	IntByReference entriesread = new IntByReference();
+    	IntByReference totalentries = new IntByReference();
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserGetGroups(
+    			null, users[0].name, 0, bufptr, LMCons.MAX_PREFERRED_LENGTH, 
+    			entriesread, totalentries));
+    	GROUP_USERS_INFO_0 lgroup = new GROUP_USERS_INFO_0(bufptr.getValue());    	
+    	GROUP_USERS_INFO_0[] lgroups = (GROUP_USERS_INFO_0[]) lgroup.toArray(entriesread.getValue());
+        for (GROUP_USERS_INFO_0 localGroupInfo : lgroups) {
+        	assertTrue(localGroupInfo.grui0_name.length() > 0);
+        }
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
+    }
+    
+    public void testNetUserGetLocalGroups() {
+    	String currentUser = Secur32Util.getUserNameEx(
+				EXTENDED_NAME_FORMAT.NameSamCompatible);
+    	PointerByReference bufptr = new PointerByReference();
+    	IntByReference entriesread = new IntByReference();
+    	IntByReference totalentries = new IntByReference();
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserGetLocalGroups(
+    			null, currentUser, 0, 0, bufptr, LMCons.MAX_PREFERRED_LENGTH, 
+    			entriesread, totalentries));
+    	LOCALGROUP_USERS_INFO_0 lgroup = new LOCALGROUP_USERS_INFO_0(bufptr.getValue());    	
+    	LOCALGROUP_USERS_INFO_0[] lgroups = (LOCALGROUP_USERS_INFO_0[]) lgroup.toArray(entriesread.getValue());
+        for (LOCALGROUP_USERS_INFO_0 localGroupInfo : lgroups) {
+        	assertTrue(localGroupInfo.lgrui0_name.length() > 0);
+        }
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
+    }    
+    
+    public void testNetGroupEnum() {
+    	PointerByReference bufptr = new PointerByReference();
+    	IntByReference entriesread = new IntByReference();
+    	IntByReference totalentries = new IntByReference();
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetGroupEnum(
+    			null, 2, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries, null));    	
+    	GROUP_INFO_2 group = new GROUP_INFO_2(bufptr.getValue());    	
+    	GROUP_INFO_2[] groups = (GROUP_INFO_2[]) group.toArray(entriesread.getValue());
+        for (GROUP_INFO_2 grpi : groups) {
+        	assertTrue(grpi.grpi2_name.length() > 0);
+        }
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
+    }
+    
+    public void testNetUserEnum() {
+    	PointerByReference bufptr = new PointerByReference();
+    	IntByReference entriesread = new IntByReference();
+    	IntByReference totalentries = new IntByReference();
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserEnum(    			
+    			null, 1, 0, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries, null));    	
+    	USER_INFO_1 userinfo = new USER_INFO_1(bufptr.getValue());    	
+    	USER_INFO_1[] userinfos = (USER_INFO_1[]) userinfo.toArray(entriesread.getValue());
+        for (USER_INFO_1 ui : userinfos) {
+        	assertTrue(ui.usri1_name.length() > 0);
+        }
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
+    }    
+    
+    public void testNetUserAdd() {
+    	USER_INFO_1 userInfo = new USER_INFO_1();
+    	userInfo.usri1_name = new WString("JNANetapi32TestUser");
+    	userInfo.usri1_password = new WString("!JNAP$$Wrd0");
+    	userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserAdd(
+    			Kernel32Util.getComputerName(), 1, userInfo, null));
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserDel(
+    			Kernel32Util.getComputerName(), userInfo.usri1_name.toString()));
+    }
+    
+    public void testNetUserChangePassword() {
+    	USER_INFO_1 userInfo = new USER_INFO_1();
+    	userInfo.usri1_name = new WString("JNANetapi32TestUser");
+    	userInfo.usri1_password = new WString("!JNAP$$Wrd0");
+    	userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
+    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserAdd(
+    			Kernel32Util.getComputerName(), 1, userInfo, null));
+    	try {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserChangePassword(
+	    			Kernel32Util.getComputerName(), userInfo.usri1_name.toString(), userInfo.usri1_password.toString(),
+	    			"!JNAP%%Wrd1"));
+    	} finally {
+	    	assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserDel(
+	    			Kernel32Util.getComputerName(), userInfo.usri1_name.toString()));
+    	}
+    }    
+    
+    public void testNetUserDel() {
+    	assertEquals(LMErr.NERR_UserNotFound, Netapi32.INSTANCE.NetUserDel(
+    			Kernel32Util.getComputerName(), "JNANetapi32TestUserDoesntExist"));
+    }
+    
+    public void testDsGetDcName() {
+    	if (Netapi32Util.getJoinStatus() != LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName)
+    		return;
+    	
+        PDOMAIN_CONTROLLER_INFO.ByReference pdci = new PDOMAIN_CONTROLLER_INFO.ByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.DsGetDcName(
+    			null, null, null, null, 0, pdci));
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(
+    			pdci.getPointer()));
+    }
+    
+    public void testDsGetForestTrustInformation() {
+    	if (Netapi32Util.getJoinStatus() != LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName)
+    		return;
+
+    	String domainController = Netapi32Util.getDCName();    	
+    	PLSA_FOREST_TRUST_INFORMATION.ByReference pfti = new PLSA_FOREST_TRUST_INFORMATION.ByReference();
+    	assertEquals(W32Errors.NO_ERROR, Netapi32.INSTANCE.DsGetForestTrustInformation(
+    			domainController, null, 0, pfti));
+    	
+    	assertTrue(pfti.fti.RecordCount.intValue() >= 0);
+    	
+    	for (PLSA_FOREST_TRUST_RECORD precord : pfti.fti.getEntries()) {
+    		LSA_FOREST_TRUST_RECORD.UNION data = precord.tr.u;
+			switch(precord.tr.ForestTrustType) {
+			case NTSecApi.ForestTrustTopLevelName:
+    		case NTSecApi.ForestTrustTopLevelNameEx:
+    			assertTrue(data.TopLevelName.Length > 0);
+    			assertTrue(data.TopLevelName.MaximumLength > 0);
+    			assertTrue(data.TopLevelName.MaximumLength >= data.TopLevelName.Length);
+    			assertTrue(data.TopLevelName.getString().length() > 0);
+    			break;
+    		case NTSecApi.ForestTrustDomainInfo:
+    			assertTrue(data.DomainInfo.DnsName.Length > 0);
+    			assertTrue(data.DomainInfo.DnsName.MaximumLength > 0);
+    			assertTrue(data.DomainInfo.DnsName.MaximumLength >= data.DomainInfo.DnsName.Length);
+    			assertTrue(data.DomainInfo.DnsName.getString().length() > 0);
+    			assertTrue(data.DomainInfo.NetbiosName.Length > 0);
+    			assertTrue(data.DomainInfo.NetbiosName.MaximumLength > 0);
+    			assertTrue(data.DomainInfo.NetbiosName.MaximumLength >= data.DomainInfo.NetbiosName.Length);
+    			assertTrue(data.DomainInfo.NetbiosName.getString().length() > 0);
+    			assertTrue(Advapi32.INSTANCE.IsValidSid(data.DomainInfo.Sid));
+    			assertTrue(Advapi32Util.convertSidToStringSid(data.DomainInfo.Sid).startsWith("S-"));
+    			break;
+			}
+    	}
+    	
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(
+    			pfti.getPointer()));   	
+    }
+    
+    
+    public void testDsEnumerateDomainTrusts() {
+    	if (Netapi32Util.getJoinStatus() != LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName)
+    		return;
+
+    	NativeLongByReference domainCount = new NativeLongByReference();
+    	PDS_DOMAIN_TRUSTS.ByReference domains = new PDS_DOMAIN_TRUSTS.ByReference();
+    	assertEquals(W32Errors.NO_ERROR, Netapi32.INSTANCE.DsEnumerateDomainTrusts(
+    			null, new NativeLong(DsGetDC.DS_DOMAIN_VALID_FLAGS), domains, domainCount));
+    	
+    	assertTrue(domainCount.getValue().intValue() >= 0);
+    	
+    	DS_DOMAIN_TRUSTS[] trusts = domains.getTrusts(domainCount.getValue().intValue());
+    	for(DS_DOMAIN_TRUSTS trust : trusts) {
+			assertTrue(trust.NetbiosDomainName.length() > 0);
+			assertTrue(trust.DnsDomainName.length() > 0);
+			assertTrue(Advapi32.INSTANCE.IsValidSid(trust.DomainSid));
+			assertTrue(Advapi32Util.convertSidToStringSid(trust.DomainSid).startsWith("S-"));
+			assertTrue(Ole32Util.getStringFromGUID(trust.DomainGuid).startsWith("{"));
+    	}
+    	
+    	assertEquals(W32Errors.ERROR_SUCCESS, Netapi32.INSTANCE.NetApiBufferFree(
+    			domains.getPointer()));   	    	
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Netapi32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Netapi32UtilTest.java
new file mode 100644
index 0000000..0ccdcaa
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Netapi32UtilTest.java
@@ -0,0 +1,155 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.Netapi32Util.DomainController;
+import com.sun.jna.platform.win32.Netapi32Util.DomainTrust;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Netapi32UtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Netapi32UtilTest.class);
+        System.out.println("Domain: " + Netapi32Util.getDomainName("localhost"));
+		// server local groups
+		Netapi32Util.LocalGroup[] localGroups = Netapi32Util.getLocalGroups();
+        System.out.println("Local groups: " + localGroups.length);
+		for(Netapi32Util.LocalGroup localGroup : localGroups) {
+			System.out.println(" " + localGroup.name + " (" + localGroup.comment + ")");
+		}
+		// global groups
+		Netapi32Util.Group[] groups = Netapi32Util.getGlobalGroups();
+        System.out.println("Global groups: " + groups.length);
+		for(Netapi32Util.Group group : groups) {
+			System.out.println(" " + group.name);
+		}
+		// server users
+		Netapi32Util.User[] users = Netapi32Util.getUsers();
+        System.out.println("Users: " + users.length);
+		for(Netapi32Util.User user : users) {
+			System.out.println(" " + user.name);
+		}
+		// user local groups
+		Netapi32Util.Group[] userLocalGroups = Netapi32Util.getCurrentUserLocalGroups();
+        System.out.println("Local user groups: " + userLocalGroups.length);
+		for(Netapi32Util.Group localGroup : userLocalGroups) {
+			System.out.println(" " + localGroup.name);
+		}
+		// domain controller
+		if (Netapi32Util.getJoinStatus() == LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName) {
+			System.out.println("Pdc: " + Netapi32Util.getDCName());
+			DomainController dc = Netapi32Util.getDC();
+			System.out.println("Domain controller:");
+			System.out.println("    name: " + dc.name);
+			System.out.println(" address: " + dc.address);
+			System.out.println("  domain: " + dc.domainName);
+			System.out.println("    site: " + dc.clientSiteName);
+			System.out.println("  forest: " + dc.dnsForestName);
+			System.out.println("    guid: " + Ole32Util.getStringFromGUID(dc.domainGuid));
+		}		
+		// domain trusts
+		if (Netapi32Util.getJoinStatus() == LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName) {
+			DomainTrust[] trusts = Netapi32Util.getDomainTrusts();
+			System.out.println("Domain trusts: (" + trusts.length + ")");
+			for(DomainTrust trust : trusts) {
+				System.out.println(" " + trust.NetbiosDomainName + ": " + trust.DnsDomainName 
+						+ " (" + trust.DomainSidString + ")");
+			}
+		}
+    }
+    
+	public void testGetDomain() {
+		String computerName = System.getenv("COMPUTERNAME");
+		String domain = Netapi32Util.getDomainName(computerName);
+		assertTrue(domain.length() > 0);
+	}
+	
+	public void testGetLocalGroups() {
+		Netapi32Util.LocalGroup[] localGroups = Netapi32Util.getLocalGroups();
+		assertNotNull(localGroups);
+		for(Netapi32Util.LocalGroup localGroup : localGroups) {
+			assertTrue(localGroup.name.length() > 0);
+		}
+		assertTrue(localGroups.length > 0);
+	}
+
+	public void testGetUsers() {
+		Netapi32Util.User[] users = Netapi32Util.getUsers();
+		assertNotNull(users);
+		for(Netapi32Util.User user : users) {
+			assertTrue(user.name.length() > 0);
+		}
+		assertTrue(users.length > 0);
+	}
+	
+	public void testGetGlobalGroups() {
+		Netapi32Util.Group[] groups = Netapi32Util.getGlobalGroups();
+		assertNotNull(groups);
+		for(Netapi32Util.Group group : groups) {
+			assertTrue(group.name.length() > 0);
+		}
+		assertTrue(groups.length > 0);
+	}
+	
+	public void testGetCurrentUserLocalGroups() {
+		Netapi32Util.Group[] localGroups = Netapi32Util.getCurrentUserLocalGroups();
+		assertNotNull(localGroups);
+		for(Netapi32Util.Group localGroup : localGroups) {
+			assertTrue(localGroup.name.length() > 0);
+		}
+		assertTrue(localGroups.length > 0);
+	}
+
+	public void testGetJoinStatus() {
+		int joinStatus = Netapi32Util.getJoinStatus();
+		assertTrue(joinStatus == LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName
+				|| joinStatus == LMJoin.NETSETUP_JOIN_STATUS.NetSetupUnjoined
+				|| joinStatus == LMJoin.NETSETUP_JOIN_STATUS.NetSetupWorkgroupName);
+	}
+	
+	public void testGetDCName() {
+		if (Netapi32Util.getJoinStatus() != LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName)
+			return;
+		
+		String domainController = Netapi32Util.getDCName();
+		assertTrue(domainController.length() > 0);
+		assertTrue(domainController.startsWith("\\\\"));
+	}
+	
+	public void testGetDC() {
+		if (Netapi32Util.getJoinStatus() != LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName)
+			return;
+			
+		DomainController dc = Netapi32Util.getDC();
+		assertTrue(dc.address.startsWith("\\\\"));
+		assertTrue(dc.domainName.length() > 0);
+	}
+	
+	public void testGetDomainTrusts() {
+		if (Netapi32Util.getJoinStatus() != LMJoin.NETSETUP_JOIN_STATUS.NetSetupDomainName)
+			return;
+
+		DomainTrust[] trusts = Netapi32Util.getDomainTrusts();
+		assertTrue(trusts.length >= 0);
+		for(DomainTrust trust : trusts) {
+			assertTrue(trust.NetbiosDomainName.length() > 0);
+			assertTrue(trust.DnsDomainName.length() > 0);
+			assertTrue(Advapi32.INSTANCE.IsValidSid(trust.DomainSid));
+			assertTrue(trust.isInbound() || trust.isOutbound() || trust.isPrimary());
+		}
+	}
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/NtDllTest.java b/contrib/platform/test/com/sun/jna/platform/win32/NtDllTest.java
new file mode 100644
index 0000000..ed50dd1
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/NtDllTest.java
@@ -0,0 +1,51 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.Wdm.KEY_BASIC_INFORMATION;
+import com.sun.jna.platform.win32.Wdm.KEY_INFORMATION_CLASS;
+import com.sun.jna.platform.win32.WinReg.HKEYByReference;
+import com.sun.jna.ptr.IntByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class NtDllTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(NtDllTest.class);
+    }
+    
+    public void testZwQueryKey() {
+    	// open a key
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software", 0, WinNT.KEY_WRITE | WinNT.KEY_READ, phKey));
+    	// query key info
+    	IntByReference resultLength = new IntByReference();    	
+    	assertEquals(NTStatus.STATUS_BUFFER_TOO_SMALL, NtDll.INSTANCE.ZwQueryKey(
+    			phKey.getValue(), KEY_INFORMATION_CLASS.KeyBasicInformation, 
+    			null, 0, resultLength));
+    	assertTrue(resultLength.getValue() > 0);
+    	KEY_BASIC_INFORMATION keyInformation = new KEY_BASIC_INFORMATION(resultLength.getValue());
+    	assertEquals(NTStatus.STATUS_SUCCESS, NtDll.INSTANCE.ZwQueryKey(
+    			phKey.getValue(), Wdm.KEY_INFORMATION_CLASS.KeyBasicInformation, 
+    			keyInformation, resultLength.getValue(), resultLength));    	
+    	// show
+    	assertEquals("Software", keyInformation.getName());
+    	// close key
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));    	    	    	    	
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/NtDllUtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/NtDllUtilTest.java
new file mode 100644
index 0000000..d9bc6b4
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/NtDllUtilTest.java
@@ -0,0 +1,35 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.WinReg.HKEYByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class NtDllUtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(NtDllUtilTest.class);
+    }
+
+    public void testGetKeyName() {
+    	HKEYByReference phKey = new HKEYByReference();
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegOpenKeyEx(
+    			WinReg.HKEY_CURRENT_USER, "Software", 0, WinNT.KEY_WRITE | WinNT.KEY_READ, phKey));
+    	assertEquals("Software", NtDllUtil.getKeyName(phKey.getValue()));
+    	assertEquals(W32Errors.ERROR_SUCCESS, Advapi32.INSTANCE.RegCloseKey(phKey.getValue()));
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Ole32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Ole32Test.java
new file mode 100644
index 0000000..77411b2
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Ole32Test.java
@@ -0,0 +1,99 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.Guid.GUID;
+import com.sun.jna.platform.win32.WinNT.HRESULT;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Ole32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Ole32Test.class);       
+    }
+    
+    public void testCoCreateGUID() {
+    	GUID.ByReference pguid = new GUID.ByReference();
+    	assertEquals(W32Errors.S_OK, Ole32.INSTANCE.CoCreateGuid(pguid));
+    	assertTrue(pguid.Data1 != 0 || pguid.Data2 != 0 || pguid.Data3 != 0 && pguid.Data4 != null);
+    }
+    
+    public void testIIDFromString() {
+    	GUID.ByReference lpiid = new GUID.ByReference();
+    	assertEquals(W32Errors.S_OK, Ole32.INSTANCE.IIDFromString(
+    			"{13709620-C279-11CE-A49E-444553540000}", lpiid)); // Shell.Application.1
+    	assertEquals(0x13709620, lpiid.Data1);
+    	assertEquals(0xFFFFC279, lpiid.Data2);
+    	assertEquals(0x11CE, lpiid.Data3);
+    	assertEquals(0xFFFFFFA4, lpiid.Data4[0]);
+    	assertEquals(0xFFFFFF9E, lpiid.Data4[1]);
+    	assertEquals(0x44, lpiid.Data4[2]);
+    	assertEquals(0x45, lpiid.Data4[3]);
+    	assertEquals(0x53, lpiid.Data4[4]);
+    	assertEquals(0x54, lpiid.Data4[5]);
+    	assertEquals(0, lpiid.Data4[6]);
+    	assertEquals(0, lpiid.Data4[7]);   	
+    }
+    
+    public void testStringFromGUID2() {
+    	GUID.ByReference pguid = new GUID.ByReference();   	
+    	pguid.Data1 = 0;
+    	pguid.Data2 = 0;
+    	pguid.Data3 = 0;
+    	for (int i = 0; i < pguid.Data4.length; i++) {
+    		pguid.Data4[i] = 0;
+    	}
+    	int max = 39;
+    	char[] lpsz = new char[max];
+    	int len = Ole32.INSTANCE.StringFromGUID2(pguid, lpsz, max);
+    	assertTrue(len > 1);
+    	lpsz[len - 1] = 0;    	
+    	assertEquals("{00000000-0000-0000-0000-000000000000}", Native.toString(lpsz));
+    }
+
+    public void testCoInitializeEx() {
+        HRESULT hr = Ole32.INSTANCE.CoInitializeEx(null, 0);
+        assertTrue(W32Errors.SUCCEEDED(hr.intValue()) || hr.intValue() == W32Errors.RPC_E_CHANGED_MODE);
+        if (W32Errors.SUCCEEDED(hr.intValue()))
+            Ole32.INSTANCE.CoUninitialize();
+    }
+
+    public void testCoCreateInstance() {
+        HRESULT hrCI = Ole32.INSTANCE.CoInitializeEx(null, 0);
+
+        GUID guid = Ole32Util.getGUIDFromString("{13709620-C279-11CE-A49E-444553540000}"); //Shell object
+        GUID riid = Ole32Util.getGUIDFromString("{D8F015C0-C278-11CE-A49E-444553540000}"); //IShellDispatch
+
+        PointerByReference iUnknown = new PointerByReference();
+
+        HRESULT hr = Ole32.INSTANCE.CoCreateInstance(
+                guid,
+                null, // pOuter = null, no aggregation
+                ObjBase.CLSCTX_ALL,
+                riid,
+                iUnknown);
+        assertTrue(W32Errors.SUCCEEDED(hr.intValue()));
+        assertTrue(!iUnknown.getValue().equals(Pointer.NULL));
+        // We leak this iUnknown reference because we don't have the JNACOM lib
+        // here to wrap the native iUnknown pointer and call iUnknown.release()
+        if (W32Errors.SUCCEEDED(hrCI.intValue()))
+            Ole32.INSTANCE.CoUninitialize();
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Ole32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Ole32UtilTest.java
new file mode 100644
index 0000000..54fc224
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Ole32UtilTest.java
@@ -0,0 +1,62 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.Guid.GUID;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Ole32UtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Ole32UtilTest.class);
+    }
+    
+    public void testGenerateGUID() {
+    	GUID guid1 = Ole32Util.generateGUID();
+    	GUID guid2 = Ole32Util.generateGUID();
+    	assertTrue(guid1 != guid2);
+    	assertTrue(Ole32Util.getStringFromGUID(guid1) != Ole32Util.getStringFromGUID(guid2));
+    }
+    
+    public void testGetStringFromGUID() {
+    	assertEquals("{00000000-0000-0000-0000-000000000000}", Ole32Util.getStringFromGUID(
+    			new GUID()));
+    	assertFalse("{00000000-0000-0000-0000-000000000000}" == Ole32Util.getStringFromGUID(
+    			Ole32Util.generateGUID()));
+    }
+    
+    public void testGetGUIDFromString() {
+    	GUID lpiid = Ole32Util.getGUIDFromString("{13709620-C279-11CE-A49E-444553540000}");
+    	assertEquals(0x13709620, lpiid.Data1);
+    	assertEquals(0xFFFFC279, lpiid.Data2);
+    	assertEquals(0x11CE, lpiid.Data3);
+    	assertEquals(0xFFFFFFA4, lpiid.Data4[0]);
+    	assertEquals(0xFFFFFF9E, lpiid.Data4[1]);
+    	assertEquals(0x44, lpiid.Data4[2]);
+    	assertEquals(0x45, lpiid.Data4[3]);
+    	assertEquals(0x53, lpiid.Data4[4]);
+    	assertEquals(0x54, lpiid.Data4[5]);
+    	assertEquals(0, lpiid.Data4[6]);
+    	assertEquals(0, lpiid.Data4[7]);
+	}
+    
+    public void testGetGUIDToFromString() {
+    	GUID guid = Ole32Util.generateGUID();
+    	assertEquals(guid, Ole32Util.getGUIDFromString(
+    			Ole32Util.getStringFromGUID(guid)));
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Oleaut32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Oleaut32Test.java
new file mode 100644
index 0000000..c263f02
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Oleaut32Test.java
@@ -0,0 +1,38 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Pointer;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Oleaut32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Oleaut32Test.class);       
+    }
+    
+    public void testSysAllocString() {
+    	assertEquals(null, Oleaut32.INSTANCE.SysAllocString(null));
+    	Pointer p = Oleaut32.INSTANCE.SysAllocString("hello world");
+    	assertEquals("hello world", p.getString(0, true));
+    	Oleaut32.INSTANCE.SysFreeString(p);
+    }
+    
+    public void testSysFreeString() {
+    	Oleaut32.INSTANCE.SysFreeString(null);
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Secur32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Secur32Test.java
new file mode 100644
index 0000000..0f3ef29
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Secur32Test.java
@@ -0,0 +1,336 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Native;
+import com.sun.jna.NativeLong;
+import com.sun.jna.platform.win32.Sspi.CredHandle;
+import com.sun.jna.platform.win32.Sspi.CtxtHandle;
+import com.sun.jna.platform.win32.Sspi.PSecPkgInfo;
+import com.sun.jna.platform.win32.Sspi.SecBufferDesc;
+import com.sun.jna.platform.win32.Sspi.SecPkgInfo;
+import com.sun.jna.platform.win32.Sspi.TimeStamp;
+import com.sun.jna.platform.win32.WinNT.HANDLEByReference;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.NativeLongByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Secur32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Secur32Test.class);
+    }
+    
+    public void testGetUserNameEx() {
+    	IntByReference len = new IntByReference();
+    	Secur32.INSTANCE.GetUserNameEx(
+    			Secur32.EXTENDED_NAME_FORMAT.NameSamCompatible, null, len);
+    	assertTrue(len.getValue() > 0);
+    	char[] buffer = new char[len.getValue() + 1];
+    	assertTrue(Secur32.INSTANCE.GetUserNameEx(
+    			Secur32.EXTENDED_NAME_FORMAT.NameSamCompatible, buffer, len));
+    	String username = Native.toString(buffer);
+    	assertTrue(username.length() > 0);
+    }
+    
+    public void testAcquireCredentialsHandle() {
+    	CredHandle phCredential = new CredHandle();
+    	TimeStamp ptsExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_OUTBOUND), null, null, null, 
+    			null, phCredential, ptsExpiry));
+    	assertTrue(phCredential.dwLower != null);
+    	assertTrue(phCredential.dwUpper != null);
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phCredential));    	
+    }
+    
+    public void testAcquireCredentialsHandleInvalidPackage() {
+    	CredHandle phCredential = new CredHandle();
+    	TimeStamp ptsExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_SECPKG_NOT_FOUND, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "PackageDoesntExist", new NativeLong(Sspi.SECPKG_CRED_OUTBOUND), null, null, null, 
+    			null, phCredential, ptsExpiry));
+    }
+    
+    public void testInitializeSecurityContext() {
+    	CredHandle phCredential = new CredHandle();
+    	TimeStamp ptsExpiry = new TimeStamp();
+    	// acquire a credentials handle
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_OUTBOUND), null, null, null, 
+    			null, phCredential, ptsExpiry));
+    	// initialize security context
+    	CtxtHandle phNewContext = new CtxtHandle();
+    	SecBufferDesc pbToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+    	NativeLongByReference pfContextAttr = new NativeLongByReference();
+    	int rc = Secur32.INSTANCE.InitializeSecurityContext(phCredential, null, 
+    			Advapi32Util.getUserName(), new NativeLong(Sspi.ISC_REQ_CONNECTION), new NativeLong(0), 
+    			new NativeLong(Sspi.SECURITY_NATIVE_DREP), null, new NativeLong(0), phNewContext, pbToken, 
+    			pfContextAttr, null);    	
+    	assertTrue(rc == W32Errors.SEC_I_CONTINUE_NEEDED || rc == W32Errors.SEC_E_OK);
+    	assertTrue(phNewContext.dwLower != null);
+    	assertTrue(phNewContext.dwUpper != null);
+    	assertTrue(pbToken.pBuffers[0].getBytes().length > 0);
+    	// release 
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phNewContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phCredential));
+    }
+    
+    public void testAcceptSecurityContext() {
+    	// client ----------- acquire outbound credential handle
+    	CredHandle phClientCredential = new CredHandle();
+    	TimeStamp ptsClientExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_OUTBOUND), null, null, null, 
+    			null, phClientCredential, ptsClientExpiry));
+    	// client ----------- security context
+    	CtxtHandle phClientContext = new CtxtHandle();
+    	NativeLongByReference pfClientContextAttr = new NativeLongByReference();
+		// server ----------- acquire inbound credential handle
+    	CredHandle phServerCredential = new CredHandle();
+    	TimeStamp ptsServerExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_INBOUND), null, null, null, 
+    			null, phServerCredential, ptsServerExpiry));
+    	// server ----------- security context
+		CtxtHandle phServerContext = new CtxtHandle();
+    	SecBufferDesc pbServerToken = null;
+    	NativeLongByReference pfServerContextAttr = new NativeLongByReference();
+    	int clientRc = W32Errors.SEC_I_CONTINUE_NEEDED;
+    	int serverRc = W32Errors.SEC_I_CONTINUE_NEEDED;
+    	do {
+        	// client ----------- initialize security context, produce a client token
+    		// client token returned is always new
+        	SecBufferDesc pbClientToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+        	if (clientRc == W32Errors.SEC_I_CONTINUE_NEEDED) {
+	        	// server token is empty the first time
+	        	SecBufferDesc pbServerTokenCopy = pbServerToken == null 
+	        		? null : new SecBufferDesc(Sspi.SECBUFFER_TOKEN, pbServerToken.getBytes());
+	        	clientRc = Secur32.INSTANCE.InitializeSecurityContext(
+	    				phClientCredential, 
+	    				phClientContext.isNull() ? null : phClientContext, 
+	        			Advapi32Util.getUserName(), 
+	        			new NativeLong(Sspi.ISC_REQ_CONNECTION), 
+	        			new NativeLong(0), 
+	        			new NativeLong(Sspi.SECURITY_NATIVE_DREP), 
+	        			pbServerTokenCopy, 
+	        			new NativeLong(0), 
+	        			phClientContext, 
+	        			pbClientToken, 
+	        			pfClientContextAttr, 
+	        			null);    		
+	    		assertTrue(clientRc == W32Errors.SEC_I_CONTINUE_NEEDED || clientRc == W32Errors.SEC_E_OK);
+        	}
+        	// server ----------- accept security context, produce a server token
+    		if (serverRc == W32Errors.SEC_I_CONTINUE_NEEDED) {
+	    		pbServerToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+	    		SecBufferDesc pbClientTokenByValue = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, pbClientToken.getBytes());
+	    		serverRc = Secur32.INSTANCE.AcceptSecurityContext(phServerCredential, 
+	    				phServerContext.isNull() ? null : phServerContext, 
+	    				pbClientTokenByValue,
+	    				new NativeLong(Sspi.ISC_REQ_CONNECTION), 
+	    				new NativeLong(Sspi.SECURITY_NATIVE_DREP), 
+	    				phServerContext,
+	    				pbServerToken, 
+	    				pfServerContextAttr, 
+	    				ptsServerExpiry);    		
+	    		assertTrue(serverRc == W32Errors.SEC_I_CONTINUE_NEEDED || serverRc == W32Errors.SEC_E_OK);    		
+    		}
+    	} while(serverRc != W32Errors.SEC_E_OK || clientRc != W32Errors.SEC_E_OK);
+    	// release server context
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phServerContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phServerCredential));
+    	// release client context
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phClientContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phClientCredential));
+    }
+    
+    public void testImpersonateRevertSecurityContext() {
+    	// client ----------- acquire outbound credential handle
+    	CredHandle phClientCredential = new CredHandle();
+    	TimeStamp ptsClientExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_OUTBOUND), null, null, null, 
+    			null, phClientCredential, ptsClientExpiry));
+    	// client ----------- security context
+    	CtxtHandle phClientContext = new CtxtHandle();
+    	NativeLongByReference pfClientContextAttr = new NativeLongByReference();
+		// server ----------- acquire inbound credential handle
+    	CredHandle phServerCredential = new CredHandle();
+    	TimeStamp ptsServerExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_INBOUND), null, null, null, 
+    			null, phServerCredential, ptsServerExpiry));
+    	// server ----------- security context
+		CtxtHandle phServerContext = new CtxtHandle();
+    	SecBufferDesc pbServerToken = null;
+    	NativeLongByReference pfServerContextAttr = new NativeLongByReference();
+    	int clientRc = W32Errors.SEC_I_CONTINUE_NEEDED;
+    	int serverRc = W32Errors.SEC_I_CONTINUE_NEEDED;
+    	do {
+        	// client ----------- initialize security context, produce a client token
+    		// client token returned is always new
+        	SecBufferDesc pbClientToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+        	if (clientRc == W32Errors.SEC_I_CONTINUE_NEEDED) {
+	        	// server token is empty the first time
+	        	SecBufferDesc pbServerTokenCopy = pbServerToken == null 
+	        		? null : new SecBufferDesc(Sspi.SECBUFFER_TOKEN, pbServerToken.getBytes());
+	        	clientRc = Secur32.INSTANCE.InitializeSecurityContext(
+	    				phClientCredential, 
+	    				phClientContext.isNull() ? null : phClientContext, 
+	        			Advapi32Util.getUserName(), 
+	        			new NativeLong(Sspi.ISC_REQ_CONNECTION), 
+	        			new NativeLong(0), 
+	        			new NativeLong(Sspi.SECURITY_NATIVE_DREP), 
+	        			pbServerTokenCopy, 
+	        			new NativeLong(0), 
+	        			phClientContext, 
+	        			pbClientToken, 
+	        			pfClientContextAttr, 
+	        			null);    		
+	    		assertTrue(clientRc == W32Errors.SEC_I_CONTINUE_NEEDED || clientRc == W32Errors.SEC_E_OK);
+        	}
+        	// server ----------- accept security context, produce a server token
+    		if (serverRc == W32Errors.SEC_I_CONTINUE_NEEDED) {
+	    		pbServerToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+	    		SecBufferDesc pbClientTokenByValue = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, pbClientToken.getBytes());
+	    		serverRc = Secur32.INSTANCE.AcceptSecurityContext(phServerCredential, 
+	    				phServerContext.isNull() ? null : phServerContext, 
+	    				pbClientTokenByValue,
+	    				new NativeLong(Sspi.ISC_REQ_CONNECTION), 
+	    				new NativeLong(Sspi.SECURITY_NATIVE_DREP), 
+	    				phServerContext,
+	    				pbServerToken, 
+	    				pfServerContextAttr, 
+	    				ptsServerExpiry);    		
+	    		assertTrue(serverRc == W32Errors.SEC_I_CONTINUE_NEEDED || serverRc == W32Errors.SEC_E_OK);    		
+    		}
+    	} while(serverRc != W32Errors.SEC_E_OK || clientRc != W32Errors.SEC_E_OK);
+    	// impersonate
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.ImpersonateSecurityContext(
+    			phServerContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.RevertSecurityContext(
+    			phServerContext));
+    	// release server context
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phServerContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phServerCredential));
+    	// release client context
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phClientContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phClientCredential));
+    }
+    
+    public void testEnumerateSecurityPackages() {
+    	IntByReference pcPackages = new IntByReference();
+    	PSecPkgInfo.ByReference pPackageInfo = new PSecPkgInfo.ByReference();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.EnumerateSecurityPackages(
+    			pcPackages, pPackageInfo));
+    	SecPkgInfo.ByReference[] packagesInfo = pPackageInfo.toArray(
+    			pcPackages.getValue());    	
+    	for(SecPkgInfo.ByReference packageInfo : packagesInfo) {
+    		assertTrue(packageInfo.Name.length() > 0);
+    		assertTrue(packageInfo.Comment.length() >= 0);
+    	}
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeContextBuffer(
+    			pPackageInfo.getPointer()));
+    }
+    
+    public void testQuerySecurityContextToken() {
+    	// client ----------- acquire outbound credential handle
+    	CredHandle phClientCredential = new CredHandle();
+    	TimeStamp ptsClientExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_OUTBOUND), null, null, null, 
+    			null, phClientCredential, ptsClientExpiry));
+    	// client ----------- security context
+    	CtxtHandle phClientContext = new CtxtHandle();
+    	NativeLongByReference pfClientContextAttr = new NativeLongByReference();
+		// server ----------- acquire inbound credential handle
+    	CredHandle phServerCredential = new CredHandle();
+    	TimeStamp ptsServerExpiry = new TimeStamp();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.AcquireCredentialsHandle(
+    			null, "Negotiate", new NativeLong(Sspi.SECPKG_CRED_INBOUND), null, null, null, 
+    			null, phServerCredential, ptsServerExpiry));
+    	// server ----------- security context
+		CtxtHandle phServerContext = new CtxtHandle();
+    	SecBufferDesc pbServerToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+    	NativeLongByReference pfServerContextAttr = new NativeLongByReference();
+    	int clientRc = W32Errors.SEC_I_CONTINUE_NEEDED;
+    	int serverRc = W32Errors.SEC_I_CONTINUE_NEEDED;
+    	do {
+    		// client token returned is always new
+        	SecBufferDesc pbClientToken = new SecBufferDesc(Sspi.SECBUFFER_TOKEN, Sspi.MAX_TOKEN_SIZE);
+        	// client ----------- initialize security context, produce a client token
+    		if (clientRc == W32Errors.SEC_I_CONTINUE_NEEDED) {
+	        	// server token is empty the first time
+	    		clientRc = Secur32.INSTANCE.InitializeSecurityContext(
+	    				phClientCredential, 
+	    				phClientContext.isNull() ? null : phClientContext, 
+	        			Advapi32Util.getUserName(), 
+	        			new NativeLong(Sspi.ISC_REQ_CONNECTION), 
+	        			new NativeLong(0), 
+	        			new NativeLong(Sspi.SECURITY_NATIVE_DREP), 
+	        			pbServerToken, 
+	        			new NativeLong(0), 
+	        			phClientContext, 
+	        			pbClientToken, 
+	        			pfClientContextAttr, 
+	        			null);    		
+	    		assertTrue(clientRc == W32Errors.SEC_I_CONTINUE_NEEDED || clientRc == W32Errors.SEC_E_OK);    		
+    		}    		
+        	// server ----------- accept security context, produce a server token
+    		if (serverRc == W32Errors.SEC_I_CONTINUE_NEEDED) {
+	    		serverRc = Secur32.INSTANCE.AcceptSecurityContext(phServerCredential, 
+	    				phServerContext.isNull() ? null : phServerContext, 
+	    				pbClientToken, 
+	    				new NativeLong(Sspi.ISC_REQ_CONNECTION), 
+	    				new NativeLong(Sspi.SECURITY_NATIVE_DREP), 
+	    				phServerContext,
+	    				pbServerToken, 
+	    				pfServerContextAttr, 
+	    				ptsServerExpiry);
+	    		assertTrue(serverRc == W32Errors.SEC_I_CONTINUE_NEEDED || serverRc == W32Errors.SEC_E_OK);
+    		}    		
+    	} while(serverRc != W32Errors.SEC_E_OK || clientRc != W32Errors.SEC_E_OK);    	
+    	// query security context token
+    	HANDLEByReference phContextToken = new HANDLEByReference();
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.QuerySecurityContextToken(
+    			phServerContext, phContextToken));
+    	// release security context token
+    	assertTrue(Kernel32.INSTANCE.CloseHandle(phContextToken.getValue()));
+    	// release server context
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phServerContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phServerCredential));
+    	// release client context
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.DeleteSecurityContext(
+    			phClientContext));
+    	assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeCredentialsHandle(
+    			phClientCredential));    	
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Secur32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Secur32UtilTest.java
new file mode 100644
index 0000000..3acc898
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Secur32UtilTest.java
@@ -0,0 +1,49 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.Secur32.EXTENDED_NAME_FORMAT;
+import com.sun.jna.platform.win32.Secur32Util.SecurityPackage;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Secur32UtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Secur32UtilTest.class);
+        System.out.println("Current user: " + Secur32Util.getUserNameEx(
+        		EXTENDED_NAME_FORMAT.NameSamCompatible));
+        System.out.println("Security packages:");
+		for(SecurityPackage sp : Secur32Util.getSecurityPackages()) {
+			System.out.println(" " + sp.name + ": " + sp.comment);
+		}
+    }
+    
+	public void testGetUsernameEx() {
+		String usernameSamCompatible = Secur32Util.getUserNameEx(
+				EXTENDED_NAME_FORMAT.NameSamCompatible); 
+		assertTrue(usernameSamCompatible.length() > 1);
+		assertTrue(usernameSamCompatible.indexOf('\\') > 0);
+	}	
+	
+	public void testGetSecurityPackages() {
+		SecurityPackage[] sps = Secur32Util.getSecurityPackages();
+		for(SecurityPackage sp : sps) {
+			assertTrue(sp.name.length() > 0);
+			assertTrue(sp.comment.length() >= 0);
+		}
+	}
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java
new file mode 100644
index 0000000..4db23bf
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Shell32Test.java
@@ -0,0 +1,53 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.Native;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.PointerByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Shell32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Shell32Test.class);
+    }
+
+    public void testStructurePacking() {
+        Structure s = new ShellAPI.SHFILEOPSTRUCT();
+        final int SIZE = Pointer.SIZE * 5 + 10; // 5 pointers, 2 ints, 1 short
+        assertEquals("Wrong structure size", SIZE, s.size());
+    }
+    
+    public void testSHGetFolderPath() {
+    	char[] pszPath = new char[WinDef.MAX_PATH];
+    	assertEquals(W32Errors.S_OK, Shell32.INSTANCE.SHGetFolderPath(null, 
+    			ShlObj.CSIDL_PROGRAM_FILES, null, ShlObj.SHGFP_TYPE_CURRENT, 
+    			pszPath));
+    	assertTrue(Native.toString(pszPath).length() > 0);
+    }
+
+    public void testSHGetDesktopFolder() {
+        PointerByReference ppshf = new PointerByReference();
+        WinNT.HRESULT hr = Shell32.INSTANCE.SHGetDesktopFolder(ppshf);
+        assertTrue(W32Errors.SUCCEEDED(hr.intValue()));
+        assertTrue(ppshf.getValue() != null);
+        // should release the interface, but we need Com4JNA to do that.
+    }
+
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Shell32UtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Shell32UtilTest.java
new file mode 100644
index 0000000..1a40d31
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Shell32UtilTest.java
@@ -0,0 +1,32 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Shell32UtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Shell32UtilTest.class);
+        System.out.println("Windows: " + Shell32Util.getFolderPath(ShlObj.CSIDL_WINDOWS));
+        System.out.println(" System: " + Shell32Util.getFolderPath(ShlObj.CSIDL_SYSTEM));
+        System.out.println("AppData: " + Shell32Util.getFolderPath(ShlObj.CSIDL_APPDATA));
+    }
+    
+	public void testGetFolderPath() {
+		assertTrue(Shell32Util.getFolderPath(ShlObj.CSIDL_WINDOWS).length() > 0);
+	}
+}
diff --git a/test/com/sun/jna/examples/win32/Shell32Test.java b/contrib/platform/test/com/sun/jna/platform/win32/User32Test.java
similarity index 56%
rename from test/com/sun/jna/examples/win32/Shell32Test.java
rename to contrib/platform/test/com/sun/jna/platform/win32/User32Test.java
index 15a1026..676d9be 100644
--- a/test/com/sun/jna/examples/win32/Shell32Test.java
+++ b/contrib/platform/test/com/sun/jna/platform/win32/User32Test.java
@@ -1,30 +1,30 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- * 
- * 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.  
- */
-package com.sun.jna.examples.win32;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import junit.framework.TestCase;
-
-public class Shell32Test extends TestCase {
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(Shell32Test.class);
-    }
-
-    public void testStructurePacking() {
-        Structure s = new Shell32.SHFILEOPSTRUCT();
-        final int SIZE = Pointer.SIZE * 5 + 10; // 5 pointers, 2 ints, 1 short
-        assertEquals("Wrong structure size", SIZE, s.size());
-    }
-}
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class User32Test extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(User32Test.class);
+    }
+
+    public void testGetSystemMetrics() {
+    	int cursorWidth = User32.INSTANCE.GetSystemMetrics(WinUser.SM_CXCURSOR);
+    	assertTrue(cursorWidth > 0);
+    }
+}
diff --git a/test/com/sun/jna/examples/FileMonitorTest.java b/contrib/platform/test/com/sun/jna/platform/win32/W32FileMonitorTest.java
similarity index 91%
rename from test/com/sun/jna/examples/FileMonitorTest.java
rename to contrib/platform/test/com/sun/jna/platform/win32/W32FileMonitorTest.java
index ebf7f24..2bbb564 100644
--- a/test/com/sun/jna/examples/FileMonitorTest.java
+++ b/contrib/platform/test/com/sun/jna/platform/win32/W32FileMonitorTest.java
@@ -10,28 +10,33 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.  
  */
-package com.sun.jna.examples;
+package com.sun.jna.platform.win32;
 
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
+
 import junit.framework.TestCase;
+
 import com.sun.jna.Platform;
-import com.sun.jna.examples.FileMonitor.FileEvent;
-import com.sun.jna.examples.FileMonitor.FileListener;
+import com.sun.jna.platform.FileMonitor;
+import com.sun.jna.platform.FileMonitor.FileEvent;
+import com.sun.jna.platform.FileMonitor.FileListener;
 
-public class FileMonitorTest extends TestCase {
+public class W32FileMonitorTest extends TestCase {
 
-    private Map events;
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(W32FileMonitorTest.class);
+    }
+	
+    private Map<Integer, FileEvent> events;
     private FileMonitor monitor;
     private File tmpdir;
     
     protected void setUp() throws Exception {
-        if (!Platform.isWindows()) return;
-
-        events = new HashMap();
+        events = new HashMap<Integer, FileEvent>();
         final FileListener listener = new FileListener() {
             public void fileChanged(FileEvent e) {
                 events.put(new Integer(e.getType()), e);
@@ -39,7 +44,7 @@ public class FileMonitorTest extends TestCase {
         };
         monitor = FileMonitor.getInstance();
         monitor.addFileListener(listener);
-        tmpdir = new File(System.getProperty("java.io.tmpdir"));
+        tmpdir = new File(Kernel32Util.getTempPath());
     }
     
     protected void tearDown() {
@@ -49,8 +54,6 @@ public class FileMonitorTest extends TestCase {
     }
     
     public void testNotifyOnFileCreation() throws Exception {
-        if (!Platform.isWindows()) return;
-
         monitor.addWatch(tmpdir);
         File file = File.createTempFile(getName(), ".tmp", tmpdir);
         file.deleteOnExit();
@@ -58,8 +61,6 @@ public class FileMonitorTest extends TestCase {
     }
     
     public void testNotifyOnFileDelete() throws Exception {
-        if (!Platform.isWindows()) return;
-
         monitor.addWatch(tmpdir);
         File file = File.createTempFile(getName(), ".tmp", tmpdir);
         file.delete();
@@ -82,8 +83,6 @@ public class FileMonitorTest extends TestCase {
     }
 
     public void testNotifyOnFileRename() throws Exception {
-        if (!Platform.isWindows()) return;
-
         monitor.addWatch(tmpdir);
         File file = File.createTempFile(getName(), ".tmp", tmpdir);
         File newFile = new File(file.getParentFile(), "newfile");
@@ -132,8 +131,6 @@ public class FileMonitorTest extends TestCase {
         return f;
     }
     public void testMultipleWatches() throws Exception {
-        if (!Platform.isWindows()) return;
-        
         File subdir1 = createSubdir(tmpdir, "sub1-");
         File subdir2 = createSubdir(tmpdir, "sub2-");
         try {
@@ -156,8 +153,6 @@ public class FileMonitorTest extends TestCase {
     }
 
     public void testMultipleConsecutiveWatches() throws Exception {
-        if (!Platform.isWindows()) return;
-
         File subdir1 = createSubdir(tmpdir, "sub1-");
         File subdir2 = createSubdir(tmpdir, "sub2-");
         try {
@@ -207,9 +202,4 @@ public class FileMonitorTest extends TestCase {
         assertTrue("No events sent", events.size() != 0);
         return actualEvent;
     }
-
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(FileMonitorTest.class);
-    }
 }
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/Win32ExceptionTest.java b/contrib/platform/test/com/sun/jna/platform/win32/Win32ExceptionTest.java
new file mode 100644
index 0000000..8caef39
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Win32ExceptionTest.java
@@ -0,0 +1,43 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class Win32ExceptionTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Win32ExceptionTest.class);
+    }
+
+	public void testFormatMessageFromLastErrorCode() {
+		try {
+			throw new Win32Exception(W32Errors.ERROR_SHARING_PAUSED);
+		} catch (Win32Exception e) {
+		    assertEquals("The remote server has been paused or is in the process of being started.",
+		    		e.getMessage());			
+		}
+	}
+
+	public void testFormatMessageFromHR() {
+		try {
+			throw new Win32Exception(W32Errors.S_OK);
+		} catch (Win32Exception e) {
+			assertEquals("The operation completed successfully.", 
+					e.getMessage());
+		}
+	}
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/WinspoolTest.java b/contrib/platform/test/com/sun/jna/platform/win32/WinspoolTest.java
new file mode 100644
index 0000000..0d6a7af
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/WinspoolTest.java
@@ -0,0 +1,46 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import junit.framework.TestCase;
+
+import com.sun.jna.platform.win32.Winspool.PRINTER_INFO_1;
+import com.sun.jna.ptr.IntByReference;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class WinspoolTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(WinspoolTest.class);
+    }
+
+    public void testEnumPrinters_1() {
+    	IntByReference pcbNeeded = new IntByReference();
+    	IntByReference pcReturned = new IntByReference();
+    	assertFalse(Winspool.INSTANCE.EnumPrinters(Winspool.PRINTER_ENUM_LOCAL, 
+    			null, 1, null, 0, pcbNeeded, pcReturned));
+    	assertTrue(pcbNeeded.getValue() > 0);
+    	PRINTER_INFO_1 pPrinterEnum = new PRINTER_INFO_1(pcbNeeded.getValue());
+    	assertTrue(pcbNeeded.getValue() > 0);
+    	assertTrue(pcReturned.getValue() == 0);
+    	assertTrue(Winspool.INSTANCE.EnumPrinters(Winspool.PRINTER_ENUM_LOCAL, 
+    			null, 1, pPrinterEnum.getPointer(), pcbNeeded.getValue(), pcbNeeded, pcReturned));
+    	assertTrue(pcReturned.getValue() > 0);
+    	PRINTER_INFO_1[] printerInfo = (PRINTER_INFO_1[]) pPrinterEnum.toArray(pcReturned.getValue());
+    	for(PRINTER_INFO_1 pi : printerInfo) {
+    		// System.out.println(pi.pName);
+    	}
+    }
+}
diff --git a/contrib/platform/test/com/sun/jna/platform/win32/WinspoolUtilTest.java b/contrib/platform/test/com/sun/jna/platform/win32/WinspoolUtilTest.java
new file mode 100644
index 0000000..323c21b
--- /dev/null
+++ b/contrib/platform/test/com/sun/jna/platform/win32/WinspoolUtilTest.java
@@ -0,0 +1,34 @@
+/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
+ * 
+ * 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.  
+ */
+package com.sun.jna.platform.win32;
+
+import com.sun.jna.platform.win32.Winspool.PRINTER_INFO_1;
+
+import junit.framework.TestCase;
+
+/**
+ * @author dblock[at]dblock[dot]org
+ */
+public class WinspoolUtilTest extends TestCase {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(Shell32UtilTest.class);
+        for(PRINTER_INFO_1 printerInfo : WinspoolUtil.getPrinterInfo1()) {
+            System.out.println(printerInfo.pName + ": " + printerInfo.pDescription);        	
+        }
+    }
+    
+	public void testGetFolderPath() {
+		assertTrue(WinspoolUtil.getPrinterInfo1().length > 0);
+	}
+}
diff --git a/debian/changelog b/debian/changelog
index 6564367..719e198 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+libjna-java (3.2.7-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * refresh patches
+  * switch debian/watch to new kenai URL
+  * change SVN URL in debian/repack-source.sh
+  * fix debian/repack-source.sh to use the directory given to uscan via
+    -destdir
+
+ -- Jan Dittberner <jandd at debian.org>  Sun, 13 Feb 2011 18:11:51 +0100
+
 libjna-java (3.2.4-2) unstable; urgency=low
 
   * make libjna-java buildable on GNU/kFreeBSD
diff --git a/debian/patches/01-nbproject.patch b/debian/patches/01-nbproject.patch
index 56eb68b..9898ace 100644
--- a/debian/patches/01-nbproject.patch
+++ b/debian/patches/01-nbproject.patch
@@ -3,15 +3,7 @@ Description: fix build.xml to remove nbproject usage as we don't have it.
 
 --- a/build.xml
 +++ b/build.xml
-@@ -59,7 +59,6 @@
- 
-   <target name="default" depends="test" description="Build and Test."/>
- 
--  <import file="nbproject/profiler-build-impl.xml"/>
-   <target name="init" depends="-setup"/>
-   <target name="compile-test-single" depends="compile-tests"/>
-   <target name="compile-single" depends="compile"/>
-@@ -620,7 +619,6 @@
+@@ -647,7 +647,6 @@
        <zipfileset src="${dist}/src.zip"/>
        <zipfileset dir="lib" includes="junit.jar,clover.jar" prefix="lib"/>
        <zipfileset dir="." includes=".classpath,.project"/>
diff --git a/debian/patches/02-builddir.patch b/debian/patches/02-builddir.patch
index 3b4755c..7cea4e6 100644
--- a/debian/patches/02-builddir.patch
+++ b/debian/patches/02-builddir.patch
@@ -3,7 +3,7 @@ Description: no special build dir for d64
 
 --- a/build.xml
 +++ b/build.xml
-@@ -96,7 +96,7 @@
+@@ -99,7 +99,7 @@
          <equals arg1="${vm.arch}" arg2="-d64"/>
        </and>
      </condition>
diff --git a/debian/patches/03-dynlink-and-cflags.patch b/debian/patches/03-dynlink-and-cflags.patch
index bbc67cf..0d449ac 100644
--- a/debian/patches/03-dynlink-and-cflags.patch
+++ b/debian/patches/03-dynlink-and-cflags.patch
@@ -3,8 +3,8 @@ Description: dynlink and cflags
 
 --- a/build.xml
 +++ b/build.xml
-@@ -377,6 +377,19 @@
-       <arg value="VERSION=${jni.version}"/>
+@@ -393,6 +393,19 @@
+       <arg value="JNA_JNI_VERSION=${jni.version}"/>
        <arg value="CHECKSUM=${jni.md5}"/>
      </exec>
 +    <antcall target="native-mixedjar"/>
@@ -23,7 +23,7 @@ Description: dynlink and cflags
      <mkdir dir="${classes}/com/sun/jna/${os.prefix}"/>
      <copy todir="${classes}/com/sun/jna/${os.prefix}">
        <fileset dir="${build.native}"
-@@ -388,15 +401,6 @@
+@@ -404,15 +417,6 @@
        <fileset dir="${build.native}"
                 includes="jnidispatch.dll,libjnidispatch.*"/>
      </copy>
@@ -38,4 +38,4 @@ Description: dynlink and cflags
 -    </jar>
    </target>
  
-   <target name="compile-tests" depends="compile,native,jar"
+   <target name="compile-tests" depends="compile,native,jar" 
diff --git a/debian/patches/04-load-native-code-from-fs.patch b/debian/patches/04-load-native-code-from-fs.patch
index fd1e9c8..38d7ebf 100644
--- a/debian/patches/04-load-native-code-from-fs.patch
+++ b/debian/patches/04-load-native-code-from-fs.patch
@@ -3,7 +3,7 @@ Subject: try to load native library from /usr/lib/jni if system
 Author: Jan Dittberner <jandd at debian.org>
 --- a/src/com/sun/jna/Native.java
 +++ b/src/com/sun/jna/Native.java
-@@ -643,6 +643,9 @@
+@@ -648,6 +648,9 @@
      private static void loadNativeLibrary() {
          String libName = "jnidispatch";
          String bootPath = System.getProperty("jna.boot.library.path");
diff --git a/debian/repack-source.sh b/debian/repack-source.sh
index 1ba0c22..3fec117 100755
--- a/debian/repack-source.sh
+++ b/debian/repack-source.sh
@@ -14,15 +14,16 @@ CURDIR=$(pwd)
 TMPDIR=`mktemp -d libjna-tmp.XXXXXX`
 BASEDIR=$TMPDIR/libjna-java-${VERSION}
 mkdir ${BASEDIR}
+TARGET=$(dirname "$3")/libjna-java_${VERSION}.orig.tar.gz
 
 # retrieve sources from svn
-# svn export https://jna.dev.java.net/svn/jna/tags/${VERSION}/jnalib/ --username guest ${BASEDIR}
-wget --user guest --password "" \
+# svn export https://svn.java.net/svn/jna~svn/tags/${VERSION}/jnalib/ --username guest ${BASEDIR}
+wget --no-check-certificate \
       --directory-prefix=${TMPDIR} \
-      https://jna.dev.java.net/svn/jna/tags/${VERSION}/jnalib/pom.xml \
-      https://jna.dev.java.net/svn/jna/tags/${VERSION}/jnalib/dist/src.zip \
-      https://jna.dev.java.net/svn/jna/tags/${VERSION}/jnalib/src/com/sun/jna/overview.html \
-      https://jna.dev.java.net/svn/jna/tags/${VERSION}/jnalib/src/com/sun/jna/package.html
+      https://svn.java.net/svn/jna~svn/tags/${VERSION}/jnalib/pom.xml \
+      https://svn.java.net/svn/jna~svn/tags/${VERSION}/jnalib/dist/src.zip \
+      https://svn.java.net/svn/jna~svn/tags/${VERSION}/jnalib/src/com/sun/jna/overview.html \
+      https://svn.java.net/svn/jna~svn/tags/${VERSION}/jnalib/src/com/sun/jna/package.html
 
 unzip -d ${BASEDIR} ${TMPDIR}/src.zip
 
@@ -37,7 +38,7 @@ mv ${TMPDIR}/*html ${BASEDIR}/src/com/sun/jna/
 mv ${TMPDIR}/*xml ${BASEDIR}/
 
 # Repack
-GZIP=-9 tar -C "$TMPDIR" -czf ../libjna-java_${VERSION}.orig.tar.gz "libjna-java-${VERSION}"
+GZIP=-9 tar -C "$TMPDIR" -czf "${TARGET}" "libjna-java-${VERSION}"
 
 # Clean temporary files
 rm -rf "$TMPDIR"
@@ -46,5 +47,5 @@ rm -f "$FILENAME"
 
 if [ $1 = --upstream-version ] ;
 then
-    uupdate --upstream-version $2 $3
+    uupdate --upstream-version $2 "${TARGET}"
 fi
diff --git a/debian/watch b/debian/watch
index b827d7f..254388c 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,5 +1,3 @@
 version=3
 
-https://jna.dev.java.net/source/browse/jna/tags/ ([\d\.]+\d)/ debian debian/repack-source.sh
-
-
+https://svn.java.net/svn/jna~svn/tags/ ([\d\.]+\d)/ debian debian/repack-source.sh
diff --git a/native/Makefile b/native/Makefile
index 563570e..f9d472b 100644
--- a/native/Makefile
+++ b/native/Makefile
@@ -1,6 +1,6 @@
 #
 # Makefile for JNA native bits
-# Copyright (c) 2007 Timothy Wall All Rights Reserved
+# Copyright (c) 2007-2010 Timothy Wall All Rights Reserved
 #
 # You may need to run 'ant javah' at the root before performing a build from 
 # this directory.
@@ -27,7 +27,7 @@ OS=$(shell uname | sed -e 's/\(CYGWIN\|MINGW32\).*/win32/g' \
                         -e 's/Darwin.*/darwin/g' \
                         -e 's/Linux.*/linux/g')
 
-VERSION=3.2.1 # auto-generated by ant
+JNA_JNI_VERSION=3.2.2 # auto-generated by ant
 CHECKSUM=c870290c36c8d3fdf85db7c782febc3f # auto-generated by ant
 
 JAVA_INCLUDES=-I"$(JAVA_HOME)/include" \
@@ -69,7 +69,7 @@ CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
 CDEFINES=-D_REENTRANT
 PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
 CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
-       -DVERSION='"$(VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
+       -DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
 LDFLAGS=-o $@ -shared 
 ifeq ($(DYNAMIC_LIBFFI),true)
 CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
@@ -192,8 +192,8 @@ endif
 PCFLAGS+=$(ISYSROOT) -x objective-c
 CDEFINES+=-DTARGET_RT_MAC_CFM=0 -DFFI_MMAP_EXEC_WRIT
 LDFLAGS=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
-  -compatibility_version $(shell echo ${VERSION}|sed 's/^\([0-9][0-9]*\).*/\1/g') \
-  -current_version $(VERSION) \
+  -compatibility_version $(shell echo ${JNA_JNI_VERSION}|sed 's/^\([0-9][0-9]*\).*/\1/g') \
+  -current_version $(JNA_JNI_VERSION) \
   -mmacosx-version-min=10.3 \
   -install_name ${@F} \
   $(SYSLIBROOT)
@@ -270,6 +270,6 @@ clean:
 	$(RM) -rf $(BUILD) 
 
 version:
-	@echo version=$(VERSION)
+	@echo version=$(JNA_JNI_VERSION)
 
 #EOF
diff --git a/native/README.libffi b/native/README.libffi
index 074ff42..0da3e20 100644
--- a/native/README.libffi
+++ b/native/README.libffi
@@ -1,19 +1,3 @@
 --- libffi notes ---
-libffi has been copied from GCC (originally 4.2.0, since updated to match the
-trunk). 
-libffi last synched: 071126 by twall
-
-Files required for standalone configure:
-config-ml.in (from root)
-config.guess (from root)
-config.sub (from root)
-depcomp (from root)
-install-sh (from root) 
-ltcf-c.sh (from ???)
-ltconfig (from ???)
-ltmain.sh (from root)
-missing (from root)
-
-Wayne Meissner did the original work to integrate libffi into JNA and to get
-it working on half a dozen different platforms.
-
+All JNA customizations to date have been merged to upstream libffi.  This
+source tree has been synched to http://github.com/atgreen/libffi.
diff --git a/native/dispatch.c b/native/dispatch.c
index 47f9eb4..40c3753 100644
--- a/native/dispatch.c
+++ b/native/dispatch.c
@@ -2268,10 +2268,10 @@ Java_com_sun_jna_Native_setLastError(JNIEnv *env, jclass classp, jint code) {
 
 JNIEXPORT jstring JNICALL
 Java_com_sun_jna_Native_getNativeVersion(JNIEnv *env, jclass classp) {
-#ifndef VERSION
-#define VERSION "undefined"
+#ifndef JNA_JNI_VERSION
+#define JNA_JNI_VERSION "undefined"
 #endif
-  return newJavaString(env, VERSION, JNI_FALSE);
+  return newJavaString(env, JNA_JNI_VERSION, JNI_FALSE);
 }
 
 JNIEXPORT jstring JNICALL
@@ -2808,7 +2808,9 @@ Java_com_sun_jna_Native_unregister(JNIEnv *env, jclass ncls, jclass cls, jlongAr
     free(md);
   }
   (*env)->ReleaseLongArrayElements(env, handles, data, 0);
-  (*env)->UnregisterNatives(env, cls);
+  // Not required, or recommended (see description in JNI docs,
+  // http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/functions.html
+  //(*env)->UnregisterNatives(env, cls);
 }
 
 JNIEXPORT jlong JNICALL
diff --git a/native/jnidispatch.rc b/native/jnidispatch.rc
index 5549d4d..f4c156a 100644
--- a/native/jnidispatch.rc
+++ b/native/jnidispatch.rc
@@ -1,5 +1,5 @@
 // Resource file to generate version information for jnidispatch.dll
-// Copyright (c) 2008 Timothy Wall
+// Copyright (c) 2008-2010 Timothy Wall
 // Type: version
 
 // Name: 1
@@ -21,7 +21,7 @@ BEGIN
       VALUE "FileVersion","3.0.0"
       VALUE "Full Version","3.0.0 b0"
       VALUE "InternalName", "jnidispatch"
-      VALUE "LegalCopyright", "Copyright \251 2008 Timothy Wall"
+      VALUE "LegalCopyright", "Copyright \251 2008-2010 Timothy Wall"
       VALUE "OriginalFilename", "jnidispatch.dll"
       VALUE "ProductName", "Java(TM) Native Access"
       VALUE "ProductVersion","3"
diff --git a/pom.xml b/pom.xml
index 623a0da..24497f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
   <groupId>net.java.dev.jna</groupId>
   <artifactId>jna</artifactId>
   <packaging>jar</packaging>
-  <version>3.2.4</version>
+  <version>3.2.7</version>
   <name>Java Native Access</name>
     
    <distributionManagement>
diff --git a/src/com/sun/jna/LastErrorException.java b/src/com/sun/jna/LastErrorException.java
index 3822998..955f8b0 100644
--- a/src/com/sun/jna/LastErrorException.java
+++ b/src/com/sun/jna/LastErrorException.java
@@ -12,15 +12,21 @@
  */
 package com.sun.jna;
 
-/** Exception representing a non-zero error code returned in either
-    <code><a href="http://www.opengroup.org/onlinepubs/009695399/functions/errno.html">errno</a></code> or <code><a href="http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx">GetLastError()</a></code>.
+/** 
+ * Exception representing a non-zero error code returned in either
+ * <code><a href="http://www.opengroup.org/onlinepubs/009695399/functions/errno.html">errno</a></code> 
+ * or <code><a href="http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx">GetLastError()</a></code>.
 */
 public class LastErrorException extends RuntimeException {
+    
+	private int errorCode;
+    
     private static String formatMessage(int code) {
         return Platform.isWindows()
-            ?"GetLastError() returned " + code
-            :"errno was " + code;
+            ? "GetLastError() returned " + code
+            : "errno was " + code;
     }
+
     private static String parseMessage(String m) {
         try {
             return formatMessage(Integer.parseInt(m));
@@ -29,7 +35,7 @@ public class LastErrorException extends RuntimeException {
             return m;
         }
     }
-    public int errorCode;
+    
     public LastErrorException(String msg) {
         super(parseMessage(msg));
         try {
@@ -39,6 +45,16 @@ public class LastErrorException extends RuntimeException {
             this.errorCode = -1;
         }
     }
+    
+    /**
+     * Returns the error code of the error.
+     * @return
+     *  Error code.
+     */
+    public int getErrorCode() {
+    	return errorCode;
+    }
+    
     public LastErrorException(int code) {
         super(formatMessage(code));
         this.errorCode = code;
diff --git a/src/com/sun/jna/Memory.java b/src/com/sun/jna/Memory.java
index 66ace6b..7a70813 100644
--- a/src/com/sun/jna/Memory.java
+++ b/src/com/sun/jna/Memory.java
@@ -143,15 +143,25 @@ public class Memory extends Pointer {
         clear(size);
     }
 
-    /** Returns false if the memory has been freed. */
+    /** @deprecated use {@link #valid()} instead. */
     public boolean isValid() {
+        return valid();
+    }
+
+    /** Returns false if the memory has been freed. */
+    public boolean valid() {
         return peer != 0;
     }
 
-    public long getSize() {
+    public long size() {
         return size;
     }
 
+    /** @deprecated use {@link #size()} instead. */
+    public long getSize() {
+        return size();
+    }
+
 
     /**
      * Check that indirection won't cause us to write outside the 
diff --git a/src/com/sun/jna/Native.java b/src/com/sun/jna/Native.java
index 0c9a0b0..a97ab91 100644
--- a/src/com/sun/jna/Native.java
+++ b/src/com/sun/jna/Native.java
@@ -28,6 +28,7 @@ import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Proxy;
+import java.net.URI;
 import java.net.URL;
 import java.net.URISyntaxException;
 import java.nio.Buffer;
@@ -71,7 +72,7 @@ import com.sun.jna.Structure.FFIType;
  */
 public final class Native {
 
-    private static final String VERSION = "3.2.4";
+    private static final String VERSION = "3.2.7";
 
     private static String nativeLibraryPath = null;
     private static boolean unpacked;
@@ -145,6 +146,9 @@ public final class Native {
         }
         // Reach into the bowels of ClassLoader to force the native
         // library to unload
+        // NOTE: this may cause a failure when freeing com.sun.jna.Memory
+        // after the library has been unloaded, see
+        // https://jna.dev.java.net/issues/show_bug.cgi?id=157
         try {
             ClassLoader cl = Native.class.getClassLoader();
             Field f = ClassLoader.class.getDeclaredField("nativeLibraries");
@@ -155,7 +159,8 @@ public final class Native {
                 f = lib.getClass().getDeclaredField("name");
                 f.setAccessible(true);
                 String name = (String)f.get(lib);
-                if (name.equals(path) || name.indexOf(path) != -1) {
+                if (name.equals(path) || name.indexOf(path) != -1
+                    || name.equals(flib.getCanonicalPath())) {
                     Method m = lib.getClass().getDeclaredMethod("finalize", new Class[0]);
                     m.setAccessible(true);
                     m.invoke(lib, new Object[0]);
@@ -707,7 +712,7 @@ public final class Native {
         File lib = null;
         if (url.getProtocol().toLowerCase().equals("file")) {
             try {
-                lib = new File(url.toURI());
+                lib = new File(new URI(url.toString()));
             }
             catch(URISyntaxException e) {
                 lib = new File(url.getPath());
@@ -1108,7 +1113,25 @@ public final class Native {
             if (cls == float.class) return "F";
             if (cls == double.class) return "D";
         }
-        return "L" + cls.getName().replace(".", "/") + ";";
+        return "L" + replace(".", "/", cls.getName()) + ";";
+    }
+
+    // No String.replace available in 1.4 
+    static String replace(String s1, String s2, String str) {
+        StringBuffer buf = new StringBuffer();
+        while (true) {
+            int idx = str.indexOf(s1);
+            if (idx == -1) {
+                buf.append(str);
+                break;
+            }
+            else {
+                buf.append(str.substring(0, idx));
+                buf.append(s2);
+                str = str.substring(idx + s1.length());
+            }
+        }
+        return buf.toString();
     }
 
     private static final int CVT_UNSUPPORTED = -1;
diff --git a/src/com/sun/jna/NativeLibrary.java b/src/com/sun/jna/NativeLibrary.java
index 95ac65a..3d6e67a 100644
--- a/src/com/sun/jna/NativeLibrary.java
+++ b/src/com/sun/jna/NativeLibrary.java
@@ -53,7 +53,6 @@ public class NativeLibrary {
     private static final Map libraries = new HashMap();
     private static final Map searchPaths = Collections.synchronizedMap(new HashMap());
     private static final List librarySearchPath = new LinkedList();
-    private static final List userSearchPath = new LinkedList();
 
     static {
         // Force initialization of native library
@@ -109,7 +108,7 @@ public class NativeLibrary {
             }
         }
         
-        searchPath.addAll(userSearchPath);
+        searchPath.addAll(initPaths("jna.library.path"));
         String libraryPath = findLibraryPath(libraryName, searchPath);
         long handle = 0;
         //
@@ -497,6 +496,11 @@ public class NativeLibrary {
                 return libName;
             }
         }
+        else if (Platform.isWindows()) {
+        	if (libName.endsWith(".drv") || libName.endsWith(".dll")) {
+        		return libName;
+        	}
+        }
 
         return System.mapLibraryName(libName);
     }
@@ -592,7 +596,6 @@ public class NativeLibrary {
     private static native void close(long handle);
     private static native long findSymbol(long handle, String name);
     static {
-        userSearchPath.addAll(initPaths("jna.library.path"));
         String webstartPath = Native.getWebStartLibraryPath("jnidispatch");
         if (webstartPath != null) {
             librarySearchPath.add(webstartPath);
diff --git a/src/com/sun/jna/Pointer.java b/src/com/sun/jna/Pointer.java
index 4f66dec..3b7fa38 100644
--- a/src/com/sun/jna/Pointer.java
+++ b/src/com/sun/jna/Pointer.java
@@ -47,11 +47,19 @@ public class Pointer {
     /** Convenience constant, same as <code>null</code>. */
     public static final Pointer NULL = null;
     
-    /** Convenience constant, equivalent to <code>(void*)-1</code>. */
+    /** Convenience constant, equivalent to <code>(void*)CONSTANT</code>. */
     public static final Pointer createConstant(long peer) {
         return new Opaque(peer);
     }
     
+    /** Convenience constant, equivalent to <code>(void*)CONSTANT</code>.
+        This version will avoid setting any of the high bits on 64-bit
+        systems.
+     */
+    public static final Pointer createConstant(int peer) {
+        return new Opaque((long)peer & 0xFFFFFFFF);
+    }
+    
     /** Pointer value of the real native pointer. Use long to be 64-bit safe. 
      */
     protected long peer;
@@ -467,6 +475,7 @@ public class Pointer {
                 if (oldbp == null || !oldbp.equals(bp)) {
                     throw new IllegalStateException("Can't autogenerate a direct buffer on memory read");
                 }
+                result = currentValue;
             }
         }
         else if (NativeMapped.class.isAssignableFrom(type)) {
@@ -843,21 +852,25 @@ v     * @param wide whether to convert from a wide or standard C string
     public String[] getStringArray(long base, int length, boolean wide) {
     
         List strings = new ArrayList();
+        Pointer p;
         int offset = 0;
-        Pointer p = getPointer(base);
         if (length != -1) {
+            p = getPointer(base + offset);
             int count = 0;
             while (count++ < length) {
-                strings.add(p.getString(0, wide));
-                offset += SIZE;
-                p = getPointer(base + offset);
+                String s = p == null ? null : p.getString(0, wide);
+                strings.add(s);
+                if (count < length) {
+                    offset += SIZE;
+                    p = getPointer(base + offset);
+                }
             }
         }
         else {
-            while (p != null) {
-                strings.add(p.getString(0, wide));
+            while ((p = getPointer(base + offset)) != null) {
+                String s = p == null ? null : p.getString(0, wide);
+                strings.add(s);
                 offset += SIZE;
-                p = getPointer(base + offset);
             }
         }
         return (String[])strings.toArray(new String[strings.size()]);
@@ -1196,6 +1209,16 @@ v     * @param wide whether to convert from a wide or standard C string
         return "native at 0x" + Long.toHexString(peer);
     }
     
+    /** Read the native peer value.  Use with caution. */
+    public static long nativeValue(Pointer p) {
+        return p.peer;
+    }
+
+    /** Set the native peer value.  Use with caution. */
+    public static void nativeValue(Pointer p, long value) {
+        p.peer = value;
+    }
+
     /** Pointer which disallows all read/write access. */
     private static class Opaque extends Pointer {
         private Opaque(long peer) { super(peer); }
diff --git a/src/com/sun/jna/PointerType.java b/src/com/sun/jna/PointerType.java
index c2b4120..b04b5cd 100644
--- a/src/com/sun/jna/PointerType.java
+++ b/src/com/sun/jna/PointerType.java
@@ -96,4 +96,8 @@ public abstract class PointerType implements NativeMapped {
         }
         return false;
     }
+
+    public String toString() {
+        return pointer == null ? "NULL" : pointer.toString();
+    }
 }
diff --git a/src/com/sun/jna/Structure.java b/src/com/sun/jna/Structure.java
index ca4007f..3dfdb6a 100644
--- a/src/com/sun/jna/Structure.java
+++ b/src/com/sun/jna/Structure.java
@@ -18,6 +18,7 @@ import java.util.AbstractCollection;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -79,22 +80,36 @@ public abstract class Structure {
     public interface ByReference { }
 
     private static class MemberOrder {
+        private static final String[] FIELDS = {
+            "first", "second", "middle", "penultimate", "last",
+        };
         public int first;
+		public int second;
         public int middle;
+        public int penultimate;
         public int last;
     }
 
     private static final boolean REVERSE_FIELDS;
-    static boolean REQUIRES_FIELD_ORDER;
+    private static final boolean REQUIRES_FIELD_ORDER;
 
     static final boolean isPPC;
     static final boolean isSPARC;
 
     static {
-        // IBM and JRockit store fields in reverse order; check for it
+        // Check for predictable field order; IBM and JRockit store fields in
+        // reverse order; Excelsior JET requires explicit order
         Field[] fields = MemberOrder.class.getFields();
-        REVERSE_FIELDS = "last".equals(fields[0].getName());
-        REQUIRES_FIELD_ORDER = !"middle".equals(fields[1].getName());
+        List names = new ArrayList();
+        for(int i=0;i < fields.length;i++) {
+            names.add(fields[i].getName());
+        }
+        List expected = Arrays.asList(MemberOrder.FIELDS);
+        List reversed = new ArrayList(expected);
+        Collections.reverse(reversed);
+
+        REVERSE_FIELDS = names.equals(reversed);
+        REQUIRES_FIELD_ORDER = !(names.equals(expected) || REVERSE_FIELDS);
         String arch = System.getProperty("os.arch").toLowerCase();
         isPPC = "ppc".equals(arch) || "powerpc".equals(arch);
         isSPARC = "sparc".equals(arch);
@@ -109,6 +124,13 @@ public abstract class Structure {
     /** validated for w32/msvc; align on field size */
     public static final int ALIGN_MSVC = 3;
 
+    /** Align to a 2-byte boundary. */
+    //public static final int ALIGN_2 = 4; 
+    /** Align to a 4-byte boundary. */
+    //public static final int ALIGN_4 = 5;
+    /** Align to an 8-byte boundary. */
+    //public static final int ALIGN_8 = 6;
+
     private static final int MAX_GNUC_ALIGNMENT = isSPARC ? 8 : Native.LONG_SIZE;
     protected static final int CALCULATE_SIZE = -1;
 
@@ -136,7 +158,7 @@ public abstract class Structure {
         this((Pointer)null, ALIGN_DEFAULT, mapper);
     }
 
-    /** Create a structure cast onto pre-allocated memory. */
+    /** Create a structure cast onto preallocated memory. */
     protected Structure(Pointer p) {
         this(p, ALIGN_DEFAULT);
     }
@@ -203,6 +225,10 @@ public abstract class Structure {
         }
     }
 
+    protected Memory autoAllocate(int size) {
+        return new AutoAllocated(size);
+    }
+
     /** Set the memory used by this structure.  This method is used to
      * indicate the given structure is nested within another or otherwise
      * overlaid on some other memory block and thus does not own its own
@@ -221,7 +247,15 @@ public abstract class Structure {
         // Invoking size() here is important when this method is invoked
         // from the ctor, to ensure fields are properly scanned and allocated
         try {
-            this.memory = m.share(offset, size());
+            // Set the structure's memory field temporarily to avoid
+            // auto-allocating memory in the call to size()
+            this.memory = m;
+            if (size == CALCULATE_SIZE) {
+                size = calculateSize(false);
+            }
+            if (size != CALCULATE_SIZE) {
+                this.memory = m.share(offset, size);
+            }
             this.array = null;
         }
         catch(IndexOutOfBoundsException e) {
@@ -230,7 +264,7 @@ public abstract class Structure {
     }
 
     protected void ensureAllocated() {
-        if (size == CALCULATE_SIZE) {
+        if (memory == null) {
             allocateMemory();
         }
     }
@@ -260,9 +294,7 @@ public abstract class Structure {
         if (size != CALCULATE_SIZE) {
             if (this.memory == null 
                 || this.memory instanceof AutoAllocated) {
-                this.memory = new AutoAllocated(size);
-                // Always clear new structure memory
-                this.memory.clear(size);
+                this.memory = autoAllocate(size);
             }
             this.size = size;
         }
@@ -270,6 +302,9 @@ public abstract class Structure {
 
     public int size() {
         ensureAllocated();
+        if (size == CALCULATE_SIZE) {
+            size = calculateSize(true);
+        }
         return size;
     }
 
@@ -334,7 +369,7 @@ public abstract class Structure {
             private int indexOf(Object o) {
                 Structure s1 = (Structure)o;
                 for (int i=0;i < count;i++) {
-                    Structure s2 = (Structure)elements[i];
+                    Structure s2 = elements[i];
                     if (s1 == s2
                         || (s1.getClass() == s2.getClass()
                             && s1.size() == s2.size()
@@ -610,6 +645,12 @@ public abstract class Structure {
         }
     }
 
+    private boolean hasFieldOrder() {
+        synchronized(this) {
+            return fieldOrder != null;
+        }
+    }
+
     protected List getFieldOrder() {
         synchronized(this) {
             if (fieldOrder == null) {
@@ -624,22 +665,60 @@ public abstract class Structure {
      */
     protected void setFieldOrder(String[] fields) {
         getFieldOrder().addAll(Arrays.asList(fields));
+        // Force recalculation of size/field layout
+        this.size = CALCULATE_SIZE;
+        if (this.memory instanceof AutoAllocated) {
+            this.memory = null;
+        }
     }
 
     /** Sort the structure fields according to the given array of names. */
-    protected void sortFields(Field[] fields, String[] names) {
-        for (int i=0;i < names.length;i++) {
-            for (int f=i;f < fields.length;f++) {
-                if (names[i].equals(fields[f].getName())) {
-                    Field tmp = fields[f];
-                    fields[f] = fields[i];
-                    fields[i] = tmp;
+    protected void sortFields(List fields, List names) {
+        for (int i=0;i < names.size();i++) {
+            String name = (String)names.get(i);
+            for (int f=0;f < fields.size();f++) {
+                Field field = (Field)fields.get(f);
+                if (name.equals(field.getName())) {
+                    Collections.swap(fields, i, f);
                     break;
                 }
             }
         }
     }
 
+    protected List getFields(boolean force) {
+        // Restrict to valid fields
+        List flist = new ArrayList();
+        for (Class cls = getClass();
+             !cls.equals(Structure.class);
+             cls = cls.getSuperclass()) {
+            List classFields = new ArrayList();
+            Field[] fields = cls.getDeclaredFields();
+            for (int i=0;i < fields.length;i++) {
+                int modifiers = fields[i].getModifiers();
+                if (Modifier.isStatic(modifiers)
+                    || !Modifier.isPublic(modifiers))
+                    continue;
+                classFields.add(fields[i]);
+            }
+            if (REVERSE_FIELDS) {
+                Collections.reverse(classFields);
+            }
+            flist.addAll(0, classFields);
+        }
+        if (REQUIRES_FIELD_ORDER || hasFieldOrder()) {
+            List fieldOrder = getFieldOrder();
+            if (fieldOrder.size() < flist.size()) {
+                if (force) {
+                    throw new Error("This VM does not store fields in a predictable order; you must use Structure.setFieldOrder to explicitly indicate the field order: " + System.getProperty("java.vendor") + ", " + System.getProperty("java.version"));
+                }
+                return null;
+            }
+            sortFields(flist, fieldOrder);
+        }
+        return flist;
+    }
+
     /** Calculate the amount of native memory required for this structure.
      * May return {@link #CALCULATE_SIZE} if the size can not yet be
      * determined (usually due to fields in the derived class not yet
@@ -658,38 +737,14 @@ public abstract class Structure {
 
         structAlignment = 1;
         int calculatedSize = 0;
-        Field[] fields = getClass().getFields();
-        // Restrict to valid fields
-        List flist = new ArrayList();
-        for (int i=0;i < fields.length;i++) {
-            int modifiers = fields[i].getModifiers();
-            if (Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers))
-                continue;
-            flist.add(fields[i]);
+        List fields = getFields(force);
+        if (fields == null) {
+            return CALCULATE_SIZE;
         }
-        fields = (Field[])flist.toArray(new Field[flist.size()]);
 
-        if (REVERSE_FIELDS) {
-            for (int i=0;i < fields.length/2;i++) {
-                int idx = fields.length-1-i;
-                Field tmp = fields[i];
-                fields[i] = fields[idx];
-                fields[idx] = tmp;
-            }
-        }
-        else if (REQUIRES_FIELD_ORDER) {
-            List fieldOrder = getFieldOrder();
-            if (fieldOrder.size() < fields.length) {
-                if (force) {
-                    throw new Error("This VM does not store fields in a predictable order; you must use setFieldOrder: " + System.getProperty("java.vendor") + ", " + System.getProperty("java.version"));
-                }
-                return CALCULATE_SIZE;
-            }
-            sortFields(fields, (String[])fieldOrder.toArray(new String[fieldOrder.size()]));
-        }
-
-        for (int i=0; i<fields.length; i++) {
-            Field field = fields[i];
+        boolean firstField = true;
+        for (Iterator i=fields.iterator();i.hasNext();firstField=false) {
+            Field field = (Field)i.next();
             int modifiers = field.getModifiers();
 
             Class type = field.getType();
@@ -773,7 +828,7 @@ public abstract class Structure {
             }
             try {
                 structField.size = Native.getNativeSize(nativeType, value);
-                fieldAlignment = getNativeAlignment(nativeType, value, i==0);
+                fieldAlignment = getNativeAlignment(nativeType, value, firstField);
             }
             catch(IllegalArgumentException e) {
                 // Might simply not yet have a type mapper set
@@ -802,6 +857,11 @@ public abstract class Structure {
             if (this instanceof ByValue) {
                 getTypeInfo();
             }
+            if (this.memory != null
+                && !(this.memory instanceof AutoAllocated)) {
+                // Ensure we've set bounds on the memory used
+                this.memory = this.memory.share(0, size);
+            }
             return size;
         }
 
@@ -971,14 +1031,12 @@ public abstract class Structure {
      */
     public Structure[] toArray(Structure[] array) {
         ensureAllocated();
-        if (memory instanceof AutoAllocated) {
+        if (this.memory instanceof AutoAllocated) {
             // reallocate if necessary
-            Memory m = (Memory)memory;
+            Memory m = (Memory)this.memory;
             int requiredSize = array.length * size();
-            if (m.getSize() < requiredSize) {
-                m = new AutoAllocated(requiredSize);
-                m.clear();
-                useMemory(m);
+            if (m.size() < requiredSize) {
+                useMemory(autoAllocate(requiredSize));
             }
         }
         array[0] = this;
@@ -1020,10 +1078,12 @@ public abstract class Structure {
      * and visible data fields.
      */
     public boolean equals(Object o) {
-        if (o == this)
+        if (o == this) {
             return true;
-        if (o == null)
+        }
+        if (!(o instanceof Structure)) {
             return false;
+        }
         if (o.getClass() != getClass()
             && ((Structure)o).baseClass() != baseClass()) {
             return false;
@@ -1058,7 +1118,7 @@ public abstract class Structure {
         return p;
     }
 
-    /** Set whether the structure is automatically synched to native memory
+    /** Set whether the structure is automatically synchronized to native memory
         before and after a native function call.  Convenience method for
         <pre><code>
         boolean auto = ...;
@@ -1071,28 +1131,28 @@ public abstract class Structure {
         setAutoWrite(auto);
     }
 
-    /** Set whether the struture is written to native memory prior to
+    /** Set whether the structure is read from native memory prior to
         a native function call.
     */
     public void setAutoRead(boolean auto) {
         this.autoRead = auto;
     }
 
-    /** Returns whether the struture is written to native memory prior to
+    /** Returns whether the structure is read from native memory prior to
         a native function call.
     */
     public boolean getAutoRead() {
         return this.autoRead;
     }
 
-    /** Set whether the structure is read from native memory after a native
-        function call. 
+    /** Set whether the structure is written to native memory after a native
+        function call.
     */
     public void setAutoWrite(boolean auto) {
         this.autoWrite = auto;
     }
 
-    /** Returns whether the structure is read from native memory after a native
+    /** Returns whether the structure is written to native memory after a native
         function call. 
     */
     public boolean getAutoWrite() {
@@ -1289,6 +1349,8 @@ public abstract class Structure {
     private class AutoAllocated extends Memory {
         public AutoAllocated(int size) {
             super(size);
+            // Always clear new structure memory
+            clear();
         }
     }
 
diff --git a/src/com/sun/jna/examples/AlphaMaskDemo.java b/src/com/sun/jna/examples/AlphaMaskDemo.java
deleted file mode 100644
index b221d95..0000000
--- a/src/com/sun/jna/examples/AlphaMaskDemo.java
+++ /dev/null
@@ -1,524 +0,0 @@
-/* Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved
- * 
- * 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.  
- */
-package com.sun.jna.examples;
-
-import java.awt.event.*;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Graphics;
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsEnvironment;
-import java.awt.Image;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.awt.Toolkit;
-import java.awt.Window;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.awt.event.MouseEvent;
-import java.awt.image.BufferedImage;
-import java.awt.image.ImageObserver;
-import java.awt.image.Raster;
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.swing.ImageIcon;
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSlider;
-import javax.swing.JWindow;
-import javax.swing.SwingUtilities;
-import javax.swing.TransferHandler;
-import javax.swing.UIManager;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.MouseInputAdapter;
-import com.sun.jna.Native;
-import com.sun.jna.NativeLong;
-import com.sun.jna.Pointer;
-import com.sun.jna.examples.unix.X11;
-import com.sun.jna.examples.unix.X11.Display;
-import com.sun.jna.examples.unix.X11.GC;
-import com.sun.jna.examples.unix.X11.XSetWindowAttributes;
-import com.sun.jna.examples.win32.GDI32;
-import com.sun.jna.examples.win32.User32;
-import com.sun.jna.examples.win32.GDI32.BITMAPINFO;
-import com.sun.jna.examples.win32.User32.BLENDFUNCTION;
-import com.sun.jna.examples.win32.User32.POINT;
-import com.sun.jna.examples.win32.User32.SIZE;
-import com.sun.jna.examples.win32.W32API.HANDLE;
-import com.sun.jna.examples.win32.W32API.HBITMAP;
-import com.sun.jna.examples.win32.W32API.HDC;
-import com.sun.jna.examples.win32.W32API.HWND;
-import com.sun.jna.ptr.PointerByReference;
-
-// TODO: put this into a reasonable API; right now this is pretty much
-// just hard-coded blitting of an image into a window
-// Thanks to Rui Lopes for the C# example on which this is based: 
-// rui at ruilopes.com 
-// http://www.codeproject.com/cs/media/perpxalpha_sharp.asp?df=100&forumid=3270&exp=0&select=773155
-public class AlphaMaskDemo implements Runnable {
-    
-    private static final DataFlavor URL_FLAVOR = 
-        new DataFlavor("application/x-java-url; class=java.net.URL", "URL");
-    private static final DataFlavor URI_LIST_FLAVOR = 
-        new DataFlavor("text/uri-list; class=java.lang.String", "URI list");
-    
-    private JFrame frame;
-    private JWindow alphaWindow;
-    private float alpha = 1f;
-    private Image image;
-    
-    private void update() {
-        update(false, true);
-    }
-
-    private void update(boolean a, boolean i) {
-        String os = System.getProperty("os.name");
-        if (os.startsWith("Windows"))
-            updateW32(a, i);
-        else if (os.startsWith("Linux")) 
-            updateX11(a, i);
-        else if (os.startsWith("Mac"))
-            updateMac(a, i);
-    }
-
-    private void updateMac(boolean a, boolean i) {
-        if (!alphaWindow.isDisplayable()) {
-            alphaWindow.pack();
-        }
-        if (a)
-            WindowUtils.setWindowAlpha(alphaWindow, alpha);
-        if (i) {
-            alphaWindow.setBackground(new Color(0,0,0,0));
-            alphaWindow.setContentPane(new JLabel(new ImageIcon(image)));
-            alphaWindow.setSize(alphaWindow.getPreferredSize());
-        }
-        if (!alphaWindow.isVisible()) {
-            Window parent = alphaWindow.getOwner();
-            Point where = parent.getLocationOnScreen();
-            where.translate(parent.getWidth(), 0);
-            alphaWindow.setLocation(where);
-            alphaWindow.setVisible(true);
-        }
-    }
-
-    private com.sun.jna.Memory buffer;
-    private int[] pixels;
-    private void updateX11(boolean a, boolean i) {
-        X11 x11 = X11.INSTANCE;
-        X11.Window win = X11.Window.None;
-        Display dpy = x11.XOpenDisplay(null);
-        try {
-            if (!alphaWindow.isDisplayable()) {
-                alphaWindow.pack();
-                if (System.getProperty("java.version").matches("^1\\.4\\..*"))
-                    alphaWindow.setVisible(true);
-                win = new X11.Window((int)Native.getWindowID(alphaWindow));
-                Window parent = alphaWindow.getOwner();
-                Point where = parent.getLocationOnScreen();
-                where.translate(parent.getWidth(), 0);
-                alphaWindow.removeAll();
-                alphaWindow.setLocation(where);
-                alphaWindow.setBackground(new Color(0,0,0,0));
-            }
-            else {
-                win = new X11.Window((int)Native.getWindowID(alphaWindow));
-            }
-            
-            if (i) {
-                int w = image.getWidth(null);
-                int h = image.getHeight(null);
-                alphaWindow.setSize(w, h);
-                if (buffer == null || buffer.getSize() != w*h*4) {
-                    buffer = new com.sun.jna.Memory(w*h*4);
-                    pixels = new int[w*h];
-                }
-
-                BufferedImage buf = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
-                Graphics g = buf.getGraphics();
-                g.drawImage(image, 0, 0, w, h, null);
-                
-                long start = System.currentTimeMillis();
-                long blitTime, putImageTime, write;
-                GC gc = x11.XCreateGC(dpy, win, new NativeLong(0), null);
-                long gcTime = System.currentTimeMillis();
-                try {
-                    Raster raster = buf.getData();
-                    int[] pixel = new int[4];
-                    for (int y=0;y < h;y++) {
-                        for (int x=0;x < w;x++) {
-                            raster.getPixel(x, y, pixel);
-                            int alpha = (pixel[3]&0xFF)<<24;
-                            int red = (pixel[2]&0xFF);
-                            int green = (pixel[1]&0xFF)<<8;
-                            int blue = (pixel[0]&0xFF)<<16;
-                            pixels[y*w+x] = alpha|red|green|blue;
-                        }
-                    }
-                    blitTime = System.currentTimeMillis();
-                    X11.XWindowAttributes xwa = new X11.XWindowAttributes();
-                    x11.XGetWindowAttributes(dpy, win, xwa);
-                    X11.XImage image = x11.XCreateImage(dpy, xwa.visual,
-                                                        32, X11.ZPixmap,
-                                                        0, buffer, w, h, 32, w*4);
-                    buffer.write(0, pixels, 0, pixels.length);
-                    write = System.currentTimeMillis();
-                    x11.XPutImage(dpy, win, gc, image, 0,0,0,0,w,h);
-                    x11.XFree(image.getPointer());
-                    putImageTime = System.currentTimeMillis();
-                }
-                finally {
-                    if (gc != null)
-                        x11.XFreeGC(dpy, gc);
-                }
-                long end = System.currentTimeMillis();
-                //System.out.println("gc: " + (gcTime-start) + "ms");
-                //System.out.println("blit: " + (blitTime-gcTime) + "ms");
-                //System.out.println("write: " + (write-blitTime) + "ms");
-                //System.out.println("put image: " + (putImageTime-write) + "ms");
-                //System.out.println("total: " + (end-start) + "ms");
-            }
-        }
-        finally {
-            if (dpy != null)
-                x11.XCloseDisplay(dpy);
-        }
-        if (a)
-            WindowUtils.setWindowAlpha(alphaWindow, alpha);
-        
-        if (!alphaWindow.isVisible()) {
-            alphaWindow.setVisible(true);
-            // hack for initial refresh (X11)
-            update(true, true);
-        }
-    }
-
-    private HWND getHwnd(Window w) {
-        HWND hwnd = new HWND();
-        hwnd.setPointer(Native.getWindowPointer(w));
-        return hwnd;
-    }
-    
-    private void updateW32(boolean a, boolean i) {
-        User32 user = User32.INSTANCE;
-        GDI32 gdi = GDI32.INSTANCE;
-        HWND hWnd = null;
-
-        if (!alphaWindow.isDisplayable()) {
-            alphaWindow.pack();
-            hWnd = getHwnd(alphaWindow);
-            int flags = user.GetWindowLong(hWnd, User32.GWL_EXSTYLE);
-            flags |= User32.WS_EX_LAYERED;
-            user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
-            Window parent = alphaWindow.getOwner();
-            Point where = parent.getLocationOnScreen();
-            where.translate(parent.getWidth(), 0);
-            alphaWindow.setLocation(where);
-        }
-        else {
-            hWnd = getHwnd(alphaWindow);
-        }
-    
-        if (i) {
-            int w = image.getWidth(null);
-            int h = image.getHeight(null);
-            HDC screenDC = user.GetDC(null);
-            HDC memDC = gdi.CreateCompatibleDC(screenDC);
-            HBITMAP hBitmap = null;
-            HANDLE oldBitmap = null;
-            
-            try {
-                BufferedImage buf = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
-                Graphics g = buf.getGraphics();
-                g.drawImage(image, 0, 0, w, h, null);
-                
-                BITMAPINFO bmi = new BITMAPINFO();
-                bmi.bmiHeader.biWidth = w;
-                bmi.bmiHeader.biHeight = h;
-                bmi.bmiHeader.biPlanes = 1;
-                bmi.bmiHeader.biBitCount = 32;
-                bmi.bmiHeader.biCompression = GDI32.BI_RGB;
-                bmi.bmiHeader.biSizeImage = w * h * 4;
-                
-                PointerByReference ppbits = new PointerByReference();
-                hBitmap = gdi.CreateDIBSection(memDC, bmi, GDI32.DIB_RGB_COLORS,
-                                               ppbits, null, 0);
-                oldBitmap = gdi.SelectObject(memDC, hBitmap);
-                Pointer pbits = ppbits.getValue();
-                
-                Raster raster = buf.getData();
-                int[] pixel = new int[4];
-                int[] bits = new int[w*h];
-                for (int y=0;y < h;y++) {
-                    for (int x=0;x < w;x++) {
-                        raster.getPixel(x, h-y-1, pixel);
-                        int alpha = (pixel[3]&0xFF)<<24;
-                        int red = (pixel[2]&0xFF);
-                        int green = (pixel[1]&0xFF)<<8;
-                        int blue = (pixel[0]&0xFF)<<16; 
-                        bits[x + y * w] = alpha|red|green|blue;
-                    }
-                }
-                pbits.write(0, bits, 0, bits.length);
-                
-                SIZE size = new SIZE();
-                size.cx = w;
-                size.cy = h;
-                POINT loc = new POINT();
-                loc.x = alphaWindow.getX();
-                loc.y = alphaWindow.getY();
-                POINT srcLoc = new POINT();
-                BLENDFUNCTION blend = new BLENDFUNCTION();
-                blend.SourceConstantAlpha = (byte)(alpha * 255);
-                blend.AlphaFormat = User32.AC_SRC_ALPHA;
-                user.UpdateLayeredWindow(hWnd, screenDC, loc, size, memDC, srcLoc, 
-                                         0, blend, User32.ULW_ALPHA);
-            }
-            finally {
-                user.ReleaseDC(null, screenDC);
-                if (hBitmap != null) {
-                    gdi.SelectObject(memDC, oldBitmap);
-                    gdi.DeleteObject(hBitmap);
-                }
-                gdi.DeleteDC(memDC);
-            }
-        }
-        else if (a) {
-            BLENDFUNCTION blend = new BLENDFUNCTION();
-            blend.SourceConstantAlpha = (byte)(alpha * 255);
-            blend.AlphaFormat = User32.AC_SRC_ALPHA;
-            user.UpdateLayeredWindow(hWnd, null, null, null, null, null, 
-                                     0, blend, User32.ULW_ALPHA);
-        }
-        
-        if (!alphaWindow.isVisible()) {
-            alphaWindow.setVisible(true);
-        }
-    }
-    
-    private ImageObserver observer = new ImageObserver() {
-        public boolean imageUpdate(final Image img, int infoflags, int x, int y, int width, int height) {
-            if ((infoflags & (ImageObserver.ALLBITS|ImageObserver.FRAMEBITS)) != 0) {
-                SwingUtilities.invokeLater(new Runnable() {
-                    public void run() {
-                        setImage(img);
-                    }
-                });
-                return false;
-            }
-            else if ((infoflags & (ImageObserver.ERROR|ImageObserver.ABORT)) != 0) {
-                System.out.println("Image load error: " + img);
-                return false;
-            }
-            return true;
-        }
-        
-    };
-    private void setImage(final Image image) {
-        int w = image.getWidth(observer);
-        int h = image.getHeight(observer);
-        if (w > 0 && h > 0) {
-            this.image = image;
-            frame.setIconImage(image);
-            update(false, true);
-        }
-    }
-    
-    private void setAlpha(float alpha) {
-        this.alpha = alpha = Math.min(1f, Math.max(0f, alpha));
-        update(true, false);
-    }
-    
-    public void run() {
-        // Must find a graphics configuration with a depth of 32 bits
-        GraphicsConfiguration gconfig = WindowUtils.getAlphaCompatibleGraphicsConfiguration();
-        frame = new JFrame("Alpha Mask Demo");
-        alphaWindow = new JWindow(frame, gconfig);
-        MouseInputAdapter handler = new MouseInputAdapter() {
-            private Point offset;
-            public void mousePressed(MouseEvent e) {
-                if (SwingUtilities.isLeftMouseButton(e))
-                    offset = e.getPoint();
-            }
-            public void mouseReleased(MouseEvent e) {
-                offset = null;
-                // hack (w32) calling this has the side effect of re-enabling
-                // hit testing; not sure why it gets disabled
-                if (System.getProperty("os.name").startsWith("Windows"))
-                    update(true, true);
-            }
-            public void mouseDragged(MouseEvent e) {
-                if (offset != null) {
-                    Window w = (Window)e.getSource();
-                    Point where = e.getPoint();
-                    where.translate(-offset.x, -offset.y);
-                    Point loc = w.getLocationOnScreen();
-                    loc.translate(where.x, where.y);
-                    w.setLocation(loc.x, loc.y);
-                }
-            }
-        };
-        alphaWindow.addMouseListener(handler);
-        alphaWindow.addMouseMotionListener(handler);
-        JPanel p = new JPanel(new BorderLayout(8, 8));
-        p.setBorder(new EmptyBorder(8, 8, 8, 8));
-        p.setTransferHandler(new TransferHandler() {
-            public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
-                List list = Arrays.asList(transferFlavors);
-                if (list.contains(URL_FLAVOR)
-                    || list.contains(URI_LIST_FLAVOR)
-                    || list.contains(DataFlavor.imageFlavor)
-                    || list.contains(DataFlavor.javaFileListFlavor)) {
-                    return true;
-                }
-                if (DataFlavor.selectBestTextFlavor(transferFlavors) != null) {
-                    return true;
-                }
-                System.out.println("No acceptable flavor found in "
-                                   + Arrays.asList(transferFlavors));
-                return false;
-            }
-            public boolean importData(JComponent comp, Transferable t) {
-                try {
-                    if (t.isDataFlavorSupported(URL_FLAVOR)) {
-                        URL url = (URL)t.getTransferData(URL_FLAVOR);
-                        setImage(Toolkit.getDefaultToolkit().getImage(url));
-                        return true;
-                    }
-                    if (t.isDataFlavorSupported(URI_LIST_FLAVOR)) {
-                        String s = (String)t.getTransferData(URI_LIST_FLAVOR);
-                        String[] uris = s.split("[\r\n]");
-                        if (uris.length > 0) {
-                            URL url = new URL(uris[0]);
-                            setImage(Toolkit.getDefaultToolkit().getImage(url));
-                            return true;
-                        }
-                        return false;
-                    }
-                    if (t.isDataFlavorSupported(DataFlavor.imageFlavor)) {
-                        Image image = (Image)t.getTransferData(DataFlavor.imageFlavor);
-                        setImage(image);
-                        return true;
-                    }
-                    if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)){
-                        List files = (List)t.getTransferData(DataFlavor.javaFileListFlavor);
-                        File f = (File)files.get(0);
-                        URL url = new URL("file://" + f.toURI().toURL().getPath());
-                        Image image = Toolkit.getDefaultToolkit().getImage(url);
-                        setImage(image);
-                        return true;
-                    }
-                    DataFlavor flavor = DataFlavor.selectBestTextFlavor(t.getTransferDataFlavors());
-                    if (flavor != null) {
-                        Reader reader = flavor.getReaderForText(t);
-                        char[] buf = new char[512];
-                        StringBuffer b = new StringBuffer();
-                        int count;
-                        // excise excess NUL characters (bug in firefox, java
-                        // or my code, not sure which).  someone got the 
-                        // encoding wrong
-                        while ((count = reader.read(buf)) > 0) {
-                            for (int i=0;i < count;i++) {
-                                if (buf[i] != 0)
-                                    b.append(buf, i, 1);
-                            }
-                        }
-                        String html = b.toString();
-                        Pattern p = Pattern.compile("<img.*src=\"([^\\\"\">]+)\"",
-                                                    Pattern.CANON_EQ|Pattern.UNICODE_CASE);
-                        Matcher m = p.matcher(html);
-                        if (m.find()) {
-                            URL url = new URL(m.group(1));
-                            System.out.println("Load image from " + url);
-                            Image image = Toolkit.getDefaultToolkit().getImage(url);
-                            setImage(image);
-                            return true;
-                        }
-                        System.out.println("Can't parse text: " + html);
-                        return false;
-                    }
-                    System.out.println("No flavor available: " 
-                                       + Arrays.asList(t.getTransferDataFlavors()));
-                }
-                catch (UnsupportedFlavorException e) {
-                    e.printStackTrace();
-                }
-                catch (IOException e) {
-                    e.printStackTrace();
-                }
-                catch(Throwable e) {
-                    e.printStackTrace();
-                }
-                return false;
-            }
-        });
-        p.add(new JLabel("<html><center>Drop an image with an alpha channel onto this window<br>" 
-                         + "You may also adjust the overall transparency with the slider</center></html>"),
-                         BorderLayout.NORTH);
-        final JSlider slider = new JSlider(0, 255, 255);
-        slider.addChangeListener(new ChangeListener() {
-            public void stateChanged(ChangeEvent e) {
-                int value = slider.getValue();
-                setAlpha(value / 255f);
-            }
-        });
-        p.add(slider, BorderLayout.SOUTH);
-        
-        frame.getContentPane().add(p);
-        frame.pack();
-        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        centerOnScreen(frame);
-        frame.setVisible(true);
-        p.addMouseListener(new MouseAdapter() {
-                public void mousePressed(MouseEvent e) {
-                    update();
-                }
-            });
-
-        try {
-            URL url = getClass().getResource("tardis.png");
-            if (url != null) {
-                setImage(Toolkit.getDefaultToolkit().getImage(url));
-            }
-        }
-        catch(Exception e) { }
-    }
-    
-    /** Center the given {@link Window} on the default screen. */
-    private static void centerOnScreen(Window window) {
-        Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
-        Rectangle max = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
-        int x = Math.max(center.x - Math.round(window.getWidth()/2f), max.x);
-        int y = Math.max(center.y - Math.round(window.getHeight()/2f), max.y);
-        window.setLocation(new Point(x, y));
-    }
-
-    public static void main(String[] args) {
-        try {
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-        }
-        catch (Exception e) {
-        }
-        SwingUtilities.invokeLater(new AlphaMaskDemo());
-    }
-}
diff --git a/src/com/sun/jna/examples/AlphaMaskDemo2.java b/src/com/sun/jna/examples/AlphaMaskDemo2.java
deleted file mode 100644
index f3e7d8c..0000000
--- a/src/com/sun/jna/examples/AlphaMaskDemo2.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved 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.
- */
-package com.sun.jna.examples;
-
-import java.awt.Cursor;
-import java.awt.BorderLayout;
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsEnvironment;
-import java.awt.Image;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.awt.Toolkit;
-import java.awt.Window;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseEvent;
-import java.awt.image.ImageObserver;
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSlider;
-import javax.swing.JWindow;
-import javax.swing.SwingConstants;
-import javax.swing.SwingUtilities;
-import javax.swing.TransferHandler;
-import javax.swing.UIManager;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.MouseInputAdapter;
-
-public class AlphaMaskDemo2 implements Runnable {
-    private static final DataFlavor URL_FLAVOR =
-        new DataFlavor("application/x-java-url; class=java.net.URL", "URL");
-    private static final DataFlavor URI_LIST_FLAVOR =
-        new DataFlavor("text/uri-list; class=java.lang.String", "URI list");
-    private JFrame frame;
-    private JWindow alphaWindow;
-    private JLabel icon;
-    private ImageObserver observer = new ImageObserver() {
-        public boolean imageUpdate(final Image img, int infoflags, int x,
-                                   int y, int width, int height) {
-            if ((infoflags & (ImageObserver.ALLBITS | ImageObserver.FRAMEBITS)) != 0) {
-                SwingUtilities.invokeLater(new Runnable() {
-                    public void run() {
-                        setImage(img);
-                    }
-                });
-                return false;
-            }
-            else if ((infoflags & (ImageObserver.ERROR | ImageObserver.ABORT)) != 0) {
-                System.err.println("Image load error: " + img);
-                return false;
-            }
-            return true;
-        }
-    };
-
-    private void setImage(final Image image) {
-        final int w = image.getWidth(observer);
-        final int h = image.getHeight(observer);
-        if (w > 0 && h > 0) {
-            frame.setIconImage(image);
-            icon.setIcon(new ImageIcon(image));
-            if (!alphaWindow.isVisible()) {
-                alphaWindow.pack();
-                alphaWindow.setVisible(true);
-            }
-            else {
-                alphaWindow.setSize(alphaWindow.getPreferredSize());
-            }
-            icon.getParent().invalidate();
-            icon.getParent().repaint();
-        }
-    }
-
-    public void run() {
-        // Must find a graphics configuration with a depth of 32 bits
-        GraphicsConfiguration gconfig = WindowUtils.getAlphaCompatibleGraphicsConfiguration();
-        frame = new JFrame("Alpha Mask Demo");
-        alphaWindow = new JWindow(frame, gconfig);
-        icon = new JLabel();
-        icon.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
-        alphaWindow.getContentPane().add(icon);
-        JButton quit = new JButton("Quit");
-        JLabel label = new JLabel("Drag this window by its image");
-        label.setHorizontalAlignment(SwingConstants.CENTER);
-        alphaWindow.getContentPane().add(label, BorderLayout.NORTH);
-        alphaWindow.getContentPane().add(quit, BorderLayout.SOUTH);
-        quit.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                System.exit(0);
-            }
-        });
-        MouseInputAdapter handler = new MouseInputAdapter() {
-            private Point offset;
-
-            public void mousePressed(MouseEvent e) {
-                if (SwingUtilities.isLeftMouseButton(e))
-                    offset = e.getPoint();
-            }
-
-            public void mouseReleased(MouseEvent e) {
-                offset = null;
-            }
-
-            public void mouseDragged(MouseEvent e) {
-                if (offset != null) {
-                    Window w = (Window)e.getSource();
-                    Point where = e.getPoint();
-                    where.translate(-offset.x, -offset.y);
-                    Point loc = w.getLocationOnScreen();
-                    loc.translate(where.x, where.y);
-                    w.setLocation(loc.x, loc.y);
-                }
-            }
-        };
-        alphaWindow.addMouseListener(handler);
-        alphaWindow.addMouseMotionListener(handler);
-        JPanel p = new JPanel(new BorderLayout(8, 8));
-        p.setBorder(new EmptyBorder(8, 8, 8, 8));
-        p.setTransferHandler(new TransferHandler() {
-            public boolean canImport(JComponent comp,
-                                     DataFlavor[] transferFlavors) {
-                List list = Arrays.asList(transferFlavors);
-                if (list.contains(URL_FLAVOR) || list.contains(URI_LIST_FLAVOR)
-                    || list.contains(DataFlavor.imageFlavor)
-                    || list.contains(DataFlavor.javaFileListFlavor)) {
-                    return true;
-                }
-                if (DataFlavor.selectBestTextFlavor(transferFlavors) != null) {
-                    return true;
-                }
-                System.err.println("No acceptable flavor found in "
-                    + Arrays.asList(transferFlavors));
-                return false;
-            }
-
-            public boolean importData(JComponent comp, Transferable t) {
-                try {
-                    if (t.isDataFlavorSupported(URL_FLAVOR)) {
-                        URL url = (URL)t.getTransferData(URL_FLAVOR);
-                        setImage(Toolkit.getDefaultToolkit().getImage(url));
-                        return true;
-                    }
-                    if (t.isDataFlavorSupported(URI_LIST_FLAVOR)) {
-                        String s = (String)t.getTransferData(URI_LIST_FLAVOR);
-                        String[] uris = s.split("[\r\n]");
-                        if (uris.length > 0) {
-                            URL url = new URL(uris[0]);
-                            setImage(Toolkit.getDefaultToolkit().getImage(url));
-                            return true;
-                        }
-                        return false;
-                    }
-                    if (t.isDataFlavorSupported(DataFlavor.imageFlavor)) {
-                        Image image = (Image)t
-                                              .getTransferData(DataFlavor.imageFlavor);
-                        setImage(image);
-                        return true;
-                    }
-                    if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
-                        List files = (List)t
-                                            .getTransferData(DataFlavor.javaFileListFlavor);
-                        File f = (File)files.get(0);
-                        URL url = new URL("file://"
-                            + f.toURI().toURL().getPath());
-                        Image image = Toolkit.getDefaultToolkit().getImage(url);
-                        setImage(image);
-                        return true;
-                    }
-                    DataFlavor flavor = DataFlavor
-                                                  .selectBestTextFlavor(t
-                                                                         .getTransferDataFlavors());
-                    if (flavor != null) {
-                        Reader reader = flavor.getReaderForText(t);
-                        char[] buf = new char[512];
-                        StringBuffer b = new StringBuffer();
-                        int count;
-                        // excise excess NUL characters (bug in firefox,
-                        // java
-                        // or my code, not sure which). someone got the
-                        // encoding wrong
-                        while ((count = reader.read(buf)) > 0) {
-                            for (int i = 0; i < count; i++) {
-                                if (buf[i] != 0)
-                                    b.append(buf, i, 1);
-                            }
-                        }
-                        String html = b.toString();
-                        Pattern p = Pattern
-                                           .compile(
-                                                    "<img.*src=\"([^\\\"\">]+)\"",
-                                                    Pattern.CANON_EQ
-                                                        | Pattern.UNICODE_CASE);
-                        Matcher m = p.matcher(html);
-                        if (m.find()) {
-                            URL url = new URL(m.group(1));
-                            System.out.println("Load image from " + url);
-                            Image image = Toolkit.getDefaultToolkit()
-                                                 .getImage(url);
-                            setImage(image);
-                            return true;
-                        }
-                        System.err.println("Can't parse text: " + html);
-                        return false;
-                    }
-                    System.err.println("No flavor available: "
-                        + Arrays.asList(t.getTransferDataFlavors()));
-                }
-                catch (UnsupportedFlavorException e) {
-                    e.printStackTrace();
-                }
-                catch (IOException e) {
-                    e.printStackTrace();
-                }
-                catch (Throwable e) {
-                    e.printStackTrace();
-                }
-                return false;
-            }
-        });
-        p
-         .add(
-              new JLabel(
-                         "<html><center>Drop an image with an alpha channel onto this window<br>"
-                             + "You may also adjust the overall transparency with the slider</center></html>"),
-              BorderLayout.NORTH);
-        p.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
-        final JSlider slider = new JSlider(0, 255, 255);
-        slider.addChangeListener(new ChangeListener() {
-            public void stateChanged(ChangeEvent e) {
-                int value = slider.getValue();
-                WindowUtils.setWindowAlpha(alphaWindow, value / 255f);
-            }
-        });
-        p.add(slider, BorderLayout.SOUTH);
-        frame.getContentPane().add(p);
-        frame.pack();
-        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        centerOnScreen(frame);
-        frame.setVisible(true);
-        WindowUtils.setWindowTransparent(alphaWindow, true);
-        alphaWindow.setLocation(frame.getX() + frame.getWidth() + 4,
-                                frame.getY());
-        try {
-            URL url = getClass().getResource("tardis.png");
-            if (url != null) {
-                setImage(Toolkit.getDefaultToolkit().getImage(url));
-            }
-        }
-        catch (Exception e) {
-        }
-    }
-
-    /** Center the given {@link Window} on the default screen. */
-    private static void centerOnScreen(Window window) {
-        Point center = GraphicsEnvironment.getLocalGraphicsEnvironment()
-                                          .getCenterPoint();
-        Rectangle max = GraphicsEnvironment.getLocalGraphicsEnvironment()
-                                           .getMaximumWindowBounds();
-        int x = Math.max(center.x - Math.round(window.getWidth() / 2f), max.x);
-        int y = Math.max(center.y - Math.round(window.getHeight() / 2f), max.y);
-        window.setLocation(new Point(x, y));
-    }
-
-    public static void main(String[] args) {
-        try {
-            System.setProperty("sun.java2d.noddraw", "true");
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-        }
-        catch (Exception e) {
-        }
-        SwingUtilities.invokeLater(new AlphaMaskDemo2());
-    }
-}
diff --git a/src/com/sun/jna/examples/BalloonManager.java b/src/com/sun/jna/examples/BalloonManager.java
deleted file mode 100644
index 5c2a6e4..0000000
--- a/src/com/sun/jna/examples/BalloonManager.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2007 Timothy Wall, All Rights Reserved 
- * 
- * 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. <p/> 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.
- */
-package com.sun.jna.examples;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.GradientPaint;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Point;
-import java.awt.Shape;
-import java.awt.Window;
-import java.awt.event.ComponentAdapter;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Area;
-import java.awt.geom.GeneralPath;
-import java.awt.geom.RoundRectangle2D;
-import javax.swing.Box;
-import javax.swing.JWindow;
-import javax.swing.Popup;
-import javax.swing.SwingUtilities;
-
-/**
- * Provides a popup balloon containing an arbitrary component.  This provides
- * a form of content-specific decoration less transient than a tooltip, and less
- * heavyweight and more adaptable to changing content than a dedicated window. 
- * Clients are responsible for invoking show and hide on the provided popup.
- */ 
-// TODO: anchor balloon point
-// TODO: connect drop shadow and parent masks
-// TODO: proper preferred size for html
-// TODO: lightweight popups
-public class BalloonManager {
-
-    // Avoid using drop shadow in some instances
-    private static boolean useDropShadow() {
-        return WindowUtils.isWindowAlphaSupported();
-    }
-    
-    private static class DropShadow extends JWindow {
-        private static final float SHADOW_ALPHA = .25f;
-        private static final float YSCALE = .80f;
-        private static final double ANGLE = 2*Math.PI/24;
-        private static final Point OFFSET = new Point(8, 8);
-        private static final Color COLOR = new Color(0, 0, 0, 50);
-
-        private Shape parentMask;
-        private ComponentListener listener;
-        public DropShadow(final Window parent, Shape mask) {
-            super(parent);
-            setFocusableWindowState(false);
-            setName("###overrideRedirect###");
-
-            Point where = parent.isShowing()
-                ? parent.getLocationOnScreen() : parent.getLocation();
-            setLocation(where.x + OFFSET.x, where.y + OFFSET.y);
-            setBackground(COLOR);
-            getContentPane().setBackground(COLOR);
-
-            parentMask = mask;
-            parent.addComponentListener(listener = new ComponentAdapter() {
-                public void componentMoved(ComponentEvent e) {
-                    Point where = getOwner().isShowing()
-                        ? getOwner().getLocationOnScreen()
-                        : getOwner().getLocation();
-                    setLocation(where.x + OFFSET.x, where.y + OFFSET.y);
-                }
-                public void componentResized(ComponentEvent e) {
-                    Component c = e.getComponent();
-                    int extra = c.getWidth() + (int)Math.sin(ANGLE)*c.getHeight();
-                    setSize(c.getWidth() + extra, c.getHeight());
-                    WindowUtils.setWindowMask(DropShadow.this, getMask());
-                }
-                public void componentShown(ComponentEvent e) {
-                    if (!isVisible()) {
-                        pack();
-                        setVisible(true);
-                    }
-                }
-            });
-            addWindowListener(new WindowAdapter() {
-                public void windowClosed(WindowEvent e) {
-                    if (listener != null) {
-                        parent.removeComponentListener(listener);
-                        listener = null;
-                    }
-                }
-            });
-            WindowUtils.setWindowMask(DropShadow.this, getMask());
-            WindowUtils.setWindowAlpha(DropShadow.this, SHADOW_ALPHA);
-            if (parent.isVisible()) {
-                pack();
-                setVisible(true);
-            }
-        }
-        
-        public void paint(Graphics graphics) {
-            Graphics2D g = (Graphics2D)graphics.create();
-            // Workaround for OSX since we only get automatic clipping
-            // on the content pane and below
-            g.setClip(getMask());
-            g.setPaint(new GradientPaint(0, getHeight()/2, new Color(0,0,0,0), getWidth(), getHeight()/2, new Color(0,0,0,255)));
-            g.fillRect(0, 0, getWidth(), getHeight());
-            g.dispose();
-        }
-
-        public Dimension getPreferredSize() {
-            Dimension size = getOwner().getPreferredSize();
-            size.width += 100;
-            size.height += 100;
-            return size;
-        }
-        
-        private Shape getMask() {
-            Area area = new Area(parentMask);
-            Area clip = new Area(parentMask);
-
-            AffineTransform tx = new AffineTransform();
-            tx.translate(Math.sin(ANGLE)*getOwner().getHeight(), 0);
-            tx.shear(-Math.tan(ANGLE), 0);
-            tx.scale(1, YSCALE);
-            tx.translate(0, (1-YSCALE)*getOwner().getHeight());
-            area.transform(tx);
-            tx = new AffineTransform();
-            tx.translate(-OFFSET.x, -OFFSET.y);
-            clip.transform(tx);
-            area.subtract(clip);
-            return area;
-        }
-    }
-    
-    private static final class BubbleWindow extends JWindow {
-        private static final int Y_OFFSET = 50;
-        private static final int ARC = 25;
-
-        private Point offset;
-        private Area mask;
-        private Dimension maskSize;
-        private ComponentListener moveTracker = new ComponentAdapter() {
-            public void componentMoved(ComponentEvent e) {
-                Point where = 
-                    e.getComponent().isShowing() 
-                    ? e.getComponent().getLocationOnScreen()
-                    : e.getComponent().getLocation();
-                setLocation(where.x - offset.x, where.y - offset.y);
-                // TODO preserve stacking order (linux)
-            }
-        };
-        
-        public BubbleWindow(Window owner, Component content) {
-            super(owner);
-            setFocusableWindowState(false);
-            setName("###overrideRedirect###");
-            getContentPane().setBackground(Color.white);
-            getContentPane().add(content, BorderLayout.CENTER);
-            getContentPane().add(Box.createVerticalStrut(Y_OFFSET), BorderLayout.SOUTH);
-            owner.addComponentListener(moveTracker);
-            setSize(getPreferredSize());
-            mask = new Area(getMask(getWidth(), getHeight()));
-            maskSize = getSize();
-            WindowUtils.setWindowMask(BubbleWindow.this, mask);
-            if (useDropShadow()) {
-                new DropShadow(this, mask);
-            }
-        }
-        
-        public void setBounds(int x, int y, int w, int h) {
-            super.setBounds(x, y, w, h);
-            Dimension size = new Dimension(w, h);
-            if (mask != null && !size.equals(maskSize)) {
-                mask.subtract(mask);
-                mask.add(new Area(getMask(w, h)));
-                maskSize = size;
-            }
-        }
-        
-        public void setAnchorLocation(int x, int y) {
-            super.setLocation(x, y);
-            Window owner = getOwner();
-            if (owner != null) {
-                Point ref = owner.isShowing()
-                    ? owner.getLocationOnScreen() : owner.getLocation();
-                offset = new Point(ref.x - x, ref.y - y);
-            }
-        }
-        
-        public void dispose() {
-            super.dispose();
-            getOwner().removeComponentListener(moveTracker);
-        }
-
-        private Shape getMask(int w, int h) {
-            Shape shape = new RoundRectangle2D.Float(0, 0, w, h-Y_OFFSET, 
-                                                     ARC, ARC);
-            Area area = new Area(shape);
-            GeneralPath path = new GeneralPath();
-            path.moveTo(w/3, h-1);
-            path.lineTo(w/2, h-1-Y_OFFSET);
-            path.lineTo(w*2/3, h-1-Y_OFFSET);
-            path.closePath();
-            area.add(new Area(path));
-            return area;
-        }
-        
-        public Dimension getPreferredSize() {
-            Dimension size = super.getPreferredSize();
-            size.height += Y_OFFSET;
-            return size;
-        }
-    }
-
-    /** Get a balloon pointing to the given location.  The coordinates are 
-     * relative to <code>owner</code>, which if null, indicates the coordinates
-     * are absolute.
-     */
-    public static Popup getBalloon(final Component owner, final Component content, int x, int y) {
-
-        // Simulate PopupFactory, ensuring we get a heavyweight "popup"
-        final Point origin = 
-            owner == null ? new Point(0, 0)
-                : (owner.isShowing()
-                   ? owner.getLocationOnScreen() : owner.getLocation());
-        final Window parent = owner != null 
-            ? SwingUtilities.getWindowAncestor(owner) : null;
-        origin.translate(x, y);
-        return new Popup() {
-            private BubbleWindow w;
-            public void show() {
-                w = new BubbleWindow(parent, content);
-                w.pack();
-                Point where = new Point(origin);
-                where.translate(-w.getWidth()/3, -w.getHeight());
-                w.setAnchorLocation(where.x, where.y);
-                w.setVisible(true);
-            }
-            public void hide() {
-                w.setVisible(false);
-                w.dispose();
-            }
-        };
-    }  
-}
diff --git a/src/com/sun/jna/examples/BalloonManagerDemo.java b/src/com/sun/jna/examples/BalloonManagerDemo.java
deleted file mode 100644
index 2e3155a..0000000
--- a/src/com/sun/jna/examples/BalloonManagerDemo.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- * 
- * 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.  
- */
-package com.sun.jna.examples;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.geom.Rectangle2D;
-import javax.swing.Icon;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.Popup;
-import javax.swing.SwingConstants;
-import javax.swing.UIManager;
-import javax.swing.border.EmptyBorder;
-
-/** Demonstration of BalloonManager. */
-public class BalloonManagerDemo {
-    private static final int ICON_SIZE = 48;
-    private static class InfoIcon implements Icon {
-        public int getIconHeight() {
-            return ICON_SIZE;
-        }
-        public int getIconWidth() {
-            return ICON_SIZE;
-        }
-        public void paintIcon(Component c, Graphics graphics, int x, int y) {
-            Font font = UIManager.getFont("TextField.font");
-            Graphics2D g = (Graphics2D)graphics.create(x, y, getIconWidth(), getIconHeight());
-            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-            g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
-            g.setFont(font.deriveFont(Font.BOLD, getIconWidth()*3/4));
-            g.setColor(Color.green.darker());
-            final int SW = Math.max(getIconWidth()/10, 4);
-            g.setStroke(new BasicStroke(SW));
-            g.drawArc(SW/2, SW/2, getIconWidth()-SW-1, getIconHeight()-SW-1, 0, 360);
-            Rectangle2D bounds = 
-                font.getStringBounds("i", g.getFontRenderContext());
-            g.drawString("i", Math.round((getIconWidth() - bounds.getWidth())/2 - getIconWidth()/12), 
-                         SW/2 + Math.round((getIconHeight()-bounds.getHeight())/2 - bounds.getY() + getIconHeight()/8));
-            g.dispose();
-        }
-    }
-    public static void main(String[] args) {
-        try {
-            System.setProperty("sun.java2d.noddraw", "true");
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-        }
-        catch(Exception e) {
-        }
-        JFrame f = new JFrame("Balloon Test");
-        final String BALLOON_TEXT = "<html><center>"
-            + "This is some sample balloon text<br>"
-            + "which has been formatted with html.<br>"
-            + "Click to dismiss.</center></html>";
-        final JLabel content = new JLabel(BALLOON_TEXT);
-        content.setIconTextGap(10);
-        content.setBorder(new EmptyBorder(0, 8, 0, 8));
-        content.setSize(content.getPreferredSize());
-        content.setIcon(new InfoIcon());
-        JLabel label = new JLabel("Click anywhere for more information");
-        label.setHorizontalAlignment(SwingConstants.CENTER);
-        label.addMouseListener(new MouseAdapter() {
-            private MouseListener listener = new MouseAdapter() {
-                public void mousePressed(MouseEvent e) {
-                    hidePopup(e);
-                }
-            }; 
-            private Popup popup;
-            private void hidePopup(MouseEvent e) {
-                e.getComponent().removeMouseListener(listener);
-                if (popup != null)
-                    popup.hide();
-            }
-            public void mousePressed(MouseEvent e) {
-                hidePopup(e);
-                popup = BalloonManager.getBalloon(e.getComponent(), content, e.getX(), e.getY());
-                popup.show();
-                content.getParent().addMouseListener(listener);
-            }
-        });
-        f.getContentPane().add(label);
-        f.pack();
-        f.setSize(new Dimension(300, 300));
-        f.setLocation(100, 100);
-        try {
-            // Force a load of JNA
-            WindowUtils.setWindowMask(f, WindowUtils.MASK_NONE);
-            f.setVisible(true);
-            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        }
-        catch(UnsatisfiedLinkError e) {
-            e.printStackTrace();
-            String msg = e.getMessage() 
-                + "\nError loading the JNA library";
-            JTextArea area = new JTextArea(msg);
-            area.setOpaque(false);
-            area.setFont(UIManager.getFont("Label.font"));
-            area.setEditable(false);
-            area.setColumns(80);
-            area.setRows(8);
-            area.setWrapStyleWord(true);
-            area.setLineWrap(true);
-            JOptionPane.showMessageDialog(null, new JScrollPane(area), 
-                                          "Library Load Error: "
-                                          + System.getProperty("os.name")
-                                          + "/" + System.getProperty("os.arch"),
-                                          JOptionPane.ERROR_MESSAGE);
-            System.exit(1);
-        }
-    }    
-}
diff --git a/src/com/sun/jna/examples/CLibrary.java b/src/com/sun/jna/examples/CLibrary.java
deleted file mode 100644
index 1f232c2..0000000
--- a/src/com/sun/jna/examples/CLibrary.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.  
- */
-package com.sun.jna.examples;
-
-import com.sun.jna.Library;
-import com.sun.jna.Native;
-
-/** Sample implementation of C library access. */
-public interface CLibrary extends Library {
-    
-    CLibrary INSTANCE = (CLibrary)
-        Native.loadLibrary((System.getProperty("os.name").startsWith("Windows")
-                            ? "msvcrt" : "c"), CLibrary.class);
-
-    int atol(String s);
-}
diff --git a/src/com/sun/jna/examples/FileMonitor.java b/src/com/sun/jna/examples/FileMonitor.java
deleted file mode 100644
index a6aea75..0000000
--- a/src/com/sun/jna/examples/FileMonitor.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.  
- */
-package com.sun.jna.examples;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import com.sun.jna.examples.win32.Kernel32;
-import com.sun.jna.examples.win32.Kernel32.FILE_NOTIFY_INFORMATION;
-import com.sun.jna.examples.win32.Kernel32.OVERLAPPED;
-import com.sun.jna.examples.win32.W32API.HANDLE;
-import com.sun.jna.examples.win32.W32API.HANDLEByReference;
-import com.sun.jna.ptr.IntByReference;
-import com.sun.jna.ptr.PointerByReference;
-
-/** Provides notification of file system changes.  Actual capabilities may
- * vary slightly by platform.
- * <p>
- * Watched files which are removed from the filesystem are no longer watched.
- * @author twall
- */
-
-public abstract class FileMonitor {
-
-    public static final int FILE_CREATED = 0x1;
-    public static final int FILE_DELETED = 0x2;
-    public static final int FILE_MODIFIED = 0x4;
-    public static final int FILE_ACCESSED = 0x8;
-    public static final int FILE_NAME_CHANGED_OLD = 0x10;
-    public static final int FILE_NAME_CHANGED_NEW = 0x20;
-    public static final int FILE_RENAMED = FILE_NAME_CHANGED_OLD|FILE_NAME_CHANGED_NEW;
-    public static final int FILE_SIZE_CHANGED = 0x40;
-    public static final int FILE_ATTRIBUTES_CHANGED = 0x80;
-    public static final int FILE_SECURITY_CHANGED = 0x100;
-    public static final int FILE_ANY = 0x1FF;
-
-    public interface FileListener {
-        public void fileChanged(FileEvent e);
-    }
-    
-    public class FileEvent extends EventObject {
-        private final File file;
-        private final int type;
-        public FileEvent(File file, int type) {
-            super(FileMonitor.this);
-            this.file = file;
-            this.type = type;
-        }
-        public File getFile() { return file; }
-        public int getType() { return type; }
-        public String toString() {
-            return "FileEvent: " + file + ":" + type;
-        }
-    }
-    
-    private final Map watched = new HashMap();
-    private List listeners = new ArrayList();
-    
-    protected abstract void watch(File file, int mask, boolean recursive) throws IOException ;
-    protected abstract void unwatch(File file);
-    protected abstract void dispose();
-
-    public void addWatch(File dir) throws IOException {
-        addWatch(dir, FILE_ANY);
-    }
-    
-    public void addWatch(File dir, int mask) throws IOException {
-        addWatch(dir, mask, dir.isDirectory());
-    }
-    
-    public void addWatch(File dir, int mask, boolean recursive) throws IOException {
-        watched.put(dir, new Integer(mask));
-        watch(dir, mask, recursive);
-    }
-
-    public void removeWatch(File file) {
-        if (watched.remove(file) != null) {
-            unwatch(file);
-        }
-    }
-    
-    protected void notify(FileEvent e) {
-        for (Iterator i=listeners.iterator();i.hasNext();) {
-            ((FileListener)i.next()).fileChanged(e);
-        }
-    }
-    
-    public synchronized void addFileListener(FileListener x) {
-        List list = new ArrayList(listeners);
-        list.add(x);
-        listeners = list;
-    }
-    
-    public synchronized void removeFileListener(FileListener x) {
-        List list = new ArrayList(listeners);
-        list.remove(x);
-        listeners = list;
-    }
-    
-    protected void finalize() {
-        for (Iterator i=watched.keySet().iterator();i.hasNext();) {
-            removeWatch((File)i.next());
-        }
-        dispose();
-    }
-    
-    /** Canonical lazy loading of a singleton. */
-    private static class Holder {
-        public static final FileMonitor INSTANCE;
-        static {
-            String os = System.getProperty("os.name");
-            if (os.startsWith("Windows")) {
-                INSTANCE = new W32FileMonitor();
-            }
-            else {
-                throw new Error("FileMonitor not implemented for " + os);
-            }
-        }
-    }
-    
-    public static FileMonitor getInstance() {
-        return Holder.INSTANCE;
-    }
-    
-    private static class W32FileMonitor extends FileMonitor {
-        
-        private static final int BUFFER_SIZE = 4096;
-        private class FileInfo {
-            public final File file;
-            public final HANDLE handle;
-            public final int notifyMask;
-            public final boolean recursive;
-            public final FILE_NOTIFY_INFORMATION info = new FILE_NOTIFY_INFORMATION(BUFFER_SIZE);
-            public final IntByReference infoLength = new IntByReference();
-            public final OVERLAPPED overlapped = new OVERLAPPED();
-            public FileInfo(File f, HANDLE h, int mask, boolean recurse) {
-                this.file = f;
-                this.handle = h;
-                this.notifyMask = mask;
-                this.recursive = recurse;
-            }
-        }
-        private Thread watcher;
-        private HANDLE port;
-        private final Map fileMap = new HashMap();
-        private final Map handleMap = new HashMap();
-        
-        private void handleChanges(FileInfo finfo) throws IOException {
-            Kernel32 klib = Kernel32.INSTANCE;
-            FILE_NOTIFY_INFORMATION fni = finfo.info;
-            // Need an explicit read, since data was filled in asynchronously
-            fni.read();
-            do {
-                FileEvent event = null;
-                File file = new File(finfo.file, fni.getFilename());
-                switch(fni.Action) {
-                case Kernel32.FILE_ACTION_MODIFIED:
-                    event = new FileEvent(file, FILE_MODIFIED); break;
-                case Kernel32.FILE_ACTION_ADDED:
-                    event = new FileEvent(file, FILE_CREATED); break;
-                case Kernel32.FILE_ACTION_REMOVED:
-                    event = new FileEvent(file, FILE_DELETED); break;
-                case Kernel32.FILE_ACTION_RENAMED_OLD_NAME:
-                    event = new FileEvent(file, FILE_NAME_CHANGED_OLD); break;
-                case Kernel32.FILE_ACTION_RENAMED_NEW_NAME:
-                    event = new FileEvent(file, FILE_NAME_CHANGED_NEW); break;
-                default:
-                    // TODO: other actions...
-                    System.err.println("Unrecognized file action '" + fni.Action + "'");
-                }
-                if (event != null)
-                    notify(event);
-                fni = fni.next();
-            } while (fni != null);
-            // Trigger the next read
-            if (!finfo.file.exists()) {
-                unwatch(finfo.file);
-                return;
-            }
-            
-            if (!klib.ReadDirectoryChangesW(finfo.handle, finfo.info,
-                                            finfo.info.size(), finfo.recursive,
-                                            finfo.notifyMask, finfo.infoLength, 
-                                            finfo.overlapped, null)) {
-                int err = klib.GetLastError();
-                throw new IOException("ReadDirectoryChangesW failed on "
-                                      + finfo.file + ": '" 
-                                      + getSystemError(err)
-                                      + "' (" + err + ")");
-            }
-        }
-        private FileInfo waitForChange() {
-            Kernel32 klib = Kernel32.INSTANCE;
-            IntByReference rcount = new IntByReference();
-            HANDLEByReference rkey = new HANDLEByReference();
-            PointerByReference roverlap = new PointerByReference();
-            klib.GetQueuedCompletionStatus(port, rcount, rkey, roverlap, Kernel32.INFINITE);
-            
-            synchronized (this) { 
-                return (FileInfo)handleMap.get(rkey.getValue());
-            }
-        }
-        private int convertMask(int mask) {
-            int result = 0;
-            if ((mask & FILE_CREATED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_CREATION;
-            }
-            if ((mask & FILE_DELETED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_NAME;
-            }
-            if ((mask & FILE_MODIFIED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_LAST_WRITE;
-            }
-            if ((mask & FILE_RENAMED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_NAME;
-            }
-            if ((mask & FILE_SIZE_CHANGED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_SIZE;
-            }
-            if ((mask & FILE_ACCESSED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_LAST_ACCESS;
-            }
-            if ((mask & FILE_ATTRIBUTES_CHANGED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_ATTRIBUTES;
-            }
-            if ((mask & FILE_SECURITY_CHANGED) != 0) {
-                result |= Kernel32.FILE_NOTIFY_CHANGE_SECURITY;
-            }
-            return result;
-        }
-
-        private static int watcherThreadID;
-
-        protected synchronized void watch(File file, int eventMask, boolean recursive) throws IOException {
-            File dir = file;
-            if (!dir.isDirectory()) {
-                recursive = false;
-                dir = file.getParentFile();
-            }
-            while (dir != null && !dir.exists()) {
-                recursive = true;
-                dir = dir.getParentFile();
-            }
-            if (dir == null) {
-                throw new FileNotFoundException("No ancestor found for " + file);
-            }
-            Kernel32 klib = Kernel32.INSTANCE;
-            int mask = Kernel32.FILE_SHARE_READ
-                | Kernel32.FILE_SHARE_WRITE | Kernel32.FILE_SHARE_DELETE;
-            int flags = Kernel32.FILE_FLAG_BACKUP_SEMANTICS
-                | Kernel32.FILE_FLAG_OVERLAPPED;
-            HANDLE handle = klib.CreateFile(file.getAbsolutePath(), 
-                                            Kernel32.FILE_LIST_DIRECTORY,
-                                            mask, null, Kernel32.OPEN_EXISTING,
-                                            flags, null);
-            if (Kernel32.INVALID_HANDLE_VALUE.equals(handle)) {
-                throw new IOException("Unable to open " + file + " (" 
-                                      + klib.GetLastError() + ")");
-            }
-            int notifyMask = convertMask(eventMask);
-            FileInfo finfo = new FileInfo(file, handle, notifyMask, recursive);
-            fileMap.put(file, finfo);
-            handleMap.put(handle, finfo);
-            // Existing port is returned
-            port = klib.CreateIoCompletionPort(handle, port, handle.getPointer(), 0);
-            if (Kernel32.INVALID_HANDLE_VALUE.equals(port)) {
-                throw new IOException("Unable to create/use I/O Completion port "
-                        + "for " + file + " ("
-                        + klib.GetLastError() + ")");
-            }
-            // TODO: use FileIOCompletionRoutine callback method instead of a 
-            // dedicated thread
-            if (!klib.ReadDirectoryChangesW(handle, finfo.info, finfo.info.size(), 
-                                            recursive, notifyMask, finfo.infoLength, 
-                                            finfo.overlapped, null)) {
-                int err = klib.GetLastError();
-                throw new IOException("ReadDirectoryChangesW failed on "
-                                      + finfo.file + ", handle " + handle
-                                      + ": '" + getSystemError(err)
-                                      + "' (" + err + ")");
-            }
-            if (watcher == null) {
-                watcher = new Thread("W32 File Monitor-" + (watcherThreadID++)) {
-                    public void run() {
-                        FileInfo finfo;
-                        while (true) {
-                           finfo = waitForChange();
-                           if (finfo == null) {
-                              synchronized(W32FileMonitor.this) {
-                                 if (fileMap.isEmpty()) {
-                                    watcher = null;
-                                    break;
-                                 }
-                              }
-                              continue;
-                            }
-                           
-                            try {
-                                handleChanges(finfo);
-                            }
-                            catch(IOException e) {
-                                // TODO: how is this best handled?
-                                e.printStackTrace();
-                            }
-                        }
-                    }
-                };
-                watcher.setDaemon(true);
-                watcher.start();
-            }
-        }
-
-        protected synchronized void unwatch(File file) {
-            FileInfo finfo = (FileInfo)fileMap.remove(file);
-            if (finfo != null) {
-                handleMap.remove(finfo.handle);
-                Kernel32 klib = Kernel32.INSTANCE;
-                klib.CloseHandle(finfo.handle);
-            }
-        }
-        protected synchronized void dispose() {
-            // unwatch any remaining files in map, allows watcher thread to exit
-            int i = 0;
-            for (Object[] keys = fileMap.keySet().toArray(); !fileMap.isEmpty();) {
-                unwatch((File)keys[i++]);
-            }
-            
-            Kernel32 klib = Kernel32.INSTANCE;
-            klib.PostQueuedCompletionStatus(port, 0, null, null);
-            klib.CloseHandle(port);
-            port = null;
-            watcher = null;
-        }
-        private String getSystemError(int code) {
-            Kernel32 lib = Kernel32.INSTANCE;
-            PointerByReference pref = new PointerByReference();
-            lib.FormatMessage(Kernel32.FORMAT_MESSAGE_ALLOCATE_BUFFER
-                              |Kernel32.FORMAT_MESSAGE_FROM_SYSTEM
-                              |Kernel32.FORMAT_MESSAGE_IGNORE_INSERTS, 
-                              null, code, 
-                              0, pref, 0, null);
-            String s = pref.getValue().getString(0, !Boolean.getBoolean("w32.ascii"));
-            s = s.replace(".\r",".").replace(".\n",".");
-            lib.LocalFree(pref.getValue());
-            return s;
-        }
-    }
-    
-    private static class KQueueFileMonitor extends FileMonitor {
-        protected void watch(File file, int mask, boolean recursive) {
-            
-        }
-        protected void unwatch(File file) {
-        }
-        protected void dispose() {
-        }
-    }
-    
-    private static class INotifyFileMonitor extends FileMonitor {
-        protected void watch(File file, int mask, boolean recursive) {
-            
-        }
-        protected void unwatch(File file) {
-        }
-        protected void dispose() {
-        }
-    }
-}
diff --git a/src/com/sun/jna/examples/FileUtils.java b/src/com/sun/jna/examples/FileUtils.java
deleted file mode 100644
index 2ee7fc3..0000000
--- a/src/com/sun/jna/examples/FileUtils.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.  
- */
-package com.sun.jna.examples;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-import com.sun.jna.examples.win32.Shell32;
-import com.sun.jna.examples.win32.Shell32.SHFILEOPSTRUCT;
-
-/** Miscellaneous file utils not provided for by Java. */
-public abstract class FileUtils {
-
-    public boolean hasTrash() {
-        return false;
-    }
-
-    /** Move the given file to the system trash, if one is available.
-        Throws an exception on failure.
-    */
-    public abstract void moveToTrash(File[] files) throws IOException;
-
-    /** Canonical lazy loading of a singleton. */
-    private static class Holder {
-        public static final FileUtils INSTANCE;
-        static {
-            String os = System.getProperty("os.name");
-            if (os.startsWith("Windows")) {
-                INSTANCE = new W32FileUtils();
-            }
-            else if (os.startsWith("Mac")){
-                INSTANCE = new MacFileUtils();
-            }
-            else {
-                INSTANCE = new DefaultFileUtils();
-            }
-        }
-    }
-    
-    public static FileUtils getInstance() {
-        return Holder.INSTANCE;
-    }
-    
-    private static class W32FileUtils extends FileUtils {
-
-        public boolean hasTrash() { return true; }
-
-        public void moveToTrash(File[] files) throws IOException {
-            Shell32 shell = Shell32.INSTANCE;
-            SHFILEOPSTRUCT fileop = new SHFILEOPSTRUCT();
-            fileop.wFunc = Shell32.FO_DELETE;
-            String[] paths = new String[files.length];
-            for (int i=0;i < paths.length;i++) {
-                paths[i] = files[i].getAbsolutePath();
-            }
-            fileop.pFrom = fileop.encodePaths(paths);
-            fileop.fFlags = Shell32.FOF_ALLOWUNDO|Shell32.FOF_NOCONFIRMATION|Shell32.FOF_SILENT;
-            int ret = shell.SHFileOperation(fileop);
-            if (ret != 0) {
-                throw new IOException("Move to trash failed: " + ret);
-            }
-            if (fileop.fAnyOperationsAborted) {
-                throw new IOException("Move to trash aborted");
-            }
-        }
-    }
-
-    private static class MacFileUtils extends FileUtils {
-
-        public boolean hasTrash() { return true; }
-
-        public void moveToTrash(File[] files) throws IOException {
-            // TODO: use native API for moving to trash (if any)
-            File home = new File(System.getProperty("user.home"));
-            File trash = new File(home, ".Trash");
-            if (!trash.exists()) {
-                throw new IOException("The Trash was not found in its expected location (" + trash + ")");
-            }
-            List failed = new ArrayList();
-            for (int i=0;i < files.length;i++) {
-                File src = files[i];
-                File target = new File(trash, src.getName());
-                if (!src.renameTo(target)) {
-                    failed.add(src);
-                }
-            }
-            if (failed.size() > 0) {
-                throw new IOException("The following files could not be trashed: " + failed);
-            }
-        }
-    }
-    
-    private static class DefaultFileUtils extends FileUtils {
-
-        private File getTrashDirectory() {
-            // very simple implementation.  should take care of renaming when
-            // a file already exists, or any other platform-specific behavior
-            File home = new File(System.getProperty("user.home"));
-            File trash = new File(home, ".Trash");
-            if (!trash.exists()) {
-                trash = new File(home, "Trash");
-                if (!trash.exists()) {
-                    File desktop = new File(home, "Desktop");
-                    if (desktop.exists()) {
-                        trash = new File(desktop, ".Trash");
-                        if (!trash.exists()) {
-                            trash = new File(desktop, "Trash");
-                            if (!trash.exists()) {
-                                trash = new File(System.getProperty("fileutils.trash", "Trash"));
-                            }
-                        }
-                    }
-                }
-            }
-            return trash;
-        }
-
-        public boolean hasTrash() {
-            return getTrashDirectory().exists();
-        }
-
-        /** The default implementation attempts to move the file to 
-         * the desktop "Trash" folder.
-         */
-        public void moveToTrash(File[] files) throws IOException {
-            File trash = getTrashDirectory();
-            if (!trash.exists()) {
-                throw new IOException("No trash location found (define fileutils.trash to be the path to the trash)");
-            }
-            List failed = new ArrayList();
-            for (int i=0;i < files.length;i++) {
-                File src = files[i];
-                File target = new File(trash, src.getName());
-                if (!src.renameTo(target)) {
-                    failed.add(src);
-                }
-            }
-            if (failed.size() > 0) {
-                throw new IOException("The following files could not be trashed: " + failed);
-            }
-        }
-    }
-}
diff --git a/src/com/sun/jna/examples/ShapedWindowDemo.java b/src/com/sun/jna/examples/ShapedWindowDemo.java
deleted file mode 100644
index 5e96272..0000000
--- a/src/com/sun/jna/examples/ShapedWindowDemo.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.  
- */
-package com.sun.jna.examples;
-
-import java.awt.AlphaComposite;
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Composite;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Image;
-import java.awt.Point;
-import java.awt.RenderingHints;
-import java.awt.Shape;
-import java.awt.Stroke;
-import java.awt.Window;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseEvent;
-import java.awt.geom.Area;
-import java.awt.geom.Ellipse2D;
-import java.awt.geom.Rectangle2D;
-import java.awt.image.BufferedImage;
-import java.util.Calendar;
-
-import javax.swing.AbstractAction;
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JOptionPane;
-import javax.swing.JPopupMenu;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.SwingUtilities;
-import javax.swing.Timer;
-import javax.swing.UIManager;
-import javax.swing.event.MouseInputAdapter;
-
-/** Example which uses the {@link WindowUtils} class.  Demonstrates the 
- * definition of a cross-platform library with several platform-specific
- * implementations based on JNA native library definitions.
- */
-public class ShapedWindowDemo {
-    
-    public static final int ICON_SIZE = 64;
-
-    private static class ClockFace extends JComponent {
-        private Stroke border;
-        private Stroke secondHand;
-        private Stroke minuteHand;
-        private Stroke hourHand;
-        private Stroke ticks;
-        public ClockFace(Dimension size) {
-            setPreferredSize(size);
-            setSize(size);
-            setOpaque(false);
-            Timer timer = new Timer(1000, new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    repaint();
-                    Window w = SwingUtilities.getWindowAncestor(ClockFace.this);
-                    while (!(w instanceof Frame)) {
-                        w = w.getOwner();
-                    }
-                    if (w instanceof Frame) {
-                        ((Frame)w).setIconImage(getIconImage());
-                    }
-                }
-            });
-            timer.setRepeats(true);
-            timer.start();
-        }
-        private String getRomanNumeral(int number) {
-            switch(number) {
-            case 1: return "I";
-            case 2: return "II";
-            case 3: return "III";
-            case 4: return "IV";
-            case 5: return "V";
-            case 6: return "VI";
-            case 7: return "VII";
-            case 8: return "VIII";
-            case 9: return "IX";
-            case 10: return "X";
-            case 11: return "XI";
-            case 12:
-            default: return "XII";
-            }
-        }
-        protected void paintComponent(Graphics graphics) {
-            paintFace(graphics, Math.min(getWidth(), getHeight()));
-        }
-        
-        protected void paintFace(Graphics graphics, int size) {
-            Point center = new Point(size/2, size/2);
-            int radius = center.x;
-            int margin = radius / 20;
-
-            int w = size;
-            border = new BasicStroke(Math.max(1f, w/150f), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
-            secondHand = new BasicStroke(Math.max(1f, w/75f), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
-            minuteHand = new BasicStroke(Math.max(1f, w/38f), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
-            hourHand = new BasicStroke(Math.max(1.5f, w/20f), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
-            ticks = new BasicStroke(1f);
-
-            Graphics2D g = (Graphics2D)graphics.create();
-            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
-                               RenderingHints.VALUE_ANTIALIAS_ON);
-            g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, 
-                               RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
-            g.setRenderingHint(RenderingHints.KEY_RENDERING,
-                               RenderingHints.VALUE_RENDER_QUALITY);
-            Color bg = getBackground();
-            g.setColor(new Color(bg.getRed(), bg.getGreen(), bg.getBlue()));
-
-            g.fill(new Ellipse2D.Float(0,0,size,size));
-            Font font = getFont();
-            g.setFont(font.deriveFont(Font.BOLD, size/12));
-            g.setColor(new Color(0,0,0,128));
-            g.setStroke(border);
-            g.draw(new Ellipse2D.Float(0,0,size-1,size-1));
-            g.draw(new Ellipse2D.Float(margin,margin,size-margin*2-1,size-margin*2-1));
-
-            Calendar c = Calendar.getInstance();
-            int minute = c.get(Calendar.MINUTE);
-            int hour = c.get(Calendar.HOUR);
-            int second = c.get(Calendar.SECOND);
-            g.translate(center.x, center.y);
-            g.setColor(getForeground());
-            int numbers = radius * 3 / 4;
-            for (int i=0;i < 12;i++) {
-                double theta = Math.PI*2*i/12;
-                String str = getRomanNumeral((i+2)%12+1); 
-                Rectangle2D rect = g.getFontMetrics().getStringBounds(str, g);
-                g.drawString(str, Math.round(numbers*Math.cos(theta)-rect.getWidth()/2),
-                             Math.round(numbers*Math.sin(theta)+margin*2));
-            }
-            for (int i=0;i < 60;i++) {
-                g.setColor(getForeground());
-                g.setStroke(ticks);
-                g.drawLine(radius-margin*2, 0, radius-margin, 0);
-                if ((i % 5) == 0) {
-                    g.drawLine(radius-margin*3, 0, radius-margin, 0);
-                }
-                if ((i + 15) % 60 == minute) {
-                    g.setStroke(minuteHand);
-                    g.drawLine(0, 0, radius-margin*4, 0);
-                }
-                if ((i + 15) % 60 == (hour * 5 + minute * 5 / 60)) {
-                    g.setStroke(hourHand);
-                    g.drawLine(0, 0, radius/2, 0);
-                }
-                if ((i + 15) % 60 == second) {
-                    g.setColor(new Color(255, 0, 0, 128));
-                    g.setStroke(secondHand);
-                    g.drawLine(0, 0, radius-margin*4, 0);
-                }
-                g.rotate(Math.PI*2/60);
-            }
-            g.dispose();
-        }
-        
-        public Image getIconImage() {
-            BufferedImage image = new BufferedImage(ICON_SIZE, ICON_SIZE,
-                                                    BufferedImage.TYPE_INT_ARGB);
-            Graphics2D g = image.createGraphics();
-            g.setRenderingHint(RenderingHints.KEY_RENDERING,
-                               RenderingHints.VALUE_RENDER_QUALITY);
-            Composite old = g.getComposite();
-            g.setComposite(AlphaComposite.Clear);
-            g.fillRect(0, 0, image.getWidth(), image.getHeight());
-            g.setComposite(old);
-            paintFace(g, ICON_SIZE);
-            return image;
-        }
-    }
-    
-    public static void main(String[] args) {
-        try {
-            System.setProperty("sun.java2d.noddraw", "true");
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-        }
-        catch(Exception e) {
-        }
-        final JFrame frame = new JFrame("Shaped Window Demo");
-        MouseInputAdapter handler = new MouseInputAdapter() {
-            private Point offset;
-            private void showPopup(MouseEvent e) {
-                final JPopupMenu m = new JPopupMenu();
-                m.add(new AbstractAction("Hide") {
-                    public void actionPerformed(ActionEvent e) {
-                        frame.setState(JFrame.ICONIFIED);
-                    }
-                });
-                m.add(new AbstractAction("Close") {
-                    public void actionPerformed(ActionEvent e) {
-                        System.exit(0);
-                    }
-                });
-                m.pack();
-                m.show(e.getComponent(), e.getX(), e.getY());
-            }
-            public void mousePressed(MouseEvent e) {
-                offset = e.getPoint();
-                if (e.isPopupTrigger()) {
-                    showPopup(e);
-                }
-            }
-            public void mouseDragged(MouseEvent e) {
-                if (!SwingUtilities.isLeftMouseButton(e))
-                    return;
-                Point where = e.getPoint();
-                where.translate(-offset.x, -offset.y);
-                Point loc = frame.getLocationOnScreen();
-                loc.translate(where.x, where.y);
-                frame.setLocation(loc.x, loc.y);
-            }
-            public void mouseReleased(MouseEvent e) {
-                if (e.isPopupTrigger()) {
-                    showPopup(e);
-                }
-            }
-        };
-        frame.addMouseListener(handler);
-        frame.addMouseMotionListener(handler);
-        ClockFace face = new ClockFace(new Dimension(150, 150));
-        frame.getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
-        frame.getContentPane().add(face);
-        frame.setUndecorated(true);
-        try {
-            Shape mask = new Area(new Ellipse2D.Float(0, 0, 150, 150));
-            WindowUtils.setWindowMask(frame, mask);
-            if (WindowUtils.isWindowAlphaSupported()) {
-                WindowUtils.setWindowAlpha(frame, .7f);
-            }
-            frame.setIconImage(face.getIconImage());
-            frame.setResizable(false);
-            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-
-            frame.pack();
-            frame.setLocation(100, 100);
-            frame.setVisible(true);
-        }
-        catch(UnsatisfiedLinkError e) {
-            e.printStackTrace();
-            String msg = e.getMessage() 
-                + "\nError loading the JNA library";
-            JTextArea area = new JTextArea(msg);
-            area.setOpaque(false);
-            area.setFont(UIManager.getFont("Label.font"));
-            area.setEditable(false);
-            area.setColumns(80);
-            area.setRows(8);
-            area.setWrapStyleWord(true);
-            area.setLineWrap(true);
-            JOptionPane.showMessageDialog(frame, new JScrollPane(area), 
-                                          "Library Load Error: "
-                                          + System.getProperty("os.name")
-                                          + "/" + System.getProperty("os.arch"),
-                                          JOptionPane.ERROR_MESSAGE);
-            System.exit(1);
-        }
-    }
-}
diff --git a/src/com/sun/jna/examples/X11AlphaMaskTest.java b/src/com/sun/jna/examples/X11AlphaMaskTest.java
deleted file mode 100644
index e579519..0000000
--- a/src/com/sun/jna/examples/X11AlphaMaskTest.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package com.sun.jna.examples;
-
-import java.awt.AlphaComposite;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.GraphicsConfiguration;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.image.BufferedImage;
-import java.awt.Transparency;
-import javax.swing.JComboBox;
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JSlider;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-/**
- * Experiment with different compositing methods. Unfortunately you
- * can't use anything other than AlphaComposite on Graphics derived from
- * screen surface data.
- * 
- * @author twall
- */
-public class X11AlphaMaskTest {
-    private static int alpha = 128;
-    private static AlphaComposite composite = AlphaComposite.Src;
-
-    public static void main(String[] args) {
-        GraphicsConfiguration gc = 
-            WindowUtils.getAlphaCompatibleGraphicsConfiguration();
-        JFrame frame = new JFrame("X11 alpha test", gc);
-        final JComponent content = new JComponent() {
-            public Dimension getPreferredSize() {
-                return new Dimension(100, 100);
-            }
-
-            private Color mix(Color c, int base) {
-                float f = (float)alpha / 255;
-                return new Color((int)(c.getRed() * f + base * (1 - f)),
-                                 (int)(c.getGreen() * f + base * (1 - f)),
-                                 (int)(c.getBlue() * f + base * (1 - f)));
-            }
-
-            protected void paintComponent(Graphics graphics) {
-                BufferedImage buf =
-                    ((Graphics2D)graphics).getDeviceConfiguration().
-                    createCompatibleImage(getWidth(), 
-                                          getHeight(),
-                                          Transparency.TRANSLUCENT);
-                Graphics2D g = buf.createGraphics();
-                g.setComposite(AlphaComposite.Clear);
-                g.fillRect(0, 0, getWidth(), getHeight());
-                g.setComposite(AlphaComposite.SrcOver);
-                int barw = getWidth() / 10;
-                int barh = getHeight();
-
-                g.setColor(Color.red);
-                g.fillRect(0, 0, barw, barh);
-                g.setColor(new Color(255, 0, 0, alpha));
-                g.fillRect(barw, 0, barw, barh / 2);
-                g.setColor(mix(Color.red, 255));
-                g.fillRect(barw, barh / 2, barw, barh / 4);
-                g.setColor(mix(Color.red, 0));
-                g.fillRect(barw, barh *3 / 4, barw, barh / 4);
-
-                g.setColor(Color.green);
-                g.fillRect(2 * barw, 0, barw, barh);
-                g.setColor(new Color(0, 255, 0, alpha));
-                g.fillRect(3 * barw, 0, barw, barh / 2);
-                g.setColor(mix(Color.green, 255));
-                g.fillRect(3 * barw, barh / 2, barw, barh / 4);
-                g.setColor(mix(Color.green, 0));
-                g.fillRect(3 * barw, barh *3 / 4, barw, barh / 4);
-
-                g.setColor(Color.blue);
-                g.fillRect(4 * barw, 0, barw, barh);
-                g.setColor(new Color(0, 0, 255, alpha));
-                g.fillRect(5 * barw, 0, barw, barh / 2);
-                g.setColor(mix(Color.blue, 255));
-                g.fillRect(5 * barw, barh / 2, barw, barh / 4);
-                g.setColor(mix(Color.blue, 0));
-                g.fillRect(5 * barw, barh * 3 / 4, barw, barh / 4);
-
-                g.setColor(Color.white);
-                g.fillRect(6 * barw, 0, barw, barh);
-                g.setColor(new Color(255, 255, 255, alpha));
-                g.fillRect(7 * barw, 0, barw, barh / 2);
-                g.setColor(mix(Color.white, 255));
-                g.fillRect(7 * barw, barh / 2, barw, barh / 4);
-                g.setColor(mix(Color.white, 0));
-                g.fillRect(7 * barw, barh * 3 / 4, barw, barh / 4);
-
-                g.setColor(Color.black);
-                g.fillRect(8 * barw, 0, barw, barh);
-                g.setColor(new Color(0, 0, 0, alpha));
-                g.fillRect(9 * barw, 0, barw, barh / 2);
-                g.setColor(mix(Color.black, 255));
-                g.fillRect(9 * barw, barh / 2, barw, barh / 4);
-                g.setColor(mix(Color.black, 0));
-                g.fillRect(9 * barw, barh * 3 / 4, barw, barh / 4);
-
-                // small bar on top, black 50% alpha
-                g.setColor(new Color(0, 0, 0, 128));
-                g.fillRect(0, 0, getWidth(), barh / 10);
-
-                if (false) {
-                    BufferedImage prealpha =
-                        new BufferedImage(getWidth(), getHeight(), 
-                                          BufferedImage.TYPE_INT_ARGB_PRE);
-                    g = prealpha.createGraphics();
-                    g.setComposite(AlphaComposite.Src);
-                    g.drawImage(buf, 0, 0, getWidth(), getHeight(), null);
-                    
-                    g = (Graphics2D)graphics.create();
-                    g.setComposite(composite);
-                    g.drawImage(prealpha, 0, 0, getWidth(), getHeight(), null);
-                }
-                else {
-                    g = (Graphics2D)graphics.create();
-                    g.setComposite(composite);
-                    g.drawImage(buf, 0, 0, getWidth(), getHeight(), null);
-                }
-                g.dispose();
-            }
-        };
-        final JSlider slider = new JSlider(0, 255, 128);
-        slider.addChangeListener(new ChangeListener() {
-            public void stateChanged(ChangeEvent e) {
-                if (!slider.getModel().getValueIsAdjusting()) {
-                    alpha = slider.getValue();
-                    content.repaint();
-                }
-            }
-        });
-        AlphaComposite[] options = {
-            AlphaComposite.Clear,
-            AlphaComposite.Src,
-            AlphaComposite.SrcOver,
-            AlphaComposite.SrcAtop,
-            AlphaComposite.SrcIn,
-            AlphaComposite.SrcOut,
-            AlphaComposite.Dst,
-            AlphaComposite.DstOver,
-            AlphaComposite.DstAtop,
-            AlphaComposite.DstIn,
-            AlphaComposite.DstOut,
-            AlphaComposite.Xor,
-        };
-        final JComboBox combo = new JComboBox(options);
-        combo.setOpaque(true);
-        combo.setSelectedItem(composite);
-        combo.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                composite = (AlphaComposite)combo.getSelectedItem();
-                content.repaint();
-            }
-        });
-        
-        frame.getContentPane().add(content);
-        frame.getContentPane().add(slider, BorderLayout.SOUTH);
-        frame.getContentPane().add(combo, BorderLayout.NORTH);
-        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        frame.pack();
-        if (System.getProperty("os.name").startsWith("Windows"))
-            WindowUtils.setWindowTransparent(frame, true);
-        frame.setLocation(100, 100);
-        frame.setVisible(true);
-    }
-}
diff --git a/src/com/sun/jna/examples/dnd/GhostedDragImageDemo.java b/src/com/sun/jna/examples/dnd/GhostedDragImageDemo.java
deleted file mode 100644
index 34e7869..0000000
--- a/src/com/sun/jna/examples/dnd/GhostedDragImageDemo.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- * 
- * 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.  
- */
-package com.sun.jna.examples.dnd;
-
-import java.awt.Image;
-import java.awt.Point;
-import java.awt.datatransfer.Clipboard;
-import java.awt.datatransfer.ClipboardOwner;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.awt.dnd.DnDConstants;
-import java.awt.dnd.DragGestureEvent;
-import java.awt.dnd.DragSourceDropEvent;
-import java.awt.dnd.DropTargetDropEvent;
-import java.io.IOException;
-import java.net.URL;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.UIManager;
-
-/** Demonstrate ghosted drag images.  Unfortunately, Swing drag support hides
- * the hooks we need to move the drag image around, so we don't use it and
- * roll our own.  
- */
-public class GhostedDragImageDemo {
-
-    public static class ImageSelection implements Transferable, ClipboardOwner {
-        public static final DataFlavor IMAGE_FLAVOR = DataFlavor.imageFlavor;
-        private static final DataFlavor[] FLAVORS = { IMAGE_FLAVOR };
-
-        private Image image;
-        public ImageSelection(Image image) {
-            this.image = image;
-        }
-        public void lostOwnership(Clipboard clipboard, Transferable transferable) {
-            // don't care
-        }
-        public Object getTransferData(DataFlavor flavor) {
-            return isDataFlavorSupported(flavor) ? image : null;
-        }
-        public DataFlavor[] getTransferDataFlavors() { return FLAVORS; }
-        public boolean isDataFlavorSupported(DataFlavor flavor) {
-            return flavor.equals(IMAGE_FLAVOR);
-        }
-    }
-
-    public static class DragLabel extends JLabel {
-        private boolean dragging;
-        public DragLabel(Icon icon) {
-            super(icon);
-            new DragHandler(this, DnDConstants.ACTION_COPY_OR_MOVE) {
-                protected Icon getDragIcon(DragGestureEvent e, Point imageOffset) {
-                    dragging = true;
-                    return getIcon(); 
-                }
-                public void dragDropEnd(DragSourceDropEvent e) {
-                    super.dragDropEnd(e);
-                    if (e.getDropSuccess() && getDropAction(e) == MOVE) {
-                        if (dragging) {
-                            setIcon(null);
-                            dragging = false;
-                        }
-                    }
-                }
-                protected Transferable getTransferable(DragGestureEvent e) {
-                    ImageIcon icon = (ImageIcon)getIcon();
-                    if (icon != null) {
-                        return new ImageSelection(icon.getImage());
-                    }
-                    return null;
-                }
-            };
-            DataFlavor[] flavors = new DataFlavor[] { DataFlavor.imageFlavor };
-            new DropHandler(this, DnDConstants.ACTION_COPY_OR_MOVE, flavors) {
-                protected void drop(DropTargetDropEvent e, int action) throws UnsupportedFlavorException, IOException {
-                    final Image image = (Image)e.getTransferable().getTransferData(DataFlavor.imageFlavor);
-                    dragging = false;
-                    setIcon(new ImageIcon(image));
-                }
-            };
-        }
-        public void setIcon(Icon icon) {
-            super.setIcon(icon);
-            if (icon == null) {
-                setText("Empty");
-            }
-            else {
-                setText(null);
-            }
-        }
-    }
-    
-    public static void main(String[] args) {
-        try {
-            System.setProperty("sun.java2d.noddraw", "true");
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-            JFrame f1 = new JFrame("Drag this");
-            JFrame f2 = new JFrame("Over here");
-            URL url = GhostedDragImageDemo.class.getResource("toucan.png");
-            if (url == null)
-                throw new RuntimeException("Icon not found");
-            Icon icon = new ImageIcon(url);
-            f1.getContentPane().add(new DragLabel(icon));
-            JLabel label2 = new DragLabel(icon);
-            f2.getContentPane().add(label2);
-            f1.setLocation(100, 100);
-            f1.pack();
-            f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-            f2.setLocation(300, 100);
-            f2.pack();
-            label2.setIcon(null);
-            f2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-            f2.setVisible(true);
-            f1.setVisible(true);
-        }
-        catch(Throwable t){
-            t.printStackTrace();
-            System.exit(1);
-        }
-    }
-}
diff --git a/src/com/sun/jna/examples/win32/GDI32.java b/src/com/sun/jna/examples/win32/GDI32.java
deleted file mode 100644
index f6aac1e..0000000
--- a/src/com/sun/jna/examples/win32/GDI32.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.
- */
-package com.sun.jna.examples.win32;
-
-import java.awt.Rectangle;
-
-import com.sun.jna.Native;
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.examples.win32.User32.POINT;
-import com.sun.jna.ptr.PointerByReference;
-
-/** Definition (incomplete) of <code>gdi32.dll</code>. */
-public interface GDI32 extends W32API {
-
-    GDI32 INSTANCE = (GDI32)
-        Native.loadLibrary("gdi32", GDI32.class, DEFAULT_OPTIONS);
-
-    class RECT extends Structure {
-        public int left;
-        public int top;
-        public int right;
-        public int bottom;
-        public Rectangle toRectangle() {
-            return new Rectangle(left, top, right-left, bottom-top);
-        }
-        public String toString() {
-            return "[(" + left + "," + top + ")(" + right + "," + bottom + ")]";
-        }
-    }
-
-    int RDH_RECTANGLES = 1;
-    class RGNDATAHEADER extends Structure {
-        public int dwSize = size();
-        public int iType = RDH_RECTANGLES; // required
-        public int nCount;
-        public int nRgnSize;
-        public RECT rcBound;
-    }
-    class RGNDATA extends Structure {
-        public RGNDATAHEADER rdh;
-        public byte[] Buffer;
-        public RGNDATA(int bufferSize) {
-            Buffer = new byte[bufferSize];
-            allocateMemory();
-        }
-    }
-
-    public HRGN ExtCreateRegion(Pointer lpXform, int nCount, RGNDATA lpRgnData);
-
-    int RGN_AND = 1;
-    int RGN_OR = 2;
-    int RGN_XOR = 3;
-    int RGN_DIFF = 4;
-    int RGN_COPY = 5;
-
-    int ERROR = 0;
-    int NULLREGION = 1;
-    int SIMPLEREGION = 2;
-    int COMPLEXREGION = 3;
-    int CombineRgn(HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2, int fnCombineMode);
-
-    HRGN CreateRectRgn(int nLeftRect, int nTopRect,
-                       int nRightRect, int nBottomRect);
-
-    HRGN CreateRoundRectRgn(int nLeftRect, int nTopRect,
-                            int nRightRect, int nBottomRect,
-                            int nWidthEllipse,
-                            int nHeightEllipse);
-    int ALTERNATE = 1;
-    int WINDING = 2;
-    HRGN CreatePolyPolygonRgn(POINT[] lppt, int[] lpPolyCounts, int nCount, int fnPolyFillMode);
-
-    boolean SetRectRgn(HRGN hrgn, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
-
-    int SetPixel(HDC hDC, int x, int y, int crColor);
-
-    HDC CreateCompatibleDC(HDC hDC);
-    boolean DeleteDC(HDC hDC);
-
-    int BI_RGB = 0;
-    int BI_RLE8 = 1;
-    int BI_RLE4 = 2;
-    int BI_BITFIELDS = 3;
-    int BI_JPEG = 4;
-    int BI_PNG = 5;
-    class BITMAPINFOHEADER extends Structure {
-        public int biSize = size();
-        public int biWidth;
-        public int biHeight;
-        public short biPlanes;
-        public short biBitCount;
-        public int biCompression;
-        public int biSizeImage;
-        public int biXPelsPerMeter;
-        public int biYPelsPerMeter;
-        public int biClrUsed;
-        public int biClrImportant;
-    }
-    class RGBQUAD extends Structure {
-        public byte rgbBlue;
-        public byte rgbGreen;
-        public byte rgbRed;
-        public byte rgbReserved = 0;
-    }
-    class BITMAPINFO extends Structure {
-        public BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
-        //RGBQUAD:
-        //byte rgbBlue;
-        //byte rgbGreen;
-        //byte rgbRed;
-        //byte rgbReserved = 0;
-        int[] bmiColors = new int[1];
-        public BITMAPINFO() { this(1); }
-        public BITMAPINFO(int size) {
-            bmiColors = new int[size];
-            allocateMemory();
-        }
-    }
-    int DIB_RGB_COLORS = 0;
-    int DIB_PAL_COLORS = 1;
-    HBITMAP CreateDIBitmap(HDC hDC, BITMAPINFOHEADER lpbmih, int fdwInit,
-                           Pointer lpbInit, BITMAPINFO lpbmi, int fuUsage);
-    HBITMAP CreateDIBSection(HDC hDC, BITMAPINFO pbmi, int iUsage,
-                             PointerByReference ppvBits, Pointer hSection,
-                             int dwOffset);
-    HBITMAP CreateCompatibleBitmap(HDC hDC, int width, int height);
-
-    HANDLE SelectObject(HDC hDC, HANDLE hGDIObj);
-    boolean DeleteObject(HANDLE p);
-}
diff --git a/src/com/sun/jna/examples/win32/Kernel32.java b/src/com/sun/jna/examples/win32/Kernel32.java
deleted file mode 100644
index e766893..0000000
--- a/src/com/sun/jna/examples/win32/Kernel32.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.  
- */
-package com.sun.jna.examples.win32;
-
-import java.nio.Buffer;
-import com.sun.jna.Native;
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByReference;
-import com.sun.jna.ptr.IntByReference;
-import com.sun.jna.ptr.PointerByReference;
-
-/** Definition (incomplete) of <code>kernel32.dll</code>. */
-public interface Kernel32 extends W32API {
-    
-    Kernel32 INSTANCE = (Kernel32)
-        Native.loadLibrary("kernel32", Kernel32.class, DEFAULT_OPTIONS);
-
-    class SYSTEMTIME extends Structure {
-        public short wYear;
-        public short wMonth;
-        public short wDayOfWeek;
-        public short wDay;
-        public short wHour;
-        public short wMinute;
-        public short wSecond;
-        public short wMilliseconds;
-    }
-
-    Pointer LocalFree(Pointer hLocal);
-    Pointer GlobalFree(Pointer hGlobal);
-
-    HMODULE GetModuleHandle(String name);
-    void GetSystemTime(SYSTEMTIME result);
-    int GetCurrentThreadId();
-    HANDLE GetCurrentThread();
-    int GetCurrentProcessId();
-    HANDLE GetCurrentProcess();
-    int GetProcessId(HANDLE process);
-    int GetProcessVersion(int processId);
-    int GetLastError();
-    void SetLastError(int dwErrCode);
-    int GetDriveType(String rootPathName);
-
-    int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x0100;
-    int FORMAT_MESSAGE_FROM_SYSTEM = 0x1000;
-    int FORMAT_MESSAGE_IGNORE_INSERTS = 0x200;
-    int FormatMessage(int dwFlags, Pointer lpSource, int dwMessageId, 
-                      int dwLanguageId, PointerByReference lpBuffer, 
-                      int nSize, Pointer va_list);
-    int FormatMessage(int dwFlags, Pointer lpSource, int dwMessageId, 
-                      int dwLanguageId, Buffer lpBuffer, 
-                      int nSize, Pointer va_list);
-
-    int FILE_LIST_DIRECTORY = 0x00000001;
-    
-    int FILE_SHARE_READ = 1;
-    int FILE_SHARE_WRITE = 2;
-    int FILE_SHARE_DELETE = 4;
-    
-    int CREATE_NEW =         1;
-    int CREATE_ALWAYS =      2;
-    int OPEN_EXISTING =      3;
-    int OPEN_ALWAYS =        4;
-    int TRUNCATE_EXISTING =  5;
-    
-    int FILE_FLAG_WRITE_THROUGH =        0x80000000;
-    int FILE_FLAG_OVERLAPPED =           0x40000000;
-    int FILE_FLAG_NO_BUFFERING =         0x20000000;
-    int FILE_FLAG_RANDOM_ACCESS =        0x10000000;
-    int FILE_FLAG_SEQUENTIAL_SCAN =      0x08000000;
-    int FILE_FLAG_DELETE_ON_CLOSE =      0x04000000;
-    int FILE_FLAG_BACKUP_SEMANTICS =     0x02000000;
-    int FILE_FLAG_POSIX_SEMANTICS =      0x01000000;
-    int FILE_FLAG_OPEN_REPARSE_POINT =   0x00200000;
-    int FILE_FLAG_OPEN_NO_RECALL =       0x00100000;
-
-    int FILE_ATTRIBUTE_READONLY = 0x00000001;
-    int FILE_ATTRIBUTE_HIDDEN = 0x00000002;
-    int FILE_ATTRIBUTE_SYSTEM = 0x00000004;
-    int FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
-    int FILE_ATTRIBUTE_ARCHIVE = 0x00000020;
-    int FILE_ATTRIBUTE_DEVICE = 0x00000040;
-    int FILE_ATTRIBUTE_NORMAL = 0x00000080;
-    int FILE_ATTRIBUTE_TEMPORARY = 0x00000100;
-    int FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200;
-    int FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400;
-    int FILE_ATTRIBUTE_COMPRESSED = 0x00000800;
-    int FILE_ATTRIBUTE_OFFLINE = 0x00001000;
-    int FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000;
-    int FILE_ATTRIBUTE_ENCRYPTED = 0x00004000;
-
-    int DRIVE_UNKNOWN = 0;
-    int DRIVE_NO_ROOT_DIR = 1;
-    int DRIVE_REMOVABLE = 2;
-    int DRIVE_FIXED = 3;
-    int DRIVE_REMOTE = 4;
-    int DRIVE_CDROM = 5;
-    int DRIVE_RAMDISK = 6;
-    
-    int GENERIC_WRITE = 0x40000000;
-    class SECURITY_ATTRIBUTES extends Structure {
-        public int nLength = size();
-        public Pointer lpSecurityDescriptor;
-        public boolean bInheritHandle;
-    }
-    HANDLE CreateFile(String lpFileName, int dwDesiredAccess, int dwShareMode,
-                      SECURITY_ATTRIBUTES lpSecurityAttributes,
-                      int dwCreationDisposition, int dwFlagsAndAttributes,
-                      HANDLE hTemplateFile);
-    boolean CreateDirectory();
-
-    HANDLE CreateIoCompletionPort(HANDLE FileHandle, 
-                                  HANDLE ExistingCompletionPort,
-                                  Pointer CompletionKey, 
-                                  int NumberOfConcurrentThreads);
-    int INFINITE = 0xFFFFFFFF;
-    boolean GetQueuedCompletionStatus(HANDLE CompletionPort, 
-                                      IntByReference lpNumberOfBytes,
-                                      ByReference lpCompletionKey,
-                                      PointerByReference lpOverlapped, 
-                                      int dwMilliseconds);
-    
-    boolean PostQueuedCompletionStatus(HANDLE CompletionPort, 
-                                       int dwNumberOfBytesTransferred,
-                                       Pointer dwCompletionKey, 
-                                       OVERLAPPED lpOverlapped);
-    int WaitForSingleObject(HANDLE hHandle, int dwMilliseconds);
-    boolean DuplicateHandle(HANDLE hSourceProcessHandle, 
-                            HANDLE hSourceHandle,
-                            HANDLE hTargetProcessHandle,
-                            HANDLEByReference lpTargetHandle,
-                            int dwDesiredAccess,
-                            boolean bInheritHandle,
-                            int dwOptions);
-    boolean CloseHandle(HANDLE hObject);
-    
-    int FILE_ACTION_ADDED = 1;
-    int FILE_ACTION_REMOVED = 2;
-    int FILE_ACTION_MODIFIED = 3;
-    int FILE_ACTION_RENAMED_OLD_NAME = 4;
-    int FILE_ACTION_RENAMED_NEW_NAME = 5;
-    
-    int FILE_NOTIFY_CHANGE_FILE_NAME = 1;
-    int FILE_NOTIFY_CHANGE_DIR_NAME = 2;
-    int FILE_NOTIFY_CHANGE_NAME = 3;
-    int FILE_NOTIFY_CHANGE_ATTRIBUTES = 4;
-    int FILE_NOTIFY_CHANGE_SIZE = 8;
-    int FILE_NOTIFY_CHANGE_LAST_WRITE = 16;
-    int FILE_NOTIFY_CHANGE_LAST_ACCESS = 32;
-    int FILE_NOTIFY_CHANGE_CREATION = 64;
-    int FILE_NOTIFY_CHANGE_EA = 128;
-    int FILE_NOTIFY_CHANGE_SECURITY = 256;
-    int FILE_NOTIFY_CHANGE_STREAM_NAME = 512;
-    int FILE_NOTIFY_CHANGE_STREAM_SIZE = 1024;
-    int FILE_NOTIFY_CHANGE_STREAM_WRITE = 2048;
-    /** This structure is non-trivial since it is a pattern stamped
-     * into a large block of result memory rather than something that stands
-     * alone or is used for input.
-     */
-    class FILE_NOTIFY_INFORMATION extends Structure {
-        public int NextEntryOffset;
-        public int Action;
-        public int FileNameLength;
-        // filename is not nul-terminated, so we can't use a String/WString
-        public char[] FileName = new char[1];
-        
-        private FILE_NOTIFY_INFORMATION() { } 
-        public FILE_NOTIFY_INFORMATION(int size) {
-            if (size < size())
-                throw new IllegalArgumentException("Size must greater than "
-                                                   + size() + ", requested " 
-                                                   + size);
-            allocateMemory(size);
-        }
-        /** WARNING: this filename may be either the short or long form
-         * of the filename.
-         */
-        public String getFilename() {
-            return new String(FileName, 0, FileNameLength/2);
-        }
-        public void read() {
-            // avoid reading filename until we know how long it is
-            FileName = new char[0];
-            super.read();
-            FileName = getPointer().getCharArray(12, FileNameLength/2);
-        }
-        public FILE_NOTIFY_INFORMATION next() {
-            if (NextEntryOffset == 0)
-                return null;
-            FILE_NOTIFY_INFORMATION next = new FILE_NOTIFY_INFORMATION();
-            next.useMemory(getPointer(), NextEntryOffset);
-            next.read();
-            return next;
-        }
-    }
-    class OVERLAPPED extends Structure {
-        public ULONG_PTR Internal;
-        public ULONG_PTR InternalHigh;
-        public int Offset;
-        public int OffsetHigh;
-        public HANDLE hEvent;
-    }
-    // TODO: figure out how OVERLAPPED is used and apply an appropriate mapping
-    interface OVERLAPPED_COMPLETION_ROUTINE extends StdCallCallback {
-        void callback(int errorCode, int nBytesTransferred, OVERLAPPED overlapped);
-    }
-    /** NOTE: only exists in unicode form (W suffix).  Define this method 
-     * explicitly with the W suffix to avoid inadvertent calls in ASCII mode. 
-     */
-    boolean ReadDirectoryChangesW(HANDLE directory, 
-                                  FILE_NOTIFY_INFORMATION info, 
-                                  int length,
-                                  boolean watchSubtree, 
-                                  int notifyFilter,
-                                  IntByReference bytesReturned,
-                                  OVERLAPPED overlapped, 
-                                  OVERLAPPED_COMPLETION_ROUTINE completionRoutine);
-    
-    /** ASCII version.  Use {@link Native#toString(byte[])} to obtain the short
-     * path from the <code>byte</code> array.  
-     * Use only if <code>w32.ascii==true</code>. 
-     */
-    int GetShortPathName(String lpszLongPath, byte[] lpdzShortPath, int cchBuffer);
-    
-    /** Unicode version (the default).  Use {@link Native#toString(char[])} to
-     * obtain the short path from the <code>char</code> array. 
-     */
-    int GetShortPathName(String lpszLongPath, char[] lpdzShortPath, int cchBuffer);
-}
diff --git a/src/com/sun/jna/examples/win32/Shell32.java b/src/com/sun/jna/examples/win32/Shell32.java
deleted file mode 100644
index 8d57021..0000000
--- a/src/com/sun/jna/examples/win32/Shell32.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.  
- */
-package com.sun.jna.examples.win32;
-
-import com.sun.jna.Native;
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-
-/** Mapping for w32 Shell API.  
- * Note that the C header "shellapi.h" includes "pshpack1.h", which disables 
- * automatic alignment of structure fields.  
- */
-public interface Shell32 extends W32API {
-
-    /** Custom alignment of structures. */
-    int STRUCTURE_ALIGNMENT = Structure.ALIGN_NONE;
-    Shell32 INSTANCE = (Shell32)
-        Native.loadLibrary("shell32", Shell32.class, DEFAULT_OPTIONS);
-    
-    int FO_MOVE = 1;
-    int FO_COPY = 2;
-    int FO_DELETE = 3;
-    int FO_RENAME = 4;
-    
-    int FOF_MULTIDESTFILES = 1;
-    int FOF_CONFIRMMOUSE = 2;
-    int FOF_SILENT = 4;
-    int FOF_RENAMEONCOLLISION = 8;
-    int FOF_NOCONFIRMATION = 16;
-    int FOF_WANTMAPPINGHANDLE = 32;
-    int FOF_ALLOWUNDO = 64;
-    int FOF_FILESONLY = 128;
-    int FOF_SIMPLEPROGRESS = 256;
-    int FOF_NOCONFIRMMKDIR = 512;
-    int FOF_NOERRORUI = 1024;
-    int FOF_NOCOPYSECURITYATTRIBS = 2048;
-
-    class SHFILEOPSTRUCT extends Structure {
-        public HANDLE hwnd;
-        public int wFunc;
-        public String pFrom;
-        public String pTo;
-        public short fFlags;
-        public boolean fAnyOperationsAborted;
-        public Pointer pNameMappings;
-        public String lpszProgressTitle;
-        /** Use this to encode <code>pFrom/pTo</code> paths. */
-        public String encodePaths(String[] paths) {
-            String encoded = "";
-            for (int i=0;i < paths.length;i++) {
-                encoded += paths[i];
-                encoded += "\0";
-            }
-            return encoded + "\0";
-        }
-    }
-    int SHFileOperation(SHFILEOPSTRUCT fileop);
-
-    DWORD SHGFP_TYPE_CURRENT  = new DWORD(0);   // current value for user, verify it exists
-    DWORD SHGFP_TYPE_DEFAULT  = new DWORD(1);   // default value, may not exist
-    int CSIDL_DESKTOP                 = 0x0000;        // <desktop>
-    int CSIDL_INTERNET                = 0x0001;        // Internet Explorer (icon on desktop)
-    int CSIDL_PROGRAMS                = 0x0002;        // Start Menu\Programs
-    int CSIDL_CONTROLS                = 0x0003;        // My Computer\Control Panel
-    int CSIDL_PRINTERS                = 0x0004;        // My Computer\Printers
-    int CSIDL_PERSONAL                = 0x0005;        // My Documents
-    int CSIDL_FAVORITES               = 0x0006;        // <user name>\Favorites
-    int CSIDL_STARTUP                 = 0x0007;        // Start Menu\Programs\Startup
-    int CSIDL_RECENT                  = 0x0008;        // <user name>\Recent
-    int CSIDL_SENDTO                  = 0x0009;        // <user name>\SendTo
-    int CSIDL_BITBUCKET               = 0x000a;        // <desktop>\Recycle Bin
-    int CSIDL_STARTMENU               = 0x000b;        // <user name>\Start Menu
-    int CSIDL_MYDOCUMENTS             = CSIDL_PERSONAL; //  Personal was just a silly name for My Documents
-    int CSIDL_MYMUSIC                 = 0x000d;        // "My Music" folder
-    int CSIDL_MYVIDEO                 = 0x000e;        // "My Videos" folder
-    int CSIDL_DESKTOPDIRECTORY        = 0x0010;        // <user name>\Desktop
-    int CSIDL_DRIVES                  = 0x0011;        // My Computer
-    int CSIDL_NETWORK                 = 0x0012;        // Network Neighborhood (My Network Places)
-    int CSIDL_NETHOOD                 = 0x0013;        // <user name>\nethood
-    int CSIDL_FONTS                   = 0x0014;        // windows\fonts
-    int CSIDL_TEMPLATES               = 0x0015;
-    int CSIDL_COMMON_STARTMENU        = 0x0016;        // All Users\Start Menu
-    int CSIDL_COMMON_PROGRAMS         = 0X0017;        // All Users\Start Menu\Programs
-    int CSIDL_COMMON_STARTUP          = 0x0018;        // All Users\Startup
-    int CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019;        // All Users\Desktop
-    int CSIDL_APPDATA                 = 0x001a;        // <user name>\Application Data
-    int CSIDL_PRINTHOOD               = 0x001b;        // <user name>\PrintHood
-    int CSIDL_LOCAL_APPDATA           = 0x001c;        // <user name>\Local Settings\Applicaiton Data (non roaming)
-    int CSIDL_ALTSTARTUP              = 0x001d;        // non localized startup
-    int CSIDL_COMMON_ALTSTARTUP       = 0x001e;        // non localized common startup
-    int CSIDL_COMMON_FAVORITES        = 0x001f;
-    int CSIDL_INTERNET_CACHE          = 0x0020;
-    int CSIDL_COOKIES                 = 0x0021;
-    int CSIDL_HISTORY                 = 0x0022;
-    int CSIDL_COMMON_APPDATA          = 0x0023;        // All Users\Application Data
-    int CSIDL_WINDOWS                 = 0x0024;        // GetWindowsDirectory()
-    int CSIDL_SYSTEM                  = 0x0025;        // GetSystemDirectory()
-    int CSIDL_PROGRAM_FILES           = 0x0026;        // C:\Program Files
-    int CSIDL_MYPICTURES              = 0x0027;        // C:\Program Files\My Pictures
-    int CSIDL_PROFILE                 = 0x0028;        // USERPROFILE
-    int CSIDL_SYSTEMX86               = 0x0029;        // x86 system directory on RISC
-    int CSIDL_PROGRAM_FILESX86        = 0x002a;        // x86 C:\Program Files on RISC
-    int CSIDL_PROGRAM_FILES_COMMON    = 0x002b;        // C:\Program Files\Common
-    int CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c;        // x86 Program Files\Common on RISC
-    int CSIDL_COMMON_TEMPLATES        = 0x002d;        // All Users\Templates
-    int CSIDL_COMMON_DOCUMENTS        = 0x002e;        // All Users\Documents
-    int CSIDL_COMMON_ADMINTOOLS       = 0x002f;        // All Users\Start Menu\Programs\Administrative Tools
-    int CSIDL_ADMINTOOLS              = 0x0030;        // <user name>\Start Menu\Programs\Administrative Tools
-    int CSIDL_CONNECTIONS             = 0x0031;        // Network and Dial-up Connections
-    int CSIDL_COMMON_MUSIC            = 0x0035;        // All Users\My Music
-    int CSIDL_COMMON_PICTURES         = 0x0036;        // All Users\My Pictures
-    int CSIDL_COMMON_VIDEO            = 0x0037;        // All Users\My Video
-    int CSIDL_RESOURCES               = 0x0038;        // Resource Direcotry
-    int CSIDL_RESOURCES_LOCALIZED     = 0x0039;        // Localized Resource Direcotry
-    int CSIDL_COMMON_OEM_LINKS        = 0x003a;        // Links to All Users OEM specific apps
-    int CSIDL_CDBURN_AREA             = 0x003b;        // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
-    int CSIDL_COMPUTERSNEARME         = 0x003d;        // Computers Near Me (computered from Workgroup membership)
-    HRESULT SHGetFolderPath(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, char[] pszPath);
-}
diff --git a/src/com/sun/jna/examples/win32/User32.java b/src/com/sun/jna/examples/win32/User32.java
deleted file mode 100644
index 3e2e79f..0000000
--- a/src/com/sun/jna/examples/win32/User32.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.
- */
-package com.sun.jna.examples.win32;
-
-import com.sun.jna.Native;
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.examples.win32.GDI32.RECT;
-import com.sun.jna.ptr.ByteByReference;
-import com.sun.jna.ptr.IntByReference;
-
-/** Provides access to the w32 user32 library.
- * Incomplete implementation to support demos.
- *
- * @author  Todd Fast, todd.fast at sun.com
- * @author twalljava at dev.java.net
- */
-public interface User32 extends W32API {
-
-    User32 INSTANCE = (User32)
-        Native.loadLibrary("user32", User32.class, DEFAULT_OPTIONS);
-
-    HDC GetDC(HWND hWnd);
-    int ReleaseDC(HWND hWnd, HDC hDC);
-
-    int FLASHW_STOP = 0;
-    int FLASHW_CAPTION = 1;
-    int FLASHW_TRAY = 2;
-    int FLASHW_ALL = (FLASHW_CAPTION|FLASHW_TRAY);
-    int FLASHW_TIMER = 4;
-    int FLASHW_TIMERNOFG = 12;
-
-    class FLASHWINFO extends Structure {
-        public int cbSize;
-        public HANDLE hWnd;
-        public int dwFlags;
-        public int uCount;
-        public int dwTimeout;
-    }
-
-    int IMAGE_BITMAP=0;
-    int IMAGE_ICON=1;
-    int IMAGE_CURSOR=2;
-    int IMAGE_ENHMETAFILE=3;
-
-    int LR_DEFAULTCOLOR     =0x0000;
-    int LR_MONOCHROME       =0x0001;
-    int LR_COLOR            =0x0002;
-    int LR_COPYRETURNORG    =0x0004;
-    int LR_COPYDELETEORG    =0x0008;
-    int LR_LOADFROMFILE     =0x0010;
-    int LR_LOADTRANSPARENT  =0x0020;
-    int LR_DEFAULTSIZE      =0x0040;
-    int LR_VGACOLOR         =0x0080;
-    int LR_LOADMAP3DCOLORS  =0x1000;
-    int LR_CREATEDIBSECTION =0x2000;
-    int LR_COPYFROMRESOURCE =0x4000;
-    int LR_SHARED           =0x8000;
-
-    HWND FindWindow(String winClass, String title);
-    /** ASCII version. */
-    int GetClassName(HWND hWnd, byte[] lpClassName, int nMaxCount);
-    /** Unicode version. */
-    int GetClassName(HWND hWnd, char[] lpClassName, int nMaxCount);
-    class GUITHREADINFO extends Structure {
-        public int cbSize = size();
-        public int flags;
-        public HWND hwndActive;
-        public HWND hwndFocus;
-        public HWND hwndCapture;
-        public HWND hwndMenuOwner;
-        public HWND hwndMoveSize;
-        public HWND hwndCaret;
-        public RECT rcCaret;
-    }
-    boolean GetGUIThreadInfo(int idThread, GUITHREADINFO lpgui);
-
-    class WINDOWINFO extends Structure {
-        public int cbSize = size();
-        public RECT rcWindow;
-        public RECT rcClient;
-        public int dwStyle;
-        public int dwExStyle;
-        public int dwWindowStatus;
-        public int cxWindowBorders;
-        public int cyWindowBorders;
-        public short atomWindowType;
-        public short wCreatorVersion;
-    }
-    boolean GetWindowInfo(HWND hWnd, WINDOWINFO pwi);
-    boolean GetWindowRect(HWND hWnd, RECT rect);
-    /** ASCII version. */
-    int GetWindowText(HWND hWnd, byte[] lpString, int nMaxCount);
-    /** Unicode version. */
-    int GetWindowText(HWND hWnd, char[] lpString, int nMaxCount);
-    int GetWindowTextLength(HWND hWnd);
-    /** ASCII version. */
-    int GetWindowModuleFileName(HWND hWnd, byte[] lpszFileName, int cchFileNameMax);
-    /** Unicode version. */
-    int GetWindowModuleFileName(HWND hWnd, char[] lpszFileName, int cchFileNameMax);
-    int GetWindowThreadProcessId(HWND hWnd, IntByReference lpdwProcessId);
-    interface WNDENUMPROC extends StdCallCallback {
-        /** Return whether to continue enumeration. */
-        boolean callback(HWND hWnd, Pointer data);
-    }
-    boolean EnumWindows(WNDENUMPROC lpEnumFunc, Pointer data);
-    boolean EnumChildWindows(HWND hWnd, WNDENUMPROC lpEnumFunc, Pointer data);
-    boolean EnumThreadWindows(int dwThreadId, WNDENUMPROC lpEnumFunc, Pointer data);
-
-    boolean FlashWindowEx(FLASHWINFO info);
-
-    HICON LoadIcon(HINSTANCE hInstance, String iconName);
-
-    HANDLE LoadImage(HINSTANCE hinst,   // handle to instance
-                     String name,  // image to load
-                     int type,        // image type
-                     int xDesired,     // desired width
-                     int yDesired,     // desired height
-                     int load        // load options
-    );
-
-    boolean DestroyIcon(HICON hicon);
-
-    int GWL_EXSTYLE = -20;
-    int GWL_STYLE = -16;
-    int GWL_WNDPROC = -4;
-    int GWL_HINSTANCE = -6;
-    int GWL_ID = -12;
-    int GWL_USERDATA = -21;
-    int DWL_DLGPROC = 4;
-    int DWL_MSGRESULT = 0;
-    int DWL_USER = 8;
-    int WS_EX_COMPOSITED = 0x20000000;
-    int WS_EX_LAYERED = 0x80000;
-    int WS_EX_TRANSPARENT = 32;
-    int GetWindowLong(HWND hWnd, int nIndex);
-    int SetWindowLong(HWND hWnd, int nIndex, int dwNewLong);
-    // Do not use this version on win64
-    Pointer SetWindowLong(HWND hWnd, int nIndex, Pointer dwNewLong);
-
-    LONG_PTR GetWindowLongPtr(HWND hWnd, int nIndex);
-    LONG_PTR SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLongPtr);
-    Pointer SetWindowLongPtr(HWND hWnd, int nIndex, Pointer dwNewLongPtr);
-
-    int LWA_COLORKEY = 1;
-    int LWA_ALPHA = 2;
-    int ULW_COLORKEY = 1;
-    int ULW_ALPHA = 2;
-    int ULW_OPAQUE = 4;
-    boolean SetLayeredWindowAttributes(HWND hwnd, int crKey,
-                                       byte bAlpha, int dwFlags);
-    boolean GetLayeredWindowAttributes(HWND hwnd,
-                                       IntByReference pcrKey,
-                                       ByteByReference pbAlpha,
-                                       IntByReference pdwFlags);
-
-    /** Defines the x- and y-coordinates of a point. */
-    class POINT extends Structure {
-        public int x, y;
-        public POINT() { }
-        public POINT(int x, int y) { this.x = x; this.y = y; }
-    }
-    /** Specifies the width and height of a rectangle. */
-    class SIZE extends Structure {
-        public int cx, cy;
-        public SIZE() { }
-        public SIZE(int w, int h) { this.cx = w; this.cy = h; }
-    }
-    int AC_SRC_OVER = 0x00;
-    int AC_SRC_ALPHA = 0x01;
-    int AC_SRC_NO_PREMULT_ALPHA = 0x01;
-    int AC_SRC_NO_ALPHA = 0x02;
-    class BLENDFUNCTION extends Structure {
-        public byte BlendOp = AC_SRC_OVER; // only valid value
-        public byte BlendFlags = 0; // only valid value
-        public byte SourceConstantAlpha;
-        public byte AlphaFormat;
-    }
-    boolean UpdateLayeredWindow(HWND hwnd, HDC hdcDst,
-                                POINT pptDst, SIZE psize,
-                                HDC hdcSrc, POINT pptSrc, int crKey,
-                                BLENDFUNCTION pblend, int dwFlags);
-    int SetWindowRgn(HWND hWnd, HRGN hRgn, boolean bRedraw);
-    int VK_SHIFT = 16;
-    int VK_LSHIFT = 0xA0;
-    int VK_RSHIFT = 0xA1;
-    int VK_CONTROL = 17;
-    int VK_LCONTROL = 0xA2;
-    int VK_RCONTROL = 0xA3;
-    int VK_MENU = 18;
-    int VK_LMENU = 0xA4;
-    int VK_RMENU = 0xA5;
-    boolean GetKeyboardState(byte[] state);
-    short GetAsyncKeyState(int vKey);
-
-    int WH_KEYBOARD = 2;
-    int WH_MOUSE = 7;
-    int WH_KEYBOARD_LL = 13;
-    int WH_MOUSE_LL = 14;
-    class HHOOK extends HANDLE { }
-    interface HOOKPROC extends StdCallCallback { }
-    int WM_KEYDOWN = 256;
-    int WM_KEYUP = 257;
-    int WM_SYSKEYDOWN = 260;
-    int WM_SYSKEYUP = 261;
-    class KBDLLHOOKSTRUCT extends Structure {
-        public int vkCode;
-        public int scanCode;
-        public int flags;
-        public int time;
-        public ULONG_PTR dwExtraInfo;
-    }
-    interface LowLevelKeyboardProc extends HOOKPROC {
-        LRESULT callback(int nCode, WPARAM wParam, KBDLLHOOKSTRUCT lParam);
-    }
-    HHOOK SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hMod, int dwThreadId);
-    LRESULT CallNextHookEx(HHOOK hhk, int nCode, WPARAM wParam, LPARAM lParam);
-    LRESULT CallNextHookEx(HHOOK hhk, int nCode, WPARAM wParam, Pointer lParam);
-    boolean UnhookWindowsHookEx(HHOOK hhk);
-
-    class MSG extends Structure {
-        public HWND hWnd;
-        public int message;
-        public WPARAM wParam;
-        public LPARAM lParam;
-        public int time;
-        public POINT pt;
-    }
-    int GetMessage(MSG lpMsg, HWND hWnd, int wMsgFilterMin, int wMsgFilterMax);
-    boolean PeekMessage(MSG lpMsg, HWND hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);
-    boolean TranslateMessage(MSG lpMsg);
-    LRESULT DispatchMessage(MSG lpMsg);
-    void PostMessage(HWND hWnd, int msg, WPARAM wParam, LPARAM lParam);
-    void PostQuitMessage(int nExitCode);
-}
diff --git a/src/com/sun/jna/examples/win32/W32API.java b/src/com/sun/jna/examples/win32/W32API.java
deleted file mode 100644
index 0e9b027..0000000
--- a/src/com/sun/jna/examples/win32/W32API.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- * 
- * 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.  
- */
-package com.sun.jna.examples.win32;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.IntegerType;
-import com.sun.jna.Native;
-import com.sun.jna.NativeLong;
-import com.sun.jna.Pointer;
-import com.sun.jna.PointerType;
-import com.sun.jna.ptr.ByReference;
-import com.sun.jna.win32.StdCallLibrary;
-import com.sun.jna.win32.W32APIFunctionMapper;
-import com.sun.jna.win32.W32APITypeMapper;
-
-/** Base type for most W32 API libraries.  Provides standard options
- * for unicode/ASCII mappings.  Set the system property <code>w32.ascii</code>
- * to <code>true</code> to default to the ASCII mappings.
- */
-public interface W32API extends StdCallLibrary, W32Errors {
-    
-    /** Standard options to use the unicode version of a w32 API. */
-    Map UNICODE_OPTIONS = new HashMap() {
-        {
-            put(OPTION_TYPE_MAPPER, W32APITypeMapper.UNICODE);
-            put(OPTION_FUNCTION_MAPPER, W32APIFunctionMapper.UNICODE);
-        }
-    };
-    /** Standard options to use the ASCII/MBCS version of a w32 API. */
-    Map ASCII_OPTIONS = new HashMap() {
-        {
-            put(OPTION_TYPE_MAPPER, W32APITypeMapper.ASCII);
-            put(OPTION_FUNCTION_MAPPER, W32APIFunctionMapper.ASCII);
-        }
-    };
-    Map DEFAULT_OPTIONS = Boolean.getBoolean("w32.ascii") ? ASCII_OPTIONS : UNICODE_OPTIONS;
-    
-    class HANDLE extends PointerType {
-        private boolean immutable;
-        public HANDLE() { }
-        public HANDLE(Pointer p) { setPointer(p); immutable = true; }
-        /** Override to the appropriate object for INVALID_HANDLE_VALUE. */
-        public Object fromNative(Object nativeValue, FromNativeContext context) {
-            Object o = super.fromNative(nativeValue, context);
-            if (INVALID_HANDLE_VALUE.equals(o))
-                return INVALID_HANDLE_VALUE;
-            return o;
-        }
-        public void setPointer(Pointer p) {
-            if (immutable)
-                throw new UnsupportedOperationException("immutable reference");
-            super.setPointer(p);
-        }
-    }
-    
-    class WORD extends IntegerType {
-    	public WORD() { this(0); }
-    	public WORD(long value) { super(2, value); } 
-    }
-    class DWORD extends IntegerType {
-    	public DWORD() { this(0); }
-    	public DWORD(long value) { super(4, value); } 
-    }
-    class LONG extends IntegerType {
-    	public LONG() { this(0); }
-    	public LONG(long value) { super(Native.LONG_SIZE, value); } 
-    }
-    
-    class HDC extends HANDLE { }
-    class HICON extends HANDLE { }
-    class HBITMAP extends HANDLE { }
-    class HRGN extends HANDLE { }
-    class HWND extends HANDLE {
-        public HWND() { }
-        public HWND(Pointer p) { super(p); }
-    }
-    class HINSTANCE extends HANDLE { }
-    class HMODULE extends HINSTANCE { }
-    class HRESULT extends NativeLong { }
-
-    /** Constant value representing an invalid HANDLE. */
-    HANDLE INVALID_HANDLE_VALUE = new HANDLE(Pointer.createConstant(-1));
-
-    /** Special HWND value. */
-    HWND HWND_BROADCAST = new HWND(Pointer.createConstant(0xFFFF));
-
-    /** LPHANDLE */
-    class HANDLEByReference extends ByReference {
-        public HANDLEByReference() {
-            this(null);
-        }
-        public HANDLEByReference(HANDLE h) {
-            super(Pointer.SIZE);
-            setValue(h);
-        }
-        public void setValue(HANDLE h) {
-            getPointer().setPointer(0, h != null ? h.getPointer() : null);
-        }
-        public HANDLE getValue() {
-            Pointer p = getPointer().getPointer(0);
-            if (p == null)
-                return null;
-            if (INVALID_HANDLE_VALUE.getPointer().equals(p)) 
-                return INVALID_HANDLE_VALUE;
-            HANDLE h = new HANDLE();
-            h.setPointer(p);
-            return h;
-        }
-    }
-    
-    class LONG_PTR extends IntegerType { 
-        public LONG_PTR() { this(0); }
-        public LONG_PTR(long value) { super(Pointer.SIZE, value); }
-    }
-    class SSIZE_T extends LONG_PTR {
-        public SSIZE_T() { this(0); }
-        public SSIZE_T(long value) { super(value); }
-    }
-    class ULONG_PTR extends IntegerType { 
-        public ULONG_PTR() { this(0); }
-        public ULONG_PTR(long value) { super(Pointer.SIZE, value); }
-    }
-    class SIZE_T extends ULONG_PTR {
-        public SIZE_T() { this(0); }
-        public SIZE_T(long value) { super(value); }
-    }
-    class LPARAM extends LONG_PTR { 
-        public LPARAM() { this(0); }
-        public LPARAM(long value) { super(value); }
-    } 
-    class LRESULT extends LONG_PTR { 
-        public LRESULT() { this(0); }
-        public LRESULT(long value) { super(value); }
-    }
-    class UINT_PTR extends IntegerType {
-        public UINT_PTR() { super(Pointer.SIZE); }
-        public UINT_PTR(long value) { super(Pointer.SIZE, value); }
-        public Pointer toPointer() { return Pointer.createConstant(longValue()); }
-    }
-    class WPARAM extends UINT_PTR {
-        public WPARAM() { this(0); }
-        public WPARAM(long value) { super(value); }
-    }
-}
diff --git a/src/com/sun/jna/examples/win32/W32Errors.java b/src/com/sun/jna/examples/win32/W32Errors.java
deleted file mode 100644
index 55addbd..0000000
--- a/src/com/sun/jna/examples/win32/W32Errors.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- *
- * 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.
- * <p/>
- * 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.  
- */
-package com.sun.jna.examples.win32;
-
-public interface W32Errors {
-    int NO_ERROR = 0;
-    int ERROR_INVALID_FUNCTION = 1;
-    int ERROR_FILE_NOT_FOUND = 2;
-    int ERROR_PATH_NOT_FOUND = 3;
-}
diff --git a/src/com/sun/jna/win32/W32APIOptions.java b/src/com/sun/jna/win32/W32APIOptions.java
new file mode 100644
index 0000000..5c93ae0
--- /dev/null
+++ b/src/com/sun/jna/win32/W32APIOptions.java
@@ -0,0 +1,23 @@
+package com.sun.jna.win32;
+
+import java.util.HashMap;
+import java.util.Map;
+import com.sun.jna.Library;
+
+public interface W32APIOptions extends StdCallLibrary {
+    /** Standard options to use the unicode version of a w32 API. */
+    Map UNICODE_OPTIONS = new HashMap() {
+        {
+            put(OPTION_TYPE_MAPPER, W32APITypeMapper.UNICODE);
+            put(OPTION_FUNCTION_MAPPER, W32APIFunctionMapper.UNICODE);
+        }
+    };
+    /** Standard options to use the ASCII/MBCS version of a w32 API. */
+    Map ASCII_OPTIONS = new HashMap() {
+        {
+            put(OPTION_TYPE_MAPPER, W32APITypeMapper.ASCII);
+            put(OPTION_FUNCTION_MAPPER, W32APIFunctionMapper.ASCII);
+        }
+    };
+    Map DEFAULT_OPTIONS = Boolean.getBoolean("w32.ascii") ? ASCII_OPTIONS : UNICODE_OPTIONS;
+}
diff --git a/src/com/sun/jna/win32/W32APITypeMapper.java b/src/com/sun/jna/win32/W32APITypeMapper.java
index f18eff1..776ca4b 100644
--- a/src/com/sun/jna/win32/W32APITypeMapper.java
+++ b/src/com/sun/jna/win32/W32APITypeMapper.java
@@ -12,9 +12,13 @@
  */
 package com.sun.jna.win32;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import com.sun.jna.DefaultTypeMapper;
 import com.sun.jna.FromNativeContext;
 import com.sun.jna.Pointer;
+import com.sun.jna.Library;
 import com.sun.jna.StringArray;
 import com.sun.jna.ToNativeContext;
 import com.sun.jna.TypeConverter;
diff --git a/test/com/sun/jna/ArgumentsMarshalTest.java b/test/com/sun/jna/ArgumentsMarshalTest.java
index 4df59bd..da638c4 100644
--- a/test/com/sun/jna/ArgumentsMarshalTest.java
+++ b/test/com/sun/jna/ArgumentsMarshalTest.java
@@ -29,6 +29,7 @@ import junit.framework.TestCase;
  *
  * @author twall at users.sf.net
  */
+ at SuppressWarnings("unused")
 public class ArgumentsMarshalTest extends TestCase {
 
     public static interface TestLibrary extends Library {
diff --git a/test/com/sun/jna/CallbacksTest.java b/test/com/sun/jna/CallbacksTest.java
index ce2986a..b225452 100644
--- a/test/com/sun/jna/CallbacksTest.java
+++ b/test/com/sun/jna/CallbacksTest.java
@@ -29,6 +29,7 @@ import com.sun.jna.ptr.IntByReference;
  *
  * @author twall at users.sf.net
  */
+ at SuppressWarnings("unused")
 public class CallbacksTest extends TestCase {
 
     private static final double DOUBLE_MAGIC = -118.625d;
diff --git a/test/com/sun/jna/DirectTest.java b/test/com/sun/jna/DirectTest.java
index 48fb403..7da1780 100644
--- a/test/com/sun/jna/DirectTest.java
+++ b/test/com/sun/jna/DirectTest.java
@@ -24,6 +24,7 @@ import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 
+ at SuppressWarnings("unused")
 public class DirectTest extends TestCase {
 
     private static final String BUILDDIR = 
diff --git a/test/com/sun/jna/LastErrorTest.java b/test/com/sun/jna/LastErrorTest.java
index 1ede2e0..f4369ed 100644
--- a/test/com/sun/jna/LastErrorTest.java
+++ b/test/com/sun/jna/LastErrorTest.java
@@ -18,6 +18,7 @@ import java.lang.reflect.Method;
 
 import junit.framework.TestCase;
 
+ at SuppressWarnings("unused")
 public class LastErrorTest extends TestCase {
     
     private static final Map OPTIONS = new HashMap() {{
@@ -57,7 +58,7 @@ public class LastErrorTest extends TestCase {
             fail("Method should throw LastErrorException");
         }
         catch(LastErrorException e) {
-            assertEquals("Exception should contain error code", ERROR, e.errorCode);
+            assertEquals("Exception should contain error code", ERROR, e.getErrorCode());
         }
     }
 
@@ -72,7 +73,7 @@ public class LastErrorTest extends TestCase {
             fail("Method should throw LastErrorException");
         }
         catch(LastErrorException e) {
-            assertEquals("Exception should contain error code", ERROR, e.errorCode);
+            assertEquals("Exception should contain error code", ERROR, e.getErrorCode());
         }
     }
 
diff --git a/test/com/sun/jna/MemoryTest.java b/test/com/sun/jna/MemoryTest.java
index a74d6e4..65edc0c 100644
--- a/test/com/sun/jna/MemoryTest.java
+++ b/test/com/sun/jna/MemoryTest.java
@@ -109,7 +109,7 @@ public class MemoryTest extends TestCase {
 
     public void testAvoidGCWithExtantBuffer() throws Exception {
         Memory m = new Memory(1024);
-        ByteBuffer b = m.getByteBuffer(0, m.getSize());
+        ByteBuffer b = m.getByteBuffer(0, m.size());
         WeakReference ref = new WeakReference(m);
         WeakReference bref = new WeakReference(b);
         m = null;
diff --git a/test/com/sun/jna/NativeTest.java b/test/com/sun/jna/NativeTest.java
index a7edf16..7fc316a 100644
--- a/test/com/sun/jna/NativeTest.java
+++ b/test/com/sun/jna/NativeTest.java
@@ -17,6 +17,7 @@ import java.util.Map;
 import java.util.Properties;
 import junit.framework.TestCase;
 
+ at SuppressWarnings("unused")
 public class NativeTest extends TestCase {
     
     public void testDefaultStringEncoding() throws Exception {
@@ -292,6 +293,13 @@ public class NativeTest extends TestCase {
                      Native.getTypeMapper(TestCallback.class));
     }
 
+    public void testStringReplace() {
+        assertEquals("Bad replace", "abcdefg", Native.replace("z", "a", "zbcdefg"));
+        assertEquals("Bad replace", "abcdefg", Native.replace("z", "g", "abcdefz"));
+        assertEquals("Bad replace", "abcdefg", Native.replace("z", "d", "abczefg"));
+        assertEquals("Bad replace", "abcaefa", Native.replace("z", "a", "zbczefz"));
+    }
+
     public static void main(String[] args) {
         junit.textui.TestRunner.run(NativeTest.class);
     }
diff --git a/test/com/sun/jna/PointerTest.java b/test/com/sun/jna/PointerTest.java
index 65f9658..9cbcff3 100644
--- a/test/com/sun/jna/PointerTest.java
+++ b/test/com/sun/jna/PointerTest.java
@@ -33,7 +33,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferPutString() {
         final String MAGIC = "magic";
         Memory m = new Memory(1024);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         buf.put(MAGIC.getBytes()).put((byte) 0).flip();
         assertEquals("String not written to memory", MAGIC, 
                 m.getString(0, false));
@@ -41,7 +41,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferPutByte() {
         final byte MAGIC = (byte)0xED;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         buf.put(MAGIC).flip();
         assertEquals("Byte not written to memory", MAGIC, 
                 m.getByte(0));
@@ -49,7 +49,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferPutInt() {
         final int MAGIC = 0xABEDCF23;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         buf.putInt(MAGIC).flip();
         assertEquals("Int not written to memory", MAGIC, 
                 m.getInt(0));
@@ -57,7 +57,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferPutLong() {
         final long MAGIC = 0x1234567887654321L;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         buf.putLong(MAGIC).flip();
         assertEquals("Long not written to memory", MAGIC, 
                 m.getLong(0));
@@ -65,7 +65,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferGetByte() {
         final byte MAGIC = (byte)0xED;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         m.setByte(0, MAGIC);
         assertEquals("Byte not read from memory", MAGIC, 
                 buf.get(0));
@@ -73,7 +73,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferGetInt() {
         final int MAGIC = 0xABEDCF23;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         m.setInt(0, MAGIC);
         assertEquals("Int not read from memory", MAGIC, 
                 buf.getInt(0));
@@ -81,7 +81,7 @@ public class PointerTest extends TestCase {
     public void testByteBufferGetLong() {
         final long MAGIC = 0x1234567887654321L;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         m.setLong(0, MAGIC);
         assertEquals("Long not read from memory", MAGIC, 
                 buf.getLong(0));
@@ -115,7 +115,7 @@ public class PointerTest extends TestCase {
     public void testIntBufferPut() {
         final int MAGIC = 0xABEDCF23;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         IntBuffer ib = buf.asIntBuffer();
         ib.put(MAGIC).flip();
         assertEquals("Int not written to memory", MAGIC, 
@@ -124,7 +124,7 @@ public class PointerTest extends TestCase {
     public void testLongBufferPut() {
         final long MAGIC = 0x1234567887654321L;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         LongBuffer lb = buf.asLongBuffer();
         lb.put(MAGIC).flip();
         assertEquals("Long not written to memory", MAGIC, 
@@ -133,7 +133,7 @@ public class PointerTest extends TestCase {
     public void testFloatBufferPut() {
         final float MAGIC = 1234.5678f;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         FloatBuffer fb = buf.asFloatBuffer();
         fb.put(MAGIC).flip();
         assertEquals("Int not written to memory", MAGIC, 
@@ -142,7 +142,7 @@ public class PointerTest extends TestCase {
     public void testDoubleBufferPut() {
         final double MAGIC = 1234.5678;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         DoubleBuffer db = buf.asDoubleBuffer();
         db.put(MAGIC).flip();
         assertEquals("Int not written to memory", MAGIC, 
@@ -151,7 +151,7 @@ public class PointerTest extends TestCase {
     public void testIntBufferGet() {
         final int MAGIC = 0xABEDCF23;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         IntBuffer ib = buf.asIntBuffer();
         m.setInt(0, MAGIC);
         assertEquals("Int not read from memory", MAGIC, 
@@ -160,7 +160,7 @@ public class PointerTest extends TestCase {
     public void testLongBufferGet() {
         final long MAGIC = 0x1234567887654321L;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         LongBuffer lb = buf.asLongBuffer();
         m.setLong(0, MAGIC);
         assertEquals("Long not read from memory", MAGIC, 
@@ -169,7 +169,7 @@ public class PointerTest extends TestCase {
     public void testFloatBufferGet() {
         final float MAGIC = 1234.5678f;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         FloatBuffer fb = buf.asFloatBuffer();
         m.setFloat(0, MAGIC);
         assertEquals("Float not read from memory", MAGIC, 
@@ -178,7 +178,7 @@ public class PointerTest extends TestCase {
     public void testDoubleBufferGet() {
         final double MAGIC = 1234.5678;
         Memory m = new Memory(8);
-        ByteBuffer buf = m.getByteBuffer(0, m.getSize()).order(ByteOrder.nativeOrder());
+        ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder());
         DoubleBuffer db = buf.asDoubleBuffer();
         m.setDouble(0, MAGIC);
         assertEquals("Double not read from memory", MAGIC, 
@@ -301,6 +301,22 @@ public class PointerTest extends TestCase {
         assertNotSame("Pointer element not updated[1]", orig[1], p[1]);
     }
 
+    public void testCreateConstantPointer() {
+        Pointer p = Pointer.createConstant(0xFFFFFFFF);
+        assertEquals("Wrong peer value", p.peer, 0xFFFFFFFF);
+
+        p = Pointer.createConstant(-1);
+        assertEquals("Wrong peer value", p.peer, -1);
+    }
+
+    public void testReadStringArrayNULLElement() {
+        Memory m = new Memory(Pointer.SIZE);
+        m.clear();
+        String[] arr = m.getStringArray(0, 1);
+        assertEquals("Wrong array size", 1, arr.length);
+        assertNull("Array element should be null", arr[0]);
+    }
+
     public static void main(String[] args) {
         junit.textui.TestRunner.run(PointerTest.class);
     }
diff --git a/test/com/sun/jna/StructureByValueTest.java b/test/com/sun/jna/StructureByValueTest.java
index c810dc7..f0b5679 100644
--- a/test/com/sun/jna/StructureByValueTest.java
+++ b/test/com/sun/jna/StructureByValueTest.java
@@ -91,14 +91,14 @@ public class StructureByValueTest extends TestCase {
     }
     public void testStructureArgByValue64() {
         ByValue64 data = new ByValue64();
-        final long DATA = (long)MAGIC;
+        final long DATA = MAGIC;
         data.data = DATA;
         assertEquals("Failed to pass 64-bit struct by value",
                      DATA, lib.testStructureByValueArgument64(data));
     }
     public void testStructureArgByValue128() {
         ByValue128 data = new ByValue128();
-        final long DATA = (long)MAGIC;
+        final long DATA = MAGIC;
         data.data = DATA;
         data.data1 = DATA;
         assertEquals("Failed to pass 128-bit struct by value",
diff --git a/test/com/sun/jna/StructureTest.java b/test/com/sun/jna/StructureTest.java
index e6ac623..a97d5ef 100644
--- a/test/com/sun/jna/StructureTest.java
+++ b/test/com/sun/jna/StructureTest.java
@@ -15,6 +15,8 @@ package com.sun.jna;
 import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.DoubleBuffer;
+import java.util.Arrays;
+import java.util.List;
 import java.util.Map;
 
 import junit.framework.TestCase;
@@ -26,6 +28,7 @@ import com.sun.jna.ptr.LongByReference;
 /** TODO: need more alignment tests, especially platform-specific behavior
  * @author twall at users.sf.net
  */
+ at SuppressWarnings("unused")
 public class StructureTest extends TestCase {
 
     public static void main(java.lang.String[] argList) {
@@ -610,10 +613,12 @@ public class StructureTest extends TestCase {
     }
     public void testBufferFieldReadUnchanged() {
         BufferStructure bs = new BufferStructure();
-        bs.buffer = ByteBuffer.allocateDirect(16);
+        Buffer b = ByteBuffer.allocateDirect(16);
+        bs.buffer = b;
         bs.dbuffer = ((ByteBuffer)bs.buffer).asDoubleBuffer();
         bs.write();
         bs.read();
+        assertEquals("Buffer field should be unchanged", b, bs.buffer);
     }
     public void testBufferFieldReadChanged() {
         BufferStructure bs = new BufferStructure();
@@ -975,36 +980,66 @@ public class StructureTest extends TestCase {
         assertEquals("Wrong field value (2)", 0, ts.uninitialized.longValue());
     }
 
-    public void testStructureFieldOrder() {
-        Structure.REQUIRES_FIELD_ORDER = true;
-        try {
-            class TestStructure extends Structure {
-                public int one = 1;
-                public int three = 3;
-                public int two = 2;
-                {
-                    setFieldOrder(new String[] { "one", "two", "three" });
-                }
+    public void testInheritedStructureFieldOrder() {
+        class TestStructure extends Structure {
+            public int first = 1;
+        }
+        class TestStructureSub extends TestStructure {
+            public int second = 2;
+        }
+        TestStructureSub s = new TestStructureSub();
+        assertEquals("Wrong size", 8, s.size());
+        s.write();
+        assertEquals("Wrong first field: " + s,
+                     s.first, s.getPointer().getInt(0));
+        assertEquals("Wrong second field: " + s,
+                     s.second, s.getPointer().getInt(4));
+    }
+
+    public void testExplicitStructureFieldOrder() {
+        final String[] ORDER = new String[] { "one", "two", "three" };
+        final String[] ORDER2 = new String[] { "one", "two", "three", "four" };
+        class TestStructure extends Structure {
+            public int one = 1;
+            public int three = 3;
+            public int two = 2;
+            {
+                setFieldOrder(ORDER);
             }
-            class DerivedTestStructure extends TestStructure {
-                public int four = 4;
-                {
-                    setFieldOrder(new String[] { "four" });
-                }
+            public List getFieldOrder() {
+                return super.getFieldOrder();
             }
-
-            DerivedTestStructure s = new DerivedTestStructure();
-            DerivedTestStructure s2 = new DerivedTestStructure();
-            s.write();
-            s2.write();
-            assertEquals("Wrong first field", 1, s.getPointer().getInt(0));
-            assertEquals("Wrong second field", 2, s.getPointer().getInt(4));
-            assertEquals("Wrong third field", 3, s.getPointer().getInt(8));
-            assertEquals("Wrong derived field", 4, s.getPointer().getInt(12));
         }
-        finally {
-            Structure.REQUIRES_FIELD_ORDER = false;
+        class DerivedTestStructure extends TestStructure {
+            public int four = 4;
+            {
+                setFieldOrder(new String[] { "four" });
+            }
         }
+        
+        TestStructure s = new TestStructure();
+        assertEquals("Wrong field order",
+                     Arrays.asList(ORDER), s.getFieldOrder());
+        s.write();
+        assertEquals("Wrong first field: " + s,
+                     s.one, s.getPointer().getInt(0));
+        assertEquals("Wrong second field: " + s,
+                     s.two, s.getPointer().getInt(4));
+        assertEquals("Wrong third field: " + s,
+                     s.three, s.getPointer().getInt(8));
+
+        DerivedTestStructure s2 = new DerivedTestStructure();
+        assertEquals("Wrong field order",
+                     Arrays.asList(ORDER2), s2.getFieldOrder());
+        s2.write();
+        assertEquals("Wrong first field: " + s2,
+                     s2.one, s2.getPointer().getInt(0));
+        assertEquals("Wrong second field: " + s2,
+                     s2.two, s2.getPointer().getInt(4));
+        assertEquals("Wrong third field: " + s2,
+                     s2.three, s2.getPointer().getInt(8));
+        assertEquals("Wrong derived field: " + s2,
+                     s2.four, s2.getPointer().getInt(12));
     }
 
     public void testCustomTypeMapper() {
@@ -1174,4 +1209,42 @@ public class StructureTest extends TestCase {
         assertSame("Nested ByReference structure field should reuse existing value",
                    value, s.next.next);
     }
+
+    public void testAvoidMemoryAllocationInPointerCTOR() {
+        class TestStructure extends Structure {
+            public int field;
+            public TestStructure(Pointer p) {
+                super(p);
+            }
+            protected Memory autoAllocate(int size) {
+                fail("Memory should not be auto-allocated");
+                return null;
+            }
+        }
+        Memory p = new Memory(4);
+        Structure s = new TestStructure(p);
+    }
+
+    public void testPointerCTORWithInitializedFields() {
+        class TestStructure extends Structure {
+            public byte[] field = new byte[256];
+            public TestStructure(Pointer p) {
+                super(p);
+            }
+        }
+        Memory p = new Memory(256);
+        Structure s = new TestStructure(p);
+        assertEquals("Wrong structure size", p.size(), s.size());
+    }
+
+    public void testEquals() {
+        class TestStructure extends Structure {
+            public int field;
+        }
+        Structure s = new TestStructure();
+        assertTrue("Should match self", s.equals(s));
+        assertFalse("Not equal null", s.equals(null));
+        assertFalse("Not equal some other object", s.equals(new Object()));
+    }
+
 }
diff --git a/test/com/sun/jna/TypeMapperTest.java b/test/com/sun/jna/TypeMapperTest.java
index 8c05375..ebc4a04 100644
--- a/test/com/sun/jna/TypeMapperTest.java
+++ b/test/com/sun/jna/TypeMapperTest.java
@@ -21,6 +21,7 @@ import java.util.HashMap;
 import java.util.Map;
 import junit.framework.TestCase;
 
+ at SuppressWarnings("unused")
 public class TypeMapperTest extends TestCase {
     public static interface TestLibrary extends Library {
         int returnInt32Argument(boolean b);
@@ -157,7 +158,7 @@ public class TypeMapperTest extends TestCase {
         mapper.addTypeConverter(Boolean.class, converter);
         Map options = new HashMap();
         options.put(Library.OPTION_TYPE_MAPPER, mapper);
-        StructureTestLibrary lib = (StructureTestLibrary)
+		StructureTestLibrary lib = (StructureTestLibrary)
             Native.loadLibrary("testlib", StructureTestLibrary.class, options);
         StructureTestLibrary.TestStructure s = new StructureTestLibrary.TestStructure(mapper);
         assertEquals("Wrong native size", 4, s.size());
diff --git a/test/com/sun/jna/UnionTest.java b/test/com/sun/jna/UnionTest.java
index da65c50..82b1e4c 100644
--- a/test/com/sun/jna/UnionTest.java
+++ b/test/com/sun/jna/UnionTest.java
@@ -14,6 +14,7 @@ package com.sun.jna;
 
 import junit.framework.TestCase;
 
+ at SuppressWarnings("unused")
 public class UnionTest extends TestCase {
 
     public static class TestStructure extends Structure {
diff --git a/test/com/sun/jna/examples/win32/Kernel32Test.java b/test/com/sun/jna/examples/win32/Kernel32Test.java
deleted file mode 100644
index cec0db1..0000000
--- a/test/com/sun/jna/examples/win32/Kernel32Test.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
- * 
- * 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.  
- */
-package com.sun.jna.examples.win32;
-
-import java.util.Calendar;
-import java.util.TimeZone;
-import junit.framework.TestCase;
-import com.sun.jna.*;
-import com.sun.jna.examples.win32.*;
-
-public class Kernel32Test extends TestCase {
-    
-    public void testGetDriveType() {
-        if (!Platform.isWindows()) return;
-        
-        Kernel32 kernel = Kernel32.INSTANCE;
-        assertEquals("Wrong drive type.", Kernel32.DRIVE_FIXED, kernel.GetDriveType("c:"));
-    }
-    
-    public void testStructureOutArgument() {
-        Kernel32 kernel = Kernel32.INSTANCE;
-        Kernel32.SYSTEMTIME time = new Kernel32.SYSTEMTIME();
-        kernel.GetSystemTime(time);
-        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
-        assertEquals("Hour not properly set",
-                     cal.get(Calendar.HOUR_OF_DAY), time.wHour);
-        assertEquals("Day not properly set",
-                     cal.get(Calendar.DAY_OF_WEEK)-1,
-                     time.wDayOfWeek);
-        assertEquals("Year not properly set", 
-                     cal.get(Calendar.YEAR), time.wYear);
-    }
-    
-    public void testGetLastError() {
-        Kernel32 kernel = Kernel32.INSTANCE;
-        int ERRCODE  = 8;
-        
-        kernel.SetLastError(ERRCODE);
-        int code = kernel.GetLastError();
-        assertEquals("Wrong error value after SetLastError", ERRCODE, code);
-        
-        if (kernel.GetProcessVersion(-1) == 0) {
-            final int INVALID_PARAMETER = 87;
-            code = kernel.GetLastError();
-            assertEquals("Wrong error value after failed syscall", INVALID_PARAMETER, code);
-        }
-        else {
-            fail("GetProcessId(NULL) should fail");
-        }
-    }
-    
-    public void testConvertHWND_BROADCAST() {
-        W32API.HWND hwnd = W32API.HWND_BROADCAST;
-        NativeMappedConverter.getInstance(hwnd.getClass()).toNative(hwnd, null);
-    }
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(Kernel32Test.class);
-    }
-}
diff --git a/test/com/sun/jna/win32/W32APIMapperTest.java b/test/com/sun/jna/win32/W32APIMapperTest.java
index 1af9c99..e6c98a0 100644
--- a/test/com/sun/jna/win32/W32APIMapperTest.java
+++ b/test/com/sun/jna/win32/W32APIMapperTest.java
@@ -12,12 +12,12 @@
  */
 package com.sun.jna.win32;
 
+import junit.framework.TestCase;
+
 import com.sun.jna.Library;
 import com.sun.jna.Native;
 import com.sun.jna.Pointer;
 import com.sun.jna.Structure;
-import com.sun.jna.examples.win32.W32API;
-import junit.framework.TestCase;
 
 public class W32APIMapperTest extends TestCase {
 
@@ -55,10 +55,10 @@ public class W32APIMapperTest extends TestCase {
     protected void setUp() {
         unicode = (UnicodeLibrary)
             Native.loadLibrary("testlib", UnicodeLibrary.class, 
-                               W32API.UNICODE_OPTIONS);
+            		W32APIOptions.UNICODE_OPTIONS);
         ascii = (ASCIILibrary)
             Native.loadLibrary("testlib", ASCIILibrary.class, 
-                               W32API.ASCII_OPTIONS);
+            		W32APIOptions.ASCII_OPTIONS);
     }
     
     protected void tearDown() {
@@ -66,6 +66,15 @@ public class W32APIMapperTest extends TestCase {
         ascii = null;
     }
 
+    public void testInvalidHandleValue() {
+        String expected = "opaque at 0xffffffff";
+        if (Pointer.SIZE == 8) {
+            expected += "ffffffff";
+        }
+        assertEquals("Wrong value", expected,
+        		Pointer.createConstant(Pointer.SIZE == 8 ? -1 : 0xFFFFFFFFL).toString());
+    }
+
     public void testBooleanArgumentConversion() {
         assertTrue("Wrong boolean TRUE argument conversion (unicode)",
                    unicode.returnInt32Argument(true));


hooks/post-receive
-- 
Packaging for libjna-java a library for dynamic access of native libraries from Java without JNI



More information about the pkg-java-commits mailing list