Index: /trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispKmt.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispKmt.cpp	(revision 60273)
+++ /trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispKmt.cpp	(revision 60274)
@@ -57,69 +57,69 @@
         bool bSupportedWin8 = true;
         pCallbacks->pfnD3DKMTOpenAdapterFromHdc = (PFND3DKMT_OPENADAPTERFROMHDC)GetProcAddress(pCallbacks->hGdi32, "D3DKMTOpenAdapterFromHdc");
-        Log((__FUNCTION__"pfnD3DKMTOpenAdapterFromHdc = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromHdc));
+        LogFunc(("pfnD3DKMTOpenAdapterFromHdc = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromHdc));
         bSupported &= !!(pCallbacks->pfnD3DKMTOpenAdapterFromHdc);
 
         pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName = (PFND3DKMT_OPENADAPTERFROMGDIDISPLAYNAME)GetProcAddress(pCallbacks->hGdi32, "D3DKMTOpenAdapterFromGdiDisplayName");
-        Log((__FUNCTION__": pfnD3DKMTOpenAdapterFromGdiDisplayName = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName));
+        LogFunc(("pfnD3DKMTOpenAdapterFromGdiDisplayName = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName));
         bSupported &= !!(pCallbacks->pfnD3DKMTOpenAdapterFromGdiDisplayName);
 
         pCallbacks->pfnD3DKMTCloseAdapter = (PFND3DKMT_CLOSEADAPTER)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCloseAdapter");
-        Log((__FUNCTION__": pfnD3DKMTCloseAdapter = %p\n", pCallbacks->pfnD3DKMTCloseAdapter));
+        LogFunc(("pfnD3DKMTCloseAdapter = %p\n", pCallbacks->pfnD3DKMTCloseAdapter));
         bSupported &= !!(pCallbacks->pfnD3DKMTCloseAdapter);
 
         pCallbacks->pfnD3DKMTEscape = (PFND3DKMT_ESCAPE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTEscape");
-        Log((__FUNCTION__": pfnD3DKMTEscape = %p\n", pCallbacks->pfnD3DKMTEscape));
+        LogFunc(("pfnD3DKMTEscape = %p\n", pCallbacks->pfnD3DKMTEscape));
         bSupported &= !!(pCallbacks->pfnD3DKMTEscape);
 
         pCallbacks->pfnD3DKMTQueryAdapterInfo = (PFND3DKMT_QUERYADAPTERINFO)GetProcAddress(pCallbacks->hGdi32, "D3DKMTQueryAdapterInfo");
-        Log((__FUNCTION__": pfnD3DKMTQueryAdapterInfo = %p\n", pCallbacks->pfnD3DKMTQueryAdapterInfo));
+        LogFunc(("pfnD3DKMTQueryAdapterInfo = %p\n", pCallbacks->pfnD3DKMTQueryAdapterInfo));
         bSupported &= !!(pCallbacks->pfnD3DKMTQueryAdapterInfo);
 
                 pCallbacks->pfnD3DKMTCreateDevice = (PFND3DKMT_CREATEDEVICE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateDevice");
-        Log((__FUNCTION__": pfnD3DKMTCreateDevice = %p\n", pCallbacks->pfnD3DKMTCreateDevice));
+        LogFunc(("pfnD3DKMTCreateDevice = %p\n", pCallbacks->pfnD3DKMTCreateDevice));
         bSupported &= !!(pCallbacks->pfnD3DKMTCreateDevice);
 
         pCallbacks->pfnD3DKMTDestroyDevice = (PFND3DKMT_DESTROYDEVICE)GetProcAddress(pCallbacks->hGdi32, "D3DKMTDestroyDevice");
-        Log((__FUNCTION__": pfnD3DKMTDestroyDevice = %p\n", pCallbacks->pfnD3DKMTDestroyDevice));
+        LogFunc(("pfnD3DKMTDestroyDevice = %p\n", pCallbacks->pfnD3DKMTDestroyDevice));
         bSupported &= !!(pCallbacks->pfnD3DKMTDestroyDevice);
 
         pCallbacks->pfnD3DKMTCreateContext = (PFND3DKMT_CREATECONTEXT)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateContext");
-        Log((__FUNCTION__": pfnD3DKMTCreateContext = %p\n", pCallbacks->pfnD3DKMTCreateContext));
+        LogFunc(("pfnD3DKMTCreateContext = %p\n", pCallbacks->pfnD3DKMTCreateContext));
         bSupported &= !!(pCallbacks->pfnD3DKMTCreateContext);
 
         pCallbacks->pfnD3DKMTDestroyContext = (PFND3DKMT_DESTROYCONTEXT)GetProcAddress(pCallbacks->hGdi32, "D3DKMTDestroyContext");
-        Log((__FUNCTION__": pfnD3DKMTDestroyContext = %p\n", pCallbacks->pfnD3DKMTDestroyContext));
+        LogFunc(("pfnD3DKMTDestroyContext = %p\n", pCallbacks->pfnD3DKMTDestroyContext));
         bSupported &= !!(pCallbacks->pfnD3DKMTDestroyContext);
 
         pCallbacks->pfnD3DKMTRender = (PFND3DKMT_RENDER)GetProcAddress(pCallbacks->hGdi32, "D3DKMTRender");
-        Log((__FUNCTION__": pfnD3DKMTRender = %p\n", pCallbacks->pfnD3DKMTRender));
+        LogFunc(("pfnD3DKMTRender = %p\n", pCallbacks->pfnD3DKMTRender));
         bSupported &= !!(pCallbacks->pfnD3DKMTRender);
 
         pCallbacks->pfnD3DKMTCreateAllocation = (PFND3DKMT_CREATEALLOCATION)GetProcAddress(pCallbacks->hGdi32, "D3DKMTCreateAllocation");
-        Log((__FUNCTION__": pfnD3DKMTCreateAllocation = %p\n", pCallbacks->pfnD3DKMTCreateAllocation));
+        LogFunc(("pfnD3DKMTCreateAllocation = %p\n", pCallbacks->pfnD3DKMTCreateAllocation));
         bSupported &= !!(pCallbacks->pfnD3DKMTCreateAllocation);
 
         pCallbacks->pfnD3DKMTDestroyAllocation = (PFND3DKMT_DESTROYALLOCATION)GetProcAddress(pCallbacks->hGdi32, "D3DKMTDestroyAllocation");
-        Log((__FUNCTION__": pfnD3DKMTDestroyAllocation = %p\n", pCallbacks->pfnD3DKMTDestroyAllocation));
+        LogFunc(("pfnD3DKMTDestroyAllocation = %p\n", pCallbacks->pfnD3DKMTDestroyAllocation));
         bSupported &= !!(pCallbacks->pfnD3DKMTDestroyAllocation);
 
         pCallbacks->pfnD3DKMTLock = (PFND3DKMT_LOCK)GetProcAddress(pCallbacks->hGdi32, "D3DKMTLock");
-        Log((__FUNCTION__": pfnD3DKMTLock = %p\n", pCallbacks->pfnD3DKMTLock));
+        LogFunc(("pfnD3DKMTLock = %p\n", pCallbacks->pfnD3DKMTLock));
         bSupported &= !!(pCallbacks->pfnD3DKMTLock);
 
         pCallbacks->pfnD3DKMTUnlock = (PFND3DKMT_UNLOCK)GetProcAddress(pCallbacks->hGdi32, "D3DKMTUnlock");
-        Log((__FUNCTION__": pfnD3DKMTUnlock = %p\n", pCallbacks->pfnD3DKMTUnlock));
+        LogFunc(("pfnD3DKMTUnlock = %p\n", pCallbacks->pfnD3DKMTUnlock));
         bSupported &= !!(pCallbacks->pfnD3DKMTUnlock);
 
         pCallbacks->pfnD3DKMTInvalidateActiveVidPn = (PFND3DKMT_INVALIDATEACTIVEVIDPN)GetProcAddress(pCallbacks->hGdi32, "D3DKMTInvalidateActiveVidPn");
-        Log((__FUNCTION__": pfnD3DKMTInvalidateActiveVidPn = %p\n", pCallbacks->pfnD3DKMTInvalidateActiveVidPn));
+        LogFunc(("pfnD3DKMTInvalidateActiveVidPn = %p\n", pCallbacks->pfnD3DKMTInvalidateActiveVidPn));
         bSupported &= !!(pCallbacks->pfnD3DKMTInvalidateActiveVidPn);
 
         pCallbacks->pfnD3DKMTPollDisplayChildren = (PFND3DKMT_POLLDISPLAYCHILDREN)GetProcAddress(pCallbacks->hGdi32, "D3DKMTPollDisplayChildren");
-        Log((__FUNCTION__": pfnD3DKMTPollDisplayChildren = %p\n", pCallbacks->pfnD3DKMTPollDisplayChildren));
+        LogFunc(("pfnD3DKMTPollDisplayChildren = %p\n", pCallbacks->pfnD3DKMTPollDisplayChildren));
         bSupported &= !!(pCallbacks->pfnD3DKMTPollDisplayChildren);
 
         pCallbacks->pfnD3DKMTEnumAdapters = (PFND3DKMT_ENUMADAPTERS)GetProcAddress(pCallbacks->hGdi32, "D3DKMTEnumAdapters");
-        Log((__FUNCTION__": pfnD3DKMTEnumAdapters = %p\n", pCallbacks->pfnD3DKMTEnumAdapters));
+        LogFunc(("pfnD3DKMTEnumAdapters = %p\n", pCallbacks->pfnD3DKMTEnumAdapters));
         /* this present starting win8 release preview only, so keep going if it is not available,
          * i.e. do not clear the bSupported on its absence */
@@ -127,5 +127,5 @@
 
         pCallbacks->pfnD3DKMTOpenAdapterFromLuid = (PFND3DKMT_OPENADAPTERFROMLUID)GetProcAddress(pCallbacks->hGdi32, "D3DKMTOpenAdapterFromLuid");
-        Log((__FUNCTION__": pfnD3DKMTOpenAdapterFromLuid = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromLuid));
+        LogFunc(("pfnD3DKMTOpenAdapterFromLuid = %p\n", pCallbacks->pfnD3DKMTOpenAdapterFromLuid));
         /* this present starting win8 release preview only, so keep going if it is not available,
          * i.e. do not clear the bSupported on its absence */
@@ -143,5 +143,5 @@
         else
         {
-            Log((__FUNCTION__": one of pfnD3DKMT function pointers failed to initialize\n"));
+            LogFunc(("one of pfnD3DKMT function pointers failed to initialize\n"));
             hr = E_NOINTERFACE;
         }
@@ -242,5 +242,5 @@
     else
     {
-        Log((__FUNCTION__": pfnD3DKMTOpenAdapterFromGdiDisplayName failed, Status (0x%x)\n", Status));
+        LogFunc(("pfnD3DKMTOpenAdapterFromGdiDisplayName failed, Status (0x%x)\n", Status));
         hr = E_FAIL;
     }
@@ -328,5 +328,5 @@
     }
 
-    Log((__FUNCTION__": pfnD3DKMTCloseAdapter failed, Status (0x%x)\n", Status));
+    LogFunc(("pfnD3DKMTCloseAdapter failed, Status (0x%x)\n", Status));
 
     return E_FAIL;
Index: /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp	(revision 60273)
+++ /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp	(revision 60274)
@@ -29,7 +29,14 @@
             Log(_m); \
         } while (0)
+#define WARN_FUNC(_m) do { \
+            Assert(0); \
+            LogFunc(_m); \
+        } while (0)
 #else
 #define WARN(_m) do { \
             Log(_m); \
+        } while (0)
+#define WARN_FUNC(_m) do { \
+            LogFunc(_m); \
         } while (0)
 #endif
@@ -608,14 +615,14 @@
     if (OSinfo.dwMajorVersion >= 6)
     {
-        Log((__FUNCTION__": this is vista and up\n"));
+        LogFunc(("this is vista and up\n"));
         HMODULE hUser = GetModuleHandle("user32.dll");
         if (hUser)
         {
             *(uintptr_t *)&pIf->modeData.wddm.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA");
-            Log((__FUNCTION__": VBoxDisplayInit: pfnChangeDisplaySettingsEx = %p\n", pIf->modeData.wddm.pfnChangeDisplaySettingsEx));
+            LogFunc(("VBoxDisplayInit: pfnChangeDisplaySettingsEx = %p\n", pIf->modeData.wddm.pfnChangeDisplaySettingsEx));
             bSupported &= !!(pIf->modeData.wddm.pfnChangeDisplaySettingsEx);
 
             *(uintptr_t *)&pIf->modeData.wddm.pfnEnumDisplayDevices = (uintptr_t)GetProcAddress(hUser, "EnumDisplayDevicesA");
-            Log((__FUNCTION__": VBoxDisplayInit: pfnEnumDisplayDevices = %p\n", pIf->modeData.wddm.pfnEnumDisplayDevices));
+            LogFunc(("VBoxDisplayInit: pfnEnumDisplayDevices = %p\n", pIf->modeData.wddm.pfnEnumDisplayDevices));
             bSupported &= !!(pIf->modeData.wddm.pfnEnumDisplayDevices);
             /* for win 7 and above */
@@ -623,13 +630,13 @@
             {
                 *(uintptr_t *)&gCtx.pfnSetDisplayConfig = (uintptr_t)GetProcAddress(hUser, "SetDisplayConfig");
-                Log((__FUNCTION__": VBoxDisplayInit: pfnSetDisplayConfig = %p\n", gCtx.pfnSetDisplayConfig));
+                LogFunc(("VBoxDisplayInit: pfnSetDisplayConfig = %p\n", gCtx.pfnSetDisplayConfig));
                 bSupported &= !!(gCtx.pfnSetDisplayConfig);
 
                 *(uintptr_t *)&gCtx.pfnQueryDisplayConfig = (uintptr_t)GetProcAddress(hUser, "QueryDisplayConfig");
-                Log((__FUNCTION__": VBoxDisplayInit: pfnQueryDisplayConfig = %p\n", gCtx.pfnQueryDisplayConfig));
+                LogFunc(("VBoxDisplayInit: pfnQueryDisplayConfig = %p\n", gCtx.pfnQueryDisplayConfig));
                 bSupported &= !!(gCtx.pfnQueryDisplayConfig);
 
                 *(uintptr_t *)&gCtx.pfnGetDisplayConfigBufferSizes = (uintptr_t)GetProcAddress(hUser, "GetDisplayConfigBufferSizes");
-                Log((__FUNCTION__": VBoxDisplayInit: pfnGetDisplayConfigBufferSizes = %p\n", gCtx.pfnGetDisplayConfigBufferSizes));
+                LogFunc(("VBoxDisplayInit: pfnGetDisplayConfigBufferSizes = %p\n", gCtx.pfnGetDisplayConfigBufferSizes));
                 bSupported &= !!(gCtx.pfnGetDisplayConfigBufferSizes);
             }
@@ -645,5 +652,5 @@
         else
         {
-            WARN((__FUNCTION__": GetModuleHandle(USER32) failed, err(%d)\n", GetLastError()));
+            WARN_FUNC(("GetModuleHandle(USER32) failed, err(%d)\n", GetLastError()));
             err = ERROR_NOT_SUPPORTED;
         }
@@ -651,5 +658,5 @@
     else
     {
-        WARN((__FUNCTION__": can not switch to VBOXDISPIF_MODE_WDDM, because os is not Vista or upper\n"));
+        WARN_FUNC(("can not switch to VBOXDISPIF_MODE_WDDM, because os is not Vista or upper\n"));
         err = ERROR_NOT_SUPPORTED;
     }
@@ -757,5 +764,5 @@
 #endif
         default:
-            Log((__FUNCTION__": unknown mode (%d)\n", pIf->enmMode));
+            LogFunc(("unknown mode (%d)\n", pIf->enmMode));
             return ERROR_INVALID_PARAMETER;
     }
@@ -775,5 +782,5 @@
 #endif
         default:
-            Log((__FUNCTION__": unknown mode (%d)\n", pIf->enmMode));
+            LogFunc(("unknown mode (%d)\n", pIf->enmMode));
             return ERROR_INVALID_PARAMETER;
     }
@@ -936,11 +943,11 @@
         }
         case WM_CLOSE:
-            Log((__FUNCTION__": got WM_CLOSE for hwnd(0x%x)", hwnd));
+            LogFunc(("got WM_CLOSE for hwnd(0x%x)", hwnd));
             return 0;
         case WM_DESTROY:
-            Log((__FUNCTION__": got WM_DESTROY for hwnd(0x%x)", hwnd));
+            LogFunc(("got WM_DESTROY for hwnd(0x%x)", hwnd));
             return 0;
         case WM_NCHITTEST:
-            Log((__FUNCTION__": got WM_NCHITTEST for hwnd(0x%x)\n", hwnd));
+            LogFunc(("got WM_NCHITTEST for hwnd(0x%x)\n", hwnd));
             return HTNOWHERE;
         default:
@@ -973,5 +980,5 @@
         {
             DWORD winErr = GetLastError();
-            WARN((__FUNCTION__": RegisterClass failed, winErr(%d)\n", winErr));
+            WARN_FUNC(("RegisterClass failed, winErr(%d)\n", winErr));
             hr = E_FAIL;
         }
@@ -997,5 +1004,5 @@
         {
             DWORD winErr = GetLastError();
-            WARN((__FUNCTION__": CreateWindowEx failed, winErr(%d)\n", winErr));
+            WARN_FUNC(("CreateWindowEx failed, winErr(%d)\n", winErr));
             hr = E_FAIL;
         }
@@ -1012,5 +1019,5 @@
 
     DWORD winErr = GetLastError();
-    WARN((__FUNCTION__": DestroyWindow failed, winErr(%d) for hWnd(0x%x)\n", winErr, hWnd));
+    WARN_FUNC(("DestroyWindow failed, winErr(%d) for hWnd(0x%x)\n", winErr, hWnd));
 
     return HRESULT_FROM_WIN32(winErr);
@@ -1107,5 +1114,5 @@
     {
         DWORD winErr = GetLastError();
-        WARN((__FUNCTION__": SetEvent failed, winErr = (%d)", winErr));
+        WARN_FUNC(("SetEvent failed, winErr = (%d)", winErr));
         HRESULT tmpHr = HRESULT_FROM_WIN32(winErr);
         Assert(tmpHr != S_OK);
@@ -1160,5 +1167,5 @@
         {
             DWORD winErr = GetLastError();
-            WARN((__FUNCTION__": CreateThread failed, winErr = (%d)", winErr));
+            WARN_FUNC(("CreateThread failed, winErr = (%d)", winErr));
             hr = HRESULT_FROM_WIN32(winErr);
             Assert(hr != S_OK);
@@ -1169,5 +1176,5 @@
     {
         DWORD winErr = GetLastError();
-        WARN((__FUNCTION__": CreateEvent failed, winErr = (%d)", winErr));
+        WARN_FUNC(("CreateEvent failed, winErr = (%d)", winErr));
         hr = HRESULT_FROM_WIN32(winErr);
         Assert(hr != S_OK);
@@ -1729,5 +1736,5 @@
 #endif
         default:
-            WARN((__FUNCTION__": unknown mode (%d)\n", pIf->enmMode));
+            WARN_FUNC(("unknown mode (%d)\n", pIf->enmMode));
             return ERROR_INVALID_PARAMETER;
     }
@@ -1748,5 +1755,5 @@
 #endif
         default:
-            WARN((__FUNCTION__": unknown mode (%d)\n", pIf->enmMode));
+            WARN_FUNC(("unknown mode (%d)\n", pIf->enmMode));
             return ERROR_INVALID_PARAMETER;
     }
@@ -1926,5 +1933,5 @@
 #endif
         default:
-            WARN((__FUNCTION__": unknown mode (%d)\n", pIf->enmMode));
+            WARN_FUNC(("unknown mode (%d)\n", pIf->enmMode));
             return ERROR_INVALID_PARAMETER;
     }
@@ -1950,10 +1957,10 @@
             bool bSupported = true;
             *(uintptr_t *)&pIf->modeData.xpdm.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA");
-            Log((__FUNCTION__": pfnChangeDisplaySettingsEx = %p\n", pIf->modeData.xpdm.pfnChangeDisplaySettingsEx));
+            LogFunc(("pfnChangeDisplaySettingsEx = %p\n", pIf->modeData.xpdm.pfnChangeDisplaySettingsEx));
             bSupported &= !!(pIf->modeData.xpdm.pfnChangeDisplaySettingsEx);
 
             if (!bSupported)
             {
-                WARN((__FUNCTION__": pfnChangeDisplaySettingsEx function pointer failed to initialize\n"));
+                WARN_FUNC(("pfnChangeDisplaySettingsEx function pointer failed to initialize\n"));
                 err = ERROR_NOT_SUPPORTED;
             }
@@ -1961,5 +1968,5 @@
         else
         {
-            WARN((__FUNCTION__": failed to get USER32 handle, err (%d)\n", GetLastError()));
+            WARN_FUNC(("failed to get USER32 handle, err (%d)\n", GetLastError()));
             err = ERROR_NOT_SUPPORTED;
         }
@@ -1967,5 +1974,5 @@
     else
     {
-        WARN((__FUNCTION__": can not switch to VBOXDISPIF_MODE_XPDM, because os is not >= w2k\n"));
+        WARN_FUNC(("can not switch to VBOXDISPIF_MODE_XPDM, because os is not >= w2k\n"));
         err = ERROR_NOT_SUPPORTED;
     }
@@ -1997,50 +2004,50 @@
     {
         case VBOXDISPIF_MODE_XPDM_NT4:
-            Log((__FUNCTION__": request to switch to VBOXDISPIF_MODE_XPDM_NT4\n"));
+            LogFunc(("request to switch to VBOXDISPIF_MODE_XPDM_NT4\n"));
             err = vboxDispIfSwitchToXPDM_NT4(pIf);
             if (err == NO_ERROR)
             {
-                Log((__FUNCTION__": successfully switched to XPDM_NT4 mode\n"));
+                LogFunc(("successfully switched to XPDM_NT4 mode\n"));
                 pIf->enmMode = VBOXDISPIF_MODE_XPDM_NT4;
             }
             else
-                WARN((__FUNCTION__": failed to switch to XPDM_NT4 mode, err (%d)\n", err));
+                WARN_FUNC(("failed to switch to XPDM_NT4 mode, err (%d)\n", err));
             break;
         case VBOXDISPIF_MODE_XPDM:
-            Log((__FUNCTION__": request to switch to VBOXDISPIF_MODE_XPDM\n"));
+            LogFunc(("request to switch to VBOXDISPIF_MODE_XPDM\n"));
             err = vboxDispIfSwitchToXPDM(pIf);
             if (err == NO_ERROR)
             {
-                Log((__FUNCTION__": successfully switched to XPDM mode\n"));
+                LogFunc(("successfully switched to XPDM mode\n"));
                 pIf->enmMode = VBOXDISPIF_MODE_XPDM;
             }
             else
-                WARN((__FUNCTION__": failed to switch to XPDM mode, err (%d)\n", err));
+                WARN_FUNC(("failed to switch to XPDM mode, err (%d)\n", err));
             break;
 #ifdef VBOX_WITH_WDDM
         case VBOXDISPIF_MODE_WDDM:
         {
-            Log((__FUNCTION__": request to switch to VBOXDISPIF_MODE_WDDM\n"));
+            LogFunc(("request to switch to VBOXDISPIF_MODE_WDDM\n"));
             err = vboxDispIfSwitchToWDDM(pIf);
             if (err == NO_ERROR)
             {
-                Log((__FUNCTION__": successfully switched to WDDM mode\n"));
+                LogFunc(("successfully switched to WDDM mode\n"));
                 pIf->enmMode = VBOXDISPIF_MODE_WDDM;
             }
             else
-                WARN((__FUNCTION__": failed to switch to WDDM mode, err (%d)\n", err));
+                WARN_FUNC(("failed to switch to WDDM mode, err (%d)\n", err));
             break;
         }
         case VBOXDISPIF_MODE_WDDM_W7:
         {
-            Log((__FUNCTION__": request to switch to VBOXDISPIF_MODE_WDDM_W7\n"));
+            LogFunc(("request to switch to VBOXDISPIF_MODE_WDDM_W7\n"));
             err = vboxDispIfSwitchToWDDM_W7(pIf);
             if (err == NO_ERROR)
             {
-                Log((__FUNCTION__": successfully switched to WDDM mode\n"));
+                LogFunc(("successfully switched to WDDM mode\n"));
                 pIf->enmMode = VBOXDISPIF_MODE_WDDM_W7;
             }
             else
-                WARN((__FUNCTION__": failed to switch to WDDM mode, err (%d)\n", err));
+                WARN_FUNC(("failed to switch to WDDM mode, err (%d)\n", err));
             break;
         }
