🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: What's wrong with this?

#3082
From: Remy Lebeau (TeamB)
Date: Wed, 16 Nov 2005 21:45
32 lines
2028 bytes
"dzeidzei" <dzeidzei@suolakaivos.com> wrote in message
news:437b2354$1@newsgroups.borland.com...

> AnsiString * HttpsPostSMS(AnsiString *Url, AnsiString *Params)
> {
>   AnsiString *asRet = new AnsiString;

Why are you dynamically allocating AnsiString everywhere?  You should not
be.

> TIdHTTP *IdHTTP = new TIdHTTP(NULL);

You are not protecting that instantiation from unhandled exceptions.  If an
exception is thrown, you will have a lot of memory leaks in your code.

>   TIdConnectionInterceptOpenSSL *IdConnectionInterceptOpenSSL = new
TIdConnectionInterceptOpenSSL(NULL);

That component does not exist in either Indy 9 or 10.  You are using a very
old version of Indy, probably Indy 8.  Such versions are no longer
supported.  You should seriously consider upgrading to the latest
Development Snapshot of at least Indy 9 (though Indy 10 has more features).

> And when I try to call function above it'll trow 'Intercept value is not
valid'?

Since you are using a very outdated version of Indy, the only way to know
why that error occurs is for you to look at TIdHTTP's source code yourself.


Gambit
Technical Details
Message-ID: <437ba8a7$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <437b2354$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,4165e9ea369c7fad
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: <437b2354$1@newsgroups.borland.com>
Subject: Re: What's wrong with this?
Date: Wed, 16 Nov 2005 13:45:42 -0800
Lines: 34
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: 68.69.17.41
Message-ID: <437ba8a7$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132177575 68.69.17.41 (16 Nov 2005 13:46:15 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail