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
0d87e1f9
Commit
0d87e1f9
authored
Dec 19, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Dec 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: IShellItem::GetAttributes should also work on the desktop shellfolder.
parent
7b67d4f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
shellitem.c
dlls/shell32/shellitem.c
+4
-1
shlfolder.c
dlls/shell32/tests/shlfolder.c
+44
-0
No files found.
dlls/shell32/shellitem.c
View file @
0d87e1f9
...
...
@@ -259,7 +259,10 @@ static HRESULT WINAPI ShellItem_GetAttributes(IShellItem *iface, SFGAOF sfgaoMas
TRACE
(
"(%p,%x,%p)
\n
"
,
iface
,
sfgaoMask
,
psfgaoAttribs
);
ret
=
ShellItem_get_parent_shellfolder
(
This
,
&
parent_folder
);
if
(
_ILIsDesktop
(
This
->
pidl
))
ret
=
SHGetDesktopFolder
(
&
parent_folder
);
else
ret
=
ShellItem_get_parent_shellfolder
(
This
,
&
parent_folder
);
if
(
SUCCEEDED
(
ret
))
{
child_pidl
=
ILFindLastID
(
This
->
pidl
);
...
...
dlls/shell32/tests/shlfolder.c
View file @
0d87e1f9
...
...
@@ -3670,6 +3670,49 @@ static void test_ShellItemBindToHandler(void)
pILFree
(
pidl_desktop
);
}
void
test_ShellItemGetAttributes
(
void
)
{
IShellItem
*
psi
;
LPITEMIDLIST
pidl_desktop
;
SFGAOF
sfgao
;
HRESULT
hr
;
if
(
!
pSHCreateShellItem
)
{
skip
(
"SHCreateShellItem missing.
\n
"
);
return
;
}
hr
=
pSHGetSpecialFolderLocation
(
NULL
,
CSIDL_DESKTOP
,
&
pidl_desktop
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
pILFree
(
pidl_desktop
);
}
if
(
FAILED
(
hr
))
{
skip
(
"Skipping tests."
);
return
;
}
if
(
0
)
{
/* Crashes on native (Win 7) */
hr
=
IShellItem_GetAttributes
(
psi
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
}
/* Test GetAttributes on the desktop folder. */
sfgao
=
0xdeadbeef
;
hr
=
IShellItem_GetAttributes
(
psi
,
SFGAO_FOLDER
,
&
sfgao
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_FAIL
)
/* <Vista */
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
sfgao
==
SFGAO_FOLDER
||
broken
(
sfgao
==
0
)
/* <Vista */
,
"Got 0x%08x
\n
"
,
sfgao
);
IShellItem_Release
(
psi
);
}
static
void
test_SHParseDisplayName
(
void
)
{
LPITEMIDLIST
pidl1
,
pidl2
;
...
...
@@ -4432,6 +4475,7 @@ START_TEST(shlfolder)
test_ShellItemCompare
();
test_SHChangeNotify
();
test_ShellItemBindToHandler
();
test_ShellItemGetAttributes
();
OleUninitialize
();
}
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