diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx index 4cc8ebdc6024..4b430336d7e5 100644 --- a/embedserv/source/inprocserv/dllentry.cxx +++ b/embedserv/source/inprocserv/dllentry.cxx @@ -71,7 +71,7 @@ namespace { pos += suffix.copy(pos, suffix.size()); assert(pos == end - 1); *pos = 0; - if (ERROR_SUCCESS == RegSetValueExW(HKEY_LOCAL_MACHINE, pSubKey, 0, REG_SZ, reinterpret_cast(pLibrary), nLen*sizeof(wchar_t))) + if (ERROR_SUCCESS == RegSetKeyValueW(HKEY_LOCAL_MACHINE, pSubKey, nullptr, REG_SZ, pLibrary, nLen*sizeof(wchar_t))) bLocalSuccess = true; } diff --git a/shell/source/win32/shlxthandler/util/registry.cxx b/shell/source/win32/shlxthandler/util/registry.cxx index 5e4f73797606..209eb399c923 100644 --- a/shell/source/win32/shlxthandler/util/registry.cxx +++ b/shell/source/win32/shlxthandler/util/registry.cxx @@ -30,7 +30,7 @@ bool SetRegistryKey(HKEY RootKey, const Filepath_char_t* KeyName, const Filepath_char_t* ValueName, const Filepath_char_t* Value) { - int rc = RegSetKeyValueW(RootKey, KeyName, ValueName, REG_SZ, reinterpret_cast(Value), + int rc = RegSetKeyValueW(RootKey, KeyName, ValueName, REG_SZ, Value, (wcslen(Value) + 1) * sizeof(*Value)); return (ERROR_SUCCESS == rc); } @@ -59,7 +59,7 @@ bool QueryRegistryKey(HKEY RootKey, const Filepath_char_t* KeyName, const Filepa { DWORD dwBytes = dwBufLen * sizeof(*pszData); LSTATUS rc = RegGetValueW(RootKey, KeyName, ValueName, RRF_RT_REG_SZ, nullptr, - reinterpret_cast(pszData), &dwBytes); + pszData, &dwBytes); return (ERROR_SUCCESS == rc); } diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index ebcb85f55cff..1661d3408fa8 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2656,7 +2656,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) wchar_t aValueBuf[10]; DWORD nValueSize = sizeof( aValueBuf ); if (RegGetValueW(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"MenuShowDelay", - RRF_RT_REG_SZ, nullptr, reinterpret_cast(aValueBuf), &nValueSize) + RRF_RT_REG_SZ, nullptr, aValueBuf, &nValueSize) == ERROR_SUCCESS) { aMouseSettings.SetMenuDelay( static_cast(ImplW2I( aValueBuf )) ); @@ -2947,7 +2947,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) DWORD nValueSize = sizeof( aValueBuf ); if (RegGetValueW(HKEY_CURRENT_USER, L"Control Panel\\International\\Calendars\\TwoDigitYearMax", L"1", - RRF_RT_REG_SZ, nullptr, reinterpret_cast(aValueBuf), &nValueSize) + RRF_RT_REG_SZ, nullptr, aValueBuf, &nValueSize) == ERROR_SUCCESS) { DWORD nValue = static_cast(ImplW2I(aValueBuf));