Microsoft KB Archive/245214

{|
 * width="100%"|

PRB: ReadDirectoryChangesW Not Giving Consistent Notification

 * }

Q245214

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * the operating system: Microsoft Windows 2000

-

SYMPTOMS
If you are using ReadDirectoryChangesW or FindNextChangeNotification to be notified when files are accessed you may not be notified when expected if the file is accessed soon after you were last notified.

CAUSE
Windows NT and Windows 2000 only updates the Last Access Time every hour for performance reasons.

RESOLUTION
To find out if a file has been accessed more frequently then hourly use GetFileTime.

STATUS
This behavior is by design.

Steps to Reproduce Behavior

 * 1) In explorer right-click a file and choose Properties from the Context menu to access the file. Note the Accessed time should be the current time.
 * 2) Wait 10 minutes and check the Accessed time again. The time is not updated.
 * 3) Wait more then one hour and check the Accessed time again. The Accessed time is updated to the current time.