Help and Support
Hotfix Download Available

MFC applications leak GDI objects on computers that are running Windows Server 2003 or Windows XP

Article ID:319740
Last Review:November 16, 2007
Revision:7.5
This article was previously published under Q319740
On This Page

SYMPTOMS

When you run a Microsoft Foundation Classes (MFC) application on a computer that is running Microsoft Windows XP with Service Pack 2 (SP2) installed, you may see memory leaks for Graphics Device Interface (GDI) objects when you create and destroy child windows. To see the memory leaks, view the GDI objects of the process in Task Manager.

This problem also occurs on a computer that is running Windows Server 2003 when the Themes service is started. By default, the Themes service is disabled on Windows Server 2003.

Back to the top

CAUSE

This problem occurs because of a bug in the implementation of the new theming interface.

Back to the top

RESOLUTION

Hotfix information

Back to the top

Windows Server 2003

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might 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.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

No prerequisites are required.

Restart requirement

You must restart your computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English 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 tool in Control Panel.
Windows Server 2003, x86-based versions
File nameFile versionFile sizeDateTimePlatform
Uxtheme.dll6.0.3790.274200,70418-Feb-200505:38x86
Updspapi.dll6.1.22.0371,93616-Feb-200500:18x86

Windows Server 2003, Itanium-based versions
File nameFile versionFile sizeDateTimePlatformService branch
Uxtheme.dll6.0.3790.274539,64817-Feb-200513:38IA-64RTMQFE
Wuxtheme.dll6.0.3790.274200,70417-Feb-200513:38x86WOW
Updspapi.dll6.1.22.0639,71215-Feb-200508:18IA-64Not Applicable

Back to the top

Windows XP

Prerequisites

To install this hotfix, you must have Windows XP Service Pack 2 (SP2) installed.

Restart requirement

You must restart your computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other previously released hotfixes.

File information

The English 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 tool in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Uxtheme.dll6.0.2900.2523218,62423-Sep-200417:16x86
Updspapi.dll6.1.22.4371,93625-Feb-200503:53x86

Back to the top

The following file is available for download from the Microsoft Download Center:

DownloadDownload the Update for Windows XP (KB319740) package now. (http://www.microsoft.com/downloads/details.aspx?FamilyId=9B5EDFC8-A4BB-4080-9063-6518166E2DAB&displaylang=en)
Release Date: March 21, 2006

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 (http://support.microsoft.com/kb/119591/) How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Back to the top

WORKAROUND

If this GDI leak is seriously degrading performance, you can turn off the new user interface theming in Windows XP. To do this, follow these steps:
1.Click Start, and then click Control Panel.
2.Click Appearance and Themes, and then click Display.
3.On the Themes tab of the Display Properties dialog box, click Windows Classic in the Theme list.
4.Click Apply, and then click OK.

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


APPLIES TO
Microsoft Windows XP Home Edition SP2
Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
Microsoft Windows Server 2003, Standard Edition (32-bit x86)
Microsoft Windows Server 2003, Web Edition
Microsoft Windows XP Home Edition
Microsoft Windows XP Professional

Back to the top

Keywords: 
kbautohotfix atdownload kbhotfixserver kbqfe kbwinxp64bit2003sp1fix kbwinxpsp3fix kbwinxppresp3fix kbbug kbfix kbshell KB319740

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.