-
Apr 22nd, 2022, 06:03 AM
#161
Junior Member
Re: VB6 WebView2-Binding (Edge-Chromium)
I All,
I am not able to use the RC6 WebView2 from outside VB6. In VB6 (in the IDE and compiled) everything works correctly. The same if I use the "saturnian" control (an ocx encapsulating the RC6 WebView2). The problem is when I want to use the WebView2 from, for example, PowerBuilder. I've been using RC without problems in PB for a long time, but I can't get the WebView2 to work. When I call BindTo , the PB IDE crashes (the same in a compiled version) with the same error it gives to "avinash7" (error in ntdll.dll").
I have tested the AntView control (https://antview.dev/downloads/) which I believe uses the same mechanism (WebView2Loader.dll) and everything works correctly, both in VB6, PowerBuilder, even in an Excel userForm.
If I use the saturnian control in PowerBuilder, I get the error (just instantiate the control):
Attachment 184685
For what it's worth, in PowerBuilder's object browser, I can see all RC6 classes except "cWebView2":
Attachment 184686
However, the error does not occur when creating the cWebView2 object, but when calling BindTo (or when creating it by passing the hWnd parameter).
Any ideas?
Thanks!
-
Apr 23rd, 2022, 03:43 AM
#162
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
@saturnian
Does your ActiveX control allow the setting of the userDataFolder ?
Can't seem to find it in VB6 Object Browser.
Thanks
-
Apr 23rd, 2022, 11:39 AM
#163
Lively Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by carl039
@saturnian
Does your ActiveX control allow the setting of the userDataFolder ?
Can't seem to find it in VB6 Object Browser.
Thanks
For the moment no. But if you are using a Fixed Version of WebView2, the user directory data is in the installation folder of this version (by default: C:\ProgramData\OrdoWebView2\Microsoft.WebView2.FixedVersionRuntime\Data\EBWebView)
You can copy the contents of the C:\ProgramData\OrdoWebView2\Microsoft.WebView2.FixedVersionRuntime folder several times and assign a version of the webview2 control to each user by setting the EdgeFixedPath property.
But this cannot be changed on the fly. You must use one OrdoWebView2 control per user, modify the EdgeFixedPath property and launch the Init method.
Best regards
-
Apr 24th, 2022, 06:01 AM
#164
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by saturnian
For the moment no. But if you are using a Fixed Version of WebView2, the user directory data is in the installation folder of this version (by default: C:\ProgramData\OrdoWebView2\Microsoft.WebView2.FixedVersionRuntime\Data\EBWebView)
You can copy the contents of the C:\ProgramData\OrdoWebView2\Microsoft.WebView2.FixedVersionRuntime folder several times and assign a version of the webview2 control to each user by setting the EdgeFixedPath property.
But this cannot be changed on the fly. You must use one OrdoWebView2 control per user, modify the EdgeFixedPath property and launch the Init method.
Best regards
Thanks, great job on your control btw.
-
Apr 24th, 2022, 06:05 AM
#165
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
@Olaf
Is there any plans to include all properties as detailed here in particular:
IsPasswordAutosaveEnabled
IsGeneralAutofillEnabled
Thanks
-
Jun 10th, 2022, 10:44 PM
#166
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
just ran across this, it's exactly what i've been looking for, so thank you.
i have a question, hopefully someone can help.
i've figured out mostly everything i need, but i need help with 2 things.
1) outputting the entire html of the website into a textbox. i was able to use WV.jsProp("document.body.innerHTML") but it only captures part of the html, and i need the entire source of the page.
2) scan entire page for elements such as ID, NAME, HREF, and display them in a textbox. basically, with the webbrowser control i would do this:
For X = 0 To WebBrowser1.Document.All.Length
strID = WebBrowser1.Document.All.Item(X).Id
If Not strID = "" Then txtIDs.Text = txtIDs.Text & "(" & X & ") " & wB.Document.All.Item(X).Id & vbNewLine
Next X
so basically that just loops through every element on the page, checks if it has an ID, and if so it displays it in a textbox. then you can replace Id with name or href. i need to re-create that same thing here. does anyone know how to achieve this? thanks!
----
edit:
i figured out #1 i think. if anyone else is having the same issue, try using WV.jsProp("document.documentElement.outerHTML")
Last edited by inspace; Jun 10th, 2022 at 11:02 PM.
-
Jun 11th, 2022, 07:09 AM
#167
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by inspace
2) scan entire page for elements such as ID, NAME, HREF, and display them in a textbox.
With the WebView2 you should get more familiar with its JS-interface ...
(doing all of the more complex stuff, by adding js-Functions beforehand - and then calling these from VB)
For example, if you add the following js-function (via WV.AddScriptToExecuteOnDocumentCreated):
Code:
WV.AddScriptToExecuteOnDocumentCreated New_c.ArrayList(vbString, _
"function getByExpression_id_tag_val_name_href(sExpr){", _
" var resArr = []", _
" for (var e of document.querySelectorAll(sExpr).values()){", _
" resArr.push({id:e.id, tag:e.tagName, val:e.value, name:e.name, href:e.href})", _
" }", _
" return JSON.stringify(resArr)", _
"}").Join(vbLf)
You can then use this js-routine from VB (with a "Selector-Filter-Expression"-param) e.g. this way:
Debug.Print WV.jsRun("getByExpression_id_tag_val_name_href", "[id]:not([id=''])")
The blue marked Expression-String above, filters for:
- all Elements which contain the ID-attribute (the leading [id] -part)
- and of those with an id-attribute, ignore the ones which have an empty string in it (the not([id=''] -part)
These Selector-Expressions are extremely powerful - just google for examples...
HTH
Olaf
-
Jun 14th, 2022, 10:01 AM
#168
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Does anyone have an example of how to use NavigateWithWebResourceRequest with HTTP Basic Auth?
-
Jun 22nd, 2022, 09:50 AM
#169
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi everyone
I just wanted to know is there any equivalent method in webview2 for the followings:
suppose mdocDocument is declared as an HTMLDocument
set mhtmInput1 = mdocDocument.createElement("Input")
mdocDocument.appendChild mhtmInput1
set mhtmCoords = mdocDocument.getElementById("coords")
mdocDocument.parentWindow.event
mdocDocument_onClick
mdocDocument.parentWindow.Blur
Thanks in advance
-
Jun 24th, 2022, 02:48 AM
#170
Lively Member
Re: VB6 WebView2-Binding (Edge-Chromium)
suppose mdocDocument is declared as an HTMLDocument
The HTMLDocument and the corresponding interface do not exist here. You have to program this code (a function) in JavaScript and either integrate it statically into the page or add it dynamically via VB. You can call the function from your programme at any time (also parameterised). See also: AddScriptToExecuteOnDocumentCreated, jsRun, jsRunAsync and ExecuteScript.
-
Jul 25th, 2022, 07:39 AM
#171
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi Olaf
The problem "Runtime Error 53: Error in FindFirstFile: ErrNum: 3, The system cannot find the path specified." persists.
I had to clean install my windows 10, registered RC6.dll and today installed WebView2. WebView version 103.0.1264.71 installed into the folder "C:\Program Files (x86)\Microsoft\EDGE\Application", your program looks for the "EdgeWebView" folder.
Solution? Should I rename this folder?
Regards
-
Jul 25th, 2022, 07:46 AM
#172
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi Olaf
Solutions sometimes can be quick: I did what I should have done before posting.
I copied the "Edge" folder and renamed the copy "EdgeWebView" - now my program runs smooth!
Regards
-
Jul 26th, 2022, 01:03 PM
#173
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi !
Thank you for this great tool !
I am looking for a way to change the WebView2 default User-Agent.
I know that I can send a request with NavigateWithWebResourceRequest and set the User-Agent via the headers but I need that all the resources of the page are loaded with the same User Agent. In .net the solution is to call this method :
var settings = new Web.CoreWebView2.Settings;
settings.UserAgent = "XXXXX";
Is there a way to do this ?
-
Jul 26th, 2022, 03:15 PM
#174
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by lodep
I need that all the resources of the page are loaded with the same User Agent...
There's a ton of settings possible via optional commandline-string (which you can pass along in the Bind-Method) -
"--user-agent ..." just being one of them...
https://peter.sh/experiments/chromiu...es/#user-agent
I'd try it this way first...
HTH
Olaf
-
Jul 26th, 2022, 03:46 PM
#175
New Member
-
Jul 27th, 2022, 03:01 AM
#176
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi @Olaf,
One more question : I can't access the documenturl property sometimes (it's blank).
I've read in previous posts that you have a workaround for this problem and that you'll need to update the DLL.
Is it possible to access this property with a temp fix using JSPROP for example ?
Thanks,
-
Aug 8th, 2022, 08:30 PM
#177
Banned
Re: VB6 WebView2-Binding (Edge-Chromium)
can anybody share with me how to get webview2 cookies vb6
-
Aug 9th, 2022, 09:03 AM
#178
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by jenniger9
can anybody share with me how to get webview2 cookies vb6
Please study (or at least search through) the postings of the discussion-thread you're currently in...
Cookie-retrieval was already a topic here in: https://www.vbforums.com/showthread....=1#post5498591
Olaf
-
Sep 5th, 2022, 12:02 PM
#179
Addicted Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Can this tool(webview2) replace selenium to emulate user behavior on the webpage?
Ten Years After - 01 You Give Me Loving
-
Sep 6th, 2022, 01:02 PM
#180
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by sergeos
Can this tool(webview2) replace selenium to emulate user behavior on the webpage?
In my understanding, Selenium was written as a generic Test-Tool which can "work against multiple Browser-engines".
The WebView2 is just an encapsulation of a single Browser-engine (chromium) -
minus the additional "generic Automation- and Test-interfaces".
So, if you currently use Selenium for your own testing-purposes with success,
why change it to something "less capable" and "less generic".
Just my $0.02...
Olaf
-
Sep 7th, 2022, 09:12 AM
#181
Junior Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hello!
Can you explain how to save downloaded web page to local disk?
-
Sep 7th, 2022, 04:18 PM
#182
Addicted Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Schmidt
In my understanding, Selenium was written as a generic Test-Tool which can "work against multiple Browser-engines".
The WebView2 is just an encapsulation of a single Browser-engine (chromium) -
minus the additional "generic Automation- and Test-interfaces".
So, if you currently use Selenium for your own testing-purposes with success,
why change it to something "less capable" and "less generic".
Just my $0.02...
Olaf
no, I don't use selenium. but I have seen how it works. The problem is that with every update of firefox, you need to change the version of the woking executable to connect firefox to the web page.
I also join the question above regarding use cases.
Ten Years After - 01 You Give Me Loving
-
Sep 8th, 2022, 09:57 AM
#183
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by jangle
Hello!
Can you explain how to save downloaded web page to local disk?
Not sure, what is meant here...
(there is an interactive right-mouseclick-context-menu in the chromium-engine,
which allows to trigger "Save as..."-commands).
If it's only "plain-text-" or "plain-binary"-saving of a given URL -
then a better suited (more lightweight) helper-object is available via the winhttp 5.1 reference...
Olaf
-
Sep 8th, 2022, 11:24 AM
#184
Junior Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Schmidt
Not sure, what is meant here...
(there is an interactive right-mouseclick-context-menu in the chromium-engine,
which allows to trigger "Save as..."-commands).
If it's only "plain-text-" or "plain-binary"-saving of a given URL -
then a better suited (more lightweight) helper-object is available via the winhttp 5.1 reference...
Olaf
I have a list of about 100 web pages. I need to automatically download them and save them along with the pictures to a local disk.
Can I use this component for this task or should I use something else?
-
Sep 19th, 2022, 10:15 PM
#185
Lively Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Olaf:
I was using RC6 version: 6.0.0.9, everything is fine.
Then I upgraded to RC6 version: 6.0.0.10, my program broke.
It was broken when this line of code stopped returning anything:
Code:
WV.jsProp("document.querySelector('input').value")
I have to switch back to 6.0.0.9 and my program works again.
I notice there are some new features added to cWebView2, perhaps that's where the root of the problem is.
-
Sep 20th, 2022, 01:13 PM
#186
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Resurrected
Olaf:
I was using RC6 version: 6.0.0.9, everything is fine.
Then I upgraded to RC6 version: 6.0.0.10, my program broke.
It was broken when this line of code stopped returning anything:
Code:
WV.jsProp("document.querySelector('input').value")
I have to switch back to 6.0.0.9 and my program works again.
Had to adapt the jsProp-Resolver Method internally (in 6.0.10) due to "security-reasons" -
(the old version was using eval(...) to resolve the jsProp-expression, and that does not work in all cases).
What the new version still supports, is "nested Prop-Expressions" - as for example:
Debug.Print WV.jsProp("window.document.title")
But please note, that the above "nested expression" does not contain any parentheses (which indicate function-calls).
So, it has to be "pure properties" now (since I'm not using eval anymore for jsProp-evaluation internally).
To solve your problem, just add a little helper-function like e.g:
WV.AddScriptToExecuteOnDocumentCreated "function getQSValue(qsExpr){return document.querySelector(qsExpr).value}"
...before loading a document.
This will allow you, to use WV.jsRun(...) instead, to get your values:
Debug.Print WV.jsRun("getQSValue", "input")
HTH
Olaf
-
Sep 21st, 2022, 01:52 PM
#187
Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Schmidt
Re-Delegating 10 Events or so, should not take more than 5 minutes of "Copy&Paste-work".
 Originally Posted by BooksRUs
While this exercise seemed trivial enough, it appears that to provide a true "wrapper" around this with Indexes, I must re-create/declare *ALL* the other Let/Get and Methods for *each* of the properties/methods of the actual WV object.
I did try to do this, but the .jsProp was a little confusing, while most others were straightforward. I only tried to do the ones that I'm using to change your Demo program to work with 2 of my own ucWV objects (I dynamically Load a 2nd one, just to make sure that I can dynamically Load the object).
I just wanted to BUMP this response again to see if anyone else has successfully tried/done this (making a User Control with WV so that we can have indexed UC with multiple on one form)?
I want to replace about 17 old webbrowser controls in my VB6 program and the form has simply run out of available controls (I guess 256 is the VB6 limit). Most, if not all of them, are "hosted" on a vbalDTabControl (from vbAccelerator.com), which allows me to just set the "panel" property directly to the ucWV (user control WebView) that I created.
The code seems to actually run fine, but only first WV created actually renders anything. The rest look like they are working correctly "under the hood" (when debugging, all events are fired), but only a blue box is rendered on the screen.
Any help would be appreciated.
Thanks for a great control!
Last edited by BooksRUs; Sep 22nd, 2022 at 09:06 AM.
-
Sep 21st, 2022, 10:46 PM
#188
Lively Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Schmidt
Had to adapt the jsProp-Resolver Method internally (in 6.0.10) due to "security-reasons" -
(the old version was using eval(...) to resolve the jsProp-expression, and that does not work in all cases).
What the new version still supports, is "nested Prop-Expressions" - as for example:
Debug.Print WV.jsProp("window.document.title")
But please note, that the above "nested expression" does not contain any parentheses (which indicate function-calls).
So, it has to be "pure properties" now (since I'm not using eval anymore for jsProp-evaluation internally).
To solve your problem, just add a little helper-function like e.g:
WV.AddScriptToExecuteOnDocumentCreated "function getQSValue(qsExpr){return document.querySelector(qsExpr).value}"
...before loading a document.
This will allow you, to use WV.jsRun(...) instead, to get your values:
Debug.Print WV.jsRun("getQSValue", "input")
HTH
Olaf
Olaf, thanks for the reply. I will make changes to my code.
Thanks again for your support in all those in years.
-
Sep 29th, 2022, 10:19 PM
#189
Lively Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Olaf,
Another problem related to .jsRun method.
It seems that .jsRun returns the previous result if the current result is undefined?
For example,
.jsRun(js1) returns 'result of js1' if js1 works.
.jsRun(js2) returns also 'result of js1' if js2 failed.
.jsRun(js3) returns 'result of js3' if js3 works.
I was assuming that .jsRun would return something like NULL when the script fails.
Is there any possible mistake on my side? Or is there anything I don't know about .jsRun?
Thanks
-
Sep 30th, 2022, 02:33 AM
#190
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Resurrected
It seems that .jsRun returns the previous result if the current result is undefined?
For example,
.jsRun(js1) returns 'result of js1' if js1 works.
.jsRun(js2) returns also 'result of js1' if js2 failed.
.jsRun(js3) returns 'result of js3' if js3 works.
I was assuming that .jsRun would return something like NULL when the script fails.
I've fixed that now - returning Empty in case of a js-error (a returned js-null-value maps to VT_Empty in the COM-world).
Have not compiled and re-uploaded yet, but it will come in the next release...
In the interim you have two ways to workaround that:
1) via your own try-catch-block within your self-defined js-Function (to return a null, or an err-string in case of an error)
2) or relying on the existing, internal "try-catch"-mechanism of jsRun/jsProp
.. (which in case of 2) manifests itself in: WV.jsLastError
So, for "critical js-Calls that might fail" (and have no internal try/catch definition),
you can always add an additional line after the WV.jsRun(...) like:
If Len(WV.jsLastError) Then LogOrRaiseThe WV.jsLastError
Olaf
-
Oct 1st, 2022, 02:24 PM
#191
Junior Member
Re: VB6 WebView2-Binding (Edge-Chromium)
I Olaf.
Do you know why I can't see (and use) the cWebView2 class in Excel?
Attachment 185944
The same happens in other languages (powerbuilder for example), where I have had no problems using other RC6 classes
Regards
-
Oct 14th, 2022, 06:17 PM
#192
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hello Olaf,
First of all thank you very much for a wonderful contribution!!!
Couple of problems I am having:
1. browser.jsProp("document.getElementById('divid').innerHTML") never returns any thing. However browser.jsProp("document.documentElement.innerHTML") returns whole document html and I then have to parse through whole document to find content which I am looking for.
2. Below is my JS Code
var url = 'https://abc.com/page1';
var xhr = new XMLHttpRequest();
xhr.open('POST', url);
xhr.setRequestHeader('accept', 'application/json, text/plain, */*');
xhr.setRequestHeader('Authorization', 'token');
xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
xhr.setRequestHeader('content-length', '0');
xhr.setRequestHeader('Accept-Language', 'en-US,en;q=0.9');
xhr.setRequestHeader('content-type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
ret = xhr.responseText; document.getElementById('dvRes').innerHtml = xhr.responseText;
}};
var data = '';
xhr.send(data);
so when I first time do browser.ExecuteScript(MyJSCode) it works well and sets output to the specified div. But, If I have to make another xhr call or even more calls, it never even attempts to make a call (I also check network calls from Dev Tools window). So in a nutshell, it makes only one xhr call and then never goes for 2nd or 3rd one.
Any help or direct guidance will be highly appreciated!!!
Thank you!
-
Oct 21st, 2022, 05:41 AM
#193
Re: VB6 WebView2-Binding (Edge-Chromium)
Just a few posts above (in #186) both your questions were answered.
Your second question "indirectly" - meaning:
- encapsulate the remote-call in a proper js-helper-function
..e.g. called function RPC(URL, oData){...}
- then add this function using: WV.AddScriptToExecuteOnDocumentCreated <your js-function-string>
- then you can use this function via WV.jsRun("RPC", ...)
Olaf
-
Nov 17th, 2022, 11:15 AM
#194
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Dear Olaf,
I have been using Webview2-binding for a long time. Thank you very much for your valuable creation of this library.
After I have downloaded and installed "The vbRichClient-Framework (currently at Version 6.0.10", I am in great trouble.
Although Webview2 perfectly loads the document in the picturebox, in the NavigationCompleted event, IsSuccess is always false while WebErrorStatus=0.
Am I doing something wrong or something has been chaned that I don't know.
Thank you very much for your assistance.
Last edited by talatoncu; Nov 19th, 2022 at 02:43 AM.
-
Nov 19th, 2022, 09:48 AM
#195
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by talatoncu
After I have downloaded and installed "The vbRichClient-Framework (currently at Version 6.0.10", I am in great trouble.
Although Webview2 perfectly loads the document in the picturebox, in the NavigationCompleted event, IsSuccess is always false while WebErrorStatus=0.
Am I doing something wrong or something has been chaned that I don't know.
Have just tested this with a WV.Navigate to "https://google.com" -
and the incoming NavigationCompleted-EventParams are: IsSuccess=True, WebErrorStatus=0
In the MS-documentation for the IsSuccess-Param is stated:
...Note that WebView2 will report the navigation as 'unsuccessful' if the load for the navigation did not reach the expected completion for any reason. Such reasons include potentially catastrophic issues such network and certificate issues, but can also be the result of intended actions such as the app canceling a navigation or navigating away before the original navigation completed. Applications should not just rely on this flag, but also consider the reported WebErrorStatus to determine whether the failure is indeed catastrophic in their context.
So, maybe the site you navigate to has an outdated certificate - or undergoes several redirects?
Olaf
-
Nov 24th, 2022, 01:48 PM
#196
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi Olaf,
RC6 Version 6.0.10 does not return values for html textbox on vb form. It does the same thing for WebView2Demo example as well.
MsgBox WV.jsProp("document.getElementById('txt1').value")
Kind Regards,
-
Nov 25th, 2022, 04:02 AM
#197
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by Schmidt
Have just tested this with a WV.Navigate to "https://google.com" -
and the incoming NavigationCompleted-EventParams are: IsSuccess=True, WebErrorStatus=0
In the MS-documentation for the IsSuccess-Param is stated:
...Note that WebView2 will report the navigation as 'unsuccessful' if the load for the navigation did not reach the expected completion for any reason. Such reasons include potentially catastrophic issues such network and certificate issues, but can also be the result of intended actions such as the app canceling a navigation or navigating away before the original navigation completed. Applications should not just rely on this flag, but also consider the reported WebErrorStatus to determine whether the failure is indeed catastrophic in their context.
So, maybe the site you navigate to has an outdated certificate - or undergoes several redirects?
Olaf
Dear Olaf,
Thank you very much for your valuable explanation.
So, I think the best thing is to "...consider the reported WebErrorStatus to determine whether the failure is indeed catastrophic in their context...".
-
Nov 27th, 2022, 02:55 AM
#198
Re: VB6 WebView2-Binding (Edge-Chromium)
 Originally Posted by shamiur
RC6 Version 6.0.10 does not return values for html textbox on vb form. It does the same thing for WebView2Demo example as well.
MsgBox WV.jsProp("document.getElementById('txt1').value")
I've explained why this happens - and also a workaround for it - in post #186 above.
Olaf
-
Dec 1st, 2022, 10:20 AM
#199
New Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Hi Olaf,
is it possible that you offer some sort of error number or exception on calling BindTo method instead of just returning 0 or 1? I have a case of a shutdown of msedgewebview2.exe(s) after they initialize and after they create files/folders in the given user data folder. They just shut down very shortly after starting and the return value of BindTo is 0. I tried every suggestion from WebView2 forums without success, there is no trace of it in event logs, I have no idea how to proceed. I saw that .NET WebView2 library in such situations does return exceptions with meaningful messages, it would be great if you could offer similar information on BindTo errors, thanks.
-
Dec 9th, 2022, 09:22 PM
#200
Lively Member
Re: VB6 WebView2-Binding (Edge-Chromium)
Olaf
I'm experiencing a problem.
Today, out of nowhere my program suddenly ran into "couldn't initialize Webview2 binding" on startup.
The problem remains after I tried rebooting my pc, recompliling the exe, reinstalling webview2 runtime, running in the IDE, or reresgistering RC6 binaries.
On another PC of mine, there is no problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|