🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8499

Re: Downloading a file from FTP-server via API: FtpGetFile( )

#8499
From: Oren Halvani
Date: Tue, 19 Oct 2004 17:57
48 lines
2588 bytes
"Ed Mulroy [TeamB]" <dont_email_me@invalid.com> schrieb im Newsbeitrag
 news:417553a0$1@newsgroups.borland.com...
> You already should have a WININET.LIB that was installed when you
> installed the compiler.  It should be in the compiler's LIB directory.
>
> If you chose to create one of your own, then the command you show is
> wrong.  It does not have -c for case sensitivity and does not use
> paths.  Correct commands might look something like this:
>
> cd "c:\program files\borland\cbuilder6\lib"
> implib -c wininet.lib c:\winnt\system32\wininet.dll
>
> Your machine may use c:\windows instead of c:\winnt
>
> .  Ed

hi Ed,

OK..i got now thwe libfile..but something with the code himself seems
to be wrong..

i get always the ShowMessage("problem...");

/*********************************************************/
   String user = "xxx", pass = "xxx";

   HINTERNET handle_Session = InternetOpen("My App", 0, 0, NULL,
INTERNET_FLAG_ASYNC),
             handle_Connect = InternetConnect(handle_Session, "ftp.halvani.de",
0,
                                              user.c_str(), pass.c_str(),
INTERNET_SERVICE_FTP,
                                               0, INTERNET_FLAG_ASYNC);

   if(FtpGetFile(handle_Connect, "ftp://ftp.halvani.de/index.php", "C:\\",
                 true, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_ASCII, 0))
   {
      ShowMessage("download successfully");
   }
   else
   {
      ShowMessage("problem...");
   }
/*********************************************************/


Oren
Technical Details
Message-ID: <4175559b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4175072a$1@newsgroups.borland.com> <417510a8$1@newsgroups.borland.com> <417513d7@newsgroups.borland.com> <417553a0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8c7cb2fd84899d4c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Oren Halvani" <NoSpam@fdtd.com>
From: "Oren Halvani" <NoSpam@fdtd.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4175072a$1@newsgroups.borland.com> <417510a8$1@newsgroups.borland.com> <417513d7@newsgroups.borland.com> <417553a0$1@newsgroups.borland.com>
Subject: Re: Downloading a file from FTP-server via API: FtpGetFile( )
Date: Tue, 19 Oct 2004 19:57:01 +0200
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 217.86.59.189
Message-ID: <4175559b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098208667 217.86.59.189 (19 Oct 2004 10:57:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail