[vlc-commits] qt4: only use COM apartment thread for Shell Interfaces

Rémi Denis-Courmont git at videolan.org
Mon May 25 18:02:45 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 25 18:59:52 2015 +0300| [0983db1610cad1a5058d1a2edb5dfc3311a042cb] | committer: Rémi Denis-Courmont

qt4: only use COM apartment thread for Shell Interfaces

(ref: MSDN KB 287087)

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

 modules/gui/qt4/components/simple_preferences.cpp |    4 +---
 modules/gui/qt4/main_interface_win32.cpp          |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 2c0cd25..8195b18 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1255,9 +1255,7 @@ void SPrefsPanel::assoDialog()
 {
     HRESULT hr;
 
-    hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
-    if( hr == RPC_E_CHANGED_MODE )
-        hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
+    hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
     if( SUCCEEDED(hr) )
     {
         void *p;
diff --git a/modules/gui/qt4/main_interface_win32.cpp b/modules/gui/qt4/main_interface_win32.cpp
index 909b38e..c327fc5 100644
--- a/modules/gui/qt4/main_interface_win32.cpp
+++ b/modules/gui/qt4/main_interface_win32.cpp
@@ -119,9 +119,7 @@ void MainInterface::createTaskBarButtons()
     p_taskbl = NULL;
     himl = NULL;
 
-    HRESULT hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
-    if( hr == RPC_E_CHANGED_MODE )
-        hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
+    HRESULT hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
     if( FAILED(hr) )
         return;
 



More information about the vlc-commits mailing list