James Hawkins : msi: Return ERROR_INVALID_PARAMETER if the product list is empty and index is not zero .
Alexandre Julliard
julliard at winehq.org
Mon Dec 17 06:41:54 CST 2007
Module: wine
Branch: master
Commit: 4295ce4fb63c833cd30b9f351897fd4302cf4c09
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4295ce4fb63c833cd30b9f351897fd4302cf4c09
Author: James Hawkins <truiken at gmail.com>
Date: Sun Dec 16 20:30:14 2007 -0600
msi: Return ERROR_INVALID_PARAMETER if the product list is empty and index is not zero.
---
dlls/msi/registry.c | 4 ++++
dlls/msi/tests/msi.c | 10 ++--------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index c80247a..12d2c9a 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -1327,6 +1327,10 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
if (r != ERROR_SUCCESS)
{
RegCloseKey(hkeyComp);
+
+ if (index != 0)
+ return ERROR_INVALID_PARAMETER;
+
return ERROR_UNKNOWN_COMPONENT;
}
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index c46d651..b31d88f 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -1649,10 +1649,7 @@ static void test_MsiEnumClients(void)
/* index > 0, no products exist */
product[0] = '\0';
r = MsiEnumClientsA(component, 1, product);
- todo_wine
- {
- ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- }
+ ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
@@ -1722,10 +1719,7 @@ static void test_MsiEnumClients(void)
/* index > 0, no products exist */
product[0] = '\0';
r = MsiEnumClientsA(component, 1, product);
- todo_wine
- {
- ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
- }
+ ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
More information about the wine-cvs
mailing list