[vlc-commits] windows: use C++ prototype for REFIID / CoCreateInstance

Rafaël Carré git at videolan.org
Mon Oct 31 00:23:40 CET 2011


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Oct 30 19:23:00 2011 -0400| [6dbe300fb69b0f02bac22d278f41c257b55c5b8f] | committer: Rafaël Carré

windows: use C++ prototype for REFIID / CoCreateInstance

Fix build with mingw-w64

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6dbe300fb69b0f02bac22d278f41c257b55c5b8f
---

 include/vlc_windows_interfaces.h                  |    7 ++++++-
 modules/gui/qt4/components/simple_preferences.cpp |    2 +-
 modules/gui/qt4/main_interface_win32.cpp          |    2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/vlc_windows_interfaces.h b/include/vlc_windows_interfaces.h
index 9e0dd35..ac066e6 100644
--- a/include/vlc_windows_interfaces.h
+++ b/include/vlc_windows_interfaces.h
@@ -32,8 +32,13 @@
 
 #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}};
diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index faee5e2..57e5839 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -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" ) )
diff --git a/modules/gui/qt4/main_interface_win32.cpp b/modules/gui/qt4/main_interface_win32.cpp
index 2b81907..bbbfe44 100644
--- a/modules/gui/qt4/main_interface_win32.cpp
+++ b/modules/gui/qt4/main_interface_win32.cpp
@@ -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);



More information about the vlc-commits mailing list