PRB: ReadDirectoryChangesW Not Giving Consistent Notification

ID: Q245214


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows NT 4.0
    • 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.


MORE INFORMATION

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.



REFERENCES

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

Q188321 FindFirstChangeNotification May Not Notify All Processes

Additional query words:

Keywords : kbAPI kbFileIO kbKernBase kbNTOS400 kbWinOS2000 kbDSupport kbGrpKernBase
Version : winnt:4.0
Platform : winnt
Issue type : kbprb


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.