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.

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


View products that this article applies to.

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

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

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:

Download the Update for Windows XP (KB319740) package now.
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 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


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

↑ Back to the top

Article Info
Article ID : 319740
Revision : 14
Created on : 11/16/2007
Published on : 11/16/2007
Exists online : False
Views : 806