msi: automation: Implement SummaryInfo::PropertyCount.

This commit is contained in:
Misha Koshelev 2007-06-04 09:26:51 -05:00 committed by Alexandre Julliard
parent 61f4fff42b
commit b7233ba33f
4 changed files with 23 additions and 12 deletions

View File

@ -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;
}

View File

@ -161,6 +161,8 @@ library WindowsInstaller
void Property(
[in] long Pid,
[in] VARIANT rhs);
[id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
long PropertyCount();
}
typedef enum {

View File

@ -54,3 +54,4 @@
#define DISPID_SESSION_SETINSTALLLEVEL 19
#define DISPID_SUMMARYINFO_PROPERTY 1
#define DISPID_SUMMARYINFO_PROPERTYCOUNT 2

View File

@ -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);
}
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,12 +1448,9 @@ 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);
}
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);
}
}