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
34577a84
Commit
34577a84
authored
Mar 23, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add IFolderView::Item implementation.
parent
edcaf53f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
shlview.c
dlls/shell32/shlview.c
+18
-3
shlview.c
dlls/shell32/tests/shlview.c
+11
-1
No files found.
dlls/shell32/shlview.c
View file @
34577a84
...
...
@@ -2741,9 +2741,24 @@ static HRESULT WINAPI IFView_GetFolder(IFolderView *iface, REFIID riid, void **p
static
HRESULT
WINAPI
IFView_Item
(
IFolderView
*
iface
,
int
index
,
PITEMID_CHILD
*
ppidl
)
{
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
FIXME
(
"(%p)->(%d %p), stub
\n
"
,
This
,
index
,
ppidl
);
return
E_NOTIMPL
;
IShellViewImpl
*
This
=
impl_from_IFolderView
(
iface
);
LVITEMW
item
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
ppidl
);
item
.
mask
=
LVIF_PARAM
;
item
.
iItem
=
index
;
if
(
SendMessageW
(
This
->
hWndList
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
item
))
{
*
ppidl
=
ILClone
((
PITEMID_CHILD
)
item
.
lParam
);
return
S_OK
;
}
else
{
*
ppidl
=
0
;
return
E_INVALIDARG
;
}
}
static
HRESULT
WINAPI
IFView_ItemCount
(
IFolderView
*
iface
,
UINT
flags
,
int
*
items
)
...
...
dlls/shell32/tests/shlview.c
View file @
34577a84
...
...
@@ -370,6 +370,7 @@ static void test_IFolderView(void)
IShellBrowser
*
browser
;
IFolderView
*
fv
;
HWND
hwnd_view
,
hwnd_list
;
PITEMID_CHILD
pidl
;
HRESULT
hr
;
INT
ret
;
POINT
pt
;
...
...
@@ -395,6 +396,11 @@ static void test_IFolderView(void)
hr
=
IFolderView_GetSpacing
(
fv
,
NULL
);
ok
(
hr
==
S_FALSE
||
broken
(
hr
==
S_OK
)
/* win7 */
,
"got (0x%08x)
\n
"
,
hr
);
pidl
=
(
void
*
)
0xdeadbeef
;
hr
=
IFolderView_Item
(
fv
,
0
,
&
pidl
);
ok
(
hr
==
E_INVALIDARG
||
broken
(
hr
==
E_FAIL
)
/* < Vista */
,
"got (0x%08x)
\n
"
,
hr
);
ok
(
pidl
==
0
||
broken
(
pidl
==
(
void
*
)
0xdeadbeef
)
/* < Vista */
,
"got %p
\n
"
,
pidl
);
if
(
0
)
{
/* crashes on Vista and Win2k8 - List not created yet case */
...
...
@@ -403,6 +409,9 @@ if (0)
/* crashes on XP */
hr
=
IFolderView_GetSelectionMarkedItem
(
fv
,
NULL
);
hr
=
IFolderView_GetFocusedItem
(
fv
,
NULL
);
/* crashes on Vista+ */
hr
=
IFolderView_Item
(
fv
,
0
,
NULL
);
}
browser
=
IShellBrowserImpl_Construct
();
...
...
@@ -585,7 +594,8 @@ static void test_IShellFolderView(void)
i
=
0xdeadbeef
;
hr
=
IShellFolderView_RemoveObject
(
folderview
,
NULL
,
&
i
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
ok
(
i
==
0
,
"got %d
\n
"
,
i
);
ok
(
i
==
0
||
i
==
-
1
/* Win7 */
||
broken
(
i
==
0xdeadbeef
)
/* Vista, 2k8 */
,
"got %d
\n
"
,
i
);
IShellFolderView_Release
(
folderview
);
...
...
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