A customer was using ReadÂDirectoryÂChangesW to monitor the contents of a directory, and they were concerned about the FILE_ and FILE_ pair of actions. The documentation doesn’t guarantee that the two always occur consecutively, or even that they always appear in pairs. For peace of mind, the customer was looking for a way to match up each FILE_ with a FILE_ to make sure they were tracking the rename properly.
Yes, you can do it by switching from ReadÂDirectoryÂChangesW. to ReadÂDirectoryÂChangesÂExW and asking for ReadÂDirectoryÂNotifyÂExtendedÂInformation. This produces the FILE_ structure, and that structure includes the FileId of the affected file. You can then match that up between the FILE_ and FILE_ to confirm that they are the two halves of the same rename operation.
0 comments
Be the first to start the discussion.