mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[REACTOS] RegQueryValueExW() wants bytes, not chars (#2876)
Cherry-pick:a359e02666
0662da18b8
e4e5eda3d9
CORE-9665 Co-authored-by: Victor Martinez <vicmarcal@gmail.com>
This commit is contained in:
parent
1c504f4c57
commit
703c56beb3
4 changed files with 4 additions and 4 deletions
|
@ -907,7 +907,7 @@ HRESULT WINAPI UserInstStubWrapperW(HWND hWnd, HINSTANCE hInstance,
|
|||
{
|
||||
HKEY setup, guid;
|
||||
WCHAR stub[MAX_PATH];
|
||||
DWORD size = MAX_PATH;
|
||||
DWORD size = sizeof(stub);
|
||||
HRESULT hr = S_OK;
|
||||
BOOL res;
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ static BOOL get_install_root(LPWSTR install_dir)
|
|||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key))
|
||||
return FALSE;
|
||||
|
||||
len = MAX_PATH;
|
||||
len = MAX_PATH * sizeof(WCHAR);
|
||||
if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len))
|
||||
{
|
||||
RegCloseKey(key);
|
||||
|
|
|
@ -53,7 +53,7 @@ static BOOL get_install_root(LPWSTR install_dir)
|
|||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key))
|
||||
return FALSE;
|
||||
|
||||
len = MAX_PATH;
|
||||
len = MAX_PATH * sizeof(WCHAR);
|
||||
if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len))
|
||||
{
|
||||
RegCloseKey(key);
|
||||
|
|
|
@ -4126,7 +4126,7 @@ BOOL WINAPI IsOS(DWORD feature)
|
|||
*/
|
||||
HRESULT WINAPI SHLoadRegUIStringW(HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
|
||||
{
|
||||
DWORD type, sz = size;
|
||||
DWORD type, sz = size * sizeof(WCHAR);
|
||||
|
||||
if(RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)buf, &sz) != ERROR_SUCCESS)
|
||||
return E_FAIL;
|
||||
|
|
Loading…
Reference in a new issue