Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Acess Violation

Post Reply
alpires2000
Posts: 48
Joined: Sat Dec 09, 2017 4:40 pm

Acess Violation

Post by alpires2000 »

Hi Salvador. I am trying to use WebView4Delphi component, but there is an access violation error when I run the code

Code: Select all

  if GlobalWebView2Loader.InitializationError then
    showmessage(GlobalWebView2Loader.ErrorMessage)
  else if GlobalWebView2Loader.Initialized then
    WVBrowser1.CreateBrowser(WVWindowParent1.Handle)
This error occurs in the uWVLoader unit.

Code: Select all

function TWVLoader.GetInitializationError : boolean;
begin
  Result := (FStatus = wvlsError);
end;
What am I doing wrong? I tested MiniBrowser and it works.
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Acess Violation

Post by salvadordf »

Hi,

Maybe GlobalWebView2Loader is created after the "if GlobalWebView2Loader.InitializationError then" line is executed.
alpires2000
Posts: 48
Joined: Sat Dec 09, 2017 4:40 pm

Re: Acess Violation

Post by alpires2000 »

Yes, now it worked. Thanks
Post Reply