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
aa37e696
Commit
aa37e696
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/tests: Setting a PIDL with no path resets the path.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3615db9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
shelllink.c
dlls/shell32/tests/shelllink.c
+20
-0
No files found.
dlls/shell32/tests/shelllink.c
View file @
aa37e696
...
...
@@ -39,6 +39,7 @@
static
void
(
WINAPI
*
pILFree
)(
LPITEMIDLIST
);
static
BOOL
(
WINAPI
*
pILIsEqual
)(
LPCITEMIDLIST
,
LPCITEMIDLIST
);
static
HRESULT
(
WINAPI
*
pSHILCreateFromPath
)(
LPCWSTR
,
LPITEMIDLIST
*
,
DWORD
*
);
static
HRESULT
(
WINAPI
*
pSHGetFolderLocation
)(
HWND
,
INT
,
HANDLE
,
DWORD
,
PIDLIST_ABSOLUTE
*
);
static
HRESULT
(
WINAPI
*
pSHDefExtractIconA
)(
LPCSTR
,
int
,
UINT
,
HICON
*
,
HICON
*
,
UINT
);
static
HRESULT
(
WINAPI
*
pSHGetStockIconInfo
)(
SHSTOCKICONID
,
UINT
,
SHSTOCKICONINFO
*
);
static
DWORD
(
WINAPI
*
pGetLongPathNameA
)(
LPCSTR
,
LPSTR
,
DWORD
);
...
...
@@ -242,6 +243,24 @@ static void test_get_set(void)
ok
(
lstrcmpiA
(
buffer
,
mypath
)
==
0
,
"GetPath returned '%s'
\n
"
,
buffer
);
}
if
(
pSHGetFolderLocation
)
{
LPITEMIDLIST
pidl_controls
;
r
=
pSHGetFolderLocation
(
NULL
,
CSIDL_CONTROLS
,
NULL
,
0
,
&
pidl_controls
);
ok
(
r
==
S_OK
,
"SHGetFolderLocation failed (0x%08x)
\n
"
,
r
);
r
=
IShellLinkA_SetIDList
(
sl
,
pidl_controls
);
ok
(
r
==
S_OK
,
"SetIDList failed (0x%08x)
\n
"
,
r
);
strcpy
(
buffer
,
"garbage"
);
r
=
IShellLinkA_GetPath
(
sl
,
buffer
,
sizeof
(
buffer
),
NULL
,
SLGP_RAWPATH
);
ok
(
r
==
S_FALSE
,
"GetPath failed (0x%08x)
\n
"
,
r
);
ok
(
buffer
[
0
]
==
0
,
"GetPath returned '%s'
\n
"
,
buffer
);
pILFree
(
pidl_controls
);
}
/* test path with quotes (IShellLinkA_SetPath returns S_FALSE on W2K and below and S_OK on XP and above */
r
=
IShellLinkA_SetPath
(
sl
,
"
\"
c:
\\
nonexistent
\\
file
\"
"
);
ok
(
r
==
S_FALSE
||
r
==
S_OK
,
"SetPath failed (0x%08x)
\n
"
,
r
);
...
...
@@ -1407,6 +1426,7 @@ START_TEST(shelllink)
pILFree
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
155
);
pILIsEqual
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
21
);
pSHILCreateFromPath
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
28
);
pSHGetFolderLocation
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetFolderLocation"
);
pSHDefExtractIconA
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHDefExtractIconA"
);
pSHGetStockIconInfo
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetStockIconInfo"
);
pGetLongPathNameA
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetLongPathNameA"
);
...
...
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