shell32: SHCreatePropSheetExtArrayEx should check if the key itself contains the clsid of the shell extension.
This commit is contained in:
parent
990a319750
commit
50c7cf5111
|
@ -1807,12 +1807,19 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The CLSID is stored either in the key itself or in its default value. */
|
||||||
|
if (!SUCCEEDED(lRet = SHCLSIDFromStringW(szHandler, &clsid)))
|
||||||
|
{
|
||||||
dwClsidSize = sizeof(szClsidHandler);
|
dwClsidSize = sizeof(szClsidHandler);
|
||||||
if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS)
|
if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Force a NULL-termination and convert the string */
|
/* Force a NULL-termination and convert the string */
|
||||||
szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0;
|
szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0;
|
||||||
if (SUCCEEDED(SHCLSIDFromStringW(szClsidHandler, &clsid)))
|
lRet = SHCLSIDFromStringW(szClsidHandler, &clsid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SUCCEEDED(lRet))
|
||||||
{
|
{
|
||||||
/* Attempt to get an IShellPropSheetExt and an IShellExtInit instance.
|
/* Attempt to get an IShellPropSheetExt and an IShellExtInit instance.
|
||||||
Only if both interfaces are supported it's a real shell extension.
|
Only if both interfaces are supported it's a real shell extension.
|
||||||
|
@ -1836,7 +1843,6 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_
|
||||||
pspsx->lpVtbl->Release(pspsx);
|
pspsx->lpVtbl->Release(pspsx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} while (psxa->uiCount != psxa->uiAllocated);
|
} while (psxa->uiCount != psxa->uiAllocated);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue