FindFirstChangeNotification May Not Notify All Processes on File Changes
This article was previously published under Q188321
This article has been archived. It is offered "as is" and will no longer be updated.
The FindFirstChangeNotification call may not notify all processes that havesent a notify request on the same directory. This may occur if thedirectory is on a remote computer.
This problem occurs because of an optimization in the redirector ifmultiple processes open the same directory across the network. What theredirector may do is only open one handle to the remote directory. Thiscauses the notify request to behave as though the notify requests were allsent to the same handle. By design, only one request will be notified perdirectory change per handle.
To receive multiple notify requests across the network, the user who runsthe program must have the "backup file and directories" user right. Thenthe program must set the privilege using the AdjustTokenPrivileges call.This is because the FindFirstChangeNotification API sets theFILE_OPEN_FOR_BACKUP_INTENT in its create packet. This is to prevent theoptimization mentioned above from occurring. However, the "backup file anddirectories" privilege must be turned on for it to work.
Article ID: 188321 - Last Review: 12/05/2015 08:50:46 - Revision: 1.1
Microsoft Windows NT Workstation 4.0 Developer Edition, Microsoft Windows NT Server 4.0 Standard Edition
- kbnosurvey kbarchive kbprb KB188321