Discuss this help topic in CBFS Forum

CallbackFileSystem.MaxReadBlockSize property


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

CallbackFileSystem     See also    


Specifies the maximal size of the single block passed to OnReadFile callback.


    property MaxReadBlockSize : LongWord;

[C++ (Lib)]
    DWORD GetMaxReadBlockSize();
    void SetMaxReadBlockSize(DWORD Value);

[C++ (VCL)]
    unsigned long MaxReadBlockSize;

[C++ (.NET)]
    UInt32 MaxReadBlockSize;

    UInt32 MaxReadBlockSize;

    Public Property MaxReadBlockSize As UInt32

    long getMaxReadBlockSize();
    void setMaxReadBlockSize(long value);


This property contains the size in bytes of the block which can be reliably handled by OnReadFile callback without high probability of timeout.

Default value is 0xFFFFFFFF (which means no limit).

If your filesystem is backed by network operations or by other slow storage, handling 100+Mb large blocks can cause a timeout in the driver -- sending data across network will take more than time you've reserved for single operation. In this case it makes sense to split single large block to smaller chunks and handle those chunks one by one. The driver will pass a pointer to the part of the buffer to the callback and will reset the timer after each call.

See also

MaxWriteBlockSize property     OnReadFile event    

Discuss this help topic in CBFS Forum