🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TCPPWebBrowser causing an AV

#282
From: Tom
Date: Sun, 18 Feb 2007 13:22
40 lines
2352 bytes
Any reason the code below would cause the application to
have an AV when the application is closed? It only occurs when
the movie is played at all. If the play button isn't pressed,
no error.

Place a TCPPWebBrowser on a form and this in the constructor
to reproduce.

    AnsiString HTML = "\
  <html><body bgcolor=#8ca9c6>\
    <table width=95% border=0 align=center bgcolor=#000000 
style='font-size:14px'>\
      <tr bgcolor=#FFFFFF><td style='padding:5px;text-align:center;'><object 
width=\"425\" height=\"350\"><param name=\"movie\" 
value=\"http://www.youtube.com/v/MEIWM91WZTA\"></param><param name=\"wmode\" 
value=\"transparent\"></param><embed 
src=\"http://www.youtube.com/v/MEIWM91WZTA\" 
type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" 
height=\"350\"></embed></object></td></tr>\
    </table>\
  </body></html>";

    this->CppWebBrowser1->Navigate(L"about:blank");
    while(this->CppWebBrowser1->Busy)
      Application->ProcessMessages();

    TMemoryStream* mstm=new TMemoryStream();
    mstm->Write(HTML.c_str(), HTML.Length());
    mstm->Seek(0, soFromBeginning);
    IPersistStreamInit* pPersistStreamInit = NULL;
    TStreamAdapter *IStr=new TStreamAdapter(mstm,soReference);
    this->CppWebBrowser1->Document->QueryInterface(IID_IPersistStreamInit,(void**)&pPersistStreamInit);
    pPersistStreamInit->Load(*IStr);
    pPersistStreamInit->Release();
    pPersistStreamInit=NULL;
    delete mstm;

Thanks,

Tom 
Technical Details
Message-ID: <45d852e5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.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

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,2dcae0388f1713b,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Tom" <tom@nospam.net>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: TCPPWebBrowser causing an AV
Date: Sun, 18 Feb 2007 07:22:15 -0600
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 68.1.78.156
Message-ID: <45d852e5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1171804901 68.1.78.156 (18 Feb 2007 05:21:41 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.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