OnFileRead event/delegate/callback

Filter:

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

CBFSDisk     See also    

Overview

This event is fired when CBFS Disk wants to read the data from the storage.

Declaration

[Pascal]
    TCBFSDiskReadFileEvent = procedure( Sender : TObject; Offset : int64; Buffer : Pointer; BytesToRead : LongWord; var BytesRead : LongWord) of object;

[C++ (Lib)]
    typedef Error (*CBFSDiskReadFileEvent) { CBFSDisk* Sender, long long Offset, void* Buffer, unsigned long BytesToRead, unsigned long * BytesRead );

[C++ (VCL)]
    typedef void (__closure *TCBFSDiskReadFileEvent)( System::TObject* Sender, __int64 Offset, void* Buffer, unsigned long BytesToRead, unsigned long * BytesRead );

[C++ (.NET)]
    public __delegate void CBFSDiskReadFileEvent( CBFSDisk::CBFSDisk^ Sender, LongLongInt Offset, array<unsigned char>^% Buffer, long BytesToRead, long% BytesToRead );

[C#]
    public void CBFSDiskReadFileEvent( CBFSDisk.CBFSDisk Sender, long Offset, uchar[] Buffer, long BytesToRead, ref long BytesRead);

[VB.NET]
    Sub CBFSDiskReadFileEvent( ByVal Sender As CBFSDisk.CBFSDisk, ByVal Offset As Int64, ByVal Buffer As Byte(), ByVal BytesToRead As Int32, ByRef BytesRead As Int32)

Parameters

  • Sender - reference to the class that called the delegate/event handler.
  • Offset - starting position in the storage to read the data from
  • Buffer - a reference to the buffer where application should store the data read from the storage.
  • BytesToRead - the number of bytes to be read
  • BytesRead - on return must contain the number of bytes actually read into the buffer

Description

This event is fired when CBFS Disk wants to read the data from the storage.
Read operation is successful only when BytesToRead bytes have been read. Otherwise the application must throw an error.

See also

Information about callbacks