Microsoft KB Archive/308394

= BUG: Incorrect File Time Returned by FindFirstFile and FindNextFile APIs =

Article ID: 308394

Article Last Modified on 7/27/2004

-

APPLIES TO


 * Microsoft Windows CE 2.12 for the Handheld PC
 * Microsoft Windows CE 2.11 for the Handheld PC
 * Microsoft Windows CE 2.0 for the Handheld PC
 * Microsoft Windows CE 1.0
 * Microsoft Windows CE 3.0 for the Handheld PC

-



This article was previously published under Q308394



SYMPTOMS
When you call FindFirstFile and FindNextFile for a file in the object store, the ftCreationTime, ftLastAccessTime, and ftLastWriteTime members of the WIN32_FIND_DATA structure will always return the same values. If the file is modified, this will change all times to the modified time. For files on other storage, such as compact flash cards, ftLastAccessTime and ftLastWriteTime may behave differently.



CAUSE
Files in the object store only save the last write time, therefore only the ftLastWriteTime member of WIN32_FIND_DATA is valid. The operating system incorrectly puts this value in the unsupported members instead of setting them to &quot;0&quot;.

For other file systems, these fields may or may not be supported. If they are not supported they should also return 0, otherwise they should return appropriate time stamps.



RESOLUTION
Ignore the ftCreationTime and ftLastAccessTime members of WIN32_FIND_DATA when you reference files in the object store.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Keywords: kbbug kbnofix KB308394

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.