Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b24ee836
Commit
b24ee836
authored
May 21, 2018
by
Hugh McMaster
Committed by
Alexandre Julliard
May 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Simplify the detection of existing registry values.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a20f99b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
edit.c
programs/regedit/edit.c
+4
-7
No files found.
programs/regedit/edit.c
View file @
b24ee836
...
...
@@ -184,12 +184,9 @@ static INT_PTR CALLBACK bin_modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPara
return
FALSE
;
}
static
BOOL
check_value
(
HWND
hwnd
,
HKEY
hKey
,
LPCWSTR
valueN
ame
)
static
BOOL
value_exists
(
HWND
hwnd
,
HKEY
hKey
,
const
WCHAR
*
value_n
ame
)
{
WCHAR
empty
=
0
;
LONG
lRet
=
RegQueryValueExW
(
hKey
,
valueName
?
valueName
:
&
empty
,
0
,
NULL
,
0
,
NULL
);
if
(
lRet
!=
ERROR_SUCCESS
)
return
FALSE
;
return
TRUE
;
return
!
RegQueryValueExW
(
hKey
,
value_name
,
NULL
,
NULL
,
NULL
,
NULL
);
}
static
LPWSTR
read_value
(
HWND
hwnd
,
HKEY
hKey
,
LPCWSTR
valueName
,
DWORD
*
lpType
,
LONG
*
len
)
...
...
@@ -508,8 +505,8 @@ BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR oldName, LPC
error_code_messagebox
(
hwnd
,
IDS_RENAME_VALUE_FAILED
);
return
FALSE
;
}
/* check if the value already exists */
if
(
check_value
(
hwnd
,
hKey
,
newName
))
{
if
(
value_exists
(
hwnd
,
hKey
,
newName
))
{
error_code_messagebox
(
hwnd
,
IDS_VALUE_EXISTS
,
oldName
);
goto
done
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment