msi: automation: Display an error on create_session failure.

This commit is contained in:
Misha Koshelev 2007-05-08 07:40:06 -05:00 committed by Alexandre Julliard
parent 3909a499e0
commit d5c6c64bfc
1 changed files with 3 additions and 1 deletions

View File

@ -1026,11 +1026,13 @@ static HRESULT WINAPI InstallerImpl_Invoke(
V_VT(pVarResult) = VT_DISPATCH; V_VT(pVarResult) = VT_DISPATCH;
if ((ret = MsiOpenPackageExW(V_BSTR(&varg0), V_I4(&varg1), &msiHandle)) == ERROR_SUCCESS) if ((ret = MsiOpenPackageExW(V_BSTR(&varg0), V_I4(&varg1), &msiHandle)) == ERROR_SUCCESS)
{ {
if (SUCCEEDED(create_session(msiHandle, (IDispatch *)This, &pDispatch))) if (SUCCEEDED(hr = create_session(msiHandle, (IDispatch *)This, &pDispatch)))
{ {
IDispatch_AddRef(pDispatch); IDispatch_AddRef(pDispatch);
V_DISPATCH(pVarResult) = pDispatch; V_DISPATCH(pVarResult) = pDispatch;
} }
else
ERR("Failed to create Session object, hresult 0x%08x\n", hr);
} }
else else
{ {