2025-04-04, 20:30:44
Hi Greg,
It's not very uncommon for an ActiveX control to expose access to its inner interfaces that way. We're just following the WebView2 design here. As you can see that bit is only 2 lines of code in VB6.
First creation of the object and then assigning it, so that the object is actually using the CookieManager interface from the instantiated browser object.
When I look at PowerBuilder syntax then it should be something along the lines of:
Which is ... completely untested.
You might not be able to assign the dispatch pointer or have to assign it in a specific way.
I know that PowerBuilder can handle dispatch pointers as we're using those in the examples for PowerBuilder with the BrowserDispatch method. But they might not have a mechanism to assign an object to an existing interface (which would be weird IMO)
For the document interface we made this:
Even once we get past this, there might still be issues with raising the events.
However I do notice that you have an active developer subscription.
Let's take the discussion on this to email and see if we can get you a solution for this issue.
--
Wil
It's not very uncommon for an ActiveX control to expose access to its inner interfaces that way. We're just following the WebView2 design here. As you can see that bit is only 2 lines of code in VB6.
Code:
Public WithEvents CookieManager As AntviewAx2.AntViewCookieManager
'
Set CookieManager = EdgeWebBrowser.CookieManager
First creation of the object and then assigning it, so that the object is actually using the CookieManager interface from the instantiated browser object.
When I look at PowerBuilder syntax then it should be something along the lines of:
Code:
int i
io_CookieManager = CREATE OLEObject
i = io_CookieManager.ConnectToNewObject("AntViewAx.AntViewCookieManager") // i should be 0
// set the dispatch pointer to the one in the current browser object
io_CookieManager.object = edgewebbrowser.CookieManager
Which is ... completely untested.
You might not be able to assign the dispatch pointer or have to assign it in a specific way.
I know that PowerBuilder can handle dispatch pointers as we're using those in the examples for PowerBuilder with the BrowserDispatch method. But they might not have a mechanism to assign an object to an existing interface (which would be weird IMO)
For the document interface we made this:
Code:
int i
io_Document = CREATE OLEObject
i = io_Document.ConnectToNewObject("AntViewAx2.AntViewDocument") // i should be 0
// connect the document interface to the current browser object
io_Document.BrowserDispatch(edgewebbrowser.object.IDispatchPointer)
Even once we get past this, there might still be issues with raising the events.
However I do notice that you have an active developer subscription.
Let's take the discussion on this to email and see if we can get you a solution for this issue.
--
Wil