diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 1be45b90cfa..73145e1d65d 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -1614,6 +1614,156 @@ static void test_Installer_RegistryValue(void) delete_key(hkey); } +static void test_Installer_Products(BOOL bProductInstalled) +{ + WCHAR szString[MAX_PATH]; + HRESULT hr; + int idx; + IUnknown *pUnk = NULL; + IEnumVARIANT *pEnum = NULL; + VARIANT var; + ULONG celt; + int iCount, iValue; + IDispatch *pStringList = NULL; + BOOL bProductFound = FALSE; + + /* Installer::Products */ + hr = Installer_Products(&pStringList); + ok(hr == S_OK, "Installer_Products failed, hresult 0x%08x\n", hr); + if (hr == S_OK) + { + /* StringList::_NewEnum */ + hr = StringList__NewEnum(pStringList, &pUnk); + ok(hr == S_OK, "StringList_NewEnum failed, hresult 0x%08x\n", hr); + if (hr == S_OK) + { + hr = IUnknown_QueryInterface(pUnk, &IID_IEnumVARIANT, (void **)&pEnum); + ok (hr == S_OK, "IUnknown::QueryInterface returned 0x%08x\n", hr); + } + if (!pEnum) + skip("IEnumVARIANT tests\n"); + + /* StringList::Count */ + hr = StringList_Count(pStringList, &iCount); + ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr); + + for (idx=0; idx