advpack: Stop processing if there was an error registering an OCX.

This commit is contained in:
Rob Shearman 2007-04-01 13:45:00 +01:00 committed by Alexandre Julliard
parent 5275b1b85f
commit f170f5d8d3

View file

@ -160,13 +160,21 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
continue;
hm = LoadLibraryExW(buffer, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
if (!hm)
continue;
if (hm)
{
if (do_ocx_reg(hm, TRUE))
hr = E_FAIL;
if (do_ocx_reg(hm, TRUE))
FreeLibrary(hm);
}
else
hr = E_FAIL;
FreeLibrary(hm);
if (FAILED(hr))
{
/* FIXME: display a message box */
break;
}
}
return hr;