Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp	(revision 44987)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-legacy.cpp	(revision 44988)
@@ -25,4 +25,5 @@
 #include <VBox/version.h>
 #include <VBox/VBoxGuestLib.h>
+#include <iprt/string.h>
 
 
@@ -79,5 +80,5 @@
     RtlInitUnicodeString(&szDevName, VBOXGUEST_DEVICE_NAME_NT);
     PDEVICE_OBJECT pDeviceObject = NULL;
-    rc = IoCreateDevice(pDrvObj, sizeof(VBOXGUESTDEVEXT), &szDevName, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject);
+    rc = IoCreateDevice(pDrvObj, sizeof(VBOXGUESTDEVEXTWIN), &szDevName, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject);
     if (NT_SUCCESS(rc))
     {
@@ -96,15 +97,15 @@
             Log(("VBoxGuest::vbgdNt4CreateDevice: Setting up device extension ...\n"));
 
-            PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDeviceObject->DeviceExtension;
-            RtlZeroMemory(pDevExt, sizeof(VBOXGUESTDEVEXT));
+            PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDeviceObject->DeviceExtension;
+            RT_ZERO(*pDevExt);
 
             Log(("VBoxGuest::vbgdNt4CreateDevice: Device extension created\n"));
 
             /* Store a reference to ourself. */
-            pDevExt->win.s.pDeviceObject = pDeviceObject;
+            pDevExt->pDeviceObject = pDeviceObject;
 
             /* Store bus and slot number we've queried before. */
-            pDevExt->win.s.busNumber  = uBusNumber;
-            pDevExt->win.s.slotNumber = SlotNumber.u.AsULONG;
+            pDevExt->busNumber  = uBusNumber;
+            pDevExt->slotNumber = SlotNumber.u.AsULONG;
 
 #ifdef VBOX_WITH_GUEST_BUGCHECK_DETECTION
Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp	(revision 44987)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp	(revision 44988)
@@ -104,6 +104,6 @@
 NTSTATUS vbgdNtPnP(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
-    PVBOXGUESTDEVEXT   pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
-    PIO_STACK_LOCATION pStack  = IoGetCurrentIrpStackLocation(pIrp);
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
+    PIO_STACK_LOCATION  pStack  = IoGetCurrentIrpStackLocation(pIrp);
 
 #ifdef LOG_ENABLED
@@ -147,5 +147,5 @@
 
             /* This must be handled first by the lower driver. */
-            rc = vbgdNtSendIrpSynchronously(pDevExt->win.s.pNextLowerDriver, pIrp, TRUE);
+            rc = vbgdNtSendIrpSynchronously(pDevExt->pNextLowerDriver, pIrp, TRUE);
 
             if (   NT_SUCCESS(rc)
@@ -158,5 +158,5 @@
                 {
                     Log(("VBoxGuest::vbgdNtVBoxGuestPnP: START_DEVICE: No resources, pDevExt = %p, nextLowerDriver = %p!\n",
-                         pDevExt, pDevExt ? pDevExt->win.s.pNextLowerDriver : NULL));
+                         pDevExt, pDevExt ? pDevExt->pNextLowerDriver : NULL));
                     rc = STATUS_UNSUCCESSFUL;
                 }
@@ -182,10 +182,10 @@
 
             /* This must be handled first by the lower driver. */
-            rc = vbgdNtSendIrpSynchronously(pDevExt->win.s.pNextLowerDriver, pIrp, TRUE);
-
-            if (NT_SUCCESS(rc) && pDevExt->win.s.devState == PENDINGREMOVE)
+            rc = vbgdNtSendIrpSynchronously(pDevExt->pNextLowerDriver, pIrp, TRUE);
+
+            if (NT_SUCCESS(rc) && pDevExt->devState == PENDINGREMOVE)
             {
                 /* Return to the state prior to receiving the IRP_MN_QUERY_REMOVE_DEVICE request. */
-                pDevExt->win.s.devState = pDevExt->win.s.prevDevState;
+                pDevExt->devState = pDevExt->prevDevState;
             }
 
@@ -210,5 +210,5 @@
             IoSkipCurrentIrpStackLocation(pIrp);
 
-            rc = IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+            rc = IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
 
             /* Do not complete the IRP. */
@@ -234,5 +234,5 @@
                 IoSkipCurrentIrpStackLocation(pIrp);
 
-                rc = IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+                rc = IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
                 Log(("VBoxGuest::vbgdNtGuestPnp: QUERY_REMOVE_DEVICE: Next lower driver replied rc = 0x%x\n", rc));
 
@@ -267,13 +267,13 @@
             IoSkipCurrentIrpStackLocation(pIrp);
 
-            rc = IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+            rc = IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
             Log(("VBoxGuest::vbgdNtGuestPnp: REMOVE_DEVICE: Next lower driver replied rc = 0x%x\n", rc));
 
-            IoDetachDevice(pDevExt->win.s.pNextLowerDriver);
+            IoDetachDevice(pDevExt->pNextLowerDriver);
 
             Log(("VBoxGuest::vbgdNtGuestPnp: REMOVE_DEVICE: Removing device ...\n"));
 
             /* Destroy device extension and clean up everything else. */
-            VBoxGuestDeleteDevExt(pDevExt);
+            VBoxGuestDeleteDevExt(&pDevExt->Core);
 
             /* Remove DOS device + symbolic link. */
@@ -299,10 +299,10 @@
 
             /* This must be handled first by the lower driver. */
-            rc = vbgdNtSendIrpSynchronously(pDevExt->win.s.pNextLowerDriver, pIrp, TRUE);
-
-            if (NT_SUCCESS(rc) && pDevExt->win.s.devState == PENDINGSTOP)
+            rc = vbgdNtSendIrpSynchronously(pDevExt->pNextLowerDriver, pIrp, TRUE);
+
+            if (NT_SUCCESS(rc) && pDevExt->devState == PENDINGSTOP)
             {
                 /* Return to the state prior to receiving the IRP_MN_QUERY_STOP_DEVICE request. */
-                pDevExt->win.s.devState = pDevExt->win.s.prevDevState;
+                pDevExt->devState = pDevExt->prevDevState;
             }
 
@@ -329,5 +329,5 @@
                 IoSkipCurrentIrpStackLocation(pIrp);
 
-                rc = IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+                rc = IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
                 Log(("VBoxGuest::vbgdNtGuestPnp: QUERY_STOP_DEVICE: Next lower driver replied rc = 0x%x\n", rc));
 
@@ -358,5 +358,5 @@
             IoSkipCurrentIrpStackLocation(pIrp);
 
-            rc = IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+            rc = IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
             Log(("VBoxGuest::vbgdNtGuestPnp: STOP_DEVICE: Next lower driver replied rc = 0x%x\n", rc));
 
@@ -367,5 +367,5 @@
         {
             IoSkipCurrentIrpStackLocation(pIrp);
-            rc = IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+            rc = IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
             return rc;
         }
@@ -391,6 +391,6 @@
 {
 #ifdef VBOX_STRICT
-    PVBOXGUESTDEVEXT   pDevExt = (PVBOXGUESTDEVEXT)pContext;
-    PIO_STACK_LOCATION pIrpSp  = IoGetCurrentIrpStackLocation(pIrp);
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pContext;
+    PIO_STACK_LOCATION  pIrpSp  = IoGetCurrentIrpStackLocation(pIrp);
 
     Assert(pDevExt);
@@ -435,9 +435,9 @@
 NTSTATUS vbgdNtPower(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
-    PIO_STACK_LOCATION pStack   = IoGetCurrentIrpStackLocation(pIrp);
-    PVBOXGUESTDEVEXT   pDevExt  = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
-    POWER_STATE_TYPE   enmPowerType   = pStack->Parameters.Power.Type;
-    POWER_STATE        PowerState     = pStack->Parameters.Power.State;
-    POWER_ACTION       enmPowerAction = pStack->Parameters.Power.ShutdownType;
+    PIO_STACK_LOCATION  pStack   = IoGetCurrentIrpStackLocation(pIrp);
+    PVBOXGUESTDEVEXTWIN pDevExt  = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
+    POWER_STATE_TYPE    enmPowerType   = pStack->Parameters.Power.Type;
+    POWER_STATE         PowerState     = pStack->Parameters.Power.State;
+    POWER_ACTION        enmPowerAction = pStack->Parameters.Power.ShutdownType;
 
     Log(("VBoxGuest::vbgdNtGuestPower\n"));
@@ -463,8 +463,8 @@
                             {
                                 if (   pDevExt
-                                    && pDevExt->win.s.LastSystemPowerAction == PowerActionHibernate)
+                                    && pDevExt->LastSystemPowerAction == PowerActionHibernate)
                                 {
                                     Log(("VBoxGuest::vbgdNtGuestPower: Returning from hibernation!\n"));
-                                    int rc = VBoxGuestReinitDevExtAfterHibernation(pDevExt,
+                                    int rc = VBoxGuestReinitDevExtAfterHibernation(&pDevExt->Core,
                                                                                    vbgdNtVersionToOSType(g_enmVbgdNtVer));
                                     if (RT_FAILURE(rc))
@@ -491,6 +491,5 @@
                                 if (RT_FAILURE(vrc))
                                 {
-                                    Log(("VBoxGuest::PowerStateRequest: error communicating new power status to VMMDev. "
-                                             "vrc = %Rrc\n", vrc));
+                                    Log(("VBoxGuest::PowerStateRequest: error communicating new power status to VMMDev. vrc = %Rrc\n", vrc));
                                 }
 
@@ -511,5 +510,5 @@
                                 Log(("VBoxGuest::vbgdNtGuestPower: Telling the VMMDev to close the VM ...\n"));
 
-                                VMMDevPowerStateRequest *pReq = pDevExt->win.s.pPowerStateRequest;
+                                VMMDevPowerStateRequest *pReq = pDevExt->pPowerStateRequest;
                                 int vrc = VERR_NOT_IMPLEMENTED;
                                 if (pReq)
@@ -540,5 +539,5 @@
                      */
                     if (pDevExt)
-                        pDevExt->win.s.LastSystemPowerAction = enmPowerAction;
+                        pDevExt->LastSystemPowerAction = enmPowerAction;
 
                     break;
@@ -570,5 +569,5 @@
                            TRUE,
                            TRUE);
-    return PoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+    return PoCallDriver(pDevExt->pNextLowerDriver, pIrp);
 }
 
Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp	(revision 44987)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp	(revision 44988)
@@ -207,9 +207,9 @@
      */
     PDEVICE_OBJECT pDeviceObject = NULL;
-    PVBOXGUESTDEVEXT pDevExt = NULL;
+    PVBOXGUESTDEVEXTWIN pDevExt = NULL;
     UNICODE_STRING devName;
     UNICODE_STRING win32Name;
     RtlInitUnicodeString(&devName, VBOXGUEST_DEVICE_NAME_NT);
-    rc = IoCreateDevice(pDrvObj, sizeof(VBOXGUESTDEVEXT), &devName, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject);
+    rc = IoCreateDevice(pDrvObj, sizeof(VBOXGUESTDEVEXTWIN), &devName, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject);
     if (NT_SUCCESS(rc))
     {
@@ -224,15 +224,15 @@
              * Setup the device extension.
              */
-            pDevExt = (PVBOXGUESTDEVEXT)pDeviceObject->DeviceExtension;
+            pDevExt = (PVBOXGUESTDEVEXTWIN)pDeviceObject->DeviceExtension;
             RtlZeroMemory(pDevExt, sizeof(VBOXGUESTDEVEXT));
 
-            KeInitializeSpinLock(&pDevExt->win.s.MouseEventAccessLock);
-
-            pDevExt->win.s.pDeviceObject = pDeviceObject;
-            pDevExt->win.s.prevDevState = STOPPED;
-            pDevExt->win.s.devState = STOPPED;
-
-            pDevExt->win.s.pNextLowerDriver = IoAttachDeviceToDeviceStack(pDeviceObject, pDevObj);
-            if (pDevExt->win.s.pNextLowerDriver == NULL)
+            KeInitializeSpinLock(&pDevExt->MouseEventAccessLock);
+
+            pDevExt->pDeviceObject = pDeviceObject;
+            pDevExt->prevDevState = STOPPED;
+            pDevExt->devState = STOPPED;
+
+            pDevExt->pNextLowerDriver = IoAttachDeviceToDeviceStack(pDeviceObject, pDevObj);
+            if (pDevExt->pNextLowerDriver == NULL)
             {
                 Log(("VBoxGuest::vbgdNtGuestAddDevice: IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n"));
@@ -267,6 +267,6 @@
         if (pDevExt)
         {
-            if (pDevExt->win.s.pNextLowerDriver)
-                IoDetachDevice(pDevExt->win.s.pNextLowerDriver);
+            if (pDevExt->pNextLowerDriver)
+                IoDetachDevice(pDevExt->pNextLowerDriver);
         }
         IoDeleteSymbolicLink(&win32Name);
@@ -355,7 +355,7 @@
 #endif
 {
-    PVBOXGUESTDEVEXT pDevExt   = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
 #ifndef TARGET_NT4
-    PIO_STACK_LOCATION pStack  = IoGetCurrentIrpStackLocation(pIrp);
+    PIO_STACK_LOCATION  pStack  = IoGetCurrentIrpStackLocation(pIrp);
 #endif
 
@@ -375,5 +375,5 @@
     rc = HalAssignSlotResources(pRegPath, &classNameString,
                                 pDrvObj, pDevObj,
-                                PCIBus, pDevExt->win.s.busNumber, pDevExt->win.s.slotNumber,
+                                PCIBus, pDevExt->busNumber, pDevExt->slotNumber,
                                 &pResourceList);
     if (pResourceList && pResourceList->Count > 0)
@@ -385,6 +385,5 @@
         vbgdNtShowDeviceResources(&pStack->Parameters.StartDevice.AllocatedResources->List[0].PartialResourceList);
     if (NT_SUCCESS(rc))
-        rc = vbgdNtScanPCIResourceList(pStack->Parameters.StartDevice.AllocatedResourcesTranslated,
-                                             pDevExt);
+        rc = vbgdNtScanPCIResourceList(pStack->Parameters.StartDevice.AllocatedResourcesTranslated, pDevExt);
 #endif
     if (NT_SUCCESS(rc))
@@ -397,17 +396,17 @@
         uint32_t cbMMIO = 0;
         rc = vbgdNtMapVMMDevMemory(pDevExt,
-                                   pDevExt->win.s.vmmDevPhysMemoryAddress,
-                                   pDevExt->win.s.vmmDevPhysMemoryLength,
+                                   pDevExt->vmmDevPhysMemoryAddress,
+                                   pDevExt->vmmDevPhysMemoryLength,
                                    &pvMMIOBase,
                                    &cbMMIO);
         if (NT_SUCCESS(rc))
         {
-            pDevExt->pVMMDevMemory = (VMMDevMemory *)pvMMIOBase;
+            pDevExt->Core.pVMMDevMemory = (VMMDevMemory *)pvMMIOBase;
 
             Log(("VBoxGuest::vbgdNtInit: pvMMIOBase = 0x%p, pDevExt = 0x%p, pDevExt->pVMMDevMemory = 0x%p\n",
                  pvMMIOBase, pDevExt, pDevExt ? pDevExt->pVMMDevMemory : NULL));
 
-            int vrc = VBoxGuestInitDevExt(pDevExt,
-                                          pDevExt->IOPortBase,
+            int vrc = VBoxGuestInitDevExt(&pDevExt->Core,
+                                          pDevExt->Core.IOPortBase,
                                           pvMMIOBase, cbMMIO,
                                           vbgdNtVersionToOSType(g_enmVbgdNtVer),
@@ -425,6 +424,6 @@
     if (NT_SUCCESS(rc))
     {
-        int vrc = VbglGRAlloc((VMMDevRequestHeader **)&pDevExt->win.s.pPowerStateRequest,
-                              sizeof (VMMDevPowerStateRequest), VMMDevReq_SetPowerStatus);
+        int vrc = VbglGRAlloc((VMMDevRequestHeader **)&pDevExt->pPowerStateRequest,
+                              sizeof(VMMDevPowerStateRequest), VMMDevReq_SetPowerStatus);
         if (RT_FAILURE(vrc))
         {
@@ -441,5 +440,5 @@
         Log(("VBoxGuest::vbgdNtInit: Initializing DPC/ISR ...\n"));
 
-        IoInitializeDpcRequest(pDevExt->win.s.pDeviceObject, vbgdNtDpcHandler);
+        IoInitializeDpcRequest(pDevExt->pDeviceObject, vbgdNtDpcHandler);
 #ifdef TARGET_NT4
         ULONG uInterruptVector;
@@ -447,16 +446,16 @@
         /* Get an interrupt vector. */
         /* Only proceed if the device provides an interrupt. */
-        if (   pDevExt->win.s.interruptLevel
-            || pDevExt->win.s.interruptVector)
+        if (   pDevExt->interruptLevel
+            || pDevExt->interruptVector)
         {
             Log(("VBoxGuest::vbgdNtInit: Getting interrupt vector (HAL): Bus: %u, IRQL: %u, Vector: %u\n",
-                 pDevExt->win.s.busNumber, pDevExt->win.s.interruptLevel, pDevExt->win.s.interruptVector));
+                 pDevExt->busNumber, pDevExt->interruptLevel, pDevExt->interruptVector));
 
             uInterruptVector = HalGetInterruptVector(PCIBus,
-                                                     pDevExt->win.s.busNumber,
-                                                     pDevExt->win.s.interruptLevel,
-                                                     pDevExt->win.s.interruptVector,
+                                                     pDevExt->busNumber,
+                                                     pDevExt->interruptLevel,
+                                                     pDevExt->interruptVector,
                                                      &irqLevel,
-                                                     &pDevExt->win.s.interruptAffinity);
+                                                     &pDevExt->interruptAffinity);
             Log(("VBoxGuest::vbgdNtInit: HalGetInterruptVector returns vector %u\n", uInterruptVector));
             if (uInterruptVector == 0)
@@ -466,25 +465,25 @@
             Log(("VBoxGuest::vbgdNtInit: Device does not provide an interrupt!\n"));
 #endif
-        if (pDevExt->win.s.interruptVector)
+        if (pDevExt->interruptVector)
         {
             Log(("VBoxGuest::vbgdNtInit: Connecting interrupt ...\n"));
 
-            rc = IoConnectInterrupt(&pDevExt->win.s.pInterruptObject,         /* Out: interrupt object. */
-                                    (PKSERVICE_ROUTINE)vbgdNtIsrHandler,      /* Our ISR handler. */
-                                    pDevExt,                                  /* Device context. */
-                                    NULL,                                     /* Optional spinlock. */
+            rc = IoConnectInterrupt(&pDevExt->pInterruptObject,                 /* Out: interrupt object. */
+                                    (PKSERVICE_ROUTINE)vbgdNtIsrHandler,        /* Our ISR handler. */
+                                    pDevExt,                                    /* Device context. */
+                                    NULL,                                       /* Optional spinlock. */
 #ifdef TARGET_NT4
-                                    uInterruptVector,                         /* Interrupt vector. */
-                                    irqLevel,                                 /* Interrupt level. */
-                                    irqLevel,                                 /* Interrupt level. */
+                                    uInterruptVector,                           /* Interrupt vector. */
+                                    irqLevel,                                   /* Interrupt level. */
+                                    irqLevel,                                   /* Interrupt level. */
 #else
-                                    pDevExt->win.s.interruptVector,           /* Interrupt vector. */
-                                    (KIRQL)pDevExt->win.s.interruptLevel,     /* Interrupt level. */
-                                    (KIRQL)pDevExt->win.s.interruptLevel,     /* Interrupt level. */
-#endif
-                                    pDevExt->win.s.interruptMode,             /* LevelSensitive or Latched. */
-                                    TRUE,                                     /* Shareable interrupt. */
-                                    pDevExt->win.s.interruptAffinity,         /* CPU affinity. */
-                                    FALSE);                                   /* Don't save FPU stack. */
+                                    pDevExt->interruptVector,                   /* Interrupt vector. */
+                                    (KIRQL)pDevExt->interruptLevel,             /* Interrupt level. */
+                                    (KIRQL)pDevExt->interruptLevel,             /* Interrupt level. */
+#endif
+                                    pDevExt->interruptMode,                     /* LevelSensitive or Latched. */
+                                    TRUE,                                       /* Shareable interrupt. */
+                                    pDevExt->interruptAffinity,                 /* CPU affinity. */
+                                    FALSE);                                     /* Don't save FPU stack. */
             if (NT_ERROR(rc))
                 Log(("VBoxGuest::vbgdNtInit: Could not connect interrupt, rc = 0x%x\n", rc));
@@ -497,5 +496,5 @@
 #ifdef VBOX_WITH_HGCM
     Log(("VBoxGuest::vbgdNtInit: Allocating kernel session data ...\n"));
-    int vrc = VBoxGuestCreateKernelSession(pDevExt, &pDevExt->win.s.pKernelSession);
+    int vrc = VBoxGuestCreateKernelSession(&pDevExt->Core, &pDevExt->pKernelSession);
     if (RT_FAILURE(vrc))
     {
@@ -511,6 +510,6 @@
         if (NT_SUCCESS(rcNt))
         {
-            pDevExt->fLoggingEnabled = ulValue >= 0xFF;
-            if (pDevExt->fLoggingEnabled)
+            pDevExt->Core.fLoggingEnabled = ulValue >= 0xFF;
+            if (pDevExt->Core.fLoggingEnabled)
                 Log(("Logging to release log enabled (0x%x)", ulValue));
         }
@@ -521,7 +520,5 @@
     }
     else
-    {
-        pDevExt->win.s.pInterruptObject = NULL;
-    }
+        pDevExt->pInterruptObject = NULL;
 
     Log(("VBoxGuest::vbgdNtInit: Returned with rc = 0x%x\n", rc));
@@ -540,5 +537,5 @@
     Log(("VBoxGuest::vbgdNtCleanup\n"));
 
-    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
     if (pDevExt)
     {
@@ -546,19 +543,19 @@
 #if 0 /* @todo: test & enable cleaning global session data */
 #ifdef VBOX_WITH_HGCM
-        if (pDevExt->win.s.pKernelSession)
-        {
-            VBoxGuestCloseSession(pDevExt, pDevExt->win.s.pKernelSession);
-            pDevExt->win.s.pKernelSession = NULL;
-        }
-#endif
-#endif
-
-        if (pDevExt->win.s.pInterruptObject)
-        {
-            IoDisconnectInterrupt(pDevExt->win.s.pInterruptObject);
-            pDevExt->win.s.pInterruptObject = NULL;
-        }
-
-        /* @todo: cleanup the rest stuff */
+        if (pDevExt->pKernelSession)
+        {
+            VBoxGuestCloseSession(pDevExt, pDevExt->pKernelSession);
+            pDevExt->pKernelSession = NULL;
+        }
+#endif
+#endif
+
+        if (pDevExt->pInterruptObject)
+        {
+            IoDisconnectInterrupt(pDevExt->pInterruptObject);
+            pDevExt->pInterruptObject = NULL;
+        }
+
+        /** @todo: cleanup the rest stuff */
 
 
@@ -616,14 +613,13 @@
 {
     /** @todo AssertPtrReturn(pIrp); */
-    PIO_STACK_LOCATION pStack   = IoGetCurrentIrpStackLocation(pIrp);
+    PIO_STACK_LOCATION  pStack   = IoGetCurrentIrpStackLocation(pIrp);
     /** @todo AssertPtrReturn(pStack); */
-    PFILE_OBJECT       pFileObj = pStack->FileObject;
-    PVBOXGUESTDEVEXT   pDevExt  = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
-    NTSTATUS           rc       = STATUS_SUCCESS;
-
-    if (pDevExt->win.s.devState != WORKING)
-    {
-        Log(("VBoxGuest::vbgdNtGuestCreate: device is not working currently: %d!\n",
-             pDevExt->win.s.devState));
+    PFILE_OBJECT        pFileObj = pStack->FileObject;
+    PVBOXGUESTDEVEXTWIN pDevExt  = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
+    NTSTATUS            rc       = STATUS_SUCCESS;
+
+    if (pDevExt->devState != WORKING)
+    {
+        Log(("VBoxGuest::vbgdNtGuestCreate: device is not working currently: %d!\n", pDevExt->devState));
         rc = STATUS_UNSUCCESSFUL;
     }
@@ -653,10 +649,10 @@
                  * exists for every R3 process.
                  */
-                vrc = VBoxGuestCreateUserSession(pDevExt, &pSession);
+                vrc = VBoxGuestCreateUserSession(&pDevExt->Core, &pSession);
             }
             else
             {
                 /* ... otherwise we've been called from R0! */
-                vrc = VBoxGuestCreateKernelSession(pDevExt, &pSession);
+                vrc = VBoxGuestCreateKernelSession(&pDevExt->Core, &pSession);
             }
             if (RT_SUCCESS(vrc))
@@ -684,7 +680,7 @@
 static NTSTATUS vbgdNtClose(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
-    PVBOXGUESTDEVEXT   pDevExt  = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
-    PIO_STACK_LOCATION pStack   = IoGetCurrentIrpStackLocation(pIrp);
-    PFILE_OBJECT       pFileObj = pStack->FileObject;
+    PVBOXGUESTDEVEXTWIN pDevExt  = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
+    PIO_STACK_LOCATION  pStack   = IoGetCurrentIrpStackLocation(pIrp);
+    PFILE_OBJECT        pFileObj = pStack->FileObject;
 
     Log(("VBoxGuest::vbgdNtGuestClose: pDevExt=0x%p pFileObj=0x%p FsContext=0x%p\n",
@@ -695,5 +691,5 @@
     PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pFileObj->FsContext;
     if (pSession)
-        VBoxGuestCloseSession(pDevExt, pSession);
+        VBoxGuestCloseSession(&pDevExt->Core, pSession);
 #endif
 
@@ -716,5 +712,5 @@
 {
     NTSTATUS            Status   = STATUS_SUCCESS;
-    PVBOXGUESTDEVEXT    pDevExt  = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt  = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
     PIO_STACK_LOCATION  pStack   = IoGetCurrentIrpStackLocation(pIrp);
     unsigned int        uCmd     = (unsigned int)pStack->Parameters.DeviceIoControl.IoControlCode;
@@ -740,5 +736,5 @@
     {
         Log(("VBoxGuest::vbgdNtIOCtl: Using kernel session data ...\n"));
-        pSession = pDevExt->win.s.pKernelSession;
+        pSession = pDevExt->pKernelSession;
     }
 
@@ -794,5 +790,5 @@
              */
             size_t cbDataReturned;
-            int vrc = VBoxGuestCommonIOCtl(uCmd, pDevExt, pSession, pBuf, cbData, &cbDataReturned);
+            int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned);
 
             Log(("VBoxGuest::vbgdNtGuestDeviceControl: rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n",
@@ -851,5 +847,5 @@
 {
     NTSTATUS            Status      = STATUS_SUCCESS;
-    PVBOXGUESTDEVEXT    pDevExt     = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt     = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
     PIO_STACK_LOCATION  pStack      = IoGetCurrentIrpStackLocation(pIrp);
     unsigned int        uCmd        = (unsigned int)pStack->Parameters.DeviceIoControl.IoControlCode;
@@ -875,7 +871,7 @@
             /* we need a lock here to avoid concurrency with the set event functionality */
             KIRQL OldIrql;
-            KeAcquireSpinLock(&pDevExt->win.s.MouseEventAccessLock, &OldIrql);
-            pDevExt->MouseNotifyCallback = *pInfo;
-            KeReleaseSpinLock(&pDevExt->win.s.MouseEventAccessLock, OldIrql);
+            KeAcquireSpinLock(&pDevExt->MouseEventAccessLock, &OldIrql);
+            pDevExt->Core.MouseNotifyCallback = *pInfo;
+            KeReleaseSpinLock(&pDevExt->MouseEventAccessLock, OldIrql);
 
             Status = STATUS_SUCCESS;
@@ -910,5 +906,5 @@
 NTSTATUS vbgdNtSystemControl(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
-    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
 
     Log(("VBoxGuest::vbgdNtGuestSystemControl\n"));
@@ -917,5 +913,5 @@
     IoSkipCurrentIrpStackLocation(pIrp);
 
-    return IoCallDriver(pDevExt->win.s.pNextLowerDriver, pIrp);
+    return IoCallDriver(pDevExt->pNextLowerDriver, pIrp);
 }
 
@@ -930,9 +926,9 @@
 NTSTATUS vbgdNtShutdown(PDEVICE_OBJECT pDevObj, PIRP pIrp)
 {
-    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
 
     Log(("VBoxGuest::vbgdNtGuestShutdown\n"));
 
-    VMMDevPowerStateRequest *pReq = pDevExt->win.s.pPowerStateRequest;
+    VMMDevPowerStateRequest *pReq = pDevExt->pPowerStateRequest;
     if (pReq)
     {
@@ -980,24 +976,24 @@
 void vbgdNtDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVOID pContext)
 {
-    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
     Log(("VBoxGuest::vbgdNtGuestDpcHandler: pDevExt=0x%p\n", pDevExt));
 
     /* test & reset the counter */
-    if (ASMAtomicXchgU32(&pDevExt->u32MousePosChangedSeq, 0))
+    if (ASMAtomicXchgU32(&pDevExt->Core.u32MousePosChangedSeq, 0))
     {
         /* we need a lock here to avoid concurrency with the set event ioctl handler thread,
          * i.e. to prevent the event from destroyed while we're using it */
         Assert(KeGetCurrentIrql() == DISPATCH_LEVEL);
-        KeAcquireSpinLockAtDpcLevel(&pDevExt->win.s.MouseEventAccessLock);
-
-        if (pDevExt->MouseNotifyCallback.pfnNotify)
-            pDevExt->MouseNotifyCallback.pfnNotify(pDevExt->MouseNotifyCallback.pvUser);
-
-        KeReleaseSpinLockFromDpcLevel(&pDevExt->win.s.MouseEventAccessLock);
+        KeAcquireSpinLockAtDpcLevel(&pDevExt->MouseEventAccessLock);
+
+        if (pDevExt->Core.MouseNotifyCallback.pfnNotify)
+            pDevExt->Core.MouseNotifyCallback.pfnNotify(pDevExt->Core.MouseNotifyCallback.pvUser);
+
+        KeReleaseSpinLockFromDpcLevel(&pDevExt->MouseEventAccessLock);
     }
 
     /* Process the wake-up list we were asked by the scheduling a DPC
      * in vbgdNtIsrHandler(). */
-    VBoxGuestWaitDoWakeUps(pDevExt);
+    VBoxGuestWaitDoWakeUps(&pDevExt->Core);
 }
 
@@ -1012,5 +1008,5 @@
 BOOLEAN vbgdNtIsrHandler(PKINTERRUPT pInterrupt, PVOID pServiceContext)
 {
-    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pServiceContext;
+    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pServiceContext;
     if (pDevExt == NULL)
         return FALSE;
@@ -1020,5 +1016,5 @@
 
     /* Enter the common ISR routine and do the actual work. */
-    BOOLEAN fIRQTaken = VBoxGuestCommonISR(pDevExt);
+    BOOLEAN fIRQTaken = VBoxGuestCommonISR(&pDevExt->Core);
 
     /* If we need to wake up some events we do that in a DPC to make
@@ -1028,8 +1024,8 @@
         Log(("VBoxGuest::vbgdNtGuestIsrHandler: IRQ was taken! pInterrupt = 0x%p, pDevExt = 0x%p\n",
              pInterrupt, pDevExt));
-        if (ASMAtomicUoReadU32(&pDevExt->u32MousePosChangedSeq) || !RTListIsEmpty(&pDevExt->WakeUpList))
+        if (ASMAtomicUoReadU32(&pDevExt->Core.u32MousePosChangedSeq) || !RTListIsEmpty(&pDevExt->Core.WakeUpList))
         {
             Log(("VBoxGuest::vbgdNtGuestIsrHandler: Requesting DPC ...\n"));
-            IoRequestDpc(pDevExt->win.s.pDeviceObject, pDevExt->win.s.pCurrentIrp, NULL);
+            IoRequestDpc(pDevExt->pDeviceObject, pDevExt->pCurrentIrp, NULL);
         }
     }
@@ -1038,5 +1034,5 @@
 
 
-/*
+/**
  * Overridden routine for mouse polling events.
  *
@@ -1094,5 +1090,5 @@
  * @param pDevExt   Device extension
  */
-NTSTATUS vbgdNtScanPCIResourceList(PCM_RESOURCE_LIST pResList, PVBOXGUESTDEVEXT pDevExt)
+NTSTATUS vbgdNtScanPCIResourceList(PCM_RESOURCE_LIST pResList, PVBOXGUESTDEVEXTWIN pDevExt)
 {
     /* Enumerate the resource list. */
@@ -1104,5 +1100,5 @@
     ULONG rangeCount = 0;
     ULONG cMMIORange = 0;
-    PVBOXGUESTWINBASEADDRESS pBaseAddress = pDevExt->win.s.pciBaseAddress;
+    PVBOXGUESTWINBASEADDRESS pBaseAddress = pDevExt->pciBaseAddress;
     for (ULONG i = 0; i < pResList->List->PartialResourceList.Count; i++)
     {
@@ -1122,5 +1118,5 @@
                     /* Save the IO port base. */
                     /** @todo Not so good. */
-                    pDevExt->IOPortBase = (RTIOPORT)pPartialData->u.Port.Start.LowPart;
+                    pDevExt->Core.IOPortBase = (RTIOPORT)pPartialData->u.Port.Start.LowPart;
 
                     /* Save resource information. */
@@ -1149,17 +1145,13 @@
 
                 /* Save information. */
-                pDevExt->win.s.interruptLevel    = pPartialData->u.Interrupt.Level;
-                pDevExt->win.s.interruptVector   = pPartialData->u.Interrupt.Vector;
-                pDevExt->win.s.interruptAffinity = pPartialData->u.Interrupt.Affinity;
+                pDevExt->interruptLevel    = pPartialData->u.Interrupt.Level;
+                pDevExt->interruptVector   = pPartialData->u.Interrupt.Vector;
+                pDevExt->interruptAffinity = pPartialData->u.Interrupt.Affinity;
 
                 /* Check interrupt mode. */
                 if (pPartialData->Flags & CM_RESOURCE_INTERRUPT_LATCHED)
-                {
-                    pDevExt->win.s.interruptMode = Latched;
-                }
+                    pDevExt->interruptMode = Latched;
                 else
-                {
-                    pDevExt->win.s.interruptMode = LevelSensitive;
-                }
+                    pDevExt->interruptMode = LevelSensitive;
                 break;
             }
@@ -1181,6 +1173,6 @@
                     {
                         /* Save physical MMIO base + length for VMMDev. */
-                        pDevExt->win.s.vmmDevPhysMemoryAddress = pPartialData->u.Memory.Start;
-                        pDevExt->win.s.vmmDevPhysMemoryLength = (ULONG)pPartialData->u.Memory.Length;
+                        pDevExt->vmmDevPhysMemoryAddress = pPartialData->u.Memory.Start;
+                        pDevExt->vmmDevPhysMemoryLength = (ULONG)pPartialData->u.Memory.Length;
 
                         /* Save resource information. */
@@ -1216,5 +1208,5 @@
 
     /* Memorize the number of resources found. */
-    pDevExt->win.s.pciAddressCount = rangeCount;
+    pDevExt->pciAddressCount = rangeCount;
     return rc;
 }
@@ -1232,5 +1224,5 @@
  * @param pcbMMIO           Length of mapped I/O base.
  */
-NTSTATUS vbgdNtMapVMMDevMemory(PVBOXGUESTDEVEXT pDevExt, PHYSICAL_ADDRESS physicalAdr, ULONG ulLength,
+NTSTATUS vbgdNtMapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt, PHYSICAL_ADDRESS physicalAdr, ULONG ulLength,
                                void **ppvMMIOBase, uint32_t *pcbMMIO)
 {
@@ -1282,15 +1274,15 @@
  * @param   pDevExt     The device extension.
  */
-void vbgdNtUnmapVMMDevMemory(PVBOXGUESTDEVEXT pDevExt)
-{
-    Log(("VBoxGuest::vbgdNtUnmapVMMDevMemory: pVMMDevMemory = 0x%x\n", pDevExt->pVMMDevMemory));
-    if (pDevExt->pVMMDevMemory)
-    {
-        MmUnmapIoSpace((void*)pDevExt->pVMMDevMemory, pDevExt->win.s.vmmDevPhysMemoryLength);
-        pDevExt->pVMMDevMemory = NULL;
-    }
-
-    pDevExt->win.s.vmmDevPhysMemoryAddress.QuadPart = 0;
-    pDevExt->win.s.vmmDevPhysMemoryLength = 0;
+void vbgdNtUnmapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt)
+{
+    Log(("VBoxGuest::vbgdNtUnmapVMMDevMemory: pVMMDevMemory = 0x%x\n", pDevExt->Core.pVMMDevMemory));
+    if (pDevExt->Core.pVMMDevMemory)
+    {
+        MmUnmapIoSpace((void*)pDevExt->Core.pVMMDevMemory, pDevExt->vmmDevPhysMemoryLength);
+        pDevExt->Core.pVMMDevMemory = NULL;
+    }
+
+    pDevExt->vmmDevPhysMemoryAddress.QuadPart = 0;
+    pDevExt->vmmDevPhysMemoryLength = 0;
 }
 
@@ -1365,6 +1357,5 @@
 {
     AssertPtrReturn(pu32Bits, 0);
-    LogFlowFunc(("*pu32Bits=0x%x, u32Mask=0x%x\n", *(long *)pu32Bits,
-                 u32Mask));
+    LogFlowFunc(("*pu32Bits=0x%x, u32Mask=0x%x\n", *(uint32_t *)pu32Bits, u32Mask));
     uint32_t u32Result = 0;
     uint32_t u32WorkingMask = u32Mask;
@@ -1412,33 +1403,38 @@
 
 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER
-#pragma pack(1)
+
+/*
+ * DPC latency checker.
+ */
+
+# pragma pack(1) /** @todo r=bird: Not needed for DPCSAMPLE, screwes up member alignment in DPCDATA! */
 typedef struct DPCSAMPLE
 {
-    LARGE_INTEGER PerfDelta;
-    LARGE_INTEGER PerfCounter;
-    LARGE_INTEGER PerfFrequency;
-    uint64_t u64TSC;
+    LARGE_INTEGER   PerfDelta;
+    LARGE_INTEGER   PerfCounter;
+    LARGE_INTEGER   PerfFrequency;
+    uint64_t        u64TSC;
 } DPCSAMPLE;
 
 typedef struct DPCDATA
 {
-    KDPC Dpc;
-    KTIMER Timer;
-    KSPIN_LOCK SpinLock;
-
-    ULONG ulTimerRes;
-
-    LARGE_INTEGER DueTime;
-
-    BOOLEAN fFinished;
-
-    LARGE_INTEGER PerfCounterPrev;
-
-    int iSampleCount;
-    DPCSAMPLE aSamples[8192];
+    KDPC            Dpc;
+    KTIMER          Timer;
+    KSPIN_LOCK      SpinLock;
+
+    ULONG           ulTimerRes;
+
+    BOOLEAN         fFinished;
+
+    LARGE_INTEGER   DueTime;
+
+    LARGE_INTEGER   PerfCounterPrev;
+
+    int             cSamples;
+    DPCSAMPLE       aSamples[8192];
 } DPCDATA;
-#pragma pack(1)
-
-#define VBOXGUEST_DPC_TAG 'DPCS'
+# pragma pack(1)
+
+# define VBOXGUEST_DPC_TAG 'DPCS'
 
 static VOID DPCDeferredRoutine(struct _KDPC *Dpc,
@@ -1451,5 +1447,5 @@
     KeAcquireSpinLockAtDpcLevel(&pData->SpinLock);
 
-    if (pData->iSampleCount >= RT_ELEMENTS(pData->aSamples))
+    if (pData->cSamples >= RT_ELEMENTS(pData->aSamples))
     {
         pData->fFinished = 1;
@@ -1458,5 +1454,5 @@
     }
 
-    DPCSAMPLE *pSample = &pData->aSamples[pData->iSampleCount++];
+    DPCSAMPLE *pSample = &pData->aSamples[pData->cSamples++];
 
     pSample->u64TSC = ASMReadTSC();
@@ -1471,9 +1467,7 @@
 }
 
-int VBoxGuestCommonIOCtl_DPC(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession,
+int VBoxGuestCommonIOCtl_DPC(PVBOXGUESTDEVEXTWIN pDevExt, PVBOXGUESTSESSION pSession,
                              void *pvData, size_t cbData, size_t *pcbDataReturned)
 {
-    int rc = VINF_SUCCESS;
-
     /* Allocate a non paged memory for samples and related data. */
     DPCDATA *pData = (DPCDATA *)ExAllocatePoolWithTag(NonPagedPool, sizeof(DPCDATA), VBOXGUEST_DPC_TAG);
@@ -1490,5 +1484,5 @@
 
     pData->fFinished = 0;
-    pData->iSampleCount = 0;
+    pData->cSamples = 0;
     pData->PerfCounterPrev.QuadPart = 0;
 
@@ -1510,19 +1504,20 @@
     /* Log everything to the host. */
     RTLogBackdoorPrintf("DPC: ulTimerRes = %d\n", pData->ulTimerRes);
-    int i;
-    for (i = 0; i < pData->iSampleCount; i++)
+    for (int i = 0; i < pData->cSamples; i++)
     {
         DPCSAMPLE *pSample = &pData->aSamples[i];
 
         RTLogBackdoorPrintf("[%d] pd %lld pc %lld pf %lld t %lld\n",
-                i,
-                pSample->PerfDelta.QuadPart,
-                pSample->PerfCounter.QuadPart,
-                pSample->PerfFrequency.QuadPart,
-                pSample->u64TSC);
+                            i,
+                            pSample->PerfDelta.QuadPart,
+                            pSample->PerfCounter.QuadPart,
+                            pSample->PerfFrequency.QuadPart,
+                            pSample->u64TSC);
     }
 
     ExFreePoolWithTag(pData, VBOXGUEST_DPC_TAG);
-    return rc;
-}
+    return VINF_SUCCESS;
+}
+
 #endif /* VBOX_WITH_DPC_LATENCY_CHECKER */
+
Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h	(revision 44987)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h	(revision 44988)
@@ -37,4 +37,5 @@
 #include <VBox/VMMDev.h>
 #include <VBox/VBoxGuest.h>
+#include "VBoxGuestInternal.h"
 
 
@@ -71,4 +72,6 @@
 typedef struct VBOXGUESTDEVEXTWIN
 {
+    VBOXGUESTDEVEXT Core;
+
     /** Our functional driver object. */
     PDEVICE_OBJECT pDeviceObject;
@@ -139,15 +142,10 @@
 #define VBOXGUEST_UPDATE_DEVSTATE(a_pDevExt, a_newDevState) \
     do { \
-        (a_pDevExt)->win.s.prevDevState = (a_pDevExt)->win.s.devState; \
-        (a_pDevExt)->win.s.devState     = (a_newDevState); \
+        (a_pDevExt)->prevDevState = (a_pDevExt)->devState; \
+        (a_pDevExt)->devState     = (a_newDevState); \
     } while (0)
 
 /** CM_RESOURCE_MEMORY_* flags which were used on XP or earlier. */
 #define VBOX_CM_PRE_VISTA_MASK (0x3f)
-
-
-/* Include the internal header now as we've declared the internal
-   structure and stuff. */
-#include "VBoxGuestInternal.h"
 
 
@@ -173,8 +171,8 @@
 VOID       vbgdNtDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVOID pContext);
 BOOLEAN    vbgdNtIsrHandler(PKINTERRUPT interrupt, PVOID serviceContext);
-NTSTATUS   vbgdNtScanPCIResourceList(PCM_RESOURCE_LIST pResList, PVBOXGUESTDEVEXT pDevExt);
-NTSTATUS   vbgdNtMapVMMDevMemory(PVBOXGUESTDEVEXT pDevExt, PHYSICAL_ADDRESS physicalAdr, ULONG ulLength,
+NTSTATUS   vbgdNtScanPCIResourceList(PCM_RESOURCE_LIST pResList, PVBOXGUESTDEVEXTWIN pDevExt);
+NTSTATUS   vbgdNtMapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt, PHYSICAL_ADDRESS physicalAdr, ULONG ulLength,
                                  void **ppvMMIOBase, uint32_t *pcbMMIO);
-void       vbgdNtUnmapVMMDevMemory(PVBOXGUESTDEVEXT pDevExt);
+void       vbgdNtUnmapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt);
 VBOXOSTYPE vbgdNtVersionToOSType(VBGDNTVER enmNtVer);
 /** @}  */
Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 44987)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 44988)
@@ -71,8 +71,4 @@
 static int VBoxGuestCommonIOCtl_SetMouseStatus(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, uint32_t fFeatures);
 
-#ifdef VBOX_WITH_DPC_LATENCY_CHECKER
-int VBoxGuestCommonIOCtl_DPC(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession,
-                             void *pvData, size_t cbData, size_t *pcbDataReturned);
-#endif /* VBOX_WITH_DPC_LATENCY_CHECKER */
 
 /*******************************************************************************
@@ -2500,4 +2496,6 @@
     }
 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER
+    /** @todo r=bird: This request doesn't vary in size?? AFAIK it doesn't have
+     *        any data associated with it... grumble. */
     else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_DPC))
     {
Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h	(revision 44987)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h	(revision 44988)
@@ -181,18 +181,4 @@
     /** Callback and user data for a kernel mouse handler. */
     VBoxGuestMouseSetNotifyCallback MouseNotifyCallback;
-
-    /** Windows part.
-     * @todo r=bird: Entirely wrong approach. You should create
-     *       VBOXGUESTDEVEXTWIN as a super structure to VBOXGUESTDEVEXT. If they
-     *       were classes, class VBOXGUESTDEVEXTWIN : public VBOXGUESTDEVEXT ... */
-    union
-    {
-#ifdef ___VBoxGuest_win_h
-        VBOXGUESTDEVEXTWIN          s;
-#else
-        uint32_t                    dummy;
-#endif
-    } win;
-
 } VBOXGUESTDEVEXT;
 /** Pointer to the VBoxGuest driver data. */
@@ -278,4 +264,10 @@
 void VBoxGuestNativeISRMousePollEvent(PVBOXGUESTDEVEXT pDevExt);
 
+
+#ifdef VBOX_WITH_DPC_LATENCY_CHECKER
+int VBoxGuestCommonIOCtl_DPC(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession,
+                             void *pvData, size_t cbData, size_t *pcbDataReturned);
+#endif
+
 RT_C_DECLS_END
 
