Discuss this help topic in SecureBlackbox Forum


TElSFTPServer     See also     

Filter: C#/Java  VB.NET  Pascal  C++  PHP  

This event is fired when your software has to write the data to the file.


    event TElSFTPServerWriteEvent OnWriteFile;
    delegate void TElSFTPServerWriteEvent(Object Sender, Object Data, long Offset, byte[] Buffer, int BufferOffset, int Count, ref int ErrorCode, ref string Comment);

    Event OnWriteFile As TElSFTPServerWriteEvent
    Delegate Sub TElSFTPServerWriteEvent(ByVal Sender As Object, ByVal Data As Object, ByVal Offset As Long, ByVal Buffer As Byte(), ByVal BufferOffset As Integer, ByVal Count As Integer, ByRef ErrorCode As Integer, ByRef Comment As String)

    property OnWriteFile: TSBSFTPServerWriteEvent;
    TSBSFTPServerWriteEvent = procedure(Sender : TObject; const Data: pointer; Offset : Int64; Buffer : Pointer; Count : integer; var ErrorCode : integer; var Comment : string) of object;

    void get_OnWriteFile(TElSFTPServerWriteEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnWriteFile(TElSFTPServerWriteEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerWriteEvent)(void * _ObjectData, TObjectHandle Sender, void * Data, int64_t Offset, void * Buffer, int32_t Count, int32_t &ErrorCode, char * pcComment, int32_t &szComment);

    TElSFTPServerWriteEvent|callable|NULL get_OnWriteFile()
    void set_OnWriteFile(TElSFTPServerWriteEvent|callable|NULL $Value)
    callable TElSFTPServerWriteEvent(TObject $Sender, TSBPointer|NULL $Data, integer $Offset, TSBPointer|NULL $Buffer, integer $Count, integer &$ErrorCode, string &$Comment)


  • Data - user data associated with the opened file
  • Offset - position from which the data should be written
  • Buffer - the data that should be written to the file
  • BufferOffset - the start position in the buffer from which the data must be written
  • Count - amount of bytes to be written
  • ErrorCode - the error code, see values below
  • Comment - server comment
  • pcComment - server comment
  • szComment - the length of pcComment.

Error codes values:


    This event is fired when some data has to be written to a file.
The application can return the error code in ErrorCode parameter and textual comment in Comment parameter.

See also:     OnOpenFile     OnReadFile     OnRenameFile     OnRemove    

Discuss this help topic in SecureBlackbox Forum