OnPostGetFileSizesC event/delegate/callback

Filter:

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

CBFSFilter     See also    

Overview

This callback is called after the OS or the application requests actual and/or allocation size of the file.

Declaration

[Pascal]
    property OnPostGetFileSizesC : TCBFSFltPostGetFileSizesEventC;
    TCBFSFltPostGetFileSizesEventC = procedure(Sender : TObject; FileName: TCBString; var EndOfFile: Int64; var AllocationSize: Int64; Status : DWORD; var FileContext: pointer; var HandleContext : pointer ) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CBFSFltPostGetFileSizesEventC)(CBFSFilter* Sender, LPWSTR FileName, __int64* EndOfFile, __int64* AllocationSize, LONG Status, PVOID* FileContext, PVOID* HandleContext );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCBFSFltPostGetFileSizesEventC)(System::TObject* Sender, TCBString FileName, __int64 &EndOfFile, __int64 &AllocationSize, DWORD Status, void* &FileContext void* &HandleContext );

[C++ (.NET)]
    public delegate void CBFSFltPostGetFileSizesEventC(CBFSFilter^ Sender, String^ FileName, Int64% EndOfFile, Int64% AllocationSize, Int32 Status, IntPtr% FileContext, IntPtr% HandleContext );

[C#]
    delegate void CBFSFltPostGetFileSizesEventC(CBFSFilter^ Sender, string FileName, ref long EndOfFile, ref long AllocationSize, Int32 Status, ref IntPtr FileContext, ref IntPtr HandleContext );

[VB.NET]
    Delegate Sub CBFSFltPostGetFileSizesEventC(ByVal Sender As CBFSFilter, ByVal FileName As String, ByRef EndOfFile As Long, ByRef AllocationSize As Long, ByVal Status As Int32, ByRef FileContext As IntPtr, ByRef HandleContext As IntPtr)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileName - name of the file
  • EndOfFile - size of the file
  • AllocationSize - allocation 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
  • Status - status code of the completed operation

Description

This callback is called when the OS or the application needs to get the size (either actual data size or allocation size) of the file after the request was processed by the file system. You can alter one or both sizes if you provide "fake" contents of the file.
Read more about contexts.

See also

OnGetFileSizesN     OnSetFileSizeC