Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Problem of hosting IWebBrowser2 object across processes

$
0
0

I have a problem of hosting IWebBrowser2 object across processes:

(My program was written in C++)

1. I hosted a Web Browser Control in the 1st process;

2. I processed DWebBrowserEvents2::Invoke to handle DISPID_NEWWINDOW3;

3. In DISPID_NEWWINDOW3 event, I create the 2nd process and wait for a sync event(such as my_sync_event);

4. In the 2nd process, create another Web Browser Control and marshal IDispatch interface to the 1st process(by CoMarshalInterface and WriteProcessMemory);

5. Set my_sync_event signal in the 2nd process;

6. In the 1st process, when waited the sync_event, unmarshal IDispatch interface created by the 2nd process and return it to DISPID_NEWWINDOW3 event.

The hosting is almost OK, but when the page popped up in the 2nd process, the navigation session lost.

So my question is: can I share navigation session between IWebBrowser2 objects in different processes?


Viewing all articles
Browse latest Browse all 3527

Trending Articles