3 out of 8 rated this helpful - Rate this topic

FILE_NOTIFY_INFORMATION structure

Applies to: desktop apps only

Describes the changes found by the ReadDirectoryChangesW function.

Syntax

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

Members

NextEntryOffset

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

The type of change that has occurred. This member can be one of the following values.

ValueMeaning
FILE_ACTION_ADDED
0x00000001

The file was added to the directory.

FILE_ACTION_REMOVED
0x00000002

The file was removed from the directory.

FILE_ACTION_MODIFIED
0x00000003

The file was modified. This can be a change in the time stamp or attributes.

FILE_ACTION_RENAMED_OLD_NAME
0x00000004

The file was renamed and this is the old name.

FILE_ACTION_RENAMED_NEW_NAME
0x00000005

The file was renamed and this is the new name.

 

FileNameLength

The size of the file name portion of the record, in bytes. Note that this value does not include the terminating null character.

FileName

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.

If there is both a short and long name for the file, the function will return one of these names, but it is unspecified which one.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winnt.h (include Windows.h)

See also

ReadDirectoryChangesW

 

 

Send comments about this topic to Microsoft

Build date: 4/17/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
how do we get the long name from the short name when the file is renamed or removed?
isn't it possible to do that?