mohabouje / WinToast

WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. Toast notifications allows your app to inform the users about relevant information and timely events that they should see and take action upon inside your app, such as a new instant message, a new friend request, breaking news, or a calendar event.
MIT License
688 stars 127 forks source link

Crash from CoUninitialize/OleUninitialize #48

Closed ribtoks closed 1 year ago

ribtoks commented 4 years ago

I was trying to use this library from Qt application and there's a conflict between QWindows plugin that also initializes/uninitializes Ole (for QSystemTrayIcon). The result of the conflict is that CoUninitialize() is called twice and second time it raises an exception (which causes an application).

I don't have a very good solution except to provide a way not to call CoUninitialize() in destructor.

mohabouje commented 1 year ago

There is a separate issue where different users provide alternative solutions. As you mentioned, there is no clear solution, specially if you use the provided singleton. See #44 for more details.