Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
94378704
Commit
94378704
authored
Sep 25, 2017
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: IShellLink::GetPath returns S_FALSE if there's no path.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a796bcaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
shelllink.c
dlls/shell32/shelllink.c
+9
-3
shelllink.c
dlls/shell32/tests/shelllink.c
+2
-2
No files found.
dlls/shell32/shelllink.c
View file @
94378704
...
...
@@ -1254,6 +1254,7 @@ static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA *iface, LPSTR pszFile, I
WIN32_FIND_DATAA
*
pfd
,
DWORD
fFlags
)
{
IShellLinkImpl
*
This
=
impl_from_IShellLinkA
(
iface
);
HRESULT
res
=
S_OK
;
TRACE
(
"(%p)->(pfile=%p len=%u find_data=%p flags=%u)(%s)
\n
"
,
This
,
pszFile
,
cchMaxPath
,
pfd
,
fFlags
,
debugstr_w
(
This
->
sPath
));
...
...
@@ -1263,13 +1264,15 @@ static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA *iface, LPSTR pszFile, I
if
(
cchMaxPath
)
pszFile
[
0
]
=
0
;
if
(
This
->
sPath
)
if
(
This
->
sPath
&&
This
->
sPath
[
0
]
)
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
sPath
,
-
1
,
pszFile
,
cchMaxPath
,
NULL
,
NULL
);
else
res
=
S_FALSE
;
if
(
pfd
)
FIXME
(
"(%p): WIN32_FIND_DATA is not yet filled.
\n
"
,
This
);
return
S_OK
;
return
res
;
}
static
HRESULT
WINAPI
IShellLinkA_fnGetIDList
(
IShellLinkA
*
iface
,
LPITEMIDLIST
*
ppidl
)
...
...
@@ -1639,6 +1642,7 @@ static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface)
static
HRESULT
WINAPI
IShellLinkW_fnGetPath
(
IShellLinkW
*
iface
,
LPWSTR
pszFile
,
INT
cchMaxPath
,
WIN32_FIND_DATAW
*
pfd
,
DWORD
fFlags
)
{
IShellLinkImpl
*
This
=
impl_from_IShellLinkW
(
iface
);
HRESULT
res
=
S_OK
;
TRACE
(
"(%p)->(pfile=%p len=%u find_data=%p flags=%u)(%s)
\n
"
,
This
,
pszFile
,
cchMaxPath
,
pfd
,
fFlags
,
debugstr_w
(
This
->
sPath
));
...
...
@@ -1650,10 +1654,12 @@ static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,
pszFile
[
0
]
=
0
;
if
(
This
->
sPath
)
lstrcpynW
(
pszFile
,
This
->
sPath
,
cchMaxPath
);
else
res
=
S_FALSE
;
if
(
pfd
)
FIXME
(
"(%p): WIN32_FIND_DATA is not yet filled.
\n
"
,
This
);
return
S_OK
;
return
res
;
}
static
HRESULT
WINAPI
IShellLinkW_fnGetIDList
(
IShellLinkW
*
iface
,
LPITEMIDLIST
*
ppidl
)
...
...
dlls/shell32/tests/shelllink.c
View file @
94378704
...
...
@@ -156,7 +156,7 @@ static void test_get_set(void)
/* Test Getting / Setting the path */
strcpy
(
buffer
,
"garbage"
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
todo_wine
ok
(
r
==
S_FALSE
||
broken
(
r
==
S_OK
)
/* NT4/W2K */
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
||
broken
(
r
==
S_OK
)
/* NT4/W2K */
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
*
buffer
==
'\0'
,
"GetPath returned '%s'
\n
"
,
buffer
);
CoCreateInstance
(
&
CLSID_ShellLink
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -177,7 +177,7 @@ static void test_get_set(void)
strcpy
(
buffer
,
"garbage"
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
todo_wine
ok
(
r
==
S_FALSE
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
r
==
S_FALSE
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
*
buffer
==
'\0'
,
"GetPath returned '%s'
\n
"
,
buffer
);
/* Win98 returns S_FALSE, but WinXP returns S_OK */
...
...
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