FILE_NOTIFY_INFORMATION  我在VC中找到 不知道Delphi有没有?

解决方案 »

  1.   

    The FIND_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;
     MembersNextEntryOffsetSpecifies 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.ActionSpecifies 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.
     FileNameLengthSpecifies the length, in bytes, of the filename portion of the record. Note that this length does not include the terminating null character.FileNameThis is a variable-length field that contains the filename relative to the directory handle. The filename is in the Unicode character format and is not null-terminated.
      

  2.   

    查MSDN:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/file_notify_information_str.asp
      

  3.   

    Type
      PFileNotifyInformation = ^FILE_NOTIFY_INFORMATION;
      FILE_NOTIFY_INFORMATION = Record
        NextEntryOffset: DWORD;
        Action: DWORD;
        FileNameLength: DWORD;
        FileName: Array[0..0] Of WideChar;
      End;http://www.koders.com/delphi/fid103E3E41C626483F970803CEC99BE35741DA2019.aspx
      

  4.   

    FileName: Array[0..0] Of WideChar; 
    为何是[0..0],不明白?