Function Reference


_FTP_GetLastResponseInfo

Retrieves the last error description or server response on the thread calling this function

#include <FTPEx.au3>
_FTP_GetLastResponseInfo ( ByRef $iError, ByRef $sMessage )

Parameters

$iError returns an error message pertaining to the operation that failed.
$sMessage returns the error text.

Return Value

Success: 1.
Failure: 0 and sets the @error flag to non-zero.

See Also

Search InternetGetLastResponseInfo in MSDN Library.

Example

#include <FTPEx.au3>
#include <MsgBoxConstants.au3>

_Example()

Func _Example()
    Local $sServer = 'ftp.csx.cam.ac.uk' ; UNIVERSITY OF CAMBRIDGE ANONYMOUS FTP SERVER
    Local $sUsername = ''
    Local $sPass = ''
        Local $Err, $sFTP_Message

    Local $hOpen = _FTP_Open('MyFTP Control')
    Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass)
    If @error Then
        MsgBox($MB_SYSTEMMODAL, '_FTP_Connect', 'ERROR=' & @error)
    Else
        _FTP_GetLastResponseInfo($Err, $sFTP_Message)
        ConsoleWrite('$Err=' & $Err & '   $sFTP_Message:' & @CRLF & $sFTP_Message & @CRLF)
        ; do something ...
    EndIf
    Local $iFtpc = _FTP_Close($hConn)
    Local $iFtpo = _FTP_Close($hOpen)
EndFunc   ;==>_Example