我第一次尝试新的TEdgeBrowser失败了,因为“系统找不到文件”
procedure TFrmTEdgeBrowser.BtnNavigateClick(Sender: TObject);
var lErrCode: Integer;
begin
if not EdgeBrowser.Navigate('https://www.google.com') then
begin
lErrCode := EdgeBrowser.LastErrorCode;
ShowMessage(IntToStr(lErrCode) + ': ' + SysErrorMessage(lErrCode));
end;
end;错误代码-2147024894 = $80070002 is indeed ERROR_FILE_NOT_FOUND
序列(例如,根据https://www.delphipraxis.net/204266-new-vcl-tedgebrowser-component-coming-rad-studio-10-4-a.html或http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_TEdgeBrowser_Component_and_Changes_to_the_TWebBrowser_Component):
correctly
c:\Program Files (x86)\Embarcadero\Studio\21.0\Redist\win32\WebView2Loader.dll安装Edgeview2 SDK以应用dir配置:Delphi10.4.3悉尼,在Win10 VM中运行一个32位应用程序,安装了Edge84.0.522.52
尝试:前面没有https:,重新启动,尝试从TApplicationEvents.OnException获取更多信息
然后,我尝试运行演示c:\Users\Public\Documents\Embarcadero\Studio\21.0\Samples\Object Pascal\VCL\WebBrowser\Edge\EdgeBrowser.dproj (也将dll复制到该目录中),但这会导致初始化错误:
procedure TfrmMain.EdgeBrowserCreateWebViewCompleted(Sender: TCustomEdgeBrowser; AResult: HResult);
begin
{$IFDEF DEBUG}
OutputDebugString('EdgeBrowser OnCreateWebViewCompleted');
{$ENDIF}
if Succeeded(AResult) then
begin
tbCancel.Enabled := True;
tbReload.Enabled := True;
tbGo.Enabled := True;
edtAddress.Enabled := True;
Sender.AddWebResourceRequestedFilter('*', COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE);
end
else
begin
if AResult = HResultFromWin32(ERROR_FILE_NOT_FOUND) then
Application.MessageBox('Could not find Edge installation. ' +
'Do you have a version installed that''s compatible with this WebView2 SDK version?',
'Edge initialisation error', MB_OK or MB_ICONERROR)
else
Application.MessageBox('Failed to initialise Edge browser control',
'Edge initialisation error', MB_OK or MB_ICONERROR)
end;
end;但现在AResult是-2147467259 =80004005美元
这似乎与数据/ODBC相关。
更新到Microsoft.Web.Webview2的更高版本0.9.579 (2020年7月20日)没有帮助。
发布于 2020-08-13 18:21:53
我下载了Beta版本的Edge,并为我修复了它。
我使用的是84.0.522.59版本(正式构建)(64位),并遇到了与您相同的问题。
我下载的版本是85.0.564.30 (正式构建) beta版(64位)。
另外,我回顾了文档,它说要获得金丝雀通道版本。所以当我下载测试版的时候,我假设金丝雀版本就是你应该下载的版本,并且也会解决这个问题。
http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_TEdgeBrowser_Component_and_Changes_to_the_TWebBrowser_Component
微软边缘铬浏览器目前可从https://www.microsoftedgeinsider.com/download (金丝雀通道版本,而WebView2 SDK正在预发布,目前最低要求的版本是82.0.430.0)。
https://stackoverflow.com/questions/63230261
复制相似问题