Function Reference


Opens an FTP session

#include <FTPEx.au3>
_FTP_Open ( $sAgent [, $iAccessType = $INTERNET_OPEN_TYPE_DIRECT [, $sProxyName = '' [, $sProxyBypass = '' [, $iFlags = 0]]]] )


$sAgent Random name. ( like "myftp" )
$iAccessType [optional] Set if proxy is used:
    $INTERNET_OPEN_TYPE_DIRECT -> no proxy (Default)
    $INTERNET_OPEN_TYPE_PRECONFIG -> Retrieves the proxy or direct configuration from the registry.
    $INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY -> Retrieves the proxy or direct configuration from the registry and prevents the use of a startup Microsoft JScript or Internet Setup (INS) file.
    $INTERNET_OPEN_TYPE_PROXY -> Passes requests to the proxy unless a proxy bypass list is supplied and the name to be resolved bypasses the proxy. Then no proxy is used.
$sProxyName [optional] ProxyName.
$sProxyBypass [optional] ProxyByPasses's.
$iFlags [optional]
    $INTERNET_FLAG_ASYNC -> Makes only asynchronous requests on handles descended from the handle returned from this function.
    $INTERNET_FLAG_FROM_CACHE -> Does not make network requests. All entities are returned from the cache. If the requested item is not in the cache, a suitable error, such as ERROR_FILE_NOT_FOUND, is returned.

Return Value

Success: a handle to internet session to be used in _FTP_Connect().
Failure: 0 and sets the @error flag to non-zero.


_FTP_Close, _FTP_Connect, _FTP_SetStatusCallback

See Also

Search InternetOpen in MSDN Library.


#include <FTPEx.au3>

Local $hOpen = _FTP_Open('MyFTP Control')
; ...
Local $iFtpc = _FTP_Close($hOpen)