ISX Download DLL is a "plugin" for ISX that allows you to download files from the Internet during the installation process.
Primarily written to be used from Inno Setup, but can be used by any software that can call DLL's. If you have the declarations needed for VB or other languages, please send them to me to include them on this page.
function isxdl_Download(hWnd: Integer; URL, Filename: PChar): Integer; external 'isxdl_Download@files:isxdl.dll stdcall'; procedure isxdl_AddFile(URL, Filename: PChar); external 'isxdl_AddFile@files:isxdl.dll stdcall'; procedure isxdl_AddFileSize(URL, Filename: PChar; Size: Cardinal); external 'isxdl_AddFileSize@files:isxdl.dll stdcall'; function isxdl_DownloadFiles(hWnd: Integer): Integer; external 'isxdl_DownloadFiles@files:isxdl.dll stdcall'; procedure isxdl_ClearFiles; external 'isxdl_ClearFiles@files:isxdl.dll stdcall'; function isxdl_IsConnected: Integer; external 'isxdl_IsConnected@files:isxdl.dll stdcall'; function isxdl_SetOption(Option, Value: PChar): Integer; external 'isxdl_SetOption@files:isxdl.dll stdcall'; function isxdl_GetFileName(URL: PChar): PChar; external 'isxdl_GetFileName@files:isxdl.dll stdcall';
Public Declare Function isxdl_Download Lib "isxdl.dll" _ (ByVal ihWnd As Integer, ByVal strURL As String, ByVal strFilename As String) As Integer Public Declare Function isxdl_AddFile Lib "isxdl.dll" _ (ByVal strURL As String, ByVal strFilename As String) As Integer Public Declare Function isxdl_AddFileSize Lib "isxdl.dll" _ (ByVal strURL As String, ByVal strFilename As String, ByVal lngSize As Long) As Integer Public Declare Function isxdl_DownloadFiles Lib "isxdl.dll" _ (ByVal ihWnd As Integer) As Integer Public Declare Sub isxdl_ClearFiles Lib "isxdl.dll" () Public Declare Function isxdl_IsConnected Lib "isxdl.dll" () As Integer Public Declare Function isxdl_SetOption Lib "isxdl.dll" _ (ByVal strOption As String, ByVal strValue As String) As Integer Public Declare Function isxdl_GetFileName Lib "isxdl.dll" _ (ByVal strRL As String) As String
extern "C" { int isxdl_Download(HWND hWndParent,LPCTSTR pszURL,LPCTSTR pszFileName); void isxdl_AddFile(LPCTSTR pszURL,LPCTSTR pszFileName); void isxdl_AddFileSize(LPCTSTR pszURL,LPCTSTR pszFileName,DWORD dwSize); int isxdl_DownloadFiles(HWND hWndParent); void isxdl_ClearFiles(void); int isxdl_IsConnected(void); int isxdl_SetOption(LPCTSTR pszOption,LPCTSTR pszValue); LPCTSTR isxdl_GetFileName(LPCTSTR pszURL); };
Immediately downloads a file from the Internet.
int isxdl_Download( HWND hWndParent, LPCTSTR pszURL, LPCTSTR pszFileName );
Adds a file to the internal file list.
void isxdl_AddFile( LPCTSTR pszURL, LPCTSTR pszFileName );
Adds a file to the internal file list, and tells how big the file is. Use this if you know the size of the file, and know that it will not change. Means that the DLL won't have to find the size, which can take some time if you have many files to download.
void isxdl_AddFileSize( LPCTSTR pszURL, LPCTSTR pszFileName, DWORD dwSize );
Downloads all files added with isxdl_AddFile or isxdl_AddFileSize.
int isxdl_DownloadFiles( HWND hWndParent );
Clears the internal file list. Shouldn't be necessary since files will be removed as they are successfully downloaded.
void isxdl_ClearFiles( );
Tells wether the computer is connected to the Internet or not. This is kind of experimental, and very little tested.
int isxdl_IsConnected( );
Set various options.
int isxdl_SetOption( LPCTSTR pszOption, LPCTSTR pszValue );
Option | Value |
title | The title to use for the download window. |
debug | Not used. Valid values are "true" and "false". |
simple | Turns on simple mode if the value is a string, turns off simple mode if the value is an empty string. |
label | Text for header label. |
description | Text for header description. |
language | Language file to get texts from. |
resume | Tell it to use resume. Default is true. (Disabled.) |
smallwizardimage | The image to display if you want something other than the default. |
Get the real file name of a downloaded file. The URL to download ISTool is 'http://www.istool.org/getistool.aspx', and before downloading isxdl_GetFileName returns 'getistool.aspx'. After downloading, the result will be 'istool-5.0.6.1.exe'.
LPCTSTR GetFileName( LPCTSTR pszURL );