msi: Make MsiEnumRelatedProducts enumerate registry value names, not subkeys.

This commit is contained in:
Misha Koshelev 2007-05-14 12:15:46 -05:00 committed by Alexandre Julliard
parent a6dfcf90f7
commit 536b49905b
2 changed files with 5 additions and 4 deletions

View File

@ -993,6 +993,7 @@ UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved,
{
UINT r;
HKEY hkey;
DWORD dwSize = SQUISH_GUID_SIZE;
WCHAR szKeyName[SQUISH_GUID_SIZE];
TRACE("%s %u %u %p\n", debugstr_w(szUpgradeCode), dwReserved,
@ -1007,7 +1008,7 @@ UINT WINAPI MsiEnumRelatedProductsW(LPCWSTR szUpgradeCode, DWORD dwReserved,
if (r != ERROR_SUCCESS)
return ERROR_NO_MORE_ITEMS;
r = RegEnumKeyW(hkey, iProductIndex, szKeyName, SQUISH_GUID_SIZE);
r = RegEnumValueW(hkey, iProductIndex, szKeyName, &dwSize, NULL, NULL, NULL, NULL);
if( r == ERROR_SUCCESS )
unsquash_guid(szKeyName, lpProductBuf);
RegCloseKey(hkey);

View File

@ -1676,13 +1676,13 @@ static void test_Installer_InstallProduct(LPCWSTR szPath)
/* StringList::Count */
hr = StringList_Count(pStringList, &iCount);
ok(SUCCEEDED(hr), "StringList_Count failed, hresult 0x%08x\n", hr);
todo_wine ok(iCount == 1, "Expected one related product but found %d\n", iCount);
ok(iCount == 1, "Expected one related product but found %d\n", iCount);
/* StringList::Item */
memset(szString, 0, sizeof(szString));
hr = StringList_Item(pStringList, 0, szString);
todo_wine ok(SUCCEEDED(hr), "StringList_Item failed (idx 0, count %d), hresult 0x%08x\n", iCount, hr);
todo_wine ok_w2("StringList_Item returned %s but expected %s\n", szString, szProductCode);
ok(SUCCEEDED(hr), "StringList_Item failed (idx 0, count %d), hresult 0x%08x\n", iCount, hr);
ok_w2("StringList_Item returned %s but expected %s\n", szString, szProductCode);
IDispatch_Release(pStringList);
}