AnsweredAssumed Answered

vrf Internet Explorer

Question asked by VRFuser on Jun 28, 2005
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=us-ascii"><META content="MSHTML 6.00.2900.2668" name=GENERATOR></HEAD><BODY><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2>Thanks Paul -</FONT></SPAN></DIV><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2>I'm not an ActiveX person but I might dig a bit and see if I can pull it together..</FONT></SPAN></DIV><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2>Certainly a nice trick </FONT></SPAN></DIV><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV><DIV dir=ltr align=left><SPAN class=109001015-28062005><FONT face=Arial color=#0000ff size=2>Sascha.</FONT></SPAN></DIV><BR><BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>  <HR tabIndex=-1>  <FONT face=Tahoma size=2><B>From:</B> Paul.Fowler@raytheon.co.uk   [mailto:Paul.Fowler@raytheon.co.uk] <BR><B>Sent:</B> 28 June 2005   14:10<BR><B>To:</B> SPANGENBERG,SASCHA (A-Scotland,ex1)<BR><B>Cc:</B>   PDL-LISTS,VRF (A-Lists,unix1)<BR><B>Subject:</B> RE: [vrf] Internet   Explorer<BR></FONT><BR></DIV>  <DIV></DIV><BR><FONT face=Arial color=blue size=2>>> When the url   loading succeeded I got a "Stack Pointer corrupted after return from compiled   function URLDownloadToFileA"</FONT> <BR><FONT face=Arial color=blue   size=2>>> Error 739 when it managed to load the url.</FONT>   <BR><BR><FONT face=sans-serif size=2>Ah... a fussy version of VEE. I still   have 5.01 here.</FONT> <BR><BR><FONT face=Arial color=blue size=2>>>   Still the error 553 remains a problem regardless of the delay and url   used.</FONT> <BR><BR><FONT face=sans-serif size=2>So in real life we would   declare a variable for the InternetExplorer.Application object, and probably   the associated Document object, so that we can enable event handling.</FONT>   <BR><FONT face=sans-serif size=2>We would then create event handlers for the   DownloadComplete or DocumentComplete event, and doubtless the   document.onerrorupdate event.</FONT> <BR><BR><FONT face=sans-serif size=2>We   would only perform our copy on receiving notification that the page had   downloaded successfully, or take other action in case of an error.</FONT>   <BR><BR><FONT face=sans-serif size=2>As always, my vrf examples come with a   Big Boy Warranty - If you want production code, I can pm you with my hourly   rate </FONT> <BR><BR><FONT face=sans-serif size=2>Cheers</FONT> <BR><FONT   face=sans-serif size=2>Paul F.</FONT> <BR><BR><BR><BR>  <TABLE width="100%" border=1>    <TBODY>    <TR vAlign=top>      <TD width="13%" bgColor=#004200><FONT face=Arial color=#004200         size=1><B>"SPANGENBERG,SASCHA (A-Scotland,ex1)"         |sspangenberg@agilent.com></B></FONT>       <TD width="73%" bgColor=white><FONT face="Times New Roman"         size=2><B>Document Marked as Unclassified</B></FONT>       <TD width="12%" bgColor=#004200></TR></TBODY></TABLE><BR>  <TABLE width="100%">    <TBODY>    <TR vAlign=top>      <TD>      <TD><FONT face=sans-serif size=2>                            </FONT><FONT face=sans-serif         size=1><B>"SPANGENBERG,SASCHA (A-Scotland,ex1)"         |sspangenberg@agilent.com></B></FONT> <BR><FONT face=sans-serif         color=#0041c2 size=5><B>                            </B></FONT><FONT face=sans-serif size=1>28/06/2005         13:56</FONT> <BR><FONT face=sans-serif color=#2f2f2f size=1><B>            </B></FONT><FONT face=sans-serif size=2>                                                                             </FONT><FONT face=sans-serif size=1>Please         respond to "SPANGENBERG,SASCHA (A-Scotland,ex1)"<BR>                             </FONT>         <BR><FONT face=sans-serif size=1>                                                        Stationery name:-Untitled-</FONT>         <BR><BR>        <P></P>      <TD><FONT face=Arial size=1>        </FONT><BR><FONT         face=sans-serif size=1>        To:                VRF |vrf@agilent.com></FONT> <BR><FONT         face=sans-serif size=1>        cc:                </FONT> <BR><FONT face=sans-serif size=1>                Subject:        RE: [vrf] Internet         Explorer</FONT></TR></TBODY></TABLE><BR><BR><FONT face=Arial color=blue   size=2>Hi -</FONT> <BR><FONT face="Times New Roman" size=3> </FONT>   <BR><FONT face=Arial color=blue size=2>the increased wait time helps sometimes   but not always since I still get error 553 quite frequently.</FONT> <BR><FONT   face="Times New Roman" size=3> </FONT> <BR><FONT face=Arial color=blue   size=2>When the url loading succeeded I got a "Stack Pointer corrupted after   return from compiled function URLDownloadToFileA"</FONT> <BR><FONT face=Arial   color=blue size=2>Error 739 when it managed to load the url.</FONT> <BR><FONT   face="Times New Roman" size=3> </FONT> <BR><FONT face=Arial color=blue   size=2>In my case changing the header file content in loadURLMon from</FONT>   <BR><FONT face=Arial color=blue size=2>  long URLDownloadToFileA (long   pCaller, char* szURL, char* szFileName, long dwReserved, long lpfnCB);</FONT>   <BR><FONT face=Arial color=blue size=2>to</FONT> <BR><FONT face=Arial   color=blue size=2>  long __stdcall URLDownloadToFileA (long pCaller,   char* szURL, char* szFileName, long dwReserved, long lpfnCB);</FONT> <BR><FONT   face=Arial color=blue size=2>fixed this.</FONT> <BR><FONT   face="Times New Roman" size=3> </FONT> <BR><FONT face=Arial color=blue   size=2>Still the error 553 remains a problem regardless of the delay and url   used.</FONT> <BR><FONT face="Times New Roman" size=3> </FONT> <BR><FONT   face=Arial color=blue size=2>Regards,</FONT> <BR><FONT face=Arial color=blue   size=2>    Sascha.</FONT> <BR><BR>  <HR>  <FONT face=Tahoma size=2><B>From:</B> Paul.Fowler@raytheon.co.uk   [mailto:Paul.Fowler@raytheon.co.uk] <B><BR>Sent:</B> 28 June 2005   12:57<B><BR>To:</B> SPANGENBERG,SASCHA (A-Scotland,ex1)<B><BR>Cc:</B>   PDL-LISTS,VRF (A-Lists,unix1)<B><BR>Subject:</B> RE: [vrf] Internet   Explorer</FONT><FONT face="Times New Roman" size=3><BR></FONT><BR><FONT   face=sans-serif size=2><BR>Hi Sascha,</FONT><FONT face="Times New Roman"   size=3> <BR></FONT><FONT face=sans-serif size=2><BR>That means that the page   hasn't completed dowloading.</FONT><FONT face="Times New Roman" size=3>   <BR></FONT><FONT face=sans-serif size=2><BR>1./ Put an "A.Visible = True" in   the formula somewhere so you can see the explorer window.</FONT><FONT   face="Times New Roman" size=3> </FONT><FONT face=sans-serif size=2><BR>2./ Put   a longer value in the "Wait(1000)" call</FONT><FONT face="Times New Roman"   size=3> </FONT><FONT face=sans-serif size=2><BR>3./ Check your internet   connectivity.</FONT><FONT face="Times New Roman" size=3> </FONT><FONT   face=sans-serif size=2><BR>4./ Try a different URL in the "A.Navigate()"   method invocation</FONT><FONT face="Times New Roman" size=3> <BR></FONT><FONT   face=sans-serif size=2><BR>Cheers</FONT><FONT face="Times New Roman" size=3>   </FONT><FONT face=sans-serif size=2><BR>Paul F.</FONT><FONT   face="Times New Roman" size=3> <BR><BR><BR><BR></FONT>  <TABLE width="100%" border=4>    <TBODY>    <TR vAlign=top>      <TD width="66%" bgColor=#004200><FONT face=Arial color=#004200         size=1><B>"SPANGENBERG,SASCHA (A-Scotland,ex1)"         |sspangenberg@agilent.com></B></FONT><FONT face="Times New Roman"         size=3> </FONT>      <TD width="31%" bgColor=white><FONT face="Times New Roman"         size=2><B>Document Marked as Unclassified</B></FONT><FONT         face="Times New Roman" size=3> </FONT>      <TD width="2%" bgColor=#004200></TR></TBODY></TABLE><BR>  <TABLE width="100%">    <TBODY>    <TR vAlign=top>      <TD width="1%">      <TD width="69%"><FONT face=sans-serif size=2>                            </FONT><FONT face=sans-serif         size=1><B>"SPANGENBERG,SASCHA (A-Scotland,ex1)"         |sspangenberg@agilent.com></B></FONT><FONT face="Times New Roman"         size=3> </FONT><FONT face=sans-serif color=#0041c2 size=5><B><BR>                                   </B></FONT><FONT face=sans-serif size=1>28/06/2005         12:50</FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif color=#2f2f2f size=1><B><BR>           </B></FONT><FONT face=sans-serif size=2>                                                                             </FONT><FONT face=sans-serif size=1>Please respond         to "SPANGENBERG,SASCHA (A-Scotland,ex1)"<BR>                            </FONT><FONT         face="Times New Roman" size=3> </FONT><FONT face=sans-serif         size=1><BR>                                                       Stationery name:-Untitled-</FONT><FONT         face="Times New Roman" size=3> <BR></FONT>      <TD width="28%"><FONT face=Arial size=1>                </FONT><FONT face=sans-serif size=1><BR>       To:                VRF |vrf@agilent.com></FONT><FONT         face="Times New Roman" size=3> </FONT><FONT face=sans-serif         size=1><BR>       cc:                </FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif size=1><BR>       Subject:                RE: [vrf] Internet   Explorer</FONT></TR></TBODY></TABLE><BR><FONT face="Times New Roman"   size=3><BR></FONT><FONT face=Arial color=blue size=2><BR>Hi Paul -   </FONT><FONT face="Times New Roman" size=3><BR> </FONT><FONT face=Arial   color=blue size=2><BR>when I run your example I get an error: <BR>ActiveX   object returned error during GET of property "Document"</FONT><FONT   face="Times New Roman" size=3> </FONT><FONT face=Arial color=blue   size=2><BR>Error 553</FONT><FONT face="Times New Roman" size=3> </FONT><FONT   face=Arial color=blue size=2><BR>Unspecified return error code 0x80004005   (16389)</FONT><FONT face="Times New Roman" size=3> <BR> </FONT><FONT   face=Arial color=blue size=2><BR>Do I need to have something special installed   or should this work out-of-the-box/</FONT><FONT face="Times New Roman" size=3>   <BR> </FONT><FONT face=Arial color=blue size=2><BR>Sascha.</FONT><FONT   face="Times New Roman" size=3> <BR><BR></FONT>  <HR>  <FONT face=Tahoma size=2><B>From:</B> Paul.Fowler@raytheon.co.uk   [mailto:Paul.Fowler@raytheon.co.uk] <B><BR>Sent:</B> 28 June 2005   11:16<B><BR>To:</B> PDL-LISTS,VRF (A-Lists,unix1)<B><BR>Subject:</B> Re: [vrf]   Internet Explorer</FONT><FONT face="Times New Roman" size=3><BR></FONT><FONT   face=sans-serif size=2><BR><BR>Having found a problem with the ExecWB method   when trying to download a file silently; I humbly submit another solution   using the URLDownloadToFileA function from urlmon.dll.</FONT><FONT   face="Times New Roman" size=3> </FONT><BR><FONT face=sans-serif   size=2><BR>Please see attached.</FONT><FONT face="Times New Roman" size=3>   </FONT><FONT face=sans-serif size=2><BR><BR>Paul F.</FONT><FONT   face="Times New Roman" size=3> <BR><BR><BR><BR></FONT>  <TABLE width="100%" border=4>    <TBODY>    <TR vAlign=top>      <TD width="44%" bgColor=#004200><FONT face=Arial color=#004200         size=1><B>Paul.Fowler@raytheon.co.uk</B></FONT><FONT         face="Times New Roman" size=3> </FONT>      <TD width="51%" bgColor=white><FONT face="Times New Roman"         size=2><B>Document Marked as Unclassified</B></FONT><FONT         face="Times New Roman" size=3> </FONT>      <TD width="3%" bgColor=#004200></TR></TBODY></TABLE><BR>  <TABLE width="100%">    <TBODY>    <TR vAlign=top>      <TD width="2%">      <TD width="59%"><FONT face=sans-serif size=2>                            </FONT><FONT face=sans-serif         size=1><B>Paul.Fowler@raytheon.co.uk</B></FONT><FONT         face="Times New Roman" size=3> </FONT><FONT face=sans-serif         color=#0041c2 size=5><B><BR>                          </B></FONT><FONT face=sans-serif size=1>27/06/2005         16:36</FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif color=#2f2f2f size=1><B><BR>  </B></FONT><FONT         face=sans-serif size=2>                                                                             </FONT><FONT face=sans-serif size=1>Please respond to         Paul.Fowler<BR>                           </FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif size=1><BR>                                                      Stationery name:-Untitled-</FONT><FONT         face="Times New Roman" size=3> </FONT>      <TD width="38%"><FONT face=Arial size=1>                </FONT><FONT face=sans-serif size=1><BR>      To:                VRF |vrf@agilent.com></FONT><FONT         face="Times New Roman" size=3> </FONT><FONT face=sans-serif         size=1><BR>      cc:                </FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif size=1><BR>      Subject:                Re: [vrf] Internet Explorer</FONT></TR></TBODY></TABLE><BR><FONT   face="Times New Roman" size=3><BR></FONT><FONT face=sans-serif   size=2><BR><BR><BR>Having loaded the page, I would navigate to the image   itself using:</FONT><FONT face="Times New Roman" size=3> </FONT><FONT   face=sans-serif   size=2><B><BR><BR>A.Navigate(A.Document.Images(0).src)</B></FONT><FONT   face="Times New Roman" size=3> </FONT><FONT face=sans-serif   size=2><BR><BR>where A is your InternetExplorer.Application object</FONT><FONT   face="Times New Roman" size=3> </FONT><FONT face=sans-serif size=2><BR><BR>You   can then use the <B>ExecWB</B> method to save the image. For   Example:</FONT><FONT face="Times New Roman" size=3> </FONT><FONT   face=sans-serif size=2><B><BR><BR>A.ExecWB(4,0)</B></FONT><FONT   face="Times New Roman" size=3> </FONT><FONT face=sans-serif   size=2><BR><BR>will display the SaveAs box. It is also possible to save the   image silently, to a filename you specify... there is some documentation on   this here...</FONT><FONT face="Times New Roman" size=3> </FONT><FONT   face=sans-serif   size=2><BR><BR>http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/methods/execwb.asp</FONT><FONT   face="Times New Roman" size=3> <BR><BR><BR></FONT>  <TABLE width="100%" border=4>    <TBODY>    <TR vAlign=top>      <TD width="47%" bgColor=#004200><FONT face=Arial color=#004200         size=1><B>|ext-michael.simon@nokia.com></B></FONT><FONT         face="Times New Roman" size=3> </FONT>      <TD width="48%" bgColor=white><FONT face="Times New Roman"         size=2><B>Document Marked as Unclassified</B></FONT><FONT         face="Times New Roman" size=3> </FONT>      <TD width="3%" bgColor=#004200></TR></TBODY></TABLE><BR>  <TABLE width="100%">    <TBODY>    <TR vAlign=top>      <TD width="2%">      <TD width="63%"><FONT face=sans-serif size=2>                            </FONT><FONT face=sans-serif         size=1><B>|ext-michael.simon@nokia.com></B></FONT><FONT         face="Times New Roman" size=3> </FONT><FONT face=sans-serif         color=#0041c2 size=5><B><BR>                         </B></FONT><FONT face=sans-serif size=1>27/06/2005         14:50</FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif color=#2f2f2f size=1><B><BR> </B></FONT><FONT         face=sans-serif size=2>                                                                             </FONT><FONT face=sans-serif size=1>Please respond to         ext-michael.simon<BR>                          </FONT><FONT face="Times New Roman"         size=3> </FONT><FONT face=sans-serif size=1><BR>                                                     Stationery         name:-Untitled-</FONT><FONT face="Times New Roman" size=3> </FONT>      <TD width="33%"><FONT face=Arial size=1>                </FONT><FONT face=sans-serif size=1><BR>     To:                VRF |vrf@agilent.com></FONT><FONT         face="Times New Roman" size=3> </FONT><FONT face=sans-serif         size=1><BR>     cc:                </FONT><FONT face="Times New Roman" size=3> </FONT><FONT         face=sans-serif size=1><BR>     Subject:                [vrf] Internet Explorer</FONT></TR></TBODY></TABLE><BR><FONT   face="Times New Roman" size=3><BR></FONT><FONT face="Courier New"   size=2><BR><BR><BR>Hi,<BR><BR>I'm using "Microsoft HTML Object Library" and   "Microsoft Intenet Controls" as ActiveX libraries to automatically start the   Internet Explorer and navigate to a web page. On this web page only one image   is displayed and now I want to save this image to file on my harddisk. <BR>Any   idea how to do this?<BR><BR>Regards,<BR><BR>Michael<BR><BR>---<BR>You are   currently subscribed to vrf as: Paul.Fowler@raytheon.co.uk<BR>To subscribe   send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe   send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages   to this mailing list,  email "vrf@agilent.com".  <BR>If you need   help with the mailing list send a message to   "owner-vrf@it.lists.it.agilent.com".</FONT><FONT face="Times New Roman"   size=3><BR><BR><BR>--- You are currently subscribed to vrf as:   Paul.Fowler@raytheon.co.uk To subscribe send a blank email to   "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to   "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list,   email "vrf@agilent.com". If you need help with the mailing list send a message   to "owner-vrf@it.lists.it.agilent.com". <BR><BR>--- You are currently   subscribed to vrf as: sspangenberg@agilent.com To subscribe send a blank email   to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to   "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list,   email "vrf@agilent.com". If you need help with the mailing list send a message   to "owner-vrf@it.lists.it.agilent.com". <BR><BR>---<BR>You are currently   subscribed to vrf as: Paul.Fowler@raytheon.co.uk<BR>To subscribe send a blank   email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank   email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this   mailing list, email "vrf@agilent.com". <BR>If you need help with the mailing   list send a message to "owner-vrf@it.lists.it.agilent.com".   <BR></FONT><BR><FONT face="Times New Roman" size=3><BR>---<BR>You are   currently subscribed to vrf as: Paul.Fowler@raytheon.co.uk<BR>To subscribe   send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe   send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages   to this mailing list, email "vrf@agilent.com". <BR>If you need help with the   mailing list send a message to "owner-vrf@it.lists.it.agilent.com".   </FONT><BR><BR></BLOCKQUOTE><BR>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>  

Outcomes