msdmo: Fix to DMOEnum to properly enumerate the keys and properly respect the flag.

This commit is contained in:
Aric Stewart 2007-10-26 10:21:21 -05:00 committed by Alexandre Julliard
parent 3fb513deb4
commit 20ae8d2804
1 changed files with 7 additions and 3 deletions

View File

@ -509,19 +509,23 @@ static HRESULT WINAPI IEnumDMO_fnNext(
{
This->index++;
len = MAX_PATH;
hres = RegEnumKeyExW(This->hkey, This->index, szNextKey, &len, NULL, NULL, NULL, &ft);
if (hres != ERROR_SUCCESS)
break;
TRACE("found %s\n", debugstr_w(szNextKey));
if (This->dwFlags & DMO_REGISTERF_IS_KEYED)
if (!(This->dwFlags & DMO_ENUMF_INCLUDE_KEYED))
{
wsprintfW(szKey, szCat3Fmt, szDMORootKey, szNextKey, szDMOKeyed);
hres = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &hkey);
if (ERROR_SUCCESS != hres)
if (ERROR_SUCCESS == hres)
{
RegCloseKey(hkey);
/* Skip Keyed entries */
continue;
RegCloseKey(hkey);
}
}
wsprintfW(szKey, szCat2Fmt, szDMORootKey, szNextKey);