Board index » cppbuilder » Re: Using TWebBrowser - loading HTML script from a TStream

Re: Using TWebBrowser - loading HTML script from a TStream


2008-02-15 06:32:18 AM
cppbuilder78
Quote
Also, you are not freeing the TStreamAdapter object when you are done with
it, so it will be leaked:

Gambit,
I used the first example to delete pStreamAdapter and it throws an error
back to the calling method. What that error is I don't know yet as I am
using a catch(...) statement. I will have to check it out some more this
afternoon.
Any idea as to why it would cause an error?
BTW - the required web page is still displayed.
thanks for the help
daryl
Quote
if(
SUCCEEDED(pCppWebBrowser->Document->QueryInterface(IID_IPersistStreamInit,
(LPVOID*)&pPSI)) )
{
TStreamAdapter* pStreamAdapter = new TStreamAdapter(pMemStream,
soReference);
//..
delete pStreamAdapter;
}

Or:

TStreamAdapter* pStreamAdapter = new TStreamAdapter(pMemStream,
soReference);
if(
SUCCEEDED(pCppWebBrowser->Document->QueryInterface(IID_IPersistStreamInit,
(LPVOID*)&pPSI)) )
{
pPSI->Load(*pStreamAdapter);
//..
}
delete pStreamAdapter;
 
 

Re:Re: Using TWebBrowser - loading HTML script from a TStream

"Daryl" < XXXX@XXXXX.COM >wrote in message
Quote
Your response was:
10 seconds to find with the right search criteria:


groups.google.com/groups/search
That is the search results page. I was asking which *specific message*
within those results you are looking at for the example code you quoted.
Gambit
 

Re:Re: Using TWebBrowser - loading HTML script from a TStream

"Daryl" < XXXX@XXXXX.COM >wrote in message
Quote
Would it be possible for you to expand the steps outlined by
Mark in my recent post mentioned above i.e. "Handling script
erros from TWebBrowser control" in this same group?.
No. Like I said earlier, I have nothing to offer regarding that topic.
Quote
Step 3 I do not fully understand - does Mark mean to modify
the contents of ShDocVw_OCX.cpp/h to have TWebBrowser
inherit from the modified TOleControl?
Basically, yes.
Quote
Step 4 - I can not understand where this code is placed - Is it
in the same Package/Unit as the code from step 2?
Yes.
Gambit
 

{smallsort}