OnFileSetSize event/delegate/callback
Filter:
Pascal DLL C++ (DLL/Lib) C++ (VCL) C++ (.NET) C# VB.NETOverview
This event is fired when SolFS needs to resize the storage.
Declaration
[Pascal]
TSolFSSetFileSizeEvent = procedure(
Sender : TObject;
FileHandle : THandle;
NewSize : Int64;
var Result : LongInt) of object;
[DLL]
typedef Error (__stdcall *SolFSSetFileSizeFunc)(
LongWord UserData,
LongLongWord NewSize,
Handle FileHandle);
[C++ (DLL/Lib)]
typedef Error (__stdcall *SolFSSetFileSizeFunc)(
LongWord UserData,
LongLongWord NewSize,
Handle FileHandle);
[C++ (VCL)]
typedef void (__closure *TSolFSSetFileSizeEvent)(
System::TObject* Sender,
Handle FileHandle,
LongLongWord NewSize,
Error& Result);
[C++ (.NET)]
public __delegate void SolFSSetFileSizeEvent(
SolFSStorage* Sender,
LongLongWord FileHandle,
UInt32 NewSize,
Int32 __gc &Result);
[C#]
public void SolFSSetFileSizeEvent(
SolFS.SolFSStorage Sender,
uint FileHandle,
ulong NewSize,
ref int Result);
[VB.NET]
Sub SolFSSetFileSizeEvent(
ByVal Sender As SolFS.SolFSStorage,
ByVal FileHandle As UInt32,
ByVal NewSize As UInt64,
ByRef Result As Int32)
Parameters
- Sender - reference to the class that called the delegate/event handler.
- FileHandle - Handle to the storage, whose size needs to be set.
- NewSize - contains new size of the storage.
- Result - out parameter (return value for DLL) where the application places the result of the operation.
If you are working with a 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.
- [DLL] UserData - application-defined parameter which is specified when creating the storage and passed back to callback function.
Description
This event is fired when SolFS needs to change the size of the storage. You don't need to clean newly allocated space if the storage size was increased.
See also
Information about callbacks (Driver Edition only) OnGetFileSize
