Index: trunk/include/VBox/Graphics/VBoxUhgsmi.h
===================================================================
--- trunk/include/VBox/Graphics/VBoxUhgsmi.h	(revision 76375)
+++ trunk/include/VBox/Graphics/VBoxUhgsmi.h	(revision 76376)
@@ -35,48 +35,39 @@
 typedef struct VBOXUHGSMI_BUFFER *PVBOXUHGSMI_BUFFER;
 
-typedef struct VBOXUHGSMI_BUFFER_TYPE_FLAGS
+typedef union VBOXUHGSMI_BUFFER_TYPE_FLAGS
 {
-    union
+    uint32_t Value;
+    struct
     {
-        struct
-        {
-            uint32_t fCommand    : 1;
-            uint32_t Reserved    : 31;
-        } RT_STRUCT_NM(s);
-        uint32_t Value;
-    } RT_UNION_NM(u);
+        uint32_t fCommand       : 1;
+        uint32_t Reserved       : 31;
+    } s;
 } VBOXUHGSMI_BUFFER_TYPE_FLAGS;
 
-typedef struct VBOXUHGSMI_BUFFER_LOCK_FLAGS
+typedef union VBOXUHGSMI_BUFFER_LOCK_FLAGS
 {
-    union
+    uint32_t Value;
+    struct
     {
-        struct
-        {
-            uint32_t bReadOnly   : 1;
-            uint32_t bWriteOnly  : 1;
-            uint32_t bDonotWait  : 1;
-            uint32_t bDiscard    : 1;
-            uint32_t bLockEntire : 1;
-            uint32_t Reserved    : 27;
-        } RT_STRUCT_NM(s);
-        uint32_t Value;
-    } RT_UNION_NM(u);
+        uint32_t fReadOnly      : 1;
+        uint32_t fWriteOnly     : 1;
+        uint32_t fDonotWait     : 1;
+        uint32_t fDiscard       : 1;
+        uint32_t fLockEntire    : 1;
+        uint32_t Reserved       : 27;
+    } s;
 } VBOXUHGSMI_BUFFER_LOCK_FLAGS;
 
-typedef struct VBOXUHGSMI_BUFFER_SUBMIT_FLAGS
+typedef union VBOXUHGSMI_BUFFER_SUBMIT_FLAGS
 {
-    union
+    uint32_t Value;
+    struct
     {
-        struct
-        {
-            uint32_t bHostReadOnly          : 1;
-            uint32_t bHostWriteOnly         : 1;
-            uint32_t bDoNotRetire           : 1; /**< the buffer will be used in a subsequent command */
-            uint32_t bEntireBuffer          : 1;
-            uint32_t Reserved               : 28;
-        } RT_STRUCT_NM(s);
-        uint32_t Value;
-    } RT_UNION_NM(u);
+        uint32_t fHostReadOnly  : 1;
+        uint32_t fHostWriteOnly : 1;
+        uint32_t fDoNotRetire   : 1; /**< the buffer will be used in a subsequent command */
+        uint32_t fEntireBuffer  : 1;
+        uint32_t Reserved       : 28;
+    } s;
 } VBOXUHGSMI_BUFFER_SUBMIT_FLAGS, *PVBOXUHGSMI_BUFFER_SUBMIT_FLAGS;
 
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.cpp	(revision 76375)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.cpp	(revision 76376)
@@ -48,5 +48,5 @@
     *phSynch = NULL;
 
-    if (fUhgsmiType.fCommand)
+    if (fUhgsmiType.s.fCommand)
     {
         *phSynch = CreateEvent(
@@ -186,5 +186,5 @@
         PVBOXUHGSMI_BUFFER_PRIVATE_ESC_BASE pBuf = VBOXUHGSMIESCBASE_GET_BUFFER(pBufInfo->pBuf);
         pSubmInfo->hAlloc = pBuf->Alloc.hAlloc;
-        if (pBufInfo->fFlags.bEntireBuffer)
+        if (pBufInfo->fFlags.s.fEntireBuffer)
         {
             pSubmInfo->Info.offData = 0;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h	(revision 76375)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h	(revision 76376)
@@ -94,5 +94,5 @@
     D3DDDICB_LOCKFLAGS fLockFlags;
     fLockFlags.Value = 0;
-    if (fFlags.bLockEntire)
+    if (fFlags.s.fLockEntire)
     {
         Assert(!offLock);
@@ -126,8 +126,8 @@
     }
 
-    fLockFlags.ReadOnly = fFlags.bReadOnly;
-    fLockFlags.WriteOnly = fFlags.bWriteOnly;
-    fLockFlags.DonotWait = fFlags.bDonotWait;
-//    fLockFlags.Discard = fFlags.bDiscard;
+    fLockFlags.ReadOnly  = fFlags.s.fReadOnly;
+    fLockFlags.WriteOnly = fFlags.s.fWriteOnly;
+    fLockFlags.DonotWait = fFlags.s.fDonotWait;
+//    fLockFlags.Discard = fFlags.s.fDiscard;
     *pfFlags = fLockFlags;
     return VINF_SUCCESS;
@@ -173,7 +173,7 @@
         pAllocationList->hAllocation = pBuffer->hAllocation;
         pAllocationList->Value = 0;
-        pAllocationList->WriteOperation = !pBufInfo->fFlags.bHostReadOnly;
-        pAllocationList->DoNotRetireInstance = pBufInfo->fFlags.bDoNotRetire;
-        if (pBufInfo->fFlags.bEntireBuffer)
+        pAllocationList->WriteOperation = !pBufInfo->fFlags.s.fHostReadOnly;
+        pAllocationList->DoNotRetireInstance = pBufInfo->fFlags.s.fDoNotRetire;
+        if (pBufInfo->fFlags.s.fEntireBuffer)
         {
             pBufSubmInfo->offData = 0;
Index: trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiKmt.cpp
===================================================================
--- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiKmt.cpp	(revision 76375)
+++ trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiKmt.cpp	(revision 76376)
@@ -54,5 +54,6 @@
 }
 
-DECLCALLBACK(int) vboxUhgsmiKmtBufferLock(PVBOXUHGSMI_BUFFER pBuf, uint32_t offLock, uint32_t cbLock, VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, void**pvLock)
+DECLCALLBACK(int) vboxUhgsmiKmtBufferLock(PVBOXUHGSMI_BUFFER pBuf, uint32_t offLock, uint32_t cbLock,
+                                          VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, void**pvLock)
 {
     PVBOXUHGSMI_BUFFER_PRIVATE_DX_ALLOC_BASE pBuffer = VBOXUHGSMDXALLOCBASE_GET_BUFFER(pBuf);
Index: trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
===================================================================
--- trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c	(revision 76375)
+++ trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c	(revision 76376)
@@ -241,5 +241,5 @@
     VBOXUHGSMI_BUFFER_TYPE_FLAGS Flags = {0};
     pClient->pHgsmi = pHgsmi;
-    Flags.fCommand = 1;
+    Flags.s.fCommand = 1;
     rc = pHgsmi->pfnBufferCreate(pHgsmi, CRVBOXHGSMI_PAGE_ALIGN(1), Flags, &pClient->pCmdBuffer);
     if (RT_SUCCESS(rc))
@@ -417,10 +417,9 @@
     int rc;
     fFlags.Value = 0;
-    fFlags.bDiscard = 1;
+    fFlags.s.fDiscard = 1;
     rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr);
     if (RT_SUCCESS(rc))
         return pHdr;
-    else
-        crWarning("_crVBoxHGSMICmdBufferLock: pfnLock failed rc %d", rc);
+    crWarning("_crVBoxHGSMICmdBufferLock: pfnLock failed rc %d", rc);
 
     crWarning("Failed to Lock the command buffer of size(%d), rc(%d)\n", cbBuffer, rc);
@@ -444,5 +443,5 @@
     int rc;
     fFlags.Value = 0;
-    fFlags.bReadOnly = 1;
+    fFlags.s.fReadOnly = 1;
     rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr);
     if (RT_FAILURE(rc))
@@ -465,5 +464,5 @@
 
     fFlags.Value = 0;
-    fFlags.bReadOnly = 1;
+    fFlags.s.fReadOnly = 1;
     rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, sizeof (*pHdr), fFlags, (void**)&pHdr);
     if (RT_FAILURE(rc))
@@ -515,5 +514,5 @@
     pSubm->cbData = cbData;
     pSubm->fFlags.Value = 0;
-    pSubm->fFlags.bDoNotRetire = 1;
+    pSubm->fFlags.s.fDoNotRetire = 1;
 # if 0
     pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since
@@ -1615,5 +1614,5 @@
     aSubmit[1].cbData = pRecvBuffer->cbBuffer;
     aSubmit[1].fFlags.Value = 0;
-    aSubmit[1].fFlags.bHostWriteOnly = 1;
+    aSubmit[1].fFlags.s.fHostWriteOnly = 1;
 
     rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
@@ -1702,6 +1701,6 @@
         offBuffer = 0;
         fFlags.Value = 0;
-        fFlags.bDiscard = 1;
-        fFlags.bWriteOnly = 1;
+        fFlags.s.fDiscard = 1;
+        fFlags.s.fWriteOnly = 1;
         rc = pBuf->pfnLock(pBuf, 0, len, fFlags, &pvBuf);
         if (RT_SUCCESS(rc))
@@ -1740,5 +1739,5 @@
         aSubmit[1].cbData = len;
         aSubmit[1].fFlags.Value = 0;
-        aSubmit[1].fFlags.bHostReadOnly = 1;
+        aSubmit[1].fFlags.s.fHostReadOnly = 1;
 
         aSubmit[2].pBuf = pRecvBuffer;
@@ -1862,5 +1861,5 @@
         aSubmit[1].cbData = len;
         aSubmit[1].fFlags.Value = 0;
-        aSubmit[1].fFlags.bHostReadOnly = 1;
+        aSubmit[1].fFlags.s.fHostReadOnly = 1;
 
         rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
@@ -1894,5 +1893,5 @@
         aSubmit[1].cbData = len;
         aSubmit[1].fFlags.Value = 0;
-        aSubmit[1].fFlags.bHostReadOnly = 1;
+        aSubmit[1].fFlags.s.fHostReadOnly = 1;
 
         rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
