Control over registry operations in Windows and .NET applications

OnGetFileSizesN event/delegate/callback


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

CallbackRegistry     See also    


This notification callback is called after the OS or the application needs to get actual and/or allocation size of the file.


    property OnGetFileSizesN : TCbFltGetFileSizesEventN;
    TCbFltGetFileSizesEventN = procedure(Sender : TObject; FileName: TCBString; EndOfFile: Int64; AllocationSize: Int64; Status : DWORD) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CbFltGetFileSizesEventN)(CallbackRegistry* Sender, LPWSTR FileName, __int64 EndOfFile, __int64 AllocationSize, LONG Status);

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

[C++ (.NET)]
    public delegate void CbFltGetFileSizesEventN(CallbackRegistry^ Sender, String^ FileName, Int64 EndOfFile, Int64 AllocationSize, Int32 Status);

    delegate void CbFltGetFileSizesEventN(CallbackRegistry^ Sender, string FileName, long EndOfFile, long AllocationSize, Int32 Status);

    Delegate Sub CbFltGetFileSizesEventN(ByVal Sender As CallbackRegistry, ByVal FileName As String, ByVal EndOfFile As Long, ByVal AllocationSize As Long, ByVal Status As Int32)


  • 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
  • Status - status code of the completed operation


This notification callback is called after the OS or the application needs to get the size (either actual data size or allocation size) of the file.
Read more about contexts.

See also

OnPostGetFileSizesC     OnSetFileSizeN    

Back to top