🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Getting TCppWebBrowser as Text From Stream

#751
From: caleb
Date: Thu, 09 Mar 2006 02:41
32 lines
1760 bytes
This code below is giving the exact same partial document 
results.

For some reason I can save the browser contents to file,
but if streaming the browser contents gets only partial
file and the same partial file each time.


Thanks

    
        TComInterface<IHTMLDocument2> HTMLDocument;
        TComInterface<IPersistStreamInit> PersistStream;


        if( SUCCEEDED(bro->Document->QueryInterface(IID_IHTMLDocument2,
              (LPVOID*)&HTMLDocument)) )
        {
            if(
            SUCCEEDED(HTMLDocument->QueryInterface(IID_IPersistStreamInit,
            (LPVOID*)&PersistStream)) )
            {
                std::auto_ptr<TStringStream> Strm(new TStringStream(""));
                std::auto_ptr<TStreamAdapter> Adapter(new
TStreamAdapter(Strm.get(), soReference));
                PersistStream->Save(*Adapter, FALSE);
                *str = Strm->DataString;
            }
        }

        *str = "failed";
Technical Details
Message-ID: <440fa3f3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <440f9e16$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,274260257bdc682e
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "caleb" <nos@pam.com>
Sender: "caleb" <nos@pam.com>
Reply-To: "caleb" <nos@pam.com>
Subject: Re: Getting TCppWebBrowser as Text From Stream
Newsgroups: borland.public.cppbuilder.internet.web
X-User-Info: 71.99.27.59     
References:  <440f9e16$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <440fa3f3$1@newsgroups.borland.com>
Date: 8 Mar 2006 19:41:39 -0700
X-Trace: newsgroups.borland.com 1141875699 207.105.83.66 (8 Mar 2006 19:41:39 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail