diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-08-01 08:09:29 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-08-01 08:09:29 +0000 |
commit | 2a3df0b1a58647b2e1af4319c60a910b94a965f6 (patch) | |
tree | fd2b11f01cf30ff4ddba939010114d3ce3a8d7c2 /shell | |
parent | 82454fa486ec150cca0ff82c2e8ffa78d593f268 (diff) |
INTEGRATION: CWS register30 (1.11.24); FILE MERGED
2008/07/23 11:10:28 obr 1.11.24.1: #158122# marked SystemShellExecute service as thread affine
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/win32/SysShExec.cxx | 12 | ||||
-rw-r--r-- | shell/source/win32/makefile.mk | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index d39e9b17615e..cdc4f9543a57 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SysShExec.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.12 $ * * This file is part of OpenOffice.org. * @@ -48,6 +48,7 @@ #endif #include <windows.h> #include <shellapi.h> +#include <objbase.h> #if defined _MSC_VER #pragma warning(pop) #endif @@ -269,6 +270,15 @@ namespace // private CSysShExec::CSysShExec( ) : WeakComponentImplHelper2< XSystemShellExecute, XServiceInfo >( m_aMutex ) { + /* + * As this service is declared thread-affine, it is ensured to be called from a + * dedicated thread, so initialize COM here. + * + * We need COM to be initialized for STA, but osl thread get initialized for MTA. + * Once this changed, we can remove the uninitialize call. + */ + CoUninitialize(); + CoInitialize( NULL ); } //------------------------------------------------- diff --git a/shell/source/win32/makefile.mk b/shell/source/win32/makefile.mk index f7a1d8e39a71..04cc45d89bc3 100644 --- a/shell/source/win32/makefile.mk +++ b/shell/source/win32/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.11 $ +# $Revision: 1.12 $ # # This file is part of OpenOffice.org. # @@ -52,6 +52,7 @@ SHL1STDLIBS=$(CPPULIB)\ $(SALLIB)\ $(UWINAPILIB) \ $(ADVAPI32LIB) \ + $(OLE32LIB) \ $(SHELL32LIB) SHL1DEPN= |