It is not possible to get the runtime information without needing a WebView2 instance? I ask this because I was hoping to display this information on my applications About window and in this context I have no WebView2 object. The function GetSdkBuild does not need a WebView2 instance but the second function GetRuntimeVersion does. Wil::unique_cotaskmem_string runtimeVersion ĬHECK_FAILURE(environment->get_BrowserVersionString(&runtimeVersion)) Wil::com_ptr environment = appWindow->GetWebViewEnvironment() Std::wstring GetRuntimeVersion(AppWindow* appWindow) So basically WebView2 is used in modern (UWP or Store) apps to use Microsoft Edge browser. App developers use WebView2 control to embed web technologies such as HTML, CSS, JavaScript, etc in their apps. Wil::unique_cotaskmem_string targetVersion ĬHECK_FAILURE(options->get_TargetCompatibleBrowserVersion(&targetVersion)) Ĭonst wchar_t* targetVersionMajorAndRest = targetVersion.get() Ĭonst wchar_t* targetVersionMinorAndRest = wcschr(targetVersionMajorAndRest, L'.') ĬHECK_FAILURE((targetVersionMinorAndRest != nullptr & *targetVersionMinorAndRest = L'.') ? S_OK : E_UNEXPECTED) Ĭonst wchar_t* targetVersionBuildAndRest = wcschr(targetVersionMinorAndRest + 1, L'.') ĬHECK_FAILURE((targetVersionBuildAndRest != nullptr & *targetVersionBuildAndRest = L'.') ? S_OK : E_UNEXPECTED) Microsoft Edge WebView2 is a control platform that uses Microsoft Edge browser as its rendering engine to display web contents in applications.
0 Comments
Leave a Reply. |