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
03afd26e
Commit
03afd26e
authored
Feb 15, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Feb 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Handle data for REG_EXPAND_SZ.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f1d45b5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
reg.c
programs/reg/reg.c
+1
-0
reg.c
programs/reg/tests/reg.c
+4
-4
No files found.
programs/reg/reg.c
View file @
03afd26e
...
...
@@ -230,6 +230,7 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r
{
case
REG_NONE
:
case
REG_SZ
:
case
REG_EXPAND_SZ
:
{
*
reg_count
=
(
lstrlenW
(
data
)
+
1
)
*
sizeof
(
WCHAR
);
out_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
reg_count
);
...
...
programs/reg/tests/reg.c
View file @
03afd26e
...
...
@@ -186,11 +186,11 @@ static void test_add(void)
/* REG_EXPAND_SZ */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v expand0 /t REG_EXpand_sz /d
\"
dead%PATH%beef
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"expand0"
,
REG_EXPAND_SZ
,
"dead%PATH%beef"
,
15
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"expand0"
,
REG_EXPAND_SZ
,
"dead%PATH%beef"
,
15
,
0
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v expand1 /t REG_EXpand_sz /d
\"
dead^%PATH^%beef
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"expand1"
,
REG_EXPAND_SZ
,
"dead^%PATH^%beef"
,
17
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"expand1"
,
REG_EXPAND_SZ
,
"dead^%PATH^%beef"
,
17
,
0
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_EXPAND_SZ /v expand2 /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
...
...
@@ -198,11 +198,11 @@ static void test_add(void)
run_reg_exe
(
"reg add HKEY_CURRENT_USER
\\
"
KEY_BASE
" /ve /t REG_EXPAND_SZ /d WineTEST /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
""
,
REG_EXPAND_SZ
,
"WineTEST"
,
9
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
""
,
REG_EXPAND_SZ
,
"WineTEST"
,
9
,
0
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_EXPAND_SZ /v expand3 /f /d
\"\"
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"expand3"
,
REG_EXPAND_SZ
,
""
,
1
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"expand3"
,
REG_EXPAND_SZ
,
""
,
1
,
0
);
/* REG_BINARY */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin0 /f"
,
&
r
);
...
...
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