We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ee4235 commit 3b41a5eCopy full SHA for 3b41a5e
dev/WebView2/WebView2.cpp
@@ -29,7 +29,13 @@ static constexpr wstring_view s_error_cwv2_not_present_closed{ L"Failed because
29
30
WebView2::WebView2()
31
{
32
- if (auto user32module = GetModuleHandleW(L"user32.dll"))
+ auto user32module = GetModuleHandleW(L"ext-ms-win-rtcore-webview-l1-1-0.dll");
33
+ if (!user32module)
34
+ {
35
+ user32module = GetModuleHandleW(L"user32.dll");
36
+ }
37
+
38
+ if (user32module)
39
40
m_fnClientToScreen = reinterpret_cast<decltype(m_fnClientToScreen)>(GetProcAddress(user32module, "ClientToScreen"));
41
m_fnSendMessageW = reinterpret_cast<decltype(m_fnSendMessageW)>(GetProcAddress(user32module, "SendMessageW"));
0 commit comments