msi: Return ERROR_UNKNOWN_COMPONENT if no products exist.
This commit is contained in:
parent
3edd258fcd
commit
88d51ad122
|
@ -1321,6 +1321,15 @@ UINT WINAPI MsiEnumClientsW(LPCWSTR szComponent, DWORD index, LPWSTR szProduct)
|
||||||
MSIREG_OpenLocalSystemComponentKey(szComponent, &hkeyComp, FALSE) != ERROR_SUCCESS)
|
MSIREG_OpenLocalSystemComponentKey(szComponent, &hkeyComp, FALSE) != ERROR_SUCCESS)
|
||||||
return ERROR_UNKNOWN_COMPONENT;
|
return ERROR_UNKNOWN_COMPONENT;
|
||||||
|
|
||||||
|
/* see if there are any products at all */
|
||||||
|
sz = SQUISH_GUID_SIZE;
|
||||||
|
r = RegEnumValueW(hkeyComp, 0, szValName, &sz, NULL, NULL, NULL, NULL);
|
||||||
|
if (r != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
RegCloseKey(hkeyComp);
|
||||||
|
return ERROR_UNKNOWN_COMPONENT;
|
||||||
|
}
|
||||||
|
|
||||||
sz = SQUISH_GUID_SIZE;
|
sz = SQUISH_GUID_SIZE;
|
||||||
r = RegEnumValueW(hkeyComp, index, szValName, &sz, NULL, NULL, NULL, NULL);
|
r = RegEnumValueW(hkeyComp, index, szValName, &sz, NULL, NULL, NULL, NULL);
|
||||||
if( r == ERROR_SUCCESS )
|
if( r == ERROR_SUCCESS )
|
||||||
|
|
|
@ -1643,10 +1643,7 @@ static void test_MsiEnumClients(void)
|
||||||
/* user unmanaged component key exists */
|
/* user unmanaged component key exists */
|
||||||
product[0] = '\0';
|
product[0] = '\0';
|
||||||
r = MsiEnumClientsA(component, 0, product);
|
r = MsiEnumClientsA(component, 0, product);
|
||||||
todo_wine
|
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
|
||||||
{
|
|
||||||
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
|
|
||||||
}
|
|
||||||
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
|
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
|
||||||
|
|
||||||
/* index > 0, no products exist */
|
/* index > 0, no products exist */
|
||||||
|
@ -1719,10 +1716,7 @@ static void test_MsiEnumClients(void)
|
||||||
/* user local component key exists */
|
/* user local component key exists */
|
||||||
product[0] = '\0';
|
product[0] = '\0';
|
||||||
r = MsiEnumClientsA(component, 0, product);
|
r = MsiEnumClientsA(component, 0, product);
|
||||||
todo_wine
|
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
|
||||||
{
|
|
||||||
ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
|
|
||||||
}
|
|
||||||
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
|
ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product);
|
||||||
|
|
||||||
/* index > 0, no products exist */
|
/* index > 0, no products exist */
|
||||||
|
|
Loading…
Reference in New Issue