Hans Leidekker : appwiz.cpl: Fix two RegQueryValueExW calls.

Alexandre Julliard julliard at winehq.org
Mon Jan 10 10:55:18 CST 2011


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Jan 10 09:43:19 2011 +0100

appwiz.cpl: Fix two RegQueryValueExW calls.

---

 dlls/appwiz.cpl/appwiz.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index 2a6b26a..45fc467 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -181,7 +181,8 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
         uninstlen = 0;
         if (!RegQueryValueExW(hkeyApp, DisplayNameW, 0, 0, NULL, &displen))
         {
-            if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, NULL, &value)
+            DWORD size = sizeof(value);
+            if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, (LPBYTE)&value, &size)
                 && dwType == REG_DWORD && value == 1)
             {
                 static const WCHAR fmtW[] = {'m','s','i','e','x','e','c',' ','/','x','%','s',0};
@@ -282,7 +283,8 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
             /* Fetch the modify path */
             if (!dwNoModify)
             {
-                if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, NULL, &value)
+                size = sizeof(value);
+                if (!RegQueryValueExW(hkeyApp, WindowsInstallerW, NULL, &dwType, (LPBYTE)&value, &size)
                     && dwType == REG_DWORD && value == 1)
                 {
                     static const WCHAR fmtW[] = {'m','s','i','e','x','e','c',' ','/','i','%','s',0};




More information about the wine-cvs mailing list