Skip to content

Commit

Permalink
CP Adjust apiset fallback for user32 dependencies in WebView2 (#7977)
Browse files Browse the repository at this point in the history
commit 80a4bf4
  • Loading branch information
brianostms authored and bkudiess committed Dec 15, 2022
1 parent 5ee4235 commit 3b41a5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev/WebView2/WebView2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ static constexpr wstring_view s_error_cwv2_not_present_closed{ L"Failed because

WebView2::WebView2()
{
if (auto user32module = GetModuleHandleW(L"user32.dll"))
auto user32module = GetModuleHandleW(L"ext-ms-win-rtcore-webview-l1-1-0.dll");
if (!user32module)
{
user32module = GetModuleHandleW(L"user32.dll");
}

if (user32module)
{
m_fnClientToScreen = reinterpret_cast<decltype(m_fnClientToScreen)>(GetProcAddress(user32module, "ClientToScreen"));
m_fnSendMessageW = reinterpret_cast<decltype(m_fnSendMessageW)>(GetProcAddress(user32module, "SendMessageW"));
Expand Down

0 comments on commit 3b41a5e

Please sign in to comment.