Ftp Object : Help Method |
Sends the ftpHelp command.
If Timeout is greater than 0, Help blocks until a reply is received from the server or a ptTimeout error occurs. If Timeout is 0, Help immediately returns and the Progress event fires with FtpCmd = ftpHelp when the reply is received. The Result parameter is used to capture the reply so it must not go out of scope while the command completes (it must have file or global scope).
This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):
Private Sub Command1_Click() On Error Goto OnError ' Login as anonymous Ftp1.Login "ftp.dart.com" If Ftp1.State = tcpConnected Then MsgBox "Connected" Exit Sub OnError: Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description End Sub Private Sub Command2_Click() Dim HelpResult As String ' local scope allowed because Timeout > 0 Ftp1.Timeout = 1000 ' get help on the SITE command Ftp1.Help HelpResult, "SITE" Text1.Text = HelpResult ' show to user End Sub