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
a9b76d00
Commit
a9b76d00
authored
Apr 21, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Output the value type when querying a registry key.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2bd12424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
reg.c
programs/reg/reg.c
+15
-2
No files found.
programs/reg/reg.c
View file @
a9b76d00
...
...
@@ -537,12 +537,24 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
return
0
;
}
static
const
WCHAR
*
reg_type_to_wchar
(
DWORD
type
)
{
int
i
,
array_size
=
ARRAY_SIZE
(
type_rels
);
for
(
i
=
0
;
i
<
array_size
;
i
++
)
{
if
(
type
==
type_rels
[
i
].
type
)
return
type_rels
[
i
].
name
;
}
return
NULL
;
}
static
int
query_all
(
HKEY
key
,
WCHAR
*
path
)
{
LONG
rc
;
DWORD
num_subkeys
,
max_subkey_len
,
subkey_len
;
DWORD
num_values
,
max_value_len
,
value_len
;
DWORD
i
;
DWORD
i
,
type
;
WCHAR
fmt
[]
=
{
'%'
,
'1'
,
'\n'
,
0
};
WCHAR
fmt_value
[]
=
{
' '
,
' '
,
' '
,
' '
,
'%'
,
'1'
,
0
};
WCHAR
fmt_path
[]
=
{
'%'
,
'1'
,
'\\'
,
'%'
,
'2'
,
'\n'
,
0
};
...
...
@@ -570,10 +582,11 @@ static int query_all(HKEY key, WCHAR *path)
for
(
i
=
0
;
i
<
num_values
;
i
++
)
{
value_len
=
max_value_len
;
rc
=
RegEnumValueW
(
key
,
i
,
value_name
,
&
value_len
,
NULL
,
NULL
,
NULL
,
NULL
);
rc
=
RegEnumValueW
(
key
,
i
,
value_name
,
&
value_len
,
NULL
,
&
type
,
NULL
,
NULL
);
if
(
rc
==
ERROR_SUCCESS
)
{
output_string
(
fmt_value
,
value_name
);
output_string
(
fmt_value
,
reg_type_to_wchar
(
type
));
output_string
(
newlineW
);
}
}
...
...
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