๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #843

Re: CppWebBrowser Load from Stream .MHT file

#843
From: Carlos
Date: Tue, 04 Dec 2007 15:28
39 lines
1927 bytes
Initialize:

wb->Navigate(
        WideString("about:blank"));

It code works for HTML but not for MHT.

TMemoryStream *stm = new TMemoryStream();
  Memo1->Lines->SaveToStream(stm);

  IPersistStreamInit *psi;
  stm->Seek(0,0);

  //if you pass soOwned instead, the stream will be freed for you
  TStreamAdapter *sa = new TStreamAdapter(stm,soReference);

  if (SUCCEEDED(wb->Document->QueryInterface(IID_IPersistStreamInit,(void 
**)&psi)))
    psi->Load(*sa);

  delete stm;



"Asger Joergensen" <junk@Asger-P.dk> escribiรณ en el mensaje de noticias 
news:MPG.21bf866ea99d5143989937@newsgroups.borland.com...
>
> Hi Carlos
>
> Carlos says:
>> Hello,
>>
>> I am trying load a .MHT file from stream and it does not work.
>> If I load from file works well.
>
> Could You show the code You are trying with ?
>
> Kind regards
> Asger 
Technical Details
Message-ID: <47557233@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47553aca@newsgroups.borland.com> <MPG.21bf866ea99d5143989937@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d15852fa782d1791
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,UTF8
From: "Carlos" <a@a.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <47553aca@newsgroups.borland.com> <MPG.21bf866ea99d5143989937@newsgroups.borland.com>
In-Reply-To: <MPG.21bf866ea99d5143989937@newsgroups.borland.com>
Subject: Re: CppWebBrowser Load from Stream .MHT file
Date: Tue, 4 Dec 2007 16:28:32 +0100
Lines: 40
MIME-Version: 1.0
Content-Type: text/plain;
 format=flowed;
 charset="utf-8";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
NNTP-Posting-Host: 80.38.17.40
Message-ID: <47557233@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1196782131 80.38.17.40 (4 Dec 2007 07:28:51 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail