Filter:Pascal Plain C C++ (DLL/Lib) C++ (VCL) C++ (.NET) C# VB.NET Java
This event is fired when SolFS wants to move read/write pointer in the storage to new position.
- Sender - reference to the class that called the delegate/event handler.
- FileHandle - Handle to the storage, read/write position in which needs to be set.
- Offset - contains desired offset from position, specified by Origin parameter.
- Origin - can be 0 (from beginning of file), 1 (from current position) or 2 (from the end of file)
- 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.
[Java]See Description for details about error reporting in Java.
- [Plain C] UserData - application-defined parameter which is specified when creating the storage and passed back to callback function.
This event is fired when SolFS wants to move read/write pointer in the storage to new position. Reading or writing from/to the storage is performed starting from the pointer.
The callback/event handler must be set before the storage is opened.
You need to implement ISolFSFileEvents interface in your code and pass the object, that implements the events, to one of SolFSStorage constructors that accept storageEvents parameter.
ERROR REPORTING: In Java you can't return more than one parameter, so the natural way is to throw an exception. You can throw any exception, and this exception will be passed back to the code, which called one of SolFS functions. So if you use callback mechanism and throw exception from within event handlers, be sure to wrap each call to SolFS methods with try/catch.