Home > Archive > Programming with dBASE > October 2005 > Copy a file from the internet as a source.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Copy a file from the internet as a source.
David Kleinman

2005-10-11, 7:27 am

How would I go about copying a file using the internet as a souce location?

I want to be able to provide my users a way of updating tables and programs from a location stored in a folder of my web page. On clicking a pushbutton in the program, files would be downloaded from across the internet to their local drive.

Thanks
David Stone

2005-10-11, 7:27 am

David Kleinman wrote:

> How would I go about copying a file using the internet as a souce location?
>
> I want to be able to provide my users a way of updating tables and programs from a location stored in a folder of my web page. On clicking a pushbutton in the program, files would be downloaded from across the internet to their local drive.


The below may help:

From vicmcclung@vicmcclun
g.com Thu Dec 27 05:34:00 2001
Here is a code snippet that may be useful if your app needs to download a
file from a web site:

extern culong URLDownloadToFile( cptr, cstring, cstring, culong, culong) URLMON.DLL from "URLDownloadToFileA"

URL = "http://www.vicmcclung.com/prev32.zip"
File = "prev32.zip"

URLDownloadToFile( null, URL, File, null, null)

The above code will download the printer/preview class zip file from my web
site to your current directory.

NOTE:
urlmon.dll may be missing on some older versions of Win95. Install IE 4.0
or later to be sure it is included.

David Kleinman

2005-10-12, 11:24 am


That seems to work great. Thanks.

I'm using the URLDownloadToFile function of Internet Explorer to provide a program update service for my application to my customers. I want to display a download status of a text message of the percent completed. There is a supporting method, IBindStat
usCallback::OnProgre
ss, that performs this function, but I am not sure how to use it. Could someone please provide me with a brief snippet on the use of the OnProgress method.

http://msdn.microsoft.com/library/d.../onprogress.asp

Thanks

David



David Stone Wrote:

> David Kleinman wrote:
>
>
> The below may help:
>
> From vicmcclung@vicmcclun
g.com Thu Dec 27 05:34:00 2001
> Here is a code snippet that may be useful if your app needs to download a
> file from a web site:
>
> extern culong URLDownloadToFile( cptr, cstring, cstring, culong, culong) URLMON.DLL from "URLDownloadToFileA"
>
> URL = "http://www.vicmcclung.com/prev32.zip"
> File = "prev32.zip"
>
> URLDownloadToFile( null, URL, File, null, null)
>
> The above code will download the printer/preview class zip file from my web
> site to your current directory.
>
> NOTE:
> urlmon.dll may be missing on some older versions of Win95. Install IE 4.0
> or later to be sure it is included.
>


Roland Wingerter

2005-10-12, 11:24 am

David Kleinman wrote

>
> That seems to work great. Thanks.
>
> I'm using the URLDownloadToFile function of Internet Explorer to provide a
> program update service for my application to my customers. I want to
> display a download status of a text message of the percent completed.
> There is a supporting method, IBindStatusCallback:
:OnProgress, that
> performs this function, but I am not sure how to use it. Could someone
> please provide me with a brief snippet on the use of the OnProgress
> method.

------
As an alternative, try this solution by Marc VdB:

http://www.vdblogic.de/dbl/urlde.htm

Roland



David Kleinman

2005-10-12, 11:24 am

Roland,

Thanks for the quick reply (4 minutes). That looks like just what I was looking for. No sense reinventing the wheel. Very much appreciated.

David.


Roland Wingerter Wrote:

> David Kleinman wrote
> ------
> As an alternative, try this solution by Marc VdB:
>
> http://www.vdblogic.de/dbl/urlde.htm
>
> Roland
>
>
>


Roland Wingerter

2005-10-12, 11:24 am

David Kleinman wrote

>
> That looks like just what I was looking for. No sense reinventing the
> wheel. Very much appreciated.

-------
Glad to help.

Roland


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com