Mercurial > dwindows
changeset 2154:a8b55524b1b2
Win: Fix CreateCoreWebView2EnvironmentWithOption() failure with no CoInitializeEx().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 18 Sep 2020 00:21:30 +0000 |
parents | 9c1a64ebb686 |
children | d953786b2e85 |
files | win/edge.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/win/edge.cpp Wed Sep 16 10:33:19 2020 +0000 +++ b/win/edge.cpp Fri Sep 18 00:21:30 2020 +0000 @@ -234,6 +234,8 @@ wcscat(tempdir, L".WebView2\\"); CreateDirectoryW(tempdir, NULL); + CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + CreateCoreWebView2EnvironmentWithOptions(nullptr, tempdir, nullptr, Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>( [this](HRESULT result, ICoreWebView2Environment* env) -> HRESULT {