Memory usage is more when you use a custom implementation of the ILockBytes interface to perform file operations in Windows XP Professional (897661)



The information in this article applies to:

  • Microsoft Windows XP Service Pack 2, when used with:
    • Microsoft Windows XP Professional
  • Microsoft Windows XP Service Pack 1, when used with:
    • Microsoft Windows XP Professional 64-Bit Edition (Itanium) 2003
    • Microsoft Windows XP Professional

SYMPTOMS

To open files so that you can perform file operations, you use a custom implementation of the ILockBytes interface in a program that runs in Microsoft Windows XP Professional. After you do this, memory usage is more for files that are opened in read-only mode than for the files that are opened in read-and-write mode. Additionally, you may be able to open more files in read-and-write mode than in read-only mode.

Note If the STGM_NOSNAPSHOT flag is used in read-only mode, memory usage may be the same for both read-only mode operations and read-and-write mode operations.

CAUSE

This problem occurs because a temporary scratch file is created to save modifications that are made to the file. This temporary file is mapped to memory until changes are saved in the original file.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it 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 Windows XP service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site: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

There are no prerequisites.

Restart requirement

You do not have to restart the 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 XP Professional, x86-based versions
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Ole32.dll5.1.2600.16691,190,40020-Apr-200522:39x86SP1SP1QFE
Rpcrt4.dll5.1.2600.1361535,55206-Mar-200402:16x86SP1SP1QFE
Rpcss.dll5.1.2600.1619284,67214-Jan-200505:33x86SP1SP1QFE
Ole32.dll5.1.2600.26581,286,14420-Apr-200522:23x86SP2SP2QFE
Windows XP Professional with Service Pack 1, Itanium-based versions
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Ole32.dll5.1.2600.16694,356,60820-Apr-200510:11IA-64SP1SP1QFE
Rpcrt4.dll5.1.2600.13612,317,82405-Mar-200413:37IA-64SP1SP1QFE
Rpcss.dll5.1.2600.1619785,92013-Jan-200517:00IA-64SP1SP1QFE
Wole32.dll5.1.2600.16691,190,40020-Apr-200510:09x86SP1WOW
Wrpcrt4.dll5.1.2600.1361509,44005-Mar-200413:46x86SP1WOW

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

The custom ILockBytes interface turns off memory mapping of the original file and of the snapshot file. But the scratch file is always mapped to memory unless there is insufficient memory. You cannot turn off this option except by using the STGM_NOSCRATCH flag. This flag puts the temporary changes in the free space of the snapshot file and does not create a scratch file.

When you use the STGM_READ flag, changes are not committed to the file. The scratch changes are thrown away when a file operation is finished.

For more information about the ILockBytes interface, visit the following Microsoft Web site: For more information about the STGM flags, visit the following Microsoft Web site: For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Modification Type:MinorLast Reviewed:7/24/2006
Keywords:kbQFE kbHotfixServer kbWinXPsp2fix kbWinXPsp1fix kbBug kbfix kbpubtypekc KB897661 kbAudITPRO kbAudDeveloper