salvadordf / WebView4Delphi

WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows.
https://www.briskbard.com/forum/
MIT License
280 stars 56 forks source link

Unsupported WebView2Loader.dll version! #45

Closed iamaer4fa closed 7 months ago

iamaer4fa commented 1 year ago

Compiled the tabsheetbrowser demo, using Lazarus 2.2 64-bit, running on Windows 11 Version 22H2. The supported WebView2Loader.dll version was the one that was included in this repository. Am I missing something? The readme file stated that if Windows 10/11 we already have the green version.

salvadordf commented 1 year ago

If you only see the "Unsupported WebView2Loader.dll version" message and you don't see any mention to the found and expected versions then it may mean that WebView2Loader.dll couldn't be found.

Check that GlobalWebView2Loader.LoaderDllPath is empty or has the full path to WebView2Loader.dll. If GlobalWebView2Loader.LoaderDllPath is empty then WebView2Loader.dll must be in the same directory than the application. Set GlobalWebView2Loader.SetCurrentDir to true in case you launch your application from another application.

If you see the text "Expected WebView2Loader.dll version" and "Found WebView2Loader.dll version" in the same error message then make sure you build and install the package following the instructions in this wiki page.

You can get more details if you set a breakpoint in TWVLoader.CheckWV2DLL and debug this error.