Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp	(revision 63016)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp	(revision 63017)
@@ -1,4 +1,3 @@
 /* $Id$ */
-
 /** @file
  * VBoxVideo Display D3D User mode dll
@@ -62,5 +61,5 @@
     if (!pD3D->hD3DLib)
     {
-        DWORD winErr = GetLastError();
+        DWORD winErr = GetLastError(); NOREF(winErr)
         WARN((__FUNCTION__": LoadLibrary failed, winErr = (%d)", winErr));
         return E_FAIL;
@@ -1146,5 +1145,5 @@
     }
 
-#if DEBUG
+#ifdef DEBUG
     vboxDispCheckCapsLevel(pCaps);
 #endif
@@ -1202,5 +1201,5 @@
     pCaps->MaxVertexW = 10000000000.f; /* Required by D3D feature level 9.3. */
 
-#if DEBUG
+#ifdef DEBUG
     vboxDispCheckCapsLevel(pCaps);
 #endif
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h	(revision 63016)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h	(revision 63017)
@@ -1,4 +1,3 @@
 /* $Id$ */
-
 /** @file
  * VBoxVideo Display D3D User mode dll
@@ -23,25 +22,5 @@
 #include <iprt/critsect.h>
 #include <iprt/semaphore.h>
-
-#       define _InterlockedExchange           _InterlockedExchange_StupidDDKVsCompilerCrap
-#       define _InterlockedExchangeAdd        _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
-#       define _InterlockedCompareExchange    _InterlockedCompareExchange_StupidDDKVsCompilerCrap
-#       define _InterlockedAddLargeStatistic  _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandset      _interlockedbittestandset_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandreset    _interlockedbittestandreset_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandset64    _interlockedbittestandset64_StupidDDKVsCompilerCrap
-#       define _interlockedbittestandreset64  _interlockedbittestandreset64_StupidDDKVsCompilerCrap
-#       pragma warning(disable : 4163)
-#include <D3D9.h>
-#       pragma warning(default : 4163)
-#       undef  _InterlockedExchange
-#       undef  _InterlockedExchangeAdd
-#       undef  _InterlockedCompareExchange
-#       undef  _InterlockedAddLargeStatistic
-#       undef  _interlockedbittestandset
-#       undef  _interlockedbittestandreset
-#       undef  _interlockedbittestandset64
-#       undef  _interlockedbittestandreset64
-
+#include <iprt/win/d3d9.h>
 #include "../../../Wine_new/vbox/VBoxWineEx.h"
 
@@ -103,6 +82,6 @@
 } VBOXWDDMDISP_D3D, *PVBOXWDDMDISP_D3D;
 
-void VBoxDispD3DGlobalInit();
-void VBoxDispD3DGlobalTerm();
+void VBoxDispD3DGlobalInit(void);
+void VBoxDispD3DGlobalTerm(void);
 HRESULT VBoxDispD3DGlobalOpen(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats);
 void VBoxDispD3DGlobalClose(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats);
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h	(revision 63016)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h	(revision 63017)
@@ -1,4 +1,3 @@
 /* $Id$ */
-
 /** @file
  * VBoxVideo Display D3D User mode dll
@@ -89,6 +88,6 @@
 #define VBOXUHGSMDXALLOCBASE_GET_BUFFER(_p) VBOXUHGSMIPRIVATEBASE_GET_PRIVATE(_p, VBOXUHGSMI_BUFFER_PRIVATE_DX_ALLOC_BASE)
 
-DECLINLINE(int) vboxUhgsmiBaseDxLockData(PVBOXUHGSMI_BUFFER_PRIVATE_DX_ALLOC_BASE pPrivate, uint32_t offLock, uint32_t cbLock, VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags,
-                                    D3DDDICB_LOCKFLAGS *pfFlags, UINT *pNumPages)
+DECLINLINE(int) vboxUhgsmiBaseDxLockData(PVBOXUHGSMI_BUFFER_PRIVATE_DX_ALLOC_BASE pPrivate, uint32_t offLock, uint32_t cbLock,
+                                         VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, D3DDDICB_LOCKFLAGS *pfFlags, UINT *pNumPages)
 {
     PVBOXUHGSMI_BUFFER pBuf = &pPrivate->BasePrivate.Base;
@@ -143,5 +142,6 @@
 }
 
-DECLINLINE(void) vboxUhgsmiBaseDxAllocInfoFill(D3DDDI_ALLOCATIONINFO *pDdiAllocInfo, VBOXWDDM_ALLOCINFO *pAllocInfo, uint32_t cbBuffer, VBOXUHGSMI_BUFFER_TYPE_FLAGS fUhgsmiType)
+DECLINLINE(void) vboxUhgsmiBaseDxAllocInfoFill(D3DDDI_ALLOCATIONINFO *pDdiAllocInfo, VBOXWDDM_ALLOCINFO *pAllocInfo,
+                                               uint32_t cbBuffer, VBOXUHGSMI_BUFFER_TYPE_FLAGS fUhgsmiType)
 {
     memset(pDdiAllocInfo, 0, sizeof (*pDdiAllocInfo));
@@ -155,7 +155,7 @@
 
 DECLINLINE(int) vboxUhgsmiBaseDxDmaFill(PVBOXUHGSMI_BUFFER_SUBMIT aBuffers, uint32_t cBuffers,
-        VOID* pCommandBuffer, UINT *pCommandBufferSize,
-        D3DDDI_ALLOCATIONLIST *pAllocationList, UINT AllocationListSize,
-        D3DDDI_PATCHLOCATIONLIST *pPatchLocationList, UINT PatchLocationListSize)
+                                        VOID *pCommandBuffer, UINT *pCommandBufferSize,
+                                        D3DDDI_ALLOCATIONLIST *pAllocationList, UINT AllocationListSize,
+                                        D3DDDI_PATCHLOCATIONLIST *pPatchLocationList, UINT PatchLocationListSize)
 {
     const uint32_t cbDmaCmd = RT_OFFSETOF(VBOXWDDM_DMA_PRIVATEDATA_UM_CHROMIUM_CMD, aBufInfos[cBuffers]);
@@ -215,4 +215,5 @@
 DECLCALLBACK(int) vboxUhgsmiBaseEscBufferDestroy(PVBOXUHGSMI_BUFFER pBuf);
 DECLCALLBACK(int) vboxUhgsmiBaseEscBufferCreate(PVBOXUHGSMI pHgsmi, uint32_t cbBuf, VBOXUHGSMI_BUFFER_TYPE_FLAGS fUhgsmiType, PVBOXUHGSMI_BUFFER* ppBuf);
+
 DECLINLINE(void) vboxUhgsmiBaseInit(PVBOXUHGSMI_PRIVATE_BASE pHgsmi, PFNVBOXCRHGSMI_ESCAPE pfnEscape)
 {
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/libWineStub/include/wine/debug.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/libWineStub/include/wine/debug.h	(revision 63016)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/libWineStub/include/wine/debug.h	(revision 63017)
@@ -277,7 +277,7 @@
 
 #define WINE_DECLARE_DEBUG_CHANNEL(ch) \
-    static struct __wine_debug_channel __wine_dbch_##ch = { ~0, #ch }
+    static struct __wine_debug_channel __wine_dbch_##ch = { /*was: ~0, VBox:*/ UINT8_MAX, #ch }
 #define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
-    static struct __wine_debug_channel __wine_dbch_##ch = { ~0, #ch }; \
+    static struct __wine_debug_channel __wine_dbch_##ch = { /*was: ~0, VBox:*/ UINT8_MAX, #ch }; \
     static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/vboxext.c
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/vboxext.c	(revision 63016)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/vboxext.c	(revision 63017)
@@ -335,10 +335,10 @@
 static DWORD g_cVBoxExtInits = 0;
 
-static DWORD vboxExtAddRef()
+static DWORD vboxExtAddRef(void)
 {
     return ++g_cVBoxExtInits;
 }
 
-static DWORD vboxExtRelease()
+static DWORD vboxExtRelease(void)
 {
     DWORD cVBoxExtInits = --g_cVBoxExtInits;
@@ -347,10 +347,10 @@
 }
 
-static DWORD vboxExtGetRef()
+static DWORD vboxExtGetRef(void)
 {
     return g_cVBoxExtInits;
 }
 
-HRESULT VBoxExtCheckInit()
+HRESULT VBoxExtCheckInit(void)
 {
     HRESULT hr = S_OK;
@@ -368,5 +368,5 @@
 }
 
-HRESULT VBoxExtCheckTerm()
+HRESULT VBoxExtCheckTerm(void)
 {
     HRESULT hr = S_OK;
