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
efb92561
Commit
efb92561
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: Handle default DDE application names.
parent
c8829f56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
19 deletions
+62
-19
shlexec.c
dlls/shell32/shlexec.c
+45
-2
shlexec.c
dlls/shell32/tests/shlexec.c
+17
-17
No files found.
dlls/shell32/shlexec.c
View file @
efb92561
...
...
@@ -780,8 +780,51 @@ static unsigned dde_connect(WCHAR* key, const WCHAR* start, WCHAR* ddeexec,
applen
=
sizeof
(
app
);
if
(
RegQueryValueW
(
HKEY_CLASSES_ROOT
,
key
,
app
,
&
applen
)
!=
ERROR_SUCCESS
)
{
FIXME
(
"default app name NIY %s
\n
"
,
debugstr_w
(
key
));
return
2
;
WCHAR
command
[
1024
],
fullpath
[
MAX_PATH
];
static
const
WCHAR
wSo
[]
=
{
'.'
,
's'
,
'o'
,
0
};
int
sizeSo
=
sizeof
(
wSo
)
/
sizeof
(
WCHAR
);
LPWSTR
ptr
=
NULL
;
DWORD
ret
=
0
;
/* Get application command from start string and find filename of application */
if
(
*
start
==
'"'
)
{
strcpyW
(
command
,
start
+
1
);
if
((
ptr
=
strchrW
(
command
,
'"'
)))
*
ptr
=
0
;
ret
=
SearchPathW
(
NULL
,
command
,
wszExe
,
sizeof
(
fullpath
)
/
sizeof
(
WCHAR
),
fullpath
,
&
ptr
);
}
else
{
LPWSTR
p
,
space
;
for
(
p
=
(
LPWSTR
)
start
;
(
space
=
strchrW
(
p
,
' '
));
p
=
space
+
1
)
{
int
idx
=
space
-
start
;
memcpy
(
command
,
start
,
idx
*
sizeof
(
WCHAR
));
command
[
idx
]
=
'\0'
;
if
((
ret
=
SearchPathW
(
NULL
,
command
,
wszExe
,
sizeof
(
fullpath
)
/
sizeof
(
WCHAR
),
fullpath
,
&
ptr
)))
break
;
}
if
(
!
ret
)
ret
=
SearchPathW
(
NULL
,
start
,
wszExe
,
sizeof
(
fullpath
)
/
sizeof
(
WCHAR
),
fullpath
,
&
ptr
);
}
if
(
!
ret
)
{
ERR
(
"Unable to find application path for command %s
\n
"
,
debugstr_w
(
start
));
return
ERROR_ACCESS_DENIED
;
}
strcpyW
(
app
,
ptr
);
/* Remove extensions (including .so) */
ptr
=
app
+
strlenW
(
app
)
-
(
sizeSo
-
1
);
if
(
strlenW
(
app
)
>=
sizeSo
&&
!
strcmpW
(
ptr
,
wSo
))
*
ptr
=
0
;
ptr
=
strrchrW
(
app
,
'.'
);
assert
(
ptr
);
*
ptr
=
0
;
}
strcpyW
(
endkey
,
wTopic
);
...
...
dlls/shell32/tests/shlexec.c
View file @
efb92561
...
...
@@ -1099,7 +1099,7 @@ static dde_tests_t dde_tests[] =
{
""
,
"[open(
\"
%1
\"
)]"
,
"shlexec"
,
NULL
,
NULL
,
FALSE
,
"[open(
\"
%s
\"
)]"
,
0x0
,
33
},
/* Test default DDE application */
{
""
,
"[open(
\"
%1
\"
)]"
,
NULL
,
"dde"
,
NULL
,
FALSE
,
"[open(
\"
%s
\"
)]"
,
0x
1
,
33
},
{
""
,
"[open(
\"
%1
\"
)]"
,
NULL
,
"dde"
,
NULL
,
FALSE
,
"[open(
\"
%s
\"
)]"
,
0x
0
,
33
},
{
NULL
,
NULL
,
NULL
,
NULL
,
0x0
,
0
}
};
...
...
@@ -1284,37 +1284,37 @@ typedef struct
static
dde_default_app_tests_t
dde_default_app_tests
[]
=
{
/* Test unquoted existing filename with a space */
{
"%s
\\
test file.exe"
,
"test file"
,
0x
1
,
33
},
{
"%s
\\
test file.exe param"
,
"test file"
,
0x
1
,
33
},
{
"%s
\\
test file.exe"
,
"test file"
,
0x
0
,
33
},
{
"%s
\\
test file.exe param"
,
"test file"
,
0x
0
,
33
},
/* Test quoted existing filename with a space */
{
"
\"
%s
\\
test file.exe
\"
"
,
"test file"
,
0x
1
,
33
},
{
"
\"
%s
\\
test file.exe
\"
param"
,
"test file"
,
0x
1
,
33
},
{
"
\"
%s
\\
test file.exe
\"
"
,
"test file"
,
0x
0
,
33
},
{
"
\"
%s
\\
test file.exe
\"
param"
,
"test file"
,
0x
0
,
33
},
/* Test unquoted filename with a space that doesn't exist, but
* test2.exe does */
{
"%s
\\
test2 file.exe"
,
"test2"
,
0x
1
,
33
},
{
"%s
\\
test2 file.exe param"
,
"test2"
,
0x
1
,
33
},
{
"%s
\\
test2 file.exe"
,
"test2"
,
0x
0
,
33
},
{
"%s
\\
test2 file.exe param"
,
"test2"
,
0x
0
,
33
},
/* Test quoted filename with a space that does not exist */
{
"
\"
%s
\\
test2 file.exe
\"
"
,
""
,
0x
1
,
5
},
{
"
\"
%s
\\
test2 file.exe
\"
param"
,
""
,
0x
1
,
5
},
{
"
\"
%s
\\
test2 file.exe
\"
"
,
""
,
0x
0
,
5
},
{
"
\"
%s
\\
test2 file.exe
\"
param"
,
""
,
0x
0
,
5
},
/* Test filename supplied without the extension */
{
"%s
\\
test2"
,
"test2"
,
0x
1
,
33
},
{
"%s
\\
test2 param"
,
"test2"
,
0x
1
,
33
},
{
"%s
\\
test2"
,
"test2"
,
0x
0
,
33
},
{
"%s
\\
test2 param"
,
"test2"
,
0x
0
,
33
},
/* Test an unquoted non-existent filename */
{
"%s
\\
notexist.exe"
,
""
,
0x
1
,
5
},
{
"%s
\\
notexist.exe param"
,
""
,
0x
1
,
5
},
{
"%s
\\
notexist.exe"
,
""
,
0x
0
,
5
},
{
"%s
\\
notexist.exe param"
,
""
,
0x
0
,
5
},
/* Test an application that will be found on the path */
{
"cmd"
,
"cmd"
,
0x
1
,
33
},
{
"cmd param"
,
"cmd"
,
0x
1
,
33
},
{
"cmd"
,
"cmd"
,
0x
0
,
33
},
{
"cmd param"
,
"cmd"
,
0x
0
,
33
},
/* Test an application that will not be found on the path */
{
"xyzwxyzwxyz"
,
""
,
0x
1
,
5
},
{
"xyzwxyzwxyz param"
,
""
,
0x
1
,
5
},
{
"xyzwxyzwxyz"
,
""
,
0x
0
,
5
},
{
"xyzwxyzwxyz param"
,
""
,
0x
0
,
5
},
{
NULL
,
NULL
,
0
,
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