FIX: FAT media may lose clusters during a file copy operation if the operation is suspended and then resumed in Windows CE .NET 4.2 (875553)



The information in this article applies to:

  • Microsoft Windows CE .NET 4.2



Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SYMPTOMS

If a Microsoft Windows CE .NET device suspends while a file copy operation is in process to an external file allocation table (FAT)-based storage device, such as a Compact Flash (CF) card, a problem may occur. The storage device may lose clusters after the file copy operation resumes.

CAUSE

When the Windows CE .NET device suspends, all pending sector-write operations are stopped. When the sector-write operations resume, the drivers for the storage device unload and then reload. These file operations cause an error. When this problem occurs, the unwritten sectors are discarded. However, the file copy code in the shell detects the file-write errors and then deletes the files. This removes the directory entries for the files and leaves the FAT allocations on the disk as they were before the file copy operation suspended.

RESOLUTION

Software update information

A supported software update is now available from Microsoft as Windows CE 4.2 Core OS QFE 875553. To resolve this problem immediately, click the following article number for information about obtaining Windows CE Platform Builder and core operating system software updates:

837392 How to locate core operating system fixes for Microsoft Windows CE Platform Builder products

Prerequisites

This update is supported only if all previously issued updates for this product have also been installed.

Restart requirement

After you install this update, you must perform a clean build of the whole operating system. To clean the operating system, follow these steps:
  1. On the Build menu, click Clean.
  2. On the Build menu, click Build Platform.
You do not have to restart your computer after you apply this update.

Update replacement information

This update does not replace any other updates.

File information

The English version of this update 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.
   Date         Time   Version         Size       File name
   --------------------------------------------------------------
   25-Sep-2004  01:33  4.21            2,501,368  Wincepb42-040924-kb875553-armv4.exe  
   25-Sep-2004  01:33  4.21            2,501,368  Wincepb42-040924-kb875553-armv4i.exe
   25-Sep-2004  01:33  4.21            2,566,904  Wincepb42-040924-kb875553-mipsii.exe
   25-Sep-2004  01:33  4.21            2,566,904  Wincepb42-040924-kb875553-mipsii_fp.exe
   25-Sep-2004  01:33  4.21            2,599,672  Wincepb42-040924-kb875553-mipsiv.exe
   25-Sep-2004  01:33  4.21            2,599,672  Wincepb42-040924-kb875553-mipsiv_fp.exe
   25-Sep-2004  01:33  4.21            2,394,872  Wincepb42-040924-kb875553-sh3.exe
   25-Sep-2004  01:33  4.21            2,394,872  Wincepb42-040924-kb875553-sh4.exe
   25-Sep-2004  01:33  4.21            2,161,400  Wincepb42-040924-kb875553-x86.exe
The English version of this package has the file attributes (or later) that are listed in the following table.
   Date         Time                       Size   File name
   --------------------------------------------------------------

   Path: Public\Common\Oak\Lib\Armv4\Debug
   20-Sep-2004  17:40                    651,786  Fatfsd.lib
   20-Sep-2004  17:40                     86,016  Fatfsd.pdb
   20-Sep-2004  17:40                    198,890  Fsmain.lib
   20-Sep-2004  17:40                     69,632  Fsmain.pdb
   20-Sep-2004  17:41                    737,122  Tfat.lib
   20-Sep-2004  17:41                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Armv4\Retail
   20-Sep-2004  17:40                    374,002  Fatfsd.lib
   20-Sep-2004  17:40                     86,016  Fatfsd.pdb
   20-Sep-2004  17:40                    170,604  Fsmain.lib
   20-Sep-2004  17:40                     69,632  Fsmain.pdb
   20-Sep-2004  17:40                    414,956  Tfat.lib
   20-Sep-2004  17:40                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Armv4i\Debug
   20-Sep-2004  17:42                    652,458  Fatfsd.lib
   20-Sep-2004  17:42                     86,016  Fatfsd.pdb
   20-Sep-2004  17:42                    199,172  Fsmain.lib
   20-Sep-2004  17:42                     69,632  Fsmain.pdb
   20-Sep-2004  17:42                    737,912  Tfat.lib
   20-Sep-2004  17:42                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Armv4i\Retail
   20-Sep-2004  17:42                    374,458  Fatfsd.lib
   20-Sep-2004  17:42                     86,016  Fatfsd.pdb
   20-Sep-2004  17:42                    170,818  Fsmain.lib
   20-Sep-2004  17:42                     69,632  Fsmain.pdb
   20-Sep-2004  17:42                    415,458  Tfat.lib
   20-Sep-2004  17:42                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsii\Debug
   20-Sep-2004  17:44                    667,220  Fatfsd.lib
   20-Sep-2004  17:44                     86,016  Fatfsd.pdb
   20-Sep-2004  17:43                    217,476  Fsmain.lib
   20-Sep-2004  17:43                     69,632  Fsmain.pdb
   20-Sep-2004  17:44                    752,150  Tfat.lib
   20-Sep-2004  17:44                     94,208  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsii\Retail
   20-Sep-2004  17:43                    382,686  Fatfsd.lib
   20-Sep-2004  17:43                     86,016  Fatfsd.pdb
   20-Sep-2004  17:43                    165,450  Fsmain.lib
   20-Sep-2004  17:43                     69,632  Fsmain.pdb
   20-Sep-2004  17:43                    423,978  Tfat.lib
   20-Sep-2004  17:43                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsii_fp\Debug
   20-Sep-2004  17:45                    667,364  Fatfsd.lib
   20-Sep-2004  17:45                     86,016  Fatfsd.pdb
   20-Sep-2004  17:45                    217,488  Fsmain.lib
   20-Sep-2004  17:45                     69,632  Fsmain.pdb
   20-Sep-2004  17:45                    752,240  Tfat.lib
   20-Sep-2004  17:45                     94,208  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsii_fp\Retail
   20-Sep-2004  17:45                    382,826  Fatfsd.lib
   20-Sep-2004  17:45                     86,016  Fatfsd.pdb
   20-Sep-2004  17:45                    165,460  Fsmain.lib
   20-Sep-2004  17:45                     69,632  Fsmain.pdb
   20-Sep-2004  17:45                    424,130  Tfat.lib
   20-Sep-2004  17:45                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsiv\Debug
   20-Sep-2004  17:47                    675,570  Fatfsd.lib
   20-Sep-2004  17:47                     86,016  Fatfsd.pdb
   20-Sep-2004  17:46                    220,090  Fsmain.lib
   20-Sep-2004  17:46                     69,632  Fsmain.pdb
   20-Sep-2004  17:47                    762,408  Tfat.lib
   20-Sep-2004  17:47                     94,208  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsiv\Retail
   20-Sep-2004  17:46                    385,432  Fatfsd.lib
   20-Sep-2004  17:46                     86,016  Fatfsd.pdb
   20-Sep-2004  17:46                    166,634  Fsmain.lib
   20-Sep-2004  17:46                     69,632  Fsmain.pdb
   20-Sep-2004  17:46                    427,530  Tfat.lib
   20-Sep-2004  17:46                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsiv_fp\Debug
   20-Sep-2004  17:48                    675,714  Fatfsd.lib
   20-Sep-2004  17:48                     86,016  Fatfsd.pdb
   20-Sep-2004  17:48                    220,102  Fsmain.lib
   20-Sep-2004  17:48                     69,632  Fsmain.pdb
   20-Sep-2004  17:48                    762,498  Tfat.lib
   20-Sep-2004  17:48                     94,208  Tfat.pdb

   Path: Public\Common\Oak\Lib\Mipsiv_fp\Retail
   20-Sep-2004  17:48                    385,574  Fatfsd.lib
   20-Sep-2004  17:48                     86,016  Fatfsd.pdb
   20-Sep-2004  17:48                    166,644  Fsmain.lib
   20-Sep-2004  17:48                     69,632  Fsmain.pdb
   20-Sep-2004  17:48                    427,680  Tfat.lib
   20-Sep-2004  17:48                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Sh3\Debug
   20-Sep-2004  17:50                    572,528  Fatfsd.lib
   20-Sep-2004  17:50                     86,016  Fatfsd.pdb
   20-Sep-2004  17:49                    177,354  Fsmain.lib
   20-Sep-2004  17:49                     69,632  Fsmain.pdb
   20-Sep-2004  17:50                    645,124  Tfat.lib
   20-Sep-2004  17:50                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Sh3\Retail
   20-Sep-2004  17:49                    348,456  Fatfsd.lib
   20-Sep-2004  17:49                     86,016  Fatfsd.pdb
   20-Sep-2004  17:49                    137,708  Fsmain.lib
   20-Sep-2004  17:49                     69,632  Fsmain.pdb
   20-Sep-2004  17:49                    384,996  Tfat.lib
   20-Sep-2004  17:49                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Sh4\Debug
   20-Sep-2004  17:51                    572,176  Fatfsd.lib
   20-Sep-2004  17:51                     86,016  Fatfsd.pdb
   20-Sep-2004  17:51                    177,330  Fsmain.lib
   20-Sep-2004  17:51                     69,632  Fsmain.pdb
   20-Sep-2004  17:51                    644,746  Tfat.lib
   20-Sep-2004  17:51                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\Sh4\Retail
   20-Sep-2004  17:51                    347,676  Fatfsd.lib
   20-Sep-2004  17:51                     86,016  Fatfsd.pdb
   20-Sep-2004  17:51                    137,680  Fsmain.lib
   20-Sep-2004  17:51                     69,632  Fsmain.pdb
   20-Sep-2004  17:51                    384,176  Tfat.lib
   20-Sep-2004  17:51                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\X86\Debug
   20-Sep-2004  17:39                    558,902  Fatfsd.lib
   20-Sep-2004  17:39                     86,016  Fatfsd.pdb
   20-Sep-2004  17:39                    162,684  Fsmain.lib
   20-Sep-2004  17:39                     69,632  Fsmain.pdb
   20-Sep-2004  17:39                    630,374  Tfat.lib
   20-Sep-2004  17:39                     86,016  Tfat.pdb

   Path: Public\Common\Oak\Lib\X86\Retail
   20-Sep-2004  17:39                    308,634  Fatfsd.lib
   20-Sep-2004  17:39                     86,016  Fatfsd.pdb
   20-Sep-2004  17:39                    116,038  Fsmain.lib
   20-Sep-2004  17:39                     69,632  Fsmain.pdb
   20-Sep-2004  17:39                    341,142  Tfat.lib
   20-Sep-2004  17:39                     86,016  Tfat.pdb

   Path: Public\Shell\Oak\Hpc\Ceshell
   20-Sep-2004  17:53                      2,944  Ceshell.cpp
   20-Sep-2004  17:53                      7,071  Copyfilepriv.cpp

   Path: Public\Shell\Oak\Lib\Armv4\Debug
   20-Sep-2004  17:42                  1,575,606  Ceshell.lib
   20-Sep-2004  17:42                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Armv4\Retail
   20-Sep-2004  17:41                  1,323,030  Ceshell.lib
   20-Sep-2004  17:41                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Armv4i\Debug
   20-Sep-2004  17:43                  1,578,478  Ceshell.lib
   20-Sep-2004  17:43                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Armv4i\Retail
   20-Sep-2004  17:43                  1,324,932  Ceshell.lib
   20-Sep-2004  17:43                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsii\Debug
   20-Sep-2004  17:45                  1,585,644  Ceshell.lib
   20-Sep-2004  17:45                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsii\Retail
   20-Sep-2004  17:44                  1,350,472  Ceshell.lib
   20-Sep-2004  17:44                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsii_fp\Debug
   20-Sep-2004  17:46                  1,585,932  Ceshell.lib
   20-Sep-2004  17:46                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsii_fp\Retail
   20-Sep-2004  17:46                  1,350,766  Ceshell.lib
   20-Sep-2004  17:46                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsiv\Debug
   20-Sep-2004  17:48                  1,604,576  Ceshell.lib
   20-Sep-2004  17:48                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsiv\Retail
   20-Sep-2004  17:47                  1,361,742  Ceshell.lib
   20-Sep-2004  17:47                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsiv_fp\Debug
   20-Sep-2004  17:49                  1,604,864  Ceshell.lib
   20-Sep-2004  17:49                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Mipsiv_fp\Retail
   20-Sep-2004  17:49                  1,362,030  Ceshell.lib
   20-Sep-2004  17:49                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Sh3\Debug
   20-Sep-2004  17:51                  1,427,184  Ceshell.lib
   20-Sep-2004  17:51                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Sh3\Retail
   20-Sep-2004  17:50                  1,240,026  Ceshell.lib
   20-Sep-2004  17:50                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Sh4\Debug
   20-Sep-2004  17:52                  1,427,184  Ceshell.lib
   20-Sep-2004  17:52                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\Sh4\Retail
   20-Sep-2004  17:52                  1,238,944  Ceshell.lib
   20-Sep-2004  17:52                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\X86\Debug
   20-Sep-2004  17:40                  1,326,464  Ceshell.lib
   20-Sep-2004  17:40                    176,128  Ceshell.pdb

   Path: Public\Shell\Oak\Lib\X86\Retail
   20-Sep-2004  17:40                  1,156,092  Ceshell.lib
   20-Sep-2004  17:40                    176,128  Ceshell.pdb

STATUS

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

MORE INFORMATION

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

This problem occurs because of the behavior in the CopyFileEx() API of the shell. The CopyFileEx() API of the shell immediately deletes the file that the CopyFileEx() API of the shell did not copy. There are also complex timing issues in the file system and in the device manager.

To implement a fix that carries the least risk, this hotfix changes the behavior of the CopyFileEx() API to skip removing the failed file. By default, this change is not enabled. To enable this fix, the OEM must include the following registry setting in their operating system:

[HKEY_LOCAL_MACHINE\System\StorageManager] "DeleteOnFailedCopy"=dword:0

Modification Type:MinorLast Reviewed:5/27/2005
Keywords:kbBug kbfix kbQFE KB875553 kbAudDeveloper