Index: /trunk/include/VBox/ostypes.h
===================================================================
--- /trunk/include/VBox/ostypes.h	(revision 53007)
+++ /trunk/include/VBox/ostypes.h	(revision 53008)
@@ -70,4 +70,6 @@
     VBOXOSTYPE_Win81            = 0x3A000,
     VBOXOSTYPE_Win81_x64        = 0x3A100,
+    VBOXOSTYPE_Win10            = 0x3B000,
+    VBOXOSTYPE_Win10_x64        = 0x3B100,
     VBOXOSTYPE_OS2              = 0x40000,
     VBOXOSTYPE_OS2Warp3         = 0x41000,
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.cpp	(revision 53008)
@@ -52,7 +52,7 @@
     ULONG major, minor, build;
     BOOLEAN checkedBuild;
-    static vboxWinVersion_t s_WinVersion = UNKNOWN_WINVERSION;
-
-    if (s_WinVersion != UNKNOWN_WINVERSION)
+    static vboxWinVersion_t s_WinVersion = WINVERSION_UNKNOWN;
+
+    if (s_WinVersion != WINVERSION_UNKNOWN)
         return s_WinVersion;
 
@@ -60,19 +60,21 @@
     LOG(("running on version %d.%d, build %d(checked=%d)", major, minor, build, (int)checkedBuild));
 
-    if(major == 6)
-    {
-        if (minor == 3)
-            s_WinVersion = WIN81;
+    if (major == 6)
+    {
+        if (minor >= 4)
+            s_WinVersion = WINVERSION_10;
+        else if (minor == 3)
+            s_WinVersion = WINVERSION_81;
         else if (minor == 2)
-            s_WinVersion = WIN8;
+            s_WinVersion = WINVERSION_8;
         else if (minor == 1)
-            s_WinVersion = WIN7;
+            s_WinVersion = WINVERSION_7;
         else if (minor == 0)
-            s_WinVersion = WINVISTA; /* Or Windows Server 2008. */
+            s_WinVersion = WINVERSION_VISTA; /* Or Windows Server 2008. */
     }
     else if (major == 5)
-        s_WinVersion = (minor>=1) ? WINXP:WIN2K;
+        s_WinVersion = (minor>=1) ? WINVERSION_XP: WINVERSION_2K;
     else if (major == 4)
-        s_WinVersion = WINNT4;
+        s_WinVersion = WINVERSION_NT4;
     else
         WARN(("NT4 required!"));
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.h
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.h	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.h	(revision 53008)
@@ -88,12 +88,13 @@
 typedef enum
 {
-    UNKNOWN_WINVERSION = 0,
-    WINNT4    = 1,
-    WIN2K     = 2,
-    WINXP     = 3,
-    WINVISTA  = 4,
-    WIN7      = 5,
-    WIN8      = 6,
-    WIN81     = 7
+    WINVERSION_UNKNOWN = 0,
+    WINVERSION_NT4     = 1,
+    WINVERSION_2K      = 2,
+    WINVERSION_XP      = 3,
+    WINVERSION_VISTA   = 4,
+    WINVERSION_7       = 5,
+    WINVERSION_8       = 6,
+    WINVERSION_81      = 7,
+    WINVERSION_10      = 8
 } vboxWinVersion_t;
 
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp	(revision 53008)
@@ -619,5 +619,5 @@
 
     vboxWinVersion_t ver = VBoxQueryWinVersion();
-    if (ver == WINVISTA)
+    if (ver == WINVERSION_VISTA)
     {
         pKeyPrefix = VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_VISTA;
@@ -626,5 +626,5 @@
     else
     {
-        Assert(ver == WIN7 || ver == WIN8 || ver == WIN81);
+        Assert(ver > WINVERSION_VISTA);
         pKeyPrefix = VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_WIN7;
         cbKeyPrefix = sizeof (VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_WIN7);
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp	(revision 53008)
@@ -7431,5 +7431,5 @@
         else if (major == 6)
         {
-            if (minor > 3)
+            if (minor > 4)
             {
                 WARN(("Unknow win version, newer minor release, assuming 3D check is required"));
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp	(revision 53008)
@@ -104,5 +104,5 @@
         VideoPortZeroMemory(tmpRanges, sizeof(tmpRanges));
 
-        if (VBoxQueryWinVersion() == WINNT4)
+        if (VBoxQueryWinVersion() == WINVERSION_NT4)
         {
             /* NT crashes if either of 'vendorId, 'deviceId' or 'slot' parameters is NULL,
@@ -758,10 +758,10 @@
     switch (VBoxQueryWinVersion())
     {
-        case WINNT4:
-            LOG(("WINNT4"));
+        case WINVERSION_NT4:
+            LOG(("WINVERSION_NT4"));
             vhwData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
             break;
-        case WIN2K:
-            LOG(("WIN2K"));
+        case WINVERSION_2K:
+            LOG(("WINVERSION_2K"));
             vhwData.HwInitDataSize = SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA;
             break;
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.cpp	(revision 53008)
@@ -427,5 +427,5 @@
     if (pContext)
     {
-        VideoPortZeroMemory(pContext, size);
+        VideoPortZeroMemory(pContext, (ULONG)size);
         pContext->cContexts = cDisplays;
         pContext->pCommon = pCommon;
Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPVideoPortAPI.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPVideoPortAPI.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPVideoPortAPI.cpp	(revision 53008)
@@ -89,5 +89,5 @@
     VideoPortZeroMemory(pAPI, sizeof(VBOXVIDEOPORTPROCS));
 
-    if (VBoxQueryWinVersion() <= WINNT4)
+    if (VBoxQueryWinVersion() <= WINVERSION_NT4)
     {
         /* VideoPortGetProcAddress is available for >= win2k */
Index: /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi	(revision 53008)
@@ -665,4 +665,5 @@
   StrCmp $g_strWinVersion "8" vista     ; Windows 8
   StrCmp $g_strWinVersion "8_1" vista   ; Windows 8.1 / Windows 2012 Server R2
+  StrCmp $g_strWinVersion "10" vista    ; Windows 10
 
   ${If} $g_bForceInstall == "true"
@@ -762,4 +763,5 @@
   ${OrIf} $R0 == '8'     ; Windows 8.
   ${OrIf} $R0 == '8_1'   ; Windows 8.1 / Windows Server 2012 R2.
+  ${OrIf} $R0 == '10'    ; Windows 10.
     ; Use VBoxCredProv on Vista and up.
     ${LogVerbose} "Installing VirtualBox credential provider ..."
@@ -1026,4 +1028,5 @@
     ${If}   $g_strWinVersion != "8"   ; On Windows 8 WDDM is mandatory
     ${AndIf} $g_strWinVersion != "8_1" ; ... also on Windows 8.1 / Windows 2012 Server R2
+    ${AndIf} $g_strWinVersion != "10" ; ... also on Windows 10
       StrCpy $g_bWithWDDM "false"
     ${EndIf}
@@ -1204,8 +1207,9 @@
     !insertmacro SelectSection ${SEC03}
   ${EndIf}
-  ; On Windows 8 / 8.1 / Windows Server 2012 R2 we always select the 3D
+  ; On Windows 8 / 8.1 / Windows Server 2012 R2 and newer we always select the 3D
   ; section and disable it so that it cannot be deselected again
   ${If}   $g_strWinVersion == "8"
   ${OrIf} $g_strWinVersion == "8_1"
+  ${OrIf} $g_strWinVersion == "10"
     IntOp $0 ${SF_SELECTED} | ${SF_RO}
     SectionSetFlags ${SEC03} $0
Index: /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh	(revision 53008)
@@ -545,4 +545,5 @@
   ${OrIf} $g_strWinVersion == "8"
   ${OrIf} $g_strWinVersion == "8_1"
+  ${OrIf} $g_strWinVersion == "10"
     StrCpy $g_bCapWDDM "true"
     ${LogVerbose} "OS is WDDM driver capable"
@@ -552,4 +553,5 @@
   ${If}   $g_strWinVersion == "8"
   ${OrIf} $g_strWinVersion == "8_1"
+  ${OrIf} $g_strWinVersion == "10"
     StrCpy $g_bWithWDDM "true"
     ${LogVerbose} "OS needs WDDM driver by default"
@@ -576,4 +578,5 @@
   ${OrIf} $g_strWinVersion == "8"
   ${OrIf} $g_strWinVersion == "8_1"
+  ${OrIf} $g_strWinVersion == "10"
     StrCpy $g_bCapDllCache "true"
     ${LogVerbose}  "OS has a DLL cache"
Index: /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstall.nsh
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstall.nsh	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstall.nsh	(revision 53008)
@@ -87,4 +87,5 @@
   StrCmp $g_strWinVersion "8" vista     ; Windows 8
   StrCmp $g_strWinVersion "8_1" vista   ; Windows 8.1 / Windows Server 2012 R2
+  StrCmp $g_strWinVersion "10" vista    ; Windows 10
 
   ${If} $g_bForceInstall == "true"
@@ -146,4 +147,5 @@
   StrCmp $g_strWinVersion "8" vista     ; Windows 8
   StrCmp $g_strWinVersion "8_1" vista   ; Windows 8.1 / Windows Server 2012 R2
+  StrCmp $g_strWinVersion "10" vista    ; Windows 10
 
   ${If} $g_bForceInstall == "true"
Index: /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh	(revision 53008)
@@ -122,4 +122,5 @@
   ${OrIf} $g_strWinVersion == "8"
   ${OrIf} $g_strWinVersion == "8_1"
+  ${OrIf} $g_strWinVersion == "10"
     StrCpy $reg_path_device "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000"
     StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\Control\VIDEO\$dev_id\0000\Mon00000001"
@@ -235,4 +236,5 @@
     ${If} $g_strWinVersion == "8"
     ${OrIf} $g_strWinVersion == "8_1"
+    ${OrIf} $g_strWinVersion == "10"
       !ifdef VBOX_SIGN_ADDITIONS
         FILE "$%PATH_OUT%\bin\additions\VBoxVideoW8.cat"
@@ -396,5 +398,6 @@
       ${If} $g_strWinVersion == "8"
       ${OrIf} $g_strWinVersion == "8_1"
-        ${LogVerbose} "Installing WDDM video driver for Windows 8..."
+      ${OrIf} $g_strWinVersion == "10"
+        ${LogVerbose} "Installing WDDM video driver for Windows 8 or newer..."
         ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoW8.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false"
       ${Else}
@@ -466,5 +469,6 @@
     SetRegView 32
     ; Write additional keys required for Windows XP, Vista and 7 64-bit (but for 32-bit stuff)
-    ${If} $g_strWinVersion   == '8_1'
+    ${If} $g_strWinVersion   == '10'
+    ${OrIf} $g_strWinVersion == '8_1'
     ${OrIf} $g_strWinVersion == '8'
     ${OrIf} $g_strWinVersion == '7'
Index: /trunk/src/VBox/Additions/WINNT/Installer/winver.nsh
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Installer/winver.nsh	(revision 53007)
+++ /trunk/src/VBox/Additions/WINNT/Installer/winver.nsh	(revision 53008)
@@ -67,5 +67,6 @@
   StrCmp $R1 '6.1' lbl_winnt_7
   StrCmp $R1 '6.2' lbl_winnt_8
-  StrCmp $R1 '6.3' lbl_winnt_8_1 lbl_error
+  StrCmp $R1 '6.3' lbl_winnt_8_1
+  StrCmp $R1 '6.4' lbl_winnt_10 lbl_error
 
   lbl_winnt_x:
@@ -101,4 +102,8 @@
   Goto lbl_done
 
+  lbl_winnt_10:
+    Strcpy $R0 '10'
+  Goto lbl_done
+
   lbl_error:
     Strcpy $R0 ''
Index: /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp	(revision 53007)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp	(revision 53008)
@@ -130,4 +130,7 @@
                 case 3:
                     g_enmVbgdNtVer = VBGDNTVER_WIN81;
+                    break;
+                case 4:
+                    g_enmVbgdNtVer = VBGDNTVER_WIN10;
                     break;
                 default:
@@ -1311,4 +1314,12 @@
             break;
 
+        case VBGDNTVER_WIN10:
+#if ARCH_BITS == 64
+            enmOsType = VBOXOSTYPE_Win10_x64;
+#else
+            enmOsType = VBOXOSTYPE_Win10;
+#endif
+            break;
+
         default:
             /* We don't know, therefore NT family. */
Index: /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h	(revision 53007)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h	(revision 53008)
@@ -137,4 +137,5 @@
     VBGDNTVER_WIN8,
     VBGDNTVER_WIN81,
+    VBGDNTVER_WIN10
 } VBGDNTVER;
 extern VBGDNTVER g_enmVbgdNtVer;
