From 4cf416bd3f5ea815c786311f0c28eb8cffe7b4e9 Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Tue, 5 Mar 2013 10:32:39 -0700 Subject: [PATCH] FileView: Fixed icon issue with the thread. --- Plugins/PluginFileView/PluginFileView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plugins/PluginFileView/PluginFileView.cpp b/Plugins/PluginFileView/PluginFileView.cpp index 573b394e..c7b4bac5 100644 --- a/Plugins/PluginFileView/PluginFileView.cpp +++ b/Plugins/PluginFileView/PluginFileView.cpp @@ -673,6 +673,8 @@ PLUGIN_EXPORT void Finalize(void* data) unsigned __stdcall SystemThreadProc(void* pParam) { + CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + ParentMeasure* parent = (ParentMeasure*)pParam; EnterCriticalSection(&g_CriticalSection); @@ -896,6 +898,8 @@ unsigned __stdcall SystemThreadProc(void* pParam) } delete tmp; + + CoUninitialize(); return 0; }