CallbackDisk

Create and manage virtual disk drives from your Windows applications

OnFileRead event/delegate/callback

Filter:

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

CBDisk     See also    

Overview

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

Declaration

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

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

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

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

[C#]
    public void CBDiskReadFileEvent( CallbackDisk.CBDisk Sender, long Offset, uchar[] Buffer, long BytesToRead, ref long BytesRead);

[VB.NET]
    Sub CBDiskReadFileEvent( ByVal Sender As CallbackDisk.CBDisk, 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 CBDisk 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    

Back to top