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
c7aa0875
Commit
c7aa0875
authored
May 27, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
May 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Remove duplicate code.
parent
efb92561
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
37 deletions
+7
-37
shlexec.c
dlls/shell32/tests/shlexec.c
+7
-37
No files found.
dlls/shell32/tests/shlexec.c
View file @
c7aa0875
...
...
@@ -233,43 +233,6 @@ static void delete_test_association(const char* extension)
SHDeleteKey
(
HKEY_CLASSES_ROOT
,
extension
);
}
static
void
create_test_verb
(
const
char
*
extension
,
const
char
*
verb
,
int
rawcmd
,
const
char
*
cmdtail
)
{
HKEY
hkey_shell
,
hkey_verb
,
hkey_cmd
;
char
shell
[
MAX_PATH
];
char
*
cmd
;
LONG
rc
;
sprintf
(
shell
,
"shlexec%s
\\
shell"
,
extension
);
rc
=
RegOpenKeyEx
(
HKEY_CLASSES_ROOT
,
shell
,
0
,
KEY_CREATE_SUB_KEY
,
&
hkey_shell
);
assert
(
rc
==
ERROR_SUCCESS
);
rc
=
RegCreateKeyEx
(
hkey_shell
,
verb
,
0
,
NULL
,
0
,
KEY_CREATE_SUB_KEY
,
NULL
,
&
hkey_verb
,
NULL
);
assert
(
rc
==
ERROR_SUCCESS
);
rc
=
RegCreateKeyEx
(
hkey_verb
,
"command"
,
0
,
NULL
,
0
,
KEY_SET_VALUE
,
NULL
,
&
hkey_cmd
,
NULL
);
assert
(
rc
==
ERROR_SUCCESS
);
if
(
rawcmd
)
{
rc
=
RegSetValueEx
(
hkey_cmd
,
NULL
,
0
,
REG_SZ
,
(
LPBYTE
)
cmdtail
,
strlen
(
cmdtail
)
+
1
);
}
else
{
cmd
=
malloc
(
strlen
(
argv0
)
+
10
+
strlen
(
child_file
)
+
2
+
strlen
(
cmdtail
)
+
1
);
sprintf
(
cmd
,
"%s shlexec
\"
%s
\"
%s"
,
argv0
,
child_file
,
cmdtail
);
rc
=
RegSetValueEx
(
hkey_cmd
,
NULL
,
0
,
REG_SZ
,
(
LPBYTE
)
cmd
,
strlen
(
cmd
)
+
1
);
assert
(
rc
==
ERROR_SUCCESS
);
free
(
cmd
);
}
CloseHandle
(
hkey_shell
);
CloseHandle
(
hkey_verb
);
CloseHandle
(
hkey_cmd
);
}
static
void
create_test_verb_dde
(
const
char
*
extension
,
const
char
*
verb
,
int
rawcmd
,
const
char
*
cmdtail
,
const
char
*
ddeexec
,
const
char
*
application
,
const
char
*
topic
,
...
...
@@ -352,6 +315,13 @@ static void create_test_verb_dde(const char* extension, const char* verb,
CloseHandle
(
hkey_cmd
);
}
static
void
create_test_verb
(
const
char
*
extension
,
const
char
*
verb
,
int
rawcmd
,
const
char
*
cmdtail
)
{
create_test_verb_dde
(
extension
,
verb
,
rawcmd
,
cmdtail
,
NULL
,
NULL
,
NULL
,
NULL
);
}
/***
*
* Functions to check that the child process was started just right
...
...
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