Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A COM server may not exit as expected after the object is destroyed if you start Internet Explorer 7 as the COM server


View products that this article applies to.

Symptoms

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.

↑ Back to the top


Workaround

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.

↑ Back to the top


References

For more information about the IWebBrowser2::Quit method, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Keywords: KB950935, kbprb, kbtshoot, kbexpertiseadvanced

↑ Back to the top

Article Info
Article ID : 950935
Revision : 1
Created on : 4/17/2008
Published on : 4/17/2008
Exists online : False
Views : 375