Skip to content

Instantly share code, notes, and snippets.

@hamxiaoz hamxiaoz/isxdl.cs
Last active Feb 17, 2016

What would you like to do?
How to use [isxdl.dll]( to download files in C#?
static extern Int32 isxdl_Download(IntPtr hWndParent, String pszURL, String pszFileName);
static extern Int32 isxdl_SetOption(String option, String value);
private void button_download_Click(object sender, EventArgs e)
var fileUrl = "REPLACE_ME";
// use dll to download
String downloadFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "COMPANY", "Downloaded Updates");
if (!Directory.Exists(downloadFolder)) Directory.CreateDirectory(downloadFolder);
String downloadedFile = Path.Combine(downloadFolder, Path.GetFileName(fileUrl));
isxdl_SetOption("title", "Downloading Updates");
isxdl_SetOption("label", "Downloading Updates...");
Int32 result = isxdl_Download(IntPtr.Zero, fileUrl, downloadedFile);
if (result == 1)
// file downloaded
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.