OnSetFileAttributesC event/delegate/callback

Filter:

Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CBFSFilter     See also    

Overview

This callback is called when the OS or the application needs to change the attributes or times of the open file.

Declaration

[Pascal]
    property OnSetFileAttributesC : TCBFSFltSetFileAttributesEventC;
    TCBFSFltSetFileAttributesEventC = procedure(Sender : TObject; var FileName: TCBString; var CreationTime: TDateTime; var LastAccessTime: TDateTime; var LastWriteTime: TDateTime; var FileAttributes: DWORD; var UserContext: pointer; var ProcessRequest: boolean) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CBFSFltSetFileAttributesEventC)(CBFSFilter* Sender, LPWSTR FileName, PFILETIME CreationTime, PFILETIME LastAccessTime, PFILETIME LastWriteTime, DWORD *FileAttributes, PVOID* UserContext, LPBOOL ProcessRequest);

[C++ (VCL)]
    typedef void __fastcall (__closure *TCBFSFltSetFileAttributesEventC)(System::TObject* Sender, TCBString FileName, System::TDateTime &CreationTime, System::TDateTime &LastAccessTime, System::TDateTime &LastWriteTime, unsigned long &FileAttributes, void* &UserContext, bool &ProcessRequest);

[C++ (.NET)]
    public delegate void CBFSFltSetFileAttributesEventC(CBFSFilter^ Sender, String^ FileName, DateTime% CreationTime, DateTime% LastAccessTime, DateTime% LastWriteTime, Int32% FileAttributes, IntPtr% UserContext, bool% ProcessRequest);

[C#]
    delegate void CBFSFltSetFileAttributesEventC(CBFSFilter Sender, string FileName, ref DateTime CreationTime, ref DateTime LastAccessTime, ref DateTime LastWriteTime, ref Int32 FileAttributes, ref IntPtr UserContext, ref bool ProcessRequest);

[VB.NET]
    Delegate Sub CBFSFltSetFileAttributesEventC(ByVal Sender As CBFSFilter, ByVal FileName As String, ByRef CreationTime As DateTime, ByRef LastAccessTime As DateTime, ByRef LastWriteTime As DateTime, ByRef FileAttributes As Int32, ByRef UserContext As IntPtr, ByRef ProcessRequest As Boolean)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileName - the name of the file
  • CreationTime - the time of the object creation. The value can be empty (zero in VCL, DateTime.MinValue in .NET) if the parameter is not set.
  • LastAccessTime - the time of the last access to the object. The value can be empty (zero in VCL, DateTime.MinValue in .NET) if the parameter is not set.
  • LastWriteTime - the time of the last modification to the object. The value can be empty (zero in VCL, DateTime.MinValue in .NET) if the parameter is not set.
  • FileAttributes - the attributes of the file
  • FileContext - the placeholder for the application-defined data, common to all concurrent file operations on the file
  • HandleContext - the placeholder for the application-defined data, local to each opened file handle
  • ProcessRequest - specifies, whether the request must be passed further to the underlying filters and the file system

Description

This callback is called when the OS or the application needs to change the times and/or the attributes of the open file.
Read more about contexts.

Error handling

See Error handling topic for detailed information about how to report errors, which occur in the event handlers, back to CBFSFilter.

See also

OnSetFileAttributesN