Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d433d1f1
Commit
d433d1f1
authored
May 03, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
May 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Fail if access is denied when adding registry data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a0dc4d7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
add.c
programs/reg/add.c
+10
-2
No files found.
programs/reg/add.c
View file @
d433d1f1
...
...
@@ -156,6 +156,7 @@ static int run_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty,
HKEY
hkey
;
DWORD
data_type
,
data_size
;
BYTE
*
reg_data
=
NULL
;
LONG
rc
;
if
(
RegCreateKeyExW
(
root
,
path
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
hkey
,
NULL
))
...
...
@@ -199,10 +200,17 @@ static int run_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty,
return
1
;
}
RegSetValueExW
(
hkey
,
value_name
,
0
,
data_type
,
reg_data
,
data_size
);
free
(
reg_data
);
rc
=
RegSetValueExW
(
hkey
,
value_name
,
0
,
data_type
,
reg_data
,
data_size
);
free
(
reg_data
);
RegCloseKey
(
hkey
);
if
(
rc
)
{
output_message
(
STRING_ACCESS_DENIED
);
return
1
;
}
output_message
(
STRING_SUCCESS
);
return
0
;
...
...
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