summaryrefslogtreecommitdiffstats
path: root/src/portable.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-10-27 18:00:16 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-10-27 18:00:16 (GMT)
commit8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (patch)
tree7c1bfd20df6135fa1aac607ebe1a46d31d7f4b65 /src/portable.cpp
parent3af6ff4c3d2748b45f468695a3db9f26eef4e630 (diff)
downloadDoxygen-8491e9fbd06ef8a8f1cc542a524c673d7781d4b6.zip
Doxygen-8491e9fbd06ef8a8f1cc542a524c673d7781d4b6.tar.gz
Doxygen-8491e9fbd06ef8a8f1cc542a524c673d7781d4b6.tar.bz2
Release-1.7.5.1-20111027
Diffstat (limited to 'src/portable.cpp')
-rw-r--r--src/portable.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/portable.cpp b/src/portable.cpp
index 7a78131..6dadcd1 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -121,6 +121,14 @@ int portable_system(const char *command,const char *args,bool commandHasConsole
}
else
{
+ // Because ShellExecuteEx can delegate execution to Shell extensions
+ // (data sources, context menu handlers, verb implementations) that
+ // are activated using Component Object Model (COM), COM should be
+ // initialized before ShellExecuteEx is called. Some Shell extensions
+ // require the COM single-threaded apartment (STA) type.
+ // For that case COM is initialized as follows
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
+
// gswin32 is a GUI api which will pop up a window and run
// asynchronously. To prevent both, we use ShellExecuteEx and
// WaitForSingleObject (thanks to Robert Golias for the code)