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.

Internet Explorer 6 may crash if you visit a Web site that contains an MFC ActiveX control after you install MS09-014


View products that this article applies to.

Symptoms

After you install security update 963027 (MS09-014) on a computer that is running Internet Explorer 6, Internet Explorer may close unexpectedly (crash) when you visit a Web site that contains a Microsoft Foundation Classes (MFC)-based ActiveX control. The crash is most likely to occur when you refresh (press F5) or close the Web page.

This problem can occur in the following scenario:
  • The MFC-based ActiveX control receives the pointer to the client site by calling the COleControl::GetClientSite method.
  • The ActiveX control uses the client site directly without calling the AddRef() method, but still calls the Release() method afterward.
For more information about security update 963027, click the following article number to view the article in the Microsoft Knowledge Base:
963027� MS09-014: Cumulative security update for Internet Explorer

↑ Back to the top


Cause

This problem occurs because the COleControl::GetClientSite method (from MFC) does not call the AddRef() method by itself. The additional Release() method causes the client site to be freed earlier than it should be.

The following is an example.
LPOLECLIENTSITE pIClientSite = GetClientSite() ;

//use client site

pIClientSite->Release() ;

↑ Back to the top


Resolution

To resolve this problem, manually call the AddRef() method after loading the client site by calling the COleControl::GetClientSite method.

The following is an example.
LPOLECLIENTSITE pIClientSite = GetClientSite() ;

If (pIClientSite) 
{
pIClientSite->AddRef();

//use client site 

pIClientSite->Release() ;

}
Note This solution applies only to MFC-based ActiveX controls.

If the problem is not resolved, visit the following Microsoft Customer Support Services Web site to find other solutions: The Microsoft Customer Support Services Web site provides the following additional resources:

Searchable Knowledge Base: Search technical support information and self-help tools for Microsoft products. Solution Centers: View product-specific frequently asked questions and support highlights. Microsoft Customer Support Newsgroups: Contact counterparts, peers, and Microsoft Most Valuable Professionals (MVPs). Other Support Options: Use the Web to ask a question, contact Microsoft Customer Support Services, or provide feedback.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

For more information about this topic, click the following article number to view the article in the Microsoft Developer Network:

↑ Back to the top


Keywords: KB971131, kbcode, kbprb, kbtshoot, kbexpertiseinter

↑ Back to the top

Article Info
Article ID : 971131
Revision : 1
Created on : 5/8/2009
Published on : 5/8/2009
Exists online : False
Views : 453