windows: use C++ prototype for REFIID / CoCreateInstance
authorRafaël Carré <funman@videolan.org>
Sun, 30 Oct 2011 23:23:00 +0000 (19:23 -0400)
committerRafaël Carré <funman@videolan.org>
Sun, 30 Oct 2011 23:23:00 +0000 (19:23 -0400)
Fix build with mingw-w64

include/vlc_windows_interfaces.h
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/main_interface_win32.cpp

index 9e0dd35..ac066e6 100644 (file)
 
 #define CLSCTX_INPROC_SERVER 1
 typedef GUID IID;
+
 #ifndef _REFIID_DEFINED
-# define REFIID const IID* const
+# ifdef __cplusplus
+#  define REFIID const IID&
+# else
+#  define REFIID const IID* const
+# endif
 #endif
 
 const GUID clsid_IApplication2 = { 0x1968106d,0xf3b5,0x44cf,{0x89,0x0e,0x11,0x6f,0xcb,0x9e,0xce,0xf1}};
index faee5e2..57e5839 100644 (file)
@@ -888,7 +888,7 @@ void SPrefsPanel::assoDialog()
 
     if( S_OK == CoCreateInstance( &clsid_IApplication2,
                 NULL, CLSCTX_INPROC_SERVER,
-                &IID_IApplicationAssociationRegistrationUI,
+                IID_IApplicationAssociationRegistrationUI,
                 (void **)&p_appassoc) )
     {
         if(S_OK == p_appassoc->vt->LaunchAdvancedAssociationUI(p_appassoc, L"VLC" ) )
index 2b81907..bbbfe44 100644 (file)
@@ -81,7 +81,7 @@ void MainInterface::createTaskBarButtons()
 
     if( S_OK == CoCreateInstance( &clsid_ITaskbarList,
                 NULL, CLSCTX_INPROC_SERVER,
-                &IID_ITaskbarList3,
+                IID_ITaskbarList3,
                 (void **)&p_taskbl) )
     {
         p_taskbl->vt->HrInit(p_taskbl);