Commit ad6b7cd4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Clear last error on success in MsiQueryFeatureState and MsiQueryProductState.

parent d2055e6e
......@@ -1980,6 +1980,11 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
if (lstrlenW(szProduct) != GUID_SIZE - 1)
return INSTALLSTATE_INVALIDARG;
if (szProduct[0] != '{' || szProduct[37] != '}')
return INSTALLSTATE_UNKNOWN;
SetLastError( ERROR_SUCCESS );
if (MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED,
&prodkey, FALSE) != ERROR_SUCCESS &&
MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
......@@ -2629,6 +2634,8 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
if (!squash_guid( szProduct, squishProduct ))
return INSTALLSTATE_INVALIDARG;
SetLastError( ERROR_SUCCESS );
if (MSIREG_OpenFeaturesKey(szProduct, MSIINSTALLCONTEXT_USERMANAGED,
&hkey, FALSE) != ERROR_SUCCESS &&
MSIREG_OpenFeaturesKey(szProduct, MSIINSTALLCONTEXT_USERUNMANAGED,
......
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