mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 23:14:06 +00:00
regedit: Directly use RegQueryValueExW() instead of a helper function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
101fe51b25
commit
97a3802093
|
@ -178,11 +178,6 @@ static INT_PTR CALLBACK bin_modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPara
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL value_exists(HWND hwnd, HKEY hKey, const WCHAR *value_name)
|
||||
{
|
||||
return !RegQueryValueExW(hKey, value_name, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static LPWSTR read_value(HWND hwnd, HKEY hKey, LPCWSTR valueName, DWORD *lpType, LONG *len)
|
||||
{
|
||||
DWORD valueDataLen;
|
||||
|
@ -523,7 +518,7 @@ BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR oldName, LPC
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (value_exists(hwnd, hKey, newName)) {
|
||||
if (!RegQueryValueExW(hKey, newName, NULL, NULL, NULL, NULL)) {
|
||||
error_code_messagebox(hwnd, IDS_VALUE_EXISTS, oldName);
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue