OPERATING SYSTEM EDITION
This event is fired when CBFS Storage needs to know the amount of space available on the underlying media.
TSolFSGetParentSizeEvent = procedure(
Sender : TObject;
FileHandle : THandle;
var FreeSize : Int64;
var Result : LongInt) of object;
typedef Error (__stdcall *SolFSGetParentSizeFunc)(
typedef Error (__stdcall *SolFSGetFileSizeFunc)(
typedef void (__closure *TSolFSGetParentSizeEvent)(
public __delegate void SolFSParentSizeEvent(
LongLongWord __gc &FreeSize,
Int32 __gc &Result);
public void SolFSParentSizeEvent(
ref ulong FreeSize,
ref int Result);
ByVal Sender As SolFSStorage,
ByVal FileHandle As UInt32,
ByRef FreeSize As UInt64,
ByRef Result As Int32)
- Sender - reference to the class that called the delegate/event handler.
- FileHandle - Handle to the storage, whose size needs to be queried.
- FreeSize - out parameter to which the application must place the free size on the underlying media.
- Result - out parameter (return value for DLL) where the application places the result of the operation. If you are working with file system, Win32 error code is a good candidate for placing to Result parameter. Otherwise you can use any other error codes, just be sure that 0 means success.
- [Plain C] CallerAvailableSize - put the same value as FreeSize to this parameter
- [Plain C] ActualAvailableSize - put the same value as FreeSize to this parameter
- [Plain C] UserData - application-defined parameter which is specified when creating the storage and passed back to callback function.
This event is fired when CBFS Storage needs to know available space on the underlying media.
For file-based storages return the free space on the underlying drive.
For memory-based storages return the amount of memory available to the process (of course, don't forget about memory needed for other application functions).
For storages located on remote system you would need to request the remote system about available space.
The callback/event handler must be set before the storage is opened.
Information about callbacks (Operating System edition only)