Index: /trunk/include/VBox/com/defs.h
===================================================================
--- /trunk/include/VBox/com/defs.h	(revision 62779)
+++ /trunk/include/VBox/com/defs.h	(revision 62780)
@@ -75,24 +75,24 @@
 #if !defined(VBOX_WITH_XPCOM)
 
-#if defined(RT_OS_WINDOWS)
+#ifdef RT_OS_WINDOWS
 
 // Windows COM
 /////////////////////////////////////////////////////////////////////////////
 
-#include <objbase.h>
-#ifndef VBOX_COM_NO_ATL
+# include <iprt/win/objbase.h>
+# ifndef VBOX_COM_NO_ATL
 
 /* Do not use actual ATL, just provide a superficial lookalike ourselves. */
-# include <VBox/com/microatl.h>
-#endif /* VBOX_COM_NO_ATL */
-
-#define NS_DECL_ISUPPORTS
-#define NS_IMPL_ISUPPORTS1_CI(a, b)
+#  include <VBox/com/microatl.h>
+# endif /* VBOX_COM_NO_ATL */
+
+# define NS_DECL_ISUPPORTS
+# define NS_IMPL_ISUPPORTS1_CI(a, b)
 
 /* these are XPCOM only, one for every interface implemented */
-#define NS_DECL_ISUPPORTS
+# define NS_DECL_ISUPPORTS
 
 /** Returns @c true if @a rc represents a warning result code */
-#define SUCCEEDED_WARNING(rc)   (SUCCEEDED(rc) && (rc) != S_OK)
+# define SUCCEEDED_WARNING(rc)   (SUCCEEDED(rc) && (rc) != S_OK)
 
 /** Tests is a COM result code indicates that the process implementing the
Index: /trunk/include/iprt/win/objbase.h
===================================================================
--- /trunk/include/iprt/win/objbase.h	(revision 62780)
+++ /trunk/include/iprt/win/objbase.h	(revision 62780)
@@ -0,0 +1,38 @@
+/** @file
+ * Safe way to include objbase.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_objbase_h___
+#define ___iprt_win_objbase_h___
+
+#pragma warning(push)
+#pragma warning(disable:4668) /* '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+
+#include <objbase.h>
+
+#pragma warning(pop)
+
+#endif
+
Index: /trunk/include/iprt/win/objidl.h
===================================================================
--- /trunk/include/iprt/win/objidl.h	(revision 62780)
+++ /trunk/include/iprt/win/objidl.h	(revision 62780)
@@ -0,0 +1,1 @@
+
Index: /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp	(revision 62779)
+++ /trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp	(revision 62780)
@@ -25,5 +25,5 @@
 #include <cfgmgr32.h>
 #include <tchar.h>
-#include <objbase.h>
+#include <iprt/win/objbase.h>
 
 #include <crtdbg.h>
Index: /trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
===================================================================
--- /trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp	(revision 62779)
+++ /trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp	(revision 62780)
@@ -41,5 +41,5 @@
 #include <guiddef.h>
 #include <devguid.h>
-#include <objbase.h>
+#include <iprt/win/objbase.h>
 #include <iprt/win/setupapi.h>
 #include <shlobj.h>
Index: /trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp
===================================================================
--- /trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp	(revision 62779)
+++ /trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp	(revision 62780)
@@ -31,5 +31,5 @@
 #include <lmerr.h>
 #include <msiquery.h>
-#include <objbase.h>
+#include <iprt/win/objbase.h>
 
 #include <shlobj.h>
Index: /trunk/src/VBox/Main/glue/com.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/com.cpp	(revision 62779)
+++ /trunk/src/VBox/Main/glue/com.cpp	(revision 62780)
@@ -18,5 +18,5 @@
 #if !defined (VBOX_WITH_XPCOM)
 
-# include <objbase.h>
+# include <iprt/win/objbase.h>
 
 #else /* !defined (VBOX_WITH_XPCOM) */
Index: /trunk/src/VBox/Main/glue/initterm.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/initterm.cpp	(revision 62779)
+++ /trunk/src/VBox/Main/glue/initterm.cpp	(revision 62780)
@@ -20,5 +20,5 @@
 
 # include <iprt/nt/nt-and-windows.h>
-# include <objbase.h>
+# include <iprt/win/objbase.h>
 
 #else /* !defined(VBOX_WITH_XPCOM) */
Index: /trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp
===================================================================
--- /trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp	(revision 62779)
+++ /trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp	(revision 62780)
@@ -49,5 +49,5 @@
 # define _WIN32_WINNT 0x0501
 # include <iprt/win/windows.h>          /* ShellExecuteEx, ++ */
-# include <Objbase.h>                   /* CoInitializeEx */
+# include <iprt/win/objbase.h>                   /* CoInitializeEx */
 # ifdef DEBUG
 #  include <Sddl.h>
Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 62779)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 62780)
@@ -123,5 +123,5 @@
 # include <guiddef.h>
 # include <devguid.h>
-# include <objbase.h>
+# include <iprt/win/objbase.h>
 //# include <iprt/win/setupapi.h>
 # include <shlobj.h>
Index: /trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/win/NetIf-win.cpp	(revision 62779)
+++ /trunk/src/VBox/Main/src-server/win/NetIf-win.cpp	(revision 62780)
@@ -59,5 +59,5 @@
 #include <guiddef.h>
 #include <devguid.h>
-#include <objbase.h>
+#include <iprt/win/objbase.h>
 #include <iprt/win/setupapi.h>
 #include <shlobj.h>
Index: /trunk/src/VBox/Main/testcase/tstCollector.cpp
===================================================================
--- /trunk/src/VBox/Main/testcase/tstCollector.cpp	(revision 62779)
+++ /trunk/src/VBox/Main/testcase/tstCollector.cpp	(revision 62780)
@@ -35,6 +35,6 @@
 #ifdef RT_OS_WINDOWS
 # define _WIN32_DCOM
-# include <objidl.h>
-# include <objbase.h>
+# include <iprt/win/objidl.h>
+# include <iprt/win/objbase.h>
 # include "../src-server/win/PerformanceWin.cpp"
 #endif
