[SHELL32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 6 Feb 2015 00:07:23 +0000 (00:07 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 6 Feb 2015 00:07:23 +0000 (00:07 +0000)
- Fix registry value retrieval with RegGetValue (RRF_RT_REG_EXPAND_SZ has a non-obvious functioning: it should be used with NO_EXPAND flag. Otherwise use RRF_RT_REG_SZ to retrieve REG_SZ values, or REG_EXPAND_SZ values with automatic expansion as expected). CORE-9001 #resolve #comment Fixed, thanks for reporting!
- Fix whitespace.

svn path=/trunk/; revision=66178

reactos/dll/win32/shell32/CDefaultContextMenu.cpp
reactos/dll/win32/shell32/dialogs/drvdefext.cpp
reactos/dll/win32/shell32/folders/CFSFolder.cpp
reactos/dll/win32/shell32/folders/CRecycleBin.cpp

index 6966901..057f6b6 100644 (file)
@@ -450,12 +450,12 @@ CDefaultContextMenu::EnumerateDynamicContextHandlerForKey(HKEY hRootKey)
             if (m_bGroupPolicyActive)
             {
                 if (RegGetValueW(HKEY_LOCAL_MACHINE,
             if (m_bGroupPolicyActive)
             {
                 if (RegGetValueW(HKEY_LOCAL_MACHINE,
-                                L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved",
-                                pwszClsid,
-                                RRF_RT_REG_SZ,
-                                NULL,
-                                NULL,
-                                NULL) == ERROR_SUCCESS)
+                                 L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved",
+                                 pwszClsid,
+                                 RRF_RT_REG_SZ,
+                                 NULL,
+                                 NULL,
+                                 NULL) == ERROR_SUCCESS)
                 {
                     LoadDynamicContextMenuHandler(hKey, &clsid);
                 }
                 {
                     LoadDynamicContextMenuHandler(hKey, &clsid);
                 }
index d24fcb8..954daf3 100644 (file)
@@ -366,12 +366,12 @@ CDrvDefExt::GeneralPageProc(
                 DWORD cbBuf = sizeof(wszBuf);
 
                 if (RegGetValueW(HKEY_LOCAL_MACHINE,
                 DWORD cbBuf = sizeof(wszBuf);
 
                 if (RegGetValueW(HKEY_LOCAL_MACHINE,
-                                     L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\CleanupPath",
-                                     NULL,
-                                     RRF_RT_REG_SZ,
-                                     NULL,
-                                     (PVOID)wszBuf,
-                                     &cbBuf) == ERROR_SUCCESS)
+                                 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\CleanupPath",
+                                 NULL,
+                                 RRF_RT_REG_SZ,
+                                 NULL,
+                                 (PVOID)wszBuf,
+                                 &cbBuf) == ERROR_SUCCESS)
                 {
                     WCHAR wszCmd[MAX_PATH];
 
                 {
                     WCHAR wszCmd[MAX_PATH];
 
@@ -460,7 +460,7 @@ CDrvDefExt::ExtraPageProc(
                     if (RegGetValueW(HKEY_LOCAL_MACHINE,
                                      L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\BackupPath",
                                      NULL,
                     if (RegGetValueW(HKEY_LOCAL_MACHINE,
                                      L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\BackupPath",
                                      NULL,
-                                     RRF_RT_REG_EXPAND_SZ,
+                                     RRF_RT_REG_SZ,
                                      NULL,
                                      (PVOID)wszBuf,
                                      &cbBuf) == ERROR_SUCCESS)
                                      NULL,
                                      (PVOID)wszBuf,
                                      &cbBuf) == ERROR_SUCCESS)
index 980636a..31e4eb5 100644 (file)
@@ -1810,12 +1810,12 @@ HRESULT WINAPI CFSFolder::_LoadDynamicDropTargetHandlerForKey(HKEY hRootKey, LPC
         if (m_bGroupPolicyActive)
         {
             if (RegGetValueW(HKEY_LOCAL_MACHINE,
         if (m_bGroupPolicyActive)
         {
             if (RegGetValueW(HKEY_LOCAL_MACHINE,
-                L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved",
-                pwszClsid,
-                RRF_RT_REG_SZ,
-                NULL,
-                NULL,
-                NULL) == ERROR_SUCCESS)
+                             L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved",
+                             pwszClsid,
+                             RRF_RT_REG_SZ,
+                             NULL,
+                             NULL,
+                             NULL) == ERROR_SUCCESS)
             {
                 hr = _LoadDynamicDropTargetHandler(&clsid, pwcsname, ppvOut);
             }
             {
                 hr = _LoadDynamicDropTargetHandler(&clsid, pwcsname, ppvOut);
             }
index 3e03b43..ea9b007 100644 (file)
@@ -1639,7 +1639,7 @@ HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags)
         ret = RegGetValueW(HKEY_CURRENT_USER,
                            L"AppEvents\\Schemes\\Apps\\Explorer\\EmptyRecycleBin\\.Current",
                            NULL,
         ret = RegGetValueW(HKEY_CURRENT_USER,
                            L"AppEvents\\Schemes\\Apps\\Explorer\\EmptyRecycleBin\\.Current",
                            NULL,
-                           RRF_RT_REG_EXPAND_SZ,
+                           RRF_RT_REG_SZ,
                            &dwType,
                            (PVOID)szPath,
                            &dwSize);
                            &dwType,
                            (PVOID)szPath,
                            &dwSize);