1

I have developed customize browser using IE WebBrowser Control in c++. Everything works fine. The only problem I am facing is when I am closing the browser. It closes normally if there is no to-and-fro of data happening like in light-weight website. But it hangs/freezes while closing if there is to-and-fro of data happening like audio player is running on the website or in a real-time update website where it keeps sending and receiving the data.

I am doing the clean closing and destroying of the browser as mentioned here. I also tried to navigate to about:blank before closing. Still nothing.

From the call stack I could see that it is still trying to run some JavaScript code while closing/destroying the browser. I tried to look into it if any-how I could clear or stop all activities but still I found nothing.

Any suggestions?

Community
  • 1
  • 1
Arpit
  • 767
  • 7
  • 20

1 Answers1

0

Try this:

IWebBrowser2::ExecWB(OLECMDID_STOP, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL)
Alexander Dyagilev
  • 1,139
  • 1
  • 15
  • 43