0

I am working on a multi-threaded WTL-based application that opens multiple browser windows, each with its own embedded IWebBrowser2 instance for the browsing, and each in a separate UI thread.

In response to NewWindow3, I open a new browser-window, and return the new window's IWebBrowser2->get_Application() which returns an IDispatchPtr.

While the popup does open the desired site, the session in the original window, from which this popup was opened, EXPIRES - any further navigation in that original window takes be back to the login page!

Some points that I thought may be important for anyone to help me -

  1. This happens ONLY when the NewWindow3 is fired, with a non-empty bstrUrlContext (the 3rd parameter containing the originating URL)
  2. As part of the NewWindow3 processing, the following done -
    • Creation of the new IWebBrowser2-embedding window, Create()'ed with zWindowName set to the value of the bstrUrlContext parameter
    • The returned IDispatch pointer is retrieved from IWebBrowser2->get_Application()
BartoszKP
  • 34,786
  • 15
  • 102
  • 130
eashwar
  • 1
  • 1

1 Answers1

0

This issue has been resolved.

I had to create the IWebBrowser2-embedding window with an empty-string (_T("")) WindowName. And had to ensure creation of the IWebBrowser2 control by invoking CAxWindow::CreateControl() in the window's OnCreate() handler (for WM_CREATE)

Thanks

eashwar
  • 1
  • 1