programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Snipped : download a file from Internet url

From: Charles Melice <3d_at_forthcad.com>
Date: Thu, 20 Apr 2006 20:31:18 +0200

One previous question was : how to download a file from Internet?
I have found a simpler method:

LIBRARY urlmon.dll

Function: URLDownloadToFileA ( 0 szURL szFileName 0 0 -- hresult )

: TEST ( -- )
    0
    z"
http://www.forth.com/images/sidebar-space-shuttle-embedded-hover.gif"
    z" c:/bitmap.gif"
    0 0 URLDownloadToFileA . ;

\ And why not (basic, not tested) :

: URL-INCLUDED ( zurlPath zUrlAndLocalFile -- )
    swap pad zplace
    z" /" pad zappend
    dup pad zappend
    0 pad third 0 0 URLDownloadToFileA abort" url not found"
    zcount included ;

Charles

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Thu Apr 20 2006 - 11:32:14 PDT

This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:37 PST