From: Esme Povirk esme@codeweavers.com
--- dlls/appwiz.cpl/addons.c | 10 ++++++++-- dlls/appwiz.cpl/appwiz.rc | 1 + dlls/appwiz.cpl/res.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index 4dc64606d3f..19e26ba9d83 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -459,6 +459,8 @@ static HRESULT WINAPI InstallCallback_OnProgress(IBindStatusCallback *iface, ULO static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) { + WCHAR message[256]; + if(dwl_binding) { IBinding_Release(dwl_binding); dwl_binding = NULL; @@ -467,6 +469,12 @@ static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, if(FAILED(hresult)) { if(hresult == E_ABORT) TRACE("Binding aborted\n"); + else if (hresult == INET_E_DOWNLOAD_FAILURE) + { + if(LoadStringW(hInst, IDS_DOWNLOAD_FAILED, message, ARRAY_SIZE(message))) + MessageBoxW(install_dialog, message, NULL, MB_ICONERROR); + EndDialog(install_dialog, IDCANCEL); + } else ERR("Binding failed %08lx\n", hresult); return S_OK; @@ -491,8 +499,6 @@ static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, free(cache_file_name); } }else { - WCHAR message[256]; - if(LoadStringW(hInst, IDS_INVALID_SHA, message, ARRAY_SIZE(message))) MessageBoxW(NULL, message, NULL, MB_ICONERROR); } diff --git a/dlls/appwiz.cpl/appwiz.rc b/dlls/appwiz.cpl/appwiz.rc index 1af1890dbf4..c68ae5af0cd 100644 --- a/dlls/appwiz.cpl/appwiz.rc +++ b/dlls/appwiz.cpl/appwiz.rc @@ -51,6 +51,7 @@ STRINGTABLE IDS_DOWNLOADING "Downloading..." IDS_INSTALLING "Installing..." IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation of corrupted file." + IDS_DOWNLOAD_FAILED "Download failed." }
IDD_MAIN DIALOG 0, 0, 320, 220 diff --git a/dlls/appwiz.cpl/res.h b/dlls/appwiz.cpl/res.h index b894689f51a..9f9f843df44 100644 --- a/dlls/appwiz.cpl/res.h +++ b/dlls/appwiz.cpl/res.h @@ -73,3 +73,4 @@ #define IDS_INSTALLING 15 #define IDS_INVALID_SHA 16 #define IDS_WAIT_COMPLETE 17 +#define IDS_DOWNLOAD_FAILED 18