Platform SDK: Files and I/O

FILE_NOTIFY_INFORMATION

The FILE_NOTIFY_INFORMATION structure describes the changes found by the ReadDirectoryChangesW function.

typedef struct _FILE_NOTIFY_INFORMATION {
  DWORD NextEntryOffset;
  DWORD Action;
  DWORD FileNameLength;
  WCHAR FileName[1];
} FILE_NOTIFY_INFORMATION, *PFILE_NOTIFY_INFORMATION;

Members

NextEntryOffset
Specifies the number of bytes that must be skipped to get to the next record. A value of zero indicates that this is the last record.
Action
Specifies the type of change that occurred.
Value Meaning
FILE_ACTION_ADDED The file was added to the directory.
FILE_ACTION_REMOVED The file was removed from the directory.
FILE_ACTION_MODIFIED The file was modified. This can be a change in the time stamp or attributes.
FILE_ACTION_RENAMED_OLD_NAME The file was renamed and this is the old name.
FILE_ACTION_RENAMED_NEW_NAME The file was renamed and this is the new name.

FileNameLength
Specifies the length, in bytes, of the file name portion of the record. Note that this length does not include the terminating null character.
FileName
This is a variable-length field that contains the file name relative to the directory handle. The file name is in the Unicode character format and is not null-terminated.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Winnt.h; include Windows.h.

See Also

File I/O Overview, File I/O Structures, ReadDirectoryChangesW