Article View: borland.public.cppbuilder.internet.socket
Article #286Re: DownloadFiles
From: bar
Date: Tue, 18 Mar 2008 16:51
Date: Tue, 18 Mar 2008 16:51
31 lines
1584 bytes
1584 bytes
Hi Remy thanks for reply.
sorry for the delay
I want to download a file of 100 kb regularly at an interval of 1 minute.
As i see when repeatedly calling function, program is not responding.
I try to represent my code.
void TForm1::DownloadFile(String URL,AnsiString FileName)
{
try
{
std::auto_ptr<TFileStream> strm(new TFileStream(FileName,fmCreate));
HTTP->Request->Pragma = "no-cache";
HTTP->HandleRedirects = true;
HTTP->Get(URL, strm.get());
}
catch(const Exception &E)
{
return;
}
}
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
DownloadFile("http://url",abc)
}
Thanks
SA
Technical Details
Message-ID:
<47dff30f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<47cd1f44@newsgroups.borland.com> <47cd88d4@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e3fec5dcf86ed X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "bar" <shaikakbar250281@yahoo.co.in> Newsgroups: borland.public.cppbuilder.internet.socket References: <47cd1f44@newsgroups.borland.com> <47cd88d4@newsgroups.borland.com> Subject: Re: DownloadFiles Date: Tue, 18 Mar 2008 19:51:38 +0300 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 62.150.204.196 Message-ID: <47dff30f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1205859087 62.150.204.196 (18 Mar 2008 09:51:27 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail