Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetCookies Method Example
#6
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.
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
Reply


Messages In This Thread
GetCookies Method Example - by grusak - 2025-04-03, 20:58:08
RE: GetCookies Method Example - by wila - 2025-04-03, 22:21:25
RE: GetCookies Method Example - by grusak - 2025-04-04, 01:05:03
RE: GetCookies Method Example - by wila - 2025-04-04, 08:51:09
RE: GetCookies Method Example - by grusak - 2025-04-04, 15:56:11
RE: GetCookies Method Example - by wila - 2025-04-04, 20:30:44

Forum Jump:


Users browsing this thread: 2 Guest(s)