File download

by Todd G. Nist

This program utilizes the standard DoFileDownload API.
On the occasions when you simply need to download one file, this routine will display the IE file download dialog. The nice thing is that the dialog takes care of all aspects of the interface, including the progressbar, animation and statistics. This code can easily be integrated into any application requiring this type of functionality.
The program has been tested under Windows 2000 Server/Professional.
API-procedures used in this example are listed here to be included in the search index:

PROCEDURE DoFileDownload        EXTERNAL 'shdocvw.dll':U:
PROCEDURE WideCharToMultiByte   EXTERNAL "KERNEL32.dll":
PROCEDURE MultiByteToWideChar   EXTERNAL "KERNEL32.dll":

Attachments : demo