Article View: borland.public.cppbuilder.internet.web
Article #628TCppWebrowser xml combination problems
From: Danny Abbenhuis
Date: Thu, 01 Jun 2006 09:03
Date: Thu, 01 Jun 2006 09:03
46 lines
2834 bytes
2834 bytes
I'm experiencing some problems using the TCppWebrowser component:
Request:
I'm writing a program that does some report printing on startup. It used
some tables to create data in an xml file, and
one by one needs to print this data. For this I've used an TCppWebBrowser
component to load the document
and in the ondocument complete I print the document and close the foprm on
which it is shown. During startup a undefined number
of documents need to be printed.
Experience:
Written the code, i have seen several weird things:
- Sometime the application simply stops, and is gone
- Sometime an abnormal program termination occures
- Sometimes everything seems to be normal, the application finnishes
printing, and continues
with the normal user interface, but when at a later time closing the
application al kind of weird errors
occures (like unable to write to memmory)
- Using aqtime (because codeguard doesn't see any problems) it showed that
there are lots of
exceptions in calling the msxml3 dll file which probabbly is loaded.
Possibly this is only the case
in loading an xml file instead of a other standard url.
Testing:
To be able to test the situation I created a very simple program:
- i use the following code behind a button:
CppWebBrowser1->Navigate(WideString("C:\\OwlSupplyReport.xml"));
- to automattically print the document when finnished :
void __fastcall TForm1::CppWebBrowser1DocumentComplete(TObject *Sender,
LPDISPATCH pDisp, Variant *URL)
{
CppWebBrowser1->ExecWB( OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0,
0);
CppWebBrowser1->Stop();
}
When pushing the button repeatedly, the application experiences the same
problems as the original application
Does anyone know what might be the problem, is it a bug in my own code, a
bug in the component, or a bug in the xml stuff.
Technical Details
Message-ID:
<447eadbe@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.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-mailShow Full Headers
Complete Article Headers
X-Google-Thread: feeec,63922eaac5b0c033,start X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Danny Abbenhuis" <d_j_daan@hotmail.com> From: "Danny Abbenhuis" <d_j_daan@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.web Subject: TCppWebrowser xml combination problems Date: Thu, 1 Jun 2006 11:03:08 +0200 Lines: 50 Organization: Moba B.V. 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.2869 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 212.142.8.15 Message-ID: <447eadbe@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1149152702 212.142.8.15 (1 Jun 2006 02:05:02 -0700) Path: arc1-ca.pugleaf.net!g2news2.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