Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinUpdater: Properly initialize COM on window thread #8322

Merged
merged 1 commit into from Aug 20, 2019

Conversation

@CookiePLMonster
Copy link
Contributor

CookiePLMonster commented Aug 19, 2019

This PR fixes somewhat of a regression from #8298, even though it was not really related. Before my changes, COM has been implicitly initialized on window thread by something else, and so CoCreateInstance succeeded. After my changes, this implicit initialization stopped covering this specific case and CoCreateInstance started failing. This caused ITaskbarList3 not to be created, which in turn broke the taskbar progress bar functionality.

Now I explicitly initialize and uninitialize COM on window thread, like it always should have been done. I also migrated ITaskbarList3 to use WRL instead of a raw pointer to make code cleaner and easier to release all references properly before calling CoUninitialize.

EDIT:
Obligatory Raymond Chen explaining the phenomenon which most likely happened here:
https://devblogs.microsoft.com/oldnewthing/20130419-00/?p=4613

…kbarList3 on exit
Copy link
Contributor

stenzek left a comment

LGTM otherwise

Source/Core/WinUpdater/WinUI.cpp Show resolved Hide resolved
@stenzek stenzek merged commit e71cab0 into dolphin-emu:master Aug 20, 2019
10 checks passed
10 checks passed
default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
@CookiePLMonster

This comment has been minimized.

Copy link
Contributor Author

CookiePLMonster commented Aug 20, 2019

@CookiePLMonster CookiePLMonster deleted the CookiePLMonster:8298-com-fix branch Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.