Nikolay Sivov : avifil32: Registry access calls don't return HRESULT codes.

Alexandre Julliard julliard at winehq.org
Mon Mar 15 12:19:37 CDT 2010


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Mar 12 02:22:13 2010 +0300

avifil32: Registry access calls don't return HRESULT codes.

---

 dlls/avifil32/api.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c
index dd1c2e2..ac3c35e 100644
--- a/dlls/avifil32/api.c
+++ b/dlls/avifil32/api.c
@@ -1030,14 +1030,14 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving)
    * First filter is named "All multimedia files" and its filter is a
    * collection of all possible extensions except "*.*".
    */
-  if (RegOpenKeyW(HKEY_CLASSES_ROOT, szAVIFileExtensions, &hKey) != S_OK) {
+  if (RegOpenKeyW(HKEY_CLASSES_ROOT, szAVIFileExtensions, &hKey) != ERROR_SUCCESS) {
     HeapFree(GetProcessHeap(), 0, lp);
     return AVIERR_ERROR;
   }
-  for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == S_OK;n++) {
+  for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == ERROR_SUCCESS;n++) {
     /* get CLSID to extension */
     size = sizeof(szValue);
-    if (RegQueryValueW(hKey, szFileExt, szValue, &size) != S_OK)
+    if (RegQueryValueW(hKey, szFileExt, szValue, &size) != ERROR_SUCCESS)
       break;
 
     /* search if the CLSID is already known */
@@ -1078,7 +1078,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving)
   RegCloseKey(hKey);
 
   /* 2. get descriptions for the CLSIDs and fill out szFilter */
-  if (RegOpenKeyW(HKEY_CLASSES_ROOT, szClsid, &hKey) != S_OK) {
+  if (RegOpenKeyW(HKEY_CLASSES_ROOT, szClsid, &hKey) != ERROR_SUCCESS) {
     HeapFree(GetProcessHeap(), 0, lp);
     return AVIERR_ERROR;
   }
@@ -1086,7 +1086,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving)
     /* first the description */
     if (n != 0) {
       size = sizeof(szValue);
-      if (RegQueryValueW(hKey, lp[n].szClsid, szValue, &size) == S_OK) {
+      if (RegQueryValueW(hKey, lp[n].szClsid, szValue, &size) == ERROR_SUCCESS) {
 	size = lstrlenW(szValue);
 	lstrcpynW(szFilter, szValue, cbFilter);
       }




More information about the wine-cvs mailing list