msi: Return ERROR_INVALID_PARAMETER if the product list is empty and index is not zero.
This commit is contained in:
parent
88d51ad122
commit
4295ce4fb6
|
@ -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(!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(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
|
||||
|
||||
res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10);
|
||||
|
|
Loading…
Reference in New Issue