SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 214 forks source link

Dotnet core 3.1, crash on windows 7 #83

Open kinsung opened 4 years ago

kinsung commented 4 years ago

Dotnet core 3.1, crash on windows 7.

jinqi166 commented 4 years ago

see:https://blog.stevensanderson.com/2019/11/18/2019-11-18-webwindow-a-cross-platform-webview-for-dotnet-core/ How it works On Windows, WebWindow uses the new Chromium-based Edge via webview2, assuming you have that browser installed (it could fall back on older Edge if you don’t, but I haven’t implemented that) On Mac, it uses the OS’s built-in WKWebView, which is the same technology behind Safari On Linux, it uses WebKitGTK+2, which is yet again a WebKit-based technology

kinsung commented 4 years ago

The new Chromium-based Edge is installed, and it crash when creating web view com instance.

Y56380X commented 4 years ago

Is Microsoft Visual C++ Redistributable for Visual Studio 2019 installed on your System?

kinsung commented 4 years ago

Is Microsoft Visual C++ Redistributable for Visual Studio 2019 installed on your System? Yes, the application is crashed when creating web view instance via com interface. Thank you for your reply.

Progmasys commented 3 years ago

@kinsung if you still insterested, You could try removing this method GetDpiForWindow(_hWnd) since it is Win10 only. Or add some loginc like this:

unsigned int WebWindow::GetScreenDpi() { if (IsWindows10OrGreater) { return GetDpiForWindow(_hWnd); } else { return 0; } }

And you probably would need to remove this too: SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);

This changes worked for me on Win7 x64.