OnSetEndOfFileC 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 size of the open file.

Declaration

[Pascal]
    property OnSetEndOfFileC : TCBFSFltSetEndOfFileEventC;
    TCBFSFltSetEndOfFileEventC = procedure(Sender : TObject; FileName: TCBString; var EndOfFile: Int64; var FileContext: pointer; var HandleContext: pointer; var ProcessRequest: boolean) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CBFSFltSetEndOfFileEventC)(CBFSFilter* Sender, LPWSTR FileName, __int64* EndOfFile, PVOID* FileContext, PVOID* HandleContext, LPBOOL ProcessRequest);

[C++ (VCL)]
    typedef void __fastcall (__closure *TCBFSFltSetEndOfFileEventC)(System::TObject* Sender, TCBString FileName, __int64 &EndOfFile, void* &FileContext, void* &HandleContext, bool &ProcessRequest);

[C++ (.NET)]
    public delegate void CBFSFltSetEndOfFileEventC(CBFSFilter^ Sender, String^ FileName, Int64% EndOfFile, IntPtr% FileContext, IntPtr% HandleContext, bool% ProcessRequest);

[C#]
    delegate void CBFSFltSetEndOfFileEventC(CBFSFilter^ Sender, string FileName, ref long EndOfFile, ref IntPtr FileContext, ref IntPtr HandleContext, ref bool ProcessRequest);

[VB.NET]
    Delegate Sub CBFSFltSetEndOfFileEventC(ByVal Sender As CBFSFilter, ByVal FileName As String, ByRef EndOfFile As Long, ByRef FileContext As IntPtr, ByRef HandleContext As IntPtr, ByRef ProcessRequest As Boolean)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileName - name of the file
  • EndOfFile - new size 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 size 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

OnGetFileSizesC     OnSetEndOfFileN