msi: Implement Installer::SummaryInformation.
This commit is contained in:
parent
ddaba7a369
commit
d3ce29449b
|
@ -1832,13 +1832,41 @@ static HRESULT InstallerImpl_SummaryInformation(WORD wFlags,
|
||||||
EXCEPINFO* pExcepInfo,
|
EXCEPINFO* pExcepInfo,
|
||||||
UINT* puArgErr)
|
UINT* puArgErr)
|
||||||
{
|
{
|
||||||
if (!(wFlags & DISPATCH_METHOD))
|
UINT ret;
|
||||||
|
HRESULT hr;
|
||||||
|
MSIHANDLE hsuminfo;
|
||||||
|
IDispatch *dispatch;
|
||||||
|
VARIANTARG varg0, varg1;
|
||||||
|
|
||||||
|
if (!(wFlags & DISPATCH_PROPERTYGET))
|
||||||
return DISP_E_MEMBERNOTFOUND;
|
return DISP_E_MEMBERNOTFOUND;
|
||||||
|
|
||||||
FIXME("\n");
|
VariantInit(&varg0);
|
||||||
|
hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
VariantInit(pVarResult);
|
VariantInit(&varg1);
|
||||||
return S_OK;
|
hr = DispGetParam(pDispParams, 1, VT_I4, &varg1, puArgErr);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
V_VT(pVarResult) = VT_DISPATCH;
|
||||||
|
|
||||||
|
ret = MsiGetSummaryInformationW(0, V_BSTR(&varg0), V_I4(&varg1), &hsuminfo);
|
||||||
|
if (ret != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
hr = DISP_E_EXCEPTION;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = create_summaryinfo(hsuminfo, &dispatch);
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
V_DISPATCH(pVarResult) = dispatch;
|
||||||
|
|
||||||
|
done:
|
||||||
|
VariantClear(&varg0);
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT InstallerImpl_UILevel(WORD wFlags,
|
static HRESULT InstallerImpl_UILevel(WORD wFlags,
|
||||||
|
|
|
@ -1128,6 +1128,25 @@ static HRESULT Installer_UILevelPut(int level)
|
||||||
return invoke(pInstaller, "UILevel", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY);
|
return invoke(pInstaller, "UILevel", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT Installer_SummaryInformation(BSTR PackagePath, int UpdateCount, IDispatch **pSumInfo)
|
||||||
|
{
|
||||||
|
VARIANT varresult;
|
||||||
|
VARIANTARG vararg[2];
|
||||||
|
DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0};
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
VariantInit(&vararg[1]);
|
||||||
|
V_VT(&vararg[1]) = VT_BSTR;
|
||||||
|
V_BSTR(&vararg[1]) = SysAllocString(PackagePath);
|
||||||
|
VariantInit(&vararg[0]);
|
||||||
|
V_VT(&vararg[0]) = VT_I4;
|
||||||
|
V_I4(&vararg[0]) = UpdateCount;
|
||||||
|
|
||||||
|
hr = invoke(pInstaller, "SummaryInformation", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH);
|
||||||
|
*pSumInfo = V_DISPATCH(&varresult);
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
|
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
|
||||||
{
|
{
|
||||||
VARIANT varresult;
|
VARIANT varresult;
|
||||||
|
@ -2602,7 +2621,7 @@ static void test_Installer(void)
|
||||||
static const WCHAR szIntegerDataException[] = { 'I','n','t','e','g','e','r','D','a','t','a',',','F','i','e','l','d',0 };
|
static const WCHAR szIntegerDataException[] = { 'I','n','t','e','g','e','r','D','a','t','a',',','F','i','e','l','d',0 };
|
||||||
WCHAR szPath[MAX_PATH];
|
WCHAR szPath[MAX_PATH];
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL;
|
IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL, *pSumInfo = NULL;
|
||||||
int iValue, iCount;
|
int iValue, iCount;
|
||||||
|
|
||||||
if (!pInstaller) return;
|
if (!pInstaller) return;
|
||||||
|
@ -2678,6 +2697,18 @@ static void test_Installer(void)
|
||||||
IDispatch_Release(pDatabase);
|
IDispatch_Release(pDatabase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Installer::SummaryInformation */
|
||||||
|
hr = Installer_SummaryInformation(szPath, 0, &pSumInfo);
|
||||||
|
ok(hr == S_OK, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr);
|
||||||
|
if (hr == S_OK)
|
||||||
|
{
|
||||||
|
test_SummaryInfo(pSumInfo, summary_info, sizeof(summary_info)/sizeof(msi_summary_info), TRUE);
|
||||||
|
IDispatch_Release(pSumInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = Installer_SummaryInformation(NULL, 0, &pSumInfo);
|
||||||
|
ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult 0x%08x\n", hr);
|
||||||
|
|
||||||
/* Installer::RegistryValue */
|
/* Installer::RegistryValue */
|
||||||
test_Installer_RegistryValue();
|
test_Installer_RegistryValue();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue