diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index a6d8997f..9e8d2c3a 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -1205,6 +1205,8 @@ CRainmeter::CRainmeter() InitializeCriticalSection(&m_CsLogData); + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + INITCOMMONCONTROLSEX initCtrls; initCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX); initCtrls.dwICC = ICC_TAB_CLASSES; @@ -1246,6 +1248,8 @@ CRainmeter::~CRainmeter() UpdateDesktopWorkArea(true); } + CoUninitialize(); + DeleteCriticalSection(&m_CsLogData); GdiplusShutdown(m_GDIplusToken);