Commit 20ae8d28 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

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

parent 3fb513de
......@@ -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);
......
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