If you start Windows Internet Explorer 7 as a Microsoft COM server, the COM server may not exit as expected after the object is destroyed.
Consider the following scenario in Microsoft Internet Explorer 6. You start Internet Explorer 6 as a COM server by using the
CoCreateInstance method. Additionally, you do not call the
IWebBrowser2::put_Visible(VARIANT_TRUE) method to make the window visible. In this scenario, the final
Release method that is performed on the client-side interface pointer stops the Internet Explorer process. This behavior occurs because Internet Explorer 6 implements the
IExternalConnection interface in COM.
However, in Internet Explorer 7, the COM server does not exit after the interface pointer is released. This problem is a side effect of the new threading architecture for Internet Explorer 7. In the new threading architecture for Internet Explorer 7, each tab has its own thread.
To work around this problem, call the
IWebBrowser2::Quit method to stop the Internet Explorer server process.
Note You can use this technique to work around this problem in Internet Explorer 7 and in Internet Explorer 6.
For more information about the
IWebBrowser2::Quit method, visit the following Microsoft Developer Network (MSDN) Web site: