Commit b7233ba3 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

msi: automation: Implement SummaryInfo::PropertyCount.

parent 61f4fff4
......@@ -858,6 +858,20 @@ static HRESULT WINAPI SummaryInfoImpl_Invoke(
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_SUMMARYINFO_PROPERTYCOUNT:
if (wFlags & DISPATCH_PROPERTYGET) {
UINT count;
if ((ret = MsiSummaryInfoGetPropertyCount(This->msiHandle, &count)) != ERROR_SUCCESS)
ERR("MsiSummaryInfoGetPropertyCount returned %d\n", ret);
else
{
V_VT(pVarResult) = VT_I4;
V_I4(pVarResult) = count;
}
}
else return DISP_E_MEMBERNOTFOUND;
break;
default:
return DISP_E_MEMBERNOTFOUND;
}
......
......@@ -161,6 +161,8 @@ library WindowsInstaller
void Property(
[in] long Pid,
[in] VARIANT rhs);
[id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
long PropertyCount();
}
typedef enum {
......
......@@ -54,3 +54,4 @@
#define DISPID_SESSION_SETINSTALLLEVEL 19
#define DISPID_SUMMARYINFO_PROPERTY 1
#define DISPID_SUMMARYINFO_PROPERTYCOUNT 2
......@@ -1322,12 +1322,9 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
int j;
/* SummaryInfo::PropertyCount */
todo_wine
{
hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j);
ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr);
ok(j == num_info, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
}
/* SummaryInfo::Property, get for properties we have set */
for (j = 0; j < num_info; j++)
......@@ -1451,13 +1448,10 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
VariantClear(&var);
/* SummaryInfo::PropertyCount */
todo_wine
{
hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j);
ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr);
ok(j == num_info+4, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
}
}
}
static void test_Database(IDispatch *pDatabase, BOOL readonly)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment