mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
* dlls/shell32/shellpath.c: Aric Stewart <aric@codeweavers.com>
Make sure that the size of the buffer passed to RegSetValueExW is in bytes not WCHARs. svn path=/trunk/; revision=10291
This commit is contained in:
parent
2fe9583bc7
commit
a646b85ed6
1 changed files with 9 additions and 6 deletions
|
@ -1101,6 +1101,7 @@ HRESULT WINAPI SHGetFolderPathW(
|
|||
|
||||
if (RegQueryValueExW(hKey,szValueName,NULL,&dwType,(LPBYTE)pszPath,&dwPathLen))
|
||||
{
|
||||
|
||||
/* value not existing */
|
||||
if (dwCsidlFlags & CSIDL_MYFLAG_RELATIVE)
|
||||
{
|
||||
|
@ -1114,7 +1115,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
|||
strcpyW(pszPath + 3, szDefaultPath);
|
||||
}
|
||||
dwType=REG_SZ;
|
||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,strlenW(pszPath)+1);
|
||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,
|
||||
(strlenW(pszPath)+1)*sizeof(WCHAR));
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
|
@ -1150,7 +1152,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
|||
strcpyW(pszPath + 3, szDefaultPath);
|
||||
}
|
||||
dwType=REG_SZ;
|
||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,strlenW(pszPath)+1);
|
||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,
|
||||
(strlenW(pszPath)+1)*sizeof(WCHAR));
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
@ -1322,14 +1325,14 @@ HRESULT WINAPI SHGetSpecialFolderLocation(
|
|||
*ppidl = _ILCreateControlPanel();
|
||||
break;
|
||||
|
||||
case CSIDL_FONTS:
|
||||
FIXME("virtual font folder");
|
||||
break;
|
||||
|
||||
case CSIDL_PRINTERS:
|
||||
*ppidl = _ILCreatePrinters();
|
||||
break;
|
||||
|
||||
case CSIDL_FONTS:
|
||||
FIXME("virtual font folder");
|
||||
break;
|
||||
|
||||
case CSIDL_BITBUCKET:
|
||||
*ppidl = _ILCreateBitBucket();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue