Redistributable Package fix: An MFC application that uses the COleDocIPFrameWndEx class for document embedding fails

Article translations Article translations
Article ID: 2627265 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • You use the Microsoft Foundation Class (MFC) Application Wizard in Microsoft Visual Studio 2010 Service Pack 1 (SP1) to create an MFC application.
  • The MFC application is a multiple-document interface (MDI) application that acts as an Object Linking and Embedding (OLE) client and as an OLE server.
  • You try to use a client application, for example Microsoft Excel, to embed an object for which this new application is the OLE server.
In this scenario, an access violation occurs and the embed operation fails. Additionally, if the MFC application is built with the _DEBUG flag, an assertion failure is reported in the following code:
COleCntrFrameWndEx* COleDocIPFrameWndEx::GetContainerFrameWindow()
{
      COleCntrFrameWndEx* pNewFrame = DYNAMIC_DOWNCAST(COleCntrFrameWndEx, m_pMainFrame); 
       ASSERT_VALID(pNewFrame);
       return pNewFrame;
}

CAUSE

This issue occurs because of is a bug in the MFC library. When this issue occurs, an object of the COleCntrFrameWnd base class is incorrectly created instead of the derived COleCntrFrameWndEx class. Therefore, the DYNAMIC_DOWNCAST method fails and the issue that is described in the "Symptoms" section occurs.

RESOLUTION

Apply the following hotfix to resolve this issue.
Note This hotfix applies to the Microsoft Visual C++ 2010 SP1 Redistributable Package. To obtain the hotfix for Microsoft Visual Studio 2010 SP1, click the following article number to view the article in the Microsoft Knowledge Base:
2627201 [Visual Studio fix]An MFC application that uses the COleDocIPFrameWndEx class for document embedding fails

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Microsoft Visual C++ 2010 SP1 Redistributable Package installed.

Restart requirement

You may have to restart the computer after you install this hotfix if the affected files are being used.

Hotfix replacement information

This hotfix does not replace any other previously released hotfix.

File Information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported x86-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.363139,01616-Nov-201118:23x86
Mfc100.dll10.0.40219.3634,398,34416-Nov-201118:23x86
Mfc100chs.dll10.0.40219.36337,13616-Nov-201118:23x86
Mfc100cht.dll10.0.40219.36337,13616-Nov-201118:23x86
Mfc100deu.dll10.0.40219.36365,29616-Nov-201118:23x86
Mfc100enu.dll10.0.40219.36356,08016-Nov-201118:23x86
Mfc100esn.dll10.0.40219.36364,78416-Nov-201118:23x86
Mfc100fra.dll10.0.40219.36365,29616-Nov-201118:23x86
Mfc100ita.dll10.0.40219.36363,24816-Nov-201118:23x86
Mfc100jpn.dll10.0.40219.36344,81616-Nov-201118:23x86
Mfc100kor.dll10.0.40219.36344,30416-Nov-201118:23x86
Mfc100rus.dll10.0.40219.36361,71216-Nov-201118:23x86
Mfc100u.dll10.0.40219.3634,423,94416-Nov-201118:23x86
Mfcm100.dll10.0.40219.36382,69616-Nov-201118:23x86
Mfcm100u.dll10.0.40219.36382,70416-Nov-201118:23x86
Msvcp100.dll10.0.40219.363422,16016-Nov-201118:23x86
Msvcr100_clr0400.dll10.0.40219.363774,92816-Nov-201118:23x86
Vcomp100.dll10.0.40219.36351,98416-Nov-201118:23x86
For all supported x64-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.363159,49616-Nov-201117:41x64
Mfc100.dll10.0.40219.3635,575,94416-Nov-201117:41x64
Mfc100chs.dll10.0.40219.36337,13616-Nov-201117:41x64
Mfc100cht.dll10.0.40219.36337,13616-Nov-201117:41x64
Mfc100deu.dll10.0.40219.36365,29616-Nov-201117:41x64
Mfc100enu.dll10.0.40219.36356,08016-Nov-201117:41x64
Mfc100esn.dll10.0.40219.36364,78416-Nov-201117:41x64
Mfc100fra.dll10.0.40219.36365,29616-Nov-201117:41x64
Mfc100ita.dll10.0.40219.36363,24816-Nov-201117:41x64
Mfc100jpn.dll10.0.40219.36344,81616-Nov-201117:41x64
Mfc100kor.dll10.0.40219.36344,30416-Nov-201117:41x64
Mfc100rus.dll10.0.40219.36361,71216-Nov-201117:41x64
Mfc100u.dll10.0.40219.3635,603,08016-Nov-201117:41x64
Mfcm100.dll10.0.40219.36393,96016-Nov-201117:41x64
Mfcm100u.dll10.0.40219.36393,96816-Nov-201117:41x64
Msvcp100.dll10.0.40219.363609,04016-Nov-201117:41x64
Msvcr100_clr0400.dll10.0.40219.363830,22416-Nov-201117:41x64
Vcomp100.dll10.0.40219.36358,12816-Nov-201117:41x64
For all supported IA-64–based versions of Visual C++ 2010 SP1 Redistributable Package
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.363386,31216-Nov-201118:00IA-64
Msvcp100.dll10.0.40219.363967,44016-Nov-201118:00IA-64
Msvcr100_clr0400.dll10.0.40219.3631,500,43216-Nov-201118:00IA-64
Vcomp100.dll10.0.40219.363144,14416-Nov-201118:00IA-64

STATUS

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

MORE INFORMATION

For more information about how to create an MFC application, visit the following MSDN website:
How to create an MFC Application

Properties

Article ID: 2627265 - Last Review: February 2, 2012 - Revision: 3.0
APPLIES TO
  • Microsoft Visual Studio 2010 Service Pack 1
Keywords: 
kbqfe kbhotfixserver kbfix kbexpertiseadvanced kbsurveynew KB2627265

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com