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.

Redistributable Package fix: A GDI leak occurs in an MFC MDI application that is developed in Visual Studio 2010 when you create a new document


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You use Microsoft Visual Studio 2010 to develop a Microsoft Visual C++ Microsoft Foundation Class (MFC) application. The application uses a tabbed multiple-document interface (MDI) layout.
  • You run the MFC application on your computer.
  • When the application is running, you close the last document tab and then you create a new document in the application.
In this scenario, the application consumes ten additional Graphics Device Interface (GDI) handles unexpectedly. The GDI handle resource usage increases every time that you close the last document tab and then create new documents. This behavior may eventually cause a GDI handle leak.

↑ Back to the top


Cause

This issue occurs because the GDI front handles are not released correctly by the MFC library when the last document tab is closed.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To resolve this problem immediately, 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.


Note After you install this hotfix, you need to activate the fix by adding the following code to the startup code of the application, for example to the InitInstance method:

g_bReuseRemovedTabGroups = TRUE;

Prerequisites

To apply this hotfix, you must have Visual Studio 2010 Service Pack 1 (SP1) installed.

Restart requirement

You do not have to restart the computer after you install the hotfix if the affected files are not being used during the installation process. We recommend that you close all Visual Studio 2010-related components before you install the hotfix.

Hotfix replacement information

This hotfix does not replace a 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


File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.434138,80006-Dec-201208:29x86
Mfc100.dll10.0.40219.4344,400,70406-Dec-201209:27x86
Mfc100chs.dll10.0.40219.43436,93606-Dec-201209:27x86
Mfc100cht.dll10.0.40219.43436,91206-Dec-201209:27x86
Mfc100deu.dll10.0.40219.43465,07206-Dec-201209:27x86
Mfc100enu.dll10.0.40219.43455,85606-Dec-201209:27x86
Mfc100esn.dll10.0.40219.43464,58406-Dec-201209:27x86
Mfc100fra.dll10.0.40219.43465,09606-Dec-201209:27x86
Mfc100ita.dll10.0.40219.43463,04806-Dec-201209:27x86
Mfc100jpn.dll10.0.40219.43444,59206-Dec-201209:27x86
Mfc100kor.dll10.0.40219.43444,08006-Dec-201209:27x86
Mfc100rus.dll10.0.40219.43461,48806-Dec-201209:27x86
Mfc100u.dll10.0.40219.4344,425,79206-Dec-201209:27x86
Mfcm100.dll10.0.40219.43482,48006-Dec-201209:27x86
Mfcm100u.dll10.0.40219.43482,48006-Dec-201209:27x86
Msvcp100.dll10.0.40219.434421,93606-Dec-201208:29x86
Msvcr100_clr0400.dll10.0.40219.434774,19206-Dec-201208:29x86
Vcomp100.dll10.0.40219.43452,28806-Dec-201209:27x86
For all supported x64-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package

File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.434159,29606-Dec-201209:10x64
Mfc100.dll10.0.40219.4345,579,84006-Dec-201209:10x64
Mfc100chs.dll10.0.40219.43436,91206-Dec-201209:10x64
Mfc100cht.dll10.0.40219.43436,93606-Dec-201209:10x64
Mfc100deu.dll10.0.40219.43465,09606-Dec-201209:10x64
Mfc100enu.dll10.0.40219.43455,88006-Dec-201209:10x64
Mfc100esn.dll10.0.40219.43464,56006-Dec-201209:10x64
Mfc100fra.dll10.0.40219.43465,09606-Dec-201209:10x64
Mfc100ita.dll10.0.40219.43463,04806-Dec-201209:10x64
Mfc100jpn.dll10.0.40219.43444,61606-Dec-201209:10x64
Mfc100kor.dll10.0.40219.43444,10406-Dec-201209:10x64
Mfc100rus.dll10.0.40219.43461,48806-Dec-201209:10x64
Mfc100u.dll10.0.40219.4345,605,93606-Dec-201209:10x64
Mfcm100.dll10.0.40219.43493,74406-Dec-201209:10x64
Mfcm100u.dll10.0.40219.43493,74406-Dec-201209:10x64
Msvcp100.dll10.0.40219.434608,81606-Dec-201209:10x64
Msvcr100_clr0400.dll10.0.40219.434830,01606-Dec-201209:10x64
Vcomp100.dll10.0.40219.43458,92806-Dec-201209:10x64
For all supported IA-64-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package

File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.434386,11206-Dec-201208:42IA-64
Msvcp100.dll10.0.40219.434967,23206-Dec-201208:42IA-64
Msvcr100_clr0400.dll10.0.40219.4341,500,20806-Dec-201208:42IA-64
Vcomp100.dll10.0.40219.434144,44806-Dec-201208:42IA-64

↑ 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


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

↑ Back to the top

Article Info
Article ID : 2723430
Revision : 1
Created on : 1/7/2017
Published on : 1/8/2013
Exists online : False
Views : 319