🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Submit Form From TCppWebBrowser (ebay)

#916
From: Caleb
Date: Thu, 08 Dec 2005 10:23
55 lines
2659 bytes
"Caleb" <nospam@nospam.net> wrote:
>
>"Caleb" <nospam@nospam.net> wrote:
>>
>>Hello:
>>
>>On most ebay pages the submit form logic (below) works.
>>On the ebay page (http://cgi5.ebay.com/ws2/eBayISAPI.dll?ReviseItem&Item=)
>
>There may be a problem with releasing objects.  Please
>look at the code below and let me know if this is the case.
>The form CAN be submitted if the following code is omitted.
>I think something(s) need to be released.  Thanks for any
>help.
>
>  TCppWebBrowser * CppWebBrowser1 = WB;
>  IHTMLDocument2 *HTMLDocument;
>  IPersistFile *PersistFile;
>
>  try
>  {
>     CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument,
>     &((void*)HTMLDocument) );
>     HTMLDocument->QueryInterface(IID_IPersistFile, &((void *)PersistFile));
>     PersistFile->Save(WideString(String(filename)), true);
>  }
>  catch(...)
>  {
>  }
>
>This code is part of logic used for seeing which page loaded.
>Is there a better way to examine the contents of the loaded
>page to see which page loaded (ie login accepted or login prob)?


OK, I think I have the source of the problem, but not the solution.

Added:

     PersistFile->Release(); 
     HTMLDocument->Release(); 

However, as I mentioned the submit form logic is working
in one program but not the one with the logic above for
seeing which page loaded.

The logic above saves the page to afile.  If that file is opened
in the broweser, it shows the form that is being submitted,
but if I manually click the button to submit form, the browser
shows the same "page cannot be displayed" message and the 
browser's address is "D:\ws\eBayISAPI.dll".

So how, if I save the browser to a text file, do I prevent
the browser address from changing to the local file name?
Technical Details
Message-ID: <439817c8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4395aaa7$1@newsgroups.borland.com> <43981295$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,5a1a88660f4fb67f
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Caleb" <nospam@nospam.net>
Sender: "Caleb" <nospam@nospam.net>
Reply-To: "Caleb" <nospam@nospam.net>
Subject: Re: Submit Form From TCppWebBrowser (ebay)
Newsgroups: borland.public.cppbuilder.internet.web
X-User-Info: 71.99.31.251     
References:  <4395aaa7$1@newsgroups.borland.com> <43981295$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <439817c8$1@newsgroups.borland.com>
Date: 8 Dec 2005 03:23:52 -0700
X-Trace: newsgroups.borland.com 1134041032 207.105.83.66 (8 Dec 2005 03:23:52 -0700)
Lines: 57
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail