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
3f3e42b6
Commit
3f3e42b6
authored
Oct 18, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Oct 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: ShellExec with empty operation should behave same as with NULL operation.
parent
90ca3620
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
classes.c
dlls/shell32/classes.c
+1
-1
shlexec.c
dlls/shell32/shlexec.c
+2
-2
shlexec.c
dlls/shell32/tests/shlexec.c
+8
-1
No files found.
dlls/shell32/classes.c
View file @
3f3e42b6
...
@@ -129,7 +129,7 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l
...
@@ -129,7 +129,7 @@ BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD l
TRACE
(
"%p %s %p
\n
"
,
hkeyClass
,
debugstr_w
(
szVerb
),
szDest
);
TRACE
(
"%p %s %p
\n
"
,
hkeyClass
,
debugstr_w
(
szVerb
),
szDest
);
if
(
szVerb
)
if
(
szVerb
&&
*
szVerb
)
{
{
lstrcpynW
(
szDest
,
szVerb
,
len
);
lstrcpynW
(
szDest
,
szVerb
,
len
);
return
TRUE
;
return
TRUE
;
...
...
dlls/shell32/shlexec.c
View file @
3f3e42b6
...
@@ -1517,7 +1517,7 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
...
@@ -1517,7 +1517,7 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
TRACE
(
"Got URL: %s
\n
"
,
debugstr_w
(
lpFile
));
TRACE
(
"Got URL: %s
\n
"
,
debugstr_w
(
lpFile
));
/* Looking for ...protocol\shell\lpOperation\command */
/* Looking for ...protocol\shell\lpOperation\command */
len
=
iSize
+
lstrlenW
(
wShell
)
+
lstrlenW
(
wCommand
)
+
1
;
len
=
iSize
+
lstrlenW
(
wShell
)
+
lstrlenW
(
wCommand
)
+
1
;
if
(
psei
->
lpVerb
)
if
(
psei
->
lpVerb
&&
*
psei
->
lpVerb
)
len
+=
lstrlenW
(
psei
->
lpVerb
);
len
+=
lstrlenW
(
psei
->
lpVerb
);
else
else
len
+=
lstrlenW
(
wszOpen
);
len
+=
lstrlenW
(
wszOpen
);
...
@@ -1525,7 +1525,7 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
...
@@ -1525,7 +1525,7 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
memcpy
(
lpstrProtocol
,
lpFile
,
iSize
*
sizeof
(
WCHAR
));
memcpy
(
lpstrProtocol
,
lpFile
,
iSize
*
sizeof
(
WCHAR
));
lpstrProtocol
[
iSize
]
=
'\0'
;
lpstrProtocol
[
iSize
]
=
'\0'
;
strcatW
(
lpstrProtocol
,
wShell
);
strcatW
(
lpstrProtocol
,
wShell
);
strcatW
(
lpstrProtocol
,
psei
->
lpVerb
?
psei
->
lpVerb
:
wszOpen
);
strcatW
(
lpstrProtocol
,
psei
->
lpVerb
&&
*
psei
->
lpVerb
?
psei
->
lpVerb
:
wszOpen
);
strcatW
(
lpstrProtocol
,
wCommand
);
strcatW
(
lpstrProtocol
,
wCommand
);
/* Remove File Protocol from lpFile */
/* Remove File Protocol from lpFile */
...
...
dlls/shell32/tests/shlexec.c
View file @
3f3e42b6
...
@@ -92,7 +92,10 @@ static void strcat_param(char* str, const char* param)
...
@@ -92,7 +92,10 @@ static void strcat_param(char* str, const char* param)
static
char
shell_call
[
2048
]
=
""
;
static
char
shell_call
[
2048
]
=
""
;
static
int
shell_execute
(
LPCSTR
operation
,
LPCSTR
file
,
LPCSTR
parameters
,
LPCSTR
directory
)
static
int
shell_execute
(
LPCSTR
operation
,
LPCSTR
file
,
LPCSTR
parameters
,
LPCSTR
directory
)
{
{
INT_PTR
rc
;
INT_PTR
rc
,
rcEmpty
=
0
;
if
(
!
operation
)
rcEmpty
=
shell_execute
(
""
,
file
,
parameters
,
directory
);
strcpy
(
shell_call
,
"ShellExecute("
);
strcpy
(
shell_call
,
"ShellExecute("
);
strcat_param
(
shell_call
,
operation
);
strcat_param
(
shell_call
,
operation
);
...
@@ -139,6 +142,10 @@ static int shell_execute(LPCSTR operation, LPCSTR file, LPCSTR parameters, LPCST
...
@@ -139,6 +142,10 @@ static int shell_execute(LPCSTR operation, LPCSTR file, LPCSTR parameters, LPCST
if
(
rc
>
32
)
if
(
rc
>
32
)
dump_child
();
dump_child
();
if
(
!
operation
)
ok
(
rc
==
rcEmpty
||
broken
(
rc
>
32
&&
rcEmpty
==
SE_ERR_NOASSOC
)
/* NT4 */
,
"Got different return value with empty string: %lu %lu
\n
"
,
rc
,
rcEmpty
);
return
rc
;
return
rc
;
}
}
...
...
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