Discuss this help topic in SecureBlackbox Forum

TElSFTPServer.OnBlock

TElSFTPServer     See also     


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


This event is fired when a byte-range lock on the file is requested

Declaration

[C#]
    event TElSFTPServerBlockEvent OnBlock;
    delegate void TElSFTPServerBlockEvent(Object Sender, Object Data, long Offset, long Length, TSBSftpFileOpenAccess LockMask, ref int ErrorCode, ref string Comment);

[VB.NET]
    Event OnBlock As TElSFTPServerBlockEvent
    Delegate Sub TElSFTPServerBlockEvent(ByVal Sender As Object, ByVal Data As Object, ByVal Offset As Long, ByVal Length As Long, ByVal LockMask As TSBSftpFileOpenAccess, ByRef ErrorCode As Integer, ByRef Comment As String)

[Pascal]
    property OnBlock : TElSFTPServerBlockEvent;
    TElSFTPServerBlockEvent = procedure(Sender : TObject; Data : pointer; Offset, Length : Int64; LockMask : TSBSftpFileOpenAccess; var ErrorCode : integer; var Comment : string) of object;
    
    TSBSftpFileOpenAccess = set of TSBSftpFileOpenAccessItem;

[C++]
    void get_OnBlock(TElSFTPServerBlockEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnBlock(TElSFTPServerBlockEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerBlockEvent)(void * _ObjectData, TObjectHandle Sender, void * Data, int64_t Offset, int64_t Length, TSBSftpFileOpenAccessRaw LockMask, int32_t &ErrorCode, char * pcComment, int32_t &szComment);

[PHP]
    TElSFTPServerBlockEvent|callable|NULL get_OnBlock()
    void set_OnBlock(TElSFTPServerBlockEvent|callable|NULL $Value)
    callable TElSFTPServerBlockEvent(TObject $Sender, TSBPointer|NULL $Data, integer $Offset, integer $Length, integer $LockMask, integer &$ErrorCode, string &$Comment)

[Java]
    TElSFTPServerBlockEvent getOnBlock();
    void setOnBlock(TElSFTPServerBlockEvent Value);
    TElSFTPServerBlockEvent.Callback OnBlock = new TElSFTPServerBlockEvent.Callback() {
        public void TElSFTPServerBlockEventCallback(TObject Sender, TObject Data, long Offset, long Length, int LockMask, TSBInteger ErrorCode, TSBString Comment) {
            //...
        }
    }

Parameters

  • Data - the open file
  • Offset - beginning of the byte-range to lock.
  • Length - number of bytes in the range to lock. The special value 0 means lock from Offset to the end of the file.
  • LockMask - flags managing blocking process
  • ErrorCode - the error code, see values below
  • Comment - server comment
  • pcComment - server comment
  • szComment - the length of pcComment.

TSBSftpFileOpenAccess values:

Error codes values:

TSBSftpFileOpenAccessRaw values

Description

    This event is fired when a byte-range lock on the file is requested

See also:     OnUnblock    

Discuss this help topic in SecureBlackbox Forum