Re: SSHServer not receving full file (General questions)
Here is the done event:
Private Sub m_oSFTP_Done(ByVal ErrorCode As Integer, ByVal ErrorText As String)
    m_dErrorCode = ErrorCode
    m_bDone = True
End Sub
Putfile function:
Friend Function PutFile(p_sUserName As String, p_sPassword As String, p_sHostName As String, _
             p_sPort As String, p_sLocalPath As String, p_sRemotePath As String)
    On Error GoTo Err_handler
    
    Dim nTryCount As Long
    Dim sLocation As String
    
    ' connect to the host/port
    sLocation =  Connecting to server 
    Connect p_sUserName, p_sPassword, p_sHostName, p_sPort
    
    ' Control must be in connected state before it can
    ' transfer files
    Do Until m_oSFTP.State = Connected
        DoEvents
    Loop
    sLocation =  Connected to Server 
    m_oSFTP.TransferMode = Binary
    m_oSFTP.Blocking = False
    sLocation =  Trying to put file on server 
    m_bDone = False
    m_oSFTP.PutFile p_sLocalPath, p_sRemotePath
    
    Do Until m_bDone = True
        DoEvents
    Loop
    
    DoEvents
    Sleep 500 ' this makes things work
    
    m_oSFTP.Disconnect
    Exit Function
Err_handler:
    m_dErrorCode = Err.Number
    m_sErrorText =  Location:   & sLocation &   - Description:   & Err.Description
End Function
I've used blocking mode with the same results.
Darren











