Hallo,
ich habe ein kleines FTP Upload/Download Programm, das aber z.B. bei der Anmeldung an den FTP-Server mit einem falschen Passwort abschmiert. Wie kann ich dem Programm beibringen bei ganz bestimmten Fehlern ganz bestimmte Dinge zu tun ?
Gruss nilsener
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34:
| procedure FTP_Abwicklung(steuerung : FTP_Platte); Begin transmission_flag:=true; try Form1.NMFTP1.Connect; except on E: ESockError do begin MessageDlg('FTP-Host nicht erreichbar!', mtError, [mbOk], 0); end end;
if Form1.NMFTP1.Connected = True then begin Form1.NMFTP1.Mode(MODE_IMAGE); Form1.StatusBar1.SimplePanel := True; Form1.StatusBar1.SimpleText := 'FTP Remote Host Connected'; Form1.StatusBar2.SimplePanel := True; Form1.StatusBar2.SimpleText := 'FTP Remote Host Connected';
if steuerung = schreiben then Begin Form1.StatusBar1.SimpleText := 'FTP Remote Host Connected, Upload in progress.'; Form1.StatusBar2.SimpleText := 'FTP Remote Host Connected, Upload in progress.'; Form1.NMFTP1.upload('c:\test001.dat','test001.dat'); end; if steuerung = laden then Begin Form1.NMFTP1.download('test001.dat','c:\test001.dat'); Form1.StatusBar1.SimpleText := 'FTP Remote Host Connected, Download in progress.'; Form1.StatusBar2.SimpleText := 'FTP Remote Host Connected, Download in progress.'; end; end; try Form1.NMFTP1.Disconnect; except end; end; |