Discuss this help topic in SecureBlackbox Forum


TElSFTPServer     See also     

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

This event is fired when your software has to search for the first element that matches given criteria


    event TElSFTPServerFindFirstEvent OnFindFirst;
    delegate void TElSFTPServerFindFirstEvent(Object Sender, string Path, ref Object Data, TElSftpFileInfo Info, ref int ErrorCode, ref string Comment);

    Event OnFindFirst As TElSFTPServerFindFirstEvent
    Delegate Sub TElSFTPServerFindFirstEvent(ByVal Sender As Object, ByVal Path As String, ByRef Data As Object, ByVal Info As TElSftpFileInfo, ByRef ErrorCode As Integer, ByRef Comment As String)

    property OnFindFirst: TSBSFTPServerFindFirstEvent;
    TSBSFTPServerFindFirstEvent = procedure(Sender : TObject; const Path : string; var Data : pointer; Info : TElSftpFileInfo; var ErrorCode : integer; var Comment : string) of object;

    void get_OnFindFirst(TElSFTPServerFindFirstEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnFindFirst(TElSFTPServerFindFirstEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerFindFirstEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcPath, int32_t szPath, void * (* Data), TElSftpFileInfoHandle Info, int32_t &ErrorCode, char * pcComment, int32_t &szComment);

    TElSFTPServerFindFirstEvent|callable|NULL get_OnFindFirst()
    void set_OnFindFirst(TElSFTPServerFindFirstEvent|callable|NULL $Value)
    callable TElSFTPServerFindFirstEvent(TObject $Sender, string $Path, TSBPointer $Data, TElSftpFileInfo $Info, integer &$ErrorCode, string &$Comment)

    TElSFTPServerFindFirstEvent getOnFindFirst();
    void setOnFindFirst(TElSFTPServerFindFirstEvent Value);
    TElSFTPServerFindFirstEvent.Callback OnFindFirst = new TElSFTPServerFindFirstEvent.Callback() {
        public void TElSFTPServerFindFirstEventCallback(TObject Sender, String Path, TSBObject Data, TElSftpFileInfo Info, TSBInteger ErrorCode, TSBString Comment) {


  • Path - path to the directory to be scanned
  • Data - pass some user object (e.g. file search handle) to it. Every consequent call to OnFindNext event will return this object to you as OnFindNext.Data parameter. If you do not need to store some search-related object, set the value of this parameter to null.
  • Info - information about element to be found (currently none)
  • ErrorCode - the error code, see values below
  • Comment - server comment
  • pcPath - path to the directory to be scanned
  • szPath - the length of pcPath.
  • pcComment - server comment
  • szComment - the length of pcComment.

Error codes


    This event is fired when element with specified parameters (currently none are defined) has to be found. The application can return the error code in ErrorCode parameter and textual comment in Comment parameter.

See also:     OnFindClose     OnFindNext    

Discuss this help topic in SecureBlackbox Forum