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.

FIX: An MFC application that uses the COleDocIPFrameWndEx class for document embedding fails


View products that this article applies to.

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;
}


↑ Back to the top


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.

↑ Back to the top


Resolution

Apply the following hotfix to resolve this issue.
Note This hotfix applies to Microsoft Visual Studio 2010 SP1. To obtain the hotfix for the Microsoft Visual C++ 2010 SP1 Redistributable Package, click the following article number to view the article in the Microsoft Knowledge Base:
2627265 [Redistributable Package 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: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 Studio 2010 SP1 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.
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.363159,49616-Nov-1117:41x64
Atl100.dll10.0.40219.363386,31216-Nov-1118:00IA-64
Atl100.dll10.0.40219.363139,01616-Nov-1118:23x86
Mfc100.dll10.0.40219.3635,575,94416-Nov-1117:41x64
Mfc100.dll10.0.40219.3634,398,34416-Nov-1118:23x86
Mfc100chs.dll10.0.40219.36337,13616-Nov-1117:41x64
Mfc100chs.dll10.0.40219.36337,13616-Nov-1118:23x86
Mfc100cht.dll10.0.40219.36337,13616-Nov-1117:41x64
Mfc100cht.dll10.0.40219.36337,13616-Nov-1118:23x86
Mfc100d.dll10.0.40219.3639,134,34416-Nov-1121:03x64
Mfc100d.dll10.0.40219.3637,057,16016-Nov-1121:39x86
Mfc100deu.dll10.0.40219.36365,29616-Nov-1117:41x64
Mfc100deu.dll10.0.40219.36365,29616-Nov-1118:23x86
Mfc100enu.dll10.0.40219.36356,08016-Nov-1117:41x64
Mfc100enu.dll10.0.40219.36356,08016-Nov-1118:23x86
Mfc100esn.dll10.0.40219.36364,78416-Nov-1117:41x64
Mfc100esn.dll10.0.40219.36364,78416-Nov-1118:23x86
Mfc100fra.dll10.0.40219.36365,29616-Nov-1117:41x64
Mfc100fra.dll10.0.40219.36365,29616-Nov-1118:23x86
Mfc100ita.dll10.0.40219.36363,24816-Nov-1117:41x64
Mfc100ita.dll10.0.40219.36363,24816-Nov-1118:23x86
Mfc100jpn.dll10.0.40219.36344,81616-Nov-1117:41x64
Mfc100jpn.dll10.0.40219.36344,81616-Nov-1118:23x86
Mfc100kor.dll10.0.40219.36344,30416-Nov-1117:41x64
Mfc100kor.dll10.0.40219.36344,30416-Nov-1118:23x86
Mfc100rus.dll10.0.40219.36361,71216-Nov-1117:41x64
Mfc100rus.dll10.0.40219.36361,71216-Nov-1118:23x86
Mfc100u.dll10.0.40219.3635,603,08016-Nov-1117:41x64
Mfc100u.dll10.0.40219.3634,423,94416-Nov-1118:23x86
Mfc100ud.dll10.0.40219.3639,211,66416-Nov-1121:03x64
Mfc100ud.dll10.0.40219.3637,125,77616-Nov-1121:39x86
Mfcm100.dll10.0.40219.36393,96016-Nov-1117:41x64
Mfcm100.dll10.0.40219.36382,69616-Nov-1118:23x86
Mfcm100d.dll10.0.40219.363120,59216-Nov-1121:03x64
Mfcm100d.dll10.0.40219.363104,72016-Nov-1121:39x86
Mfcm100u.dll10.0.40219.36393,96816-Nov-1117:41x64
Mfcm100u.dll10.0.40219.36382,70416-Nov-1118:23x86
Mfcm100ud.dll10.0.40219.363122,12816-Nov-1121:03x64
Mfcm100ud.dll10.0.40219.363106,25616-Nov-1121:39x86
Mfcmifc80u.dll10.0.40219.36314,09617-Nov-1118:43x86
Msvcp100.dll10.0.40219.363609,04016-Nov-1117:41x64
Msvcp100.dll10.0.40219.363967,44016-Nov-1118:00IA-64
Msvcp100.dll10.0.40219.363422,16016-Nov-1118:23x86
Msvcp100d.dll10.0.40219.3631,980,17616-Nov-1120:08IA-64
Msvcp100d.dll10.0.40219.3631,015,56816-Nov-1121:11x64
Msvcp100d.dll10.0.40219.363744,72016-Nov-1121:49x86
Msvcr100_clr0400.dll10.0.40219.363830,22416-Nov-1117:41x64
Msvcr100_clr0400.dll10.0.40219.3631,500,43216-Nov-1118:00IA-64
Msvcr100_clr0400.dll10.0.40219.363774,92816-Nov-1118:23x86
Msvcr100d_clr0400.dll10.0.40219.3633,765,00816-Nov-1120:08IA-64
Msvcr100d_clr0400.dll10.0.40219.3631,874,19216-Nov-1121:11x64
Msvcr100d_clr0400.dll10.0.40219.3631,506,06416-Nov-1121:49x86
Vcomp100.dll10.0.40219.36358,12816-Nov-1117:41x64
Vcomp100.dll10.0.40219.363144,14416-Nov-1118:00IA-64
Vcomp100.dll10.0.40219.36351,98416-Nov-1118:23x86
Vcomp100d.dll10.0.40219.363317,71216-Nov-1120:03IA-64
Vcomp100d.dll10.0.40219.363107,79216-Nov-1120:55x64
Vcomp100d.dll10.0.40219.36388,84816-Nov-1121:33x86
Vcomp100ui.dll10.0.40219.36310,51217-Nov-1118:43x86
Vcomp100ui.dll10.0.40219.36311,02417-Nov-1118:43x86
Vcomp100ui.dll10.0.40219.36311,53617-Nov-1118:43x86
Vcomp100ui.dll10.0.40219.36312,56017-Nov-1118:43x86
Vcredist_ia64.exe10.0.40219.3633,047,00816-Nov-1123:40x86
Vcredist_x64.exe10.0.40219.36310,282,58416-Nov-1123:35x86
Vcredist_x86.exe10.0.40219.3638,974,42416-Nov-1123:49x86

↑ 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 how to create an MFC application, visit the following MSDN website:

↑ Back to the top


Keywords: kbqfe, kbhotfixserver, kbfix, kbexpertiseadvanced, kbhotfixdev, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2627201
Revision : 1
Created on : 1/7/2017
Published on : 1/20/2012
Exists online : False
Views : 434