Using the latest and old libef (Release), when I call any method the VisibleNavigationEntry returns "Access violation".
At the moment I'm trying to get information from the certificate's page, then: VisibleNavigationEntry.SSLStatus.GetX509Certificate...
Do I have to instantiate before?
Using the Demo minibrowser as test.
Example:
ShowMessage(Chromium1.VisibleNavigationEntry.SSLStatus.GetX509Certificate.GetIssuer.GetDisplayName);
Returns:
Access violation at address 006432F7 in module 'MiniBrowser.exe'. Read of address 00000000.
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.
VisibleNavigationEntry Access violation
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: VisibleNavigationEntry Access violation
Hi,
Chromium1.VisibleNavigationEntry returns NIL if the browser is not initialized and that property can only be called in the CEF UI thread, which is not the same as the main application thread in Delphi.
Several TChromium events are executed in the UI thread like OnLoadingStateChange, OnTitleChange and many more.
Use them to get the VisibleNavigationEntry interface but remember that you can't create or destroy VCL components in different threads.
The safest way to show that information is to save it and then send a message to the form to show the value.
If you still get AV errors after all this check if all the returned interfaces are assigned.
For more info read these pages :
https://magpcss.org/ceforum/apidocs3/pr ... rHost.html
https://magpcss.org/ceforum/apidocs3/pr ... Entry.html
https://magpcss.org/ceforum/apidocs3/pr ... tatus.html
https://magpcss.org/ceforum/apidocs3/pr ... icate.html
https://magpcss.org/ceforum/apidocs3/pr ... cipal.html
Chromium1.VisibleNavigationEntry returns NIL if the browser is not initialized and that property can only be called in the CEF UI thread, which is not the same as the main application thread in Delphi.
Several TChromium events are executed in the UI thread like OnLoadingStateChange, OnTitleChange and many more.
Use them to get the VisibleNavigationEntry interface but remember that you can't create or destroy VCL components in different threads.
The safest way to show that information is to save it and then send a message to the form to show the value.
If you still get AV errors after all this check if all the returned interfaces are assigned.
For more info read these pages :
https://magpcss.org/ceforum/apidocs3/pr ... rHost.html
https://magpcss.org/ceforum/apidocs3/pr ... Entry.html
https://magpcss.org/ceforum/apidocs3/pr ... tatus.html
https://magpcss.org/ceforum/apidocs3/pr ... icate.html
https://magpcss.org/ceforum/apidocs3/pr ... cipal.html
Re: VisibleNavigationEntry Access violation
Ah ok, I understand.
I was able to get all the information I needed. Thanks for the quick response and clarification.
Thanks!
I was able to get all the information I needed. Thanks for the quick response and clarification.
Thanks!
