1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| hOpen = InternetOpen("Client carenet", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
'connect to the FTP server
hConnection = InternetConnect(hOpen, serveur, INTERNET_DEFAULT_FTP_PORT, user, password, INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0)
'create a buffer to store the original directory
sOrgPath = String(MAX_PATH, 0)
'get the directory
FtpGetCurrentDirectory hConnection, sOrgPath, Len(sOrgPath)
'set the current directory to 'eracarnet/out'
FtpSetCurrentDirectory hConnection, rep_dist_out
'control et envoi des fichier su le gateway rep out
UpFichier_out hConnection
'close the FTP connection
InternetCloseHandle hConnection
'close the internet connection
InternetCloseHandle hOpen |
Partager