Einzelnen Beitrag anzeigen

peter12

Registriert seit: 28. Feb 2005
Ort: Oberneukirchen ,Österreich
183 Beiträge
 
Delphi 2006 Professional
 
#3

Re: FTp server d 2005

  Alt 28. Nov 2005, 15:19
Lösung
Delphi-Quellcode:
function PutFile1(Server, Port, UserName, Password, LocalFile, RemoteFile: String): Boolean;
var
  InternetOpn: hInternet;
  InternetCon: hInternet;
begin
  InternetOpn := InternetOpen('iexplore', INTERNET_OPEN_TYPE_DIRECT, nil, nil, 0);
  InternetCon := InternetConnect(InternetOpn,
                                 convert.tostring(Server), // FTP Server
                                 convert.ToInt32(Port), // FTP Port
                                convert.tostring(Username), // FTP UserName
                                 convert.tostring(Password), // FTP Password
                                 INTERNET_SERVICE_FTP, // dwService
                                 INTERNET_FLAG_PASSIVE, // dwFlags
                                 0); // dwContext


    Result := FtpgetFile(InternetCon,
                                      // LocalFile
              convert.tostring(RemoteFile), convert.tostring(LocalFile),
             true,(0), // RemoteFile
             FTP_TRANSFER_TYPE_UNKNOWN, // dwFlags
             0);
      InternetCloseHandle(InternetOpn);
end;
so einfach

peter

[edit=r_kerber]Fehlendes Delphi-Tag eingetragen Mfg, r_kerber[/edit]
  Mit Zitat antworten Zitat