Applies ToVisual Studio Professional 2010 Visual Studio Premium 2010 Visual Studio Ultimate 2010

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 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:

http://support.microsoft.com/contactus/?ws=supportNote 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 name

File version

File size

Date

Time

Platform

Atl100.dll

10.0.40219.363

159,496

16-Nov-11

17:41

x64

Atl100.dll

10.0.40219.363

386,312

16-Nov-11

18:00

IA-64

Atl100.dll

10.0.40219.363

139,016

16-Nov-11

18:23

x86

Mfc100.dll

10.0.40219.363

5,575,944

16-Nov-11

17:41

x64

Mfc100.dll

10.0.40219.363

4,398,344

16-Nov-11

18:23

x86

Mfc100chs.dll

10.0.40219.363

37,136

16-Nov-11

17:41

x64

Mfc100chs.dll

10.0.40219.363

37,136

16-Nov-11

18:23

x86

Mfc100cht.dll

10.0.40219.363

37,136

16-Nov-11

17:41

x64

Mfc100cht.dll

10.0.40219.363

37,136

16-Nov-11

18:23

x86

Mfc100d.dll

10.0.40219.363

9,134,344

16-Nov-11

21:03

x64

Mfc100d.dll

10.0.40219.363

7,057,160

16-Nov-11

21:39

x86

Mfc100deu.dll

10.0.40219.363

65,296

16-Nov-11

17:41

x64

Mfc100deu.dll

10.0.40219.363

65,296

16-Nov-11

18:23

x86

Mfc100enu.dll

10.0.40219.363

56,080

16-Nov-11

17:41

x64

Mfc100enu.dll

10.0.40219.363

56,080

16-Nov-11

18:23

x86

Mfc100esn.dll

10.0.40219.363

64,784

16-Nov-11

17:41

x64

Mfc100esn.dll

10.0.40219.363

64,784

16-Nov-11

18:23

x86

Mfc100fra.dll

10.0.40219.363

65,296

16-Nov-11

17:41

x64

Mfc100fra.dll

10.0.40219.363

65,296

16-Nov-11

18:23

x86

Mfc100ita.dll

10.0.40219.363

63,248

16-Nov-11

17:41

x64

Mfc100ita.dll

10.0.40219.363

63,248

16-Nov-11

18:23

x86

Mfc100jpn.dll

10.0.40219.363

44,816

16-Nov-11

17:41

x64

Mfc100jpn.dll

10.0.40219.363

44,816

16-Nov-11

18:23

x86

Mfc100kor.dll

10.0.40219.363

44,304

16-Nov-11

17:41

x64

Mfc100kor.dll

10.0.40219.363

44,304

16-Nov-11

18:23

x86

Mfc100rus.dll

10.0.40219.363

61,712

16-Nov-11

17:41

x64

Mfc100rus.dll

10.0.40219.363

61,712

16-Nov-11

18:23

x86

Mfc100u.dll

10.0.40219.363

5,603,080

16-Nov-11

17:41

x64

Mfc100u.dll

10.0.40219.363

4,423,944

16-Nov-11

18:23

x86

Mfc100ud.dll

10.0.40219.363

9,211,664

16-Nov-11

21:03

x64

Mfc100ud.dll

10.0.40219.363

7,125,776

16-Nov-11

21:39

x86

Mfcm100.dll

10.0.40219.363

93,960

16-Nov-11

17:41

x64

Mfcm100.dll

10.0.40219.363

82,696

16-Nov-11

18:23

x86

Mfcm100d.dll

10.0.40219.363

120,592

16-Nov-11

21:03

x64

Mfcm100d.dll

10.0.40219.363

104,720

16-Nov-11

21:39

x86

Mfcm100u.dll

10.0.40219.363

93,968

16-Nov-11

17:41

x64

Mfcm100u.dll

10.0.40219.363

82,704

16-Nov-11

18:23

x86

Mfcm100ud.dll

10.0.40219.363

122,128

16-Nov-11

21:03

x64

Mfcm100ud.dll

10.0.40219.363

106,256

16-Nov-11

21:39

x86

Mfcmifc80u.dll

10.0.40219.363

14,096

17-Nov-11

18:43

x86

Msvcp100.dll

10.0.40219.363

609,040

16-Nov-11

17:41

x64

Msvcp100.dll

10.0.40219.363

967,440

16-Nov-11

18:00

IA-64

Msvcp100.dll

10.0.40219.363

422,160

16-Nov-11

18:23

x86

Msvcp100d.dll

10.0.40219.363

1,980,176

16-Nov-11

20:08

IA-64

Msvcp100d.dll

10.0.40219.363

1,015,568

16-Nov-11

21:11

x64

Msvcp100d.dll

10.0.40219.363

744,720

16-Nov-11

21:49

x86

Msvcr100_clr0400.dll

10.0.40219.363

830,224

16-Nov-11

17:41

x64

Msvcr100_clr0400.dll

10.0.40219.363

1,500,432

16-Nov-11

18:00

IA-64

Msvcr100_clr0400.dll

10.0.40219.363

774,928

16-Nov-11

18:23

x86

Msvcr100d_clr0400.dll

10.0.40219.363

3,765,008

16-Nov-11

20:08

IA-64

Msvcr100d_clr0400.dll

10.0.40219.363

1,874,192

16-Nov-11

21:11

x64

Msvcr100d_clr0400.dll

10.0.40219.363

1,506,064

16-Nov-11

21:49

x86

Vcomp100.dll

10.0.40219.363

58,128

16-Nov-11

17:41

x64

Vcomp100.dll

10.0.40219.363

144,144

16-Nov-11

18:00

IA-64

Vcomp100.dll

10.0.40219.363

51,984

16-Nov-11

18:23

x86

Vcomp100d.dll

10.0.40219.363

317,712

16-Nov-11

20:03

IA-64

Vcomp100d.dll

10.0.40219.363

107,792

16-Nov-11

20:55

x64

Vcomp100d.dll

10.0.40219.363

88,848

16-Nov-11

21:33

x86

Vcomp100ui.dll

10.0.40219.363

10,512

17-Nov-11

18:43

x86

Vcomp100ui.dll

10.0.40219.363

11,024

17-Nov-11

18:43

x86

Vcomp100ui.dll

10.0.40219.363

11,536

17-Nov-11

18:43

x86

Vcomp100ui.dll

10.0.40219.363

12,560

17-Nov-11

18:43

x86

Vcredist_ia64.exe

10.0.40219.363

3,047,008

16-Nov-11

23:40

x86

Vcredist_x64.exe

10.0.40219.363

10,282,584

16-Nov-11

23:35

x86

Vcredist_x86.exe

10.0.40219.363

8,974,424

16-Nov-11

23:49

x86

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

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.