🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1844

Re: IdHTTP in a thread crashes when using CodeGuard

#1844
From: tsokas
Date: Wed, 11 Oct 2006 06:33
37 lines
2404 bytes
Ο/Η Remy Lebeau (TeamB) έγραψε:
> <tsokas@gmail.com> wrote in message
> news:1160470350.947063.299430@b28g2000cwb.googlegroups.com...
>
> > The file I'm testing the project with is 18MB.
>
> That is a LOT of data to stuff into an AnsiString.  That is likely the cause
> of your problem.  Try using a TStream instead, such as a TMemoryStream, for
> example:
>
>     #include <memory>
>
>     void __fastcall TMyThread::Execute()
>     {
>         std::auto_ptr<TIdHTTP> HTTP(new TIdHTTP(NULL));
>         std::auto_ptr<TMemoryStream> Stream(new TMemoryStream);
>         HTTP->Get("http://some_url", Stream.get());
>     }
>
>
> Gambit

Remy,

I replaced the code in TMyThread with the one above and it keeps on
throwing that EOutOfMemory Exception and prompting at line
HTTP->Get("http://some_url", Stream.get());

Does it run ok at your computer? With CodeGuard on? If so I may have to
reinstall BCB (?).

Thanks,

Nicolas
Technical Details
Message-ID: <1160548391.652496.61880@i3g2000cwc.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mail
References: <1160465153.402484.273810@h48g2000cwc.googlegroups.com> <452b5ac8$1@newsgroups.borland.com> <1160470350.947063.299430@b28g2000cwb.googlegroups.com> <452bdd35$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b248989b16d7f878
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,UTF8
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!i3g2000cwc.googlegroups.com!not-for-mail
From: tsokas@gmail.com
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: IdHTTP in a thread crashes when using CodeGuard
Date: 10 Oct 2006 23:33:11 -0700
Organization: http://groups.google.com
Lines: 38
Message-ID: <1160548391.652496.61880@i3g2000cwc.googlegroups.com>
References: <1160465153.402484.273810@h48g2000cwc.googlegroups.com>
   <452b5ac8$1@newsgroups.borland.com>
   <1160470350.947063.299430@b28g2000cwb.googlegroups.com>
   <452bdd35$1@newsgroups.borland.com>
NNTP-Posting-Host: 194.177.215.42
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1160548396 28372 127.0.0.1 (11 Oct 2006 06:33:16 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 11 Oct 2006 06:33:16 +0000 (UTC)
In-Reply-To: <452bdd35$1@newsgroups.borland.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: i3g2000cwc.googlegroups.com; posting-host=194.177.215.42;
   posting-account=LB_1bg0AAABl0H9GiltpD-YjI3JGPk1V