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

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 15 14:02:10 CDT 2007


Module: wine
Branch: master
Commit: 536b49905b935e2afa015df7333bb1ae8091ef87
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=536b49905b935e2afa015df7333bb1ae8091ef87

Author: Misha Koshelev <mk144210 at bcm.edu>
Date:   Mon May 14 12:15:46 2007 -0500

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

---

 dlls/msi/registry.c         |    3 ++-
 dlls/msi/tests/automation.c |    6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 088f46a..3781088 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -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);
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 267d756..98014fd 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -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);
     }




More information about the wine-cvs mailing list