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 | d5824b06af8b4a6576f1c7a8faa5de79775686dd (patch) | |
tree | b54c98a2b14d4958cf31c3cbbb4b004faffc3973 /shell | |
parent | e4038d50bbbce0099c272e83ac6894fe50e311e2 (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 f66d90e9c0..35e68a3a04 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 f7a1d8e39a..04cc45d89b 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= |