diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-10-27 18:00:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-10-27 18:00:16 (GMT) |
commit | 8491e9fbd06ef8a8f1cc542a524c673d7781d4b6 (patch) | |
tree | 7c1bfd20df6135fa1aac607ebe1a46d31d7f4b65 /src/portable.cpp | |
parent | 3af6ff4c3d2748b45f468695a3db9f26eef4e630 (diff) | |
download | Doxygen-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.cpp | 8 |
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) |