Author: hbelusca Date: Fri Feb 6 00:07:23 2015 New Revision: 66178
URL: http://svn.reactos.org/svn/reactos?rev=66178&view=rev Log: [SHELL32] - 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.
Modified: trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp trunk/reactos/dll/win32/shell32/dialogs/drvdefext.cpp trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefaultC... ============================================================================== --- trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDefaultContextMenu.cpp [iso-8859-1] Fri Feb 6 00:07:23 2015 @@ -450,12 +450,12 @@ 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); }
Modified: trunk/reactos/dll/win32/shell32/dialogs/drvdefext.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/dialogs/d... ============================================================================== --- trunk/reactos/dll/win32/shell32/dialogs/drvdefext.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/dialogs/drvdefext.cpp [iso-8859-1] Fri Feb 6 00:07:23 2015 @@ -366,12 +366,12 @@ 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];
@@ -460,7 +460,7 @@ 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)
Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/C... ============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] Fri Feb 6 00:07:23 2015 @@ -1810,12 +1810,12 @@ 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); }
Modified: trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/C... ============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] Fri Feb 6 00:07:23 2015 @@ -1639,7 +1639,7 @@ 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);