🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #873

Re: vbscript

#873
From: anton
Date: Thu, 26 Jan 2006 13:38
62 lines
2792 bytes
That's a lot of helpful imformation.

Thank you very much

Anton

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schreef in bericht 
news:43d7cd6e@newsgroups.borland.com...
>
> "anton" <acvoosten@zeelandnet.nl> wrote in message
> news:43d759c1$1@newsgroups.borland.com...
>
>> I discovered a piece of vbscript to turn on and off an
>> adslmodem. Has someone an idea to translate this script to bcb?
>
> A literal translation would be as follows:
>
>    void __fastcall download(const AnsiString &DataToSend)
>    {
>        Variant objXML = Variant::CreateObject("Microsoft.XMLHTTP");
>        objXML.OleProcedure("Open", "POST", "http://10.0.0.138/cgi/dial/",
> false);
>        objXML.OleProcedure("setRequestHeader", "Content-Type",
> "application/x-www-form-urlencoded");
>        objXML.OleProcedure("Send", DataToSend);
>    }
>
> With that said, the above requires MSXML to be installed.  I would suggest
> using an actual HTTP component instead, such as the one from Indy
> (http://indyproject.org), ICS (http://www.overbyte.be), or Synapse
> (http://www.ararat.cz/synapse).  Then you won't have any external
> dependancies.
>
> For example, in Indy:
>
>    void __fastcall Download(const AnsiString &DataToSend)
>    {
>        TIdHTTP *HTTP = new TIdHTTP(NULL);
>        try
>        {
>            TStringStream *Data = new TStringStream(Data);
>            try
>            {
>                HTTP->Request->ContentType =
> "application/x-www-form-urlencoded";
>                HTTP->Post("http://10.0.0.138/cgi/dial/", Data);
>            }
>            __finally
>            {
>                delete Data;
>            }
>        }
>        __finally
>        {
>            delete HTTP;
>        }
>    }
>
>
> Gambit
>
> 
Technical Details
Message-ID: <43d8d021$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43d759c1$1@newsgroups.borland.com> <43d7cd6e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,f766eaff99f31577
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "anton" <acvoosten@zeelandnet.nl>
Newsgroups: borland.public.cppbuilder.internet.web
References: <43d759c1$1@newsgroups.borland.com> <43d7cd6e@newsgroups.borland.com>
Subject: Re: vbscript
Date: Thu, 26 Jan 2006 14:38:31 +0100
Lines: 64
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 62.238.67.108
Message-ID: <43d8d021$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1138282529 62.238.67.108 (26 Jan 2006 05:35:29 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail