🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: IdHTTP in a thread crashes when using CodeGuard

#1842
From: Remy Lebeau (TeamB)
Date: Tue, 10 Oct 2006 17:47
21 lines
1634 bytes
<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
Technical Details
Message-ID: <452bdd35$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <1160465153.402484.273810@h48g2000cwc.googlegroups.com> <452b5ac8$1@newsgroups.borland.com> <1160470350.947063.299430@b28g2000cwb.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b248989b16d7f878
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <1160465153.402484.273810@h48g2000cwc.googlegroups.com> <452b5ac8$1@newsgroups.borland.com> <1160470350.947063.299430@b28g2000cwb.googlegroups.com>
Subject: Re: IdHTTP in a thread crashes when using CodeGuard
Date: Tue, 10 Oct 2006 10:47:51 -0700
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 69.169.4.232
Message-ID: <452bdd35$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1160502581 69.169.4.232 (10 Oct 2006 10:49:41 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail