Commit 72d6a984 authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

Write WCHAR strings to registry with correct size.

parent eea31097
......@@ -169,9 +169,12 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
tmp[1] = '\0';
RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (const BYTE*)tmp, sizeof(WCHAR)*2);
if(bThemeActive) {
RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)szCurrentColor, lstrlenW(szCurrentColor)+1);
RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)szCurrentSize, lstrlenW(szCurrentSize)+1);
RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)szCurrentTheme, lstrlenW(szCurrentTheme)+1);
RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)szCurrentColor,
(lstrlenW(szCurrentColor)+1)*sizeof(WCHAR));
RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)szCurrentSize,
(lstrlenW(szCurrentSize)+1)*sizeof(WCHAR));
RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)szCurrentTheme,
(lstrlenW(szCurrentTheme)+1)*sizeof(WCHAR));
}
else {
RegDeleteValueW(hKey, szColorName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment