Commit 4295ce4f authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Return ERROR_INVALID_PARAMETER if the product list is empty and index is not zero.

parent 88d51ad1
......@@ -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;
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment