Discuss this help topic in CBFS Forum

OnSetEndOfFile event/delegate/callback

Filter:

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

CallbackFileSystem     See also    

Overview

This event is fired when the OS or the application needs to change the size of the open file.

Declaration

[Pascal]
    property OnSetEndOfFile : TCbFsSetEndOfFileEvent;
    TCbFsSetEndOfFileEvent = procedure( Sender : TObject; FileInfo: TCbFsFileInfo; EndOfFile: Int64 ) of object;

[C++ (Lib)]
    void (__stdcall *CbFsSetEndOfFileEvent)(void* Sender, CbFsFileInfo* FileInfo, long long EndOfFile );

[C++ (VCL)]
    typedef void (__closure *TCbFsSetEndOfFileEvent)( System::TObject* Sender, TCbFsFileInfo* FileInfo, __int64 & EndOfFile );

[C++ (.NET)]
    public __delegate void CbFsSetEndOfFileEvent( CallbackFileSystem^ Sender, CbFsFileInfo^ FileInfo, Int64 EndOfFile );

[C#]
    public void CbFsSetEndOfFileEvent( CallbackFileSystem Sender, CbFsFileInfo FileInfo, Int64 EndOfFile );

[VB.NET]
    Sub CbFsSetEndOfFileEvent( ByVal Sender As CallbackFileSystem, ByVal FileInfo As CbFsFileInfo, ByVal EndOfFile As Int64 )

[Java]
    void ICbFsFileEvents.onSetEndOfFile( CallbackFileSystem sender, CbFsFileInfo fileInfo, long endOfFile );

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileInfo - contains the information about the file
  • EndOfFile - new size of the file data

Description

This event is fired when the OS or the application needs to change the size of the open file. Setting the file pointer doesn't require actual space to be allocated.
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 Callback File System.

See also

GetHandleInfo method     OnCloseFile event     OnCreateFile event     OnOpenFile event     OnSetAllocationSize event     OnSetValidDataLength event    

Discuss this help topic in CBFS Forum