Compare result of RegQueryValueExW() with ERROR_SUCCESS.

This commit is contained in:
Frank Richter 2005-08-15 10:23:48 +00:00 committed by Alexandre Julliard
parent 8fb663541a
commit fcb8a2f859
1 changed files with 4 additions and 4 deletions

View File

@ -291,8 +291,8 @@ static void UXTHEME_RestoreSystemMetrics(void)
char colorStr[13];
DWORD count = sizeof(colorStr);
if (SUCCEEDED(RegQueryValueExA (colorKey, SysColorsNames[i], 0,
&type, colorStr, &count)))
if (RegQueryValueExA (colorKey, SysColorsNames[i], 0,
&type, colorStr, &count) == ERROR_SUCCESS)
{
int r, g, b;
if (sscanf (colorStr, "%d %d %d", &r, &g, &b) == 3)
@ -315,8 +315,8 @@ static void UXTHEME_RestoreSystemMetrics(void)
DWORD count = sizeof(value);
DWORD type;
if (SUCCEEDED(RegQueryValueExW (hKey, bsp->keyName, 0,
&type, (LPBYTE)&value, &count)))
if (RegQueryValueExW (hKey, bsp->keyName, 0,
&type, (LPBYTE)&value, &count) == ERROR_SUCCESS)
{
SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value,
SPIF_UPDATEINIFILE);