🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Help with Delphi Translation

#1070
From: mike
Date: Thu, 29 Sep 2005 19:24
64 lines
3225 bytes
Remy,

Well sir I am very impressed, you have given me the perfect answer and it 
now works. I tried both of your suggestions and both work just fine.

I can't thank you enough for taking the time to help me in this, I 
appreciate it very much.

Mike

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:433c2ae0$1@newsgroups.borland.com...
>
> "mike" <mfbrowne@earthlink.nnet> wrote in message
> news:43388d42$1@newsgroups.borland.com...
>
>>             OleCheck(Collection->item(WideString(""), 0, Disp));
> <snip>
>> When this is executed it never returns therefore the app is hung
>> at this point. There is no exception reported.
>
> The only thing I can think of is the blank item name that is being passed
> in.  That is very unusual to do, even for the original Pascal.  Looking 
> back
> at it, I think the Pascal was trying to pass in an integer of 0, not a 
> blank
> string.  In which case, the above line should be the following instead:
>
>    OleCheck(Collection->item(0, 0, Disp));
>
> Now, with that said, since the collection traversal code is simply trying 
> to
> get an IHTMLElement for the <BODY> tag of a document, there is an easier
> way - the IHTMLDocument2 interface has a body property that returns that
> same IHTMLElement interface directly, ie:
>
>    #include <mshtml.hpp>
>
>    void __fastcall TForm1::acIESniffer1WBDownloadComplete(TObject *Sender,
> const AnsiString URL, const IWebBrowser2 *Browser)
>    {
>        DelphiInterface<IHTMLDocument2> Doc;
>        DelphiInterface<IHTMLElement> Element;
>        _di_IDispatch Disp;
>        WideString HTMLPage;
>        WideString PlainText;
>
>        try
>        {
>            OleCheck(Browser->Get_Document(Disp));
>            Doc = Disp;
>            OleCheck(Doc->Get_Body(Element));
>            OleCheck(Element->Get_OuterHTML(HTMLPage));
>            OleCheck(Element->Get_OuterText(PlainText));
>        }
>        catch(const Exception &)
>        {
>        }
>    }
>
>
> Gambit
>
> 
Technical Details
Message-ID: <433c3f0a$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: <43359db7@newsgroups.borland.com> <4335b4c4$1@newsgroups.borland.com> <4336bfa0$1@newsgroups.borland.com> <43382c29$1@newsgroups.borland.com> <43384404@newsgroups.borland.com> <43386fde$1@newsgroups.borland.com> <43388d42$1@newsgroups.borland.com> <433c2ae0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,5d71e42a8af639c6
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "mike" <mfbrowne@earthlink.nnet>
Newsgroups: borland.public.cppbuilder.internet.web
References: <43359db7@newsgroups.borland.com> <4335b4c4$1@newsgroups.borland.com> <4336bfa0$1@newsgroups.borland.com> <43382c29$1@newsgroups.borland.com> <43384404@newsgroups.borland.com> <43386fde$1@newsgroups.borland.com> <43388d42$1@newsgroups.borland.com> <433c2ae0$1@newsgroups.borland.com>
Subject: Re: Help with Delphi Translation
Date: Thu, 29 Sep 2005 15:24:35 -0400
Lines: 66
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: 68.204.189.169
Message-ID: <433c3f0a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1128021770 68.204.189.169 (29 Sep 2005 12:22:50 -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