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

Alexandre Julliard julliard at winehq.org
Mon Oct 29 08:34:46 CDT 2007


Module: wine
Branch: master
Commit: 20ae8d28043d7a5e627aa2ce234927c3c9293575
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=20ae8d28043d7a5e627aa2ce234927c3c9293575

Author: Aric Stewart <aric at codeweavers.com>
Date:   Fri Oct 26 10:21:21 2007 -0500

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

---

 dlls/msdmo/dmoreg.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c
index 25bb759..9560234 100644
--- a/dlls/msdmo/dmoreg.c
+++ b/dlls/msdmo/dmoreg.c
@@ -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);




More information about the wine-cvs mailing list