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
1f73f3a5
Commit
1f73f3a5
authored
14 years ago
by
David Hedberg
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Support BHID_SFUIObject and BHID_DataObject in IShellItem::BindToHandler.
parent
b88c3e2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
14 deletions
+57
-14
shellitem.c
dlls/shell32/shellitem.c
+20
-0
shlfolder.c
dlls/shell32/tests/shlfolder.c
+37
-14
No files found.
dlls/shell32/shellitem.c
View file @
1f73f3a5
...
...
@@ -190,6 +190,26 @@ static HRESULT WINAPI ShellItem_BindToHandler(IShellItem *iface, IBindCtx *pbc,
}
return
ret
;
}
else
if
(
IsEqualGUID
(
rbhid
,
&
BHID_SFUIObject
))
{
IShellFolder
*
psf_parent
;
if
(
_ILIsDesktop
(
This
->
pidl
))
ret
=
SHGetDesktopFolder
(
&
psf_parent
);
else
ret
=
ShellItem_get_parent_shellfolder
(
This
,
&
psf_parent
);
if
(
SUCCEEDED
(
ret
))
{
LPCITEMIDLIST
pidl
=
ILFindLastID
(
This
->
pidl
);
ret
=
IShellFolder_GetUIObjectOf
(
psf_parent
,
NULL
,
1
,
&
pidl
,
riid
,
NULL
,
ppvOut
);
IShellFolder_Release
(
psf_parent
);
}
return
ret
;
}
else
if
(
IsEqualGUID
(
rbhid
,
&
BHID_DataObject
))
{
return
ShellItem_BindToHandler
((
IShellItem
*
)
This
,
pbc
,
&
BHID_SFUIObject
,
&
IID_IDataObject
,
ppvOut
);
}
FIXME
(
"Unsupported BHID %s.
\n
"
,
debugstr_guid
(
rbhid
));
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/tests/shlfolder.c
View file @
1f73f3a5
...
...
@@ -1888,7 +1888,7 @@ static void test_SHCreateShellItem(void)
{
IShellItem
*
shellitem
,
*
shellitem2
;
IPersistIDList
*
persistidl
;
LPITEMIDLIST
pidl_cwd
=
NULL
,
pidl_testfile
,
pidl_abstestfile
,
pidl_test
;
LPITEMIDLIST
pidl_cwd
=
NULL
,
pidl_testfile
,
pidl_abstestfile
,
pidl_test
,
pidl_desktop
;
HRESULT
ret
;
char
curdirA
[
MAX_PATH
];
WCHAR
curdirW
[
MAX_PATH
];
...
...
@@ -1910,6 +1910,17 @@ static void test_SHCreateShellItem(void)
return
;
}
if
(
pSHGetSpecialFolderLocation
)
{
ret
=
pSHGetSpecialFolderLocation
(
NULL
,
CSIDL_DESKTOP
,
&
pidl_desktop
);
ok
(
ret
==
S_OK
,
"Got 0x%08x
\n
"
,
ret
);
}
else
{
win_skip
(
"pSHGetSpecialFolderLocation missing.
\n
"
);
pidl_desktop
=
NULL
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
curdirA
,
-
1
,
curdirW
,
MAX_PATH
);
ret
=
SHGetDesktopFolder
(
&
desktopfolder
);
...
...
@@ -2058,6 +2069,17 @@ static void test_SHCreateShellItem(void)
}
IPersistIDList_Release
(
persistidl
);
}
IShellItem_Release
(
shellitem
);
}
ret
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
shellitem
);
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
if
(
SUCCEEDED
(
ret
))
{
ret
=
IShellItem_GetParent
(
shellitem
,
&
shellitem2
);
ok
(
FAILED
(
ret
),
"Got 0x%08x
\n
"
,
ret
);
if
(
SUCCEEDED
(
ret
))
IShellItem_Release
(
shellitem2
);
IShellItem_Release
(
shellitem
);
}
...
...
@@ -2161,6 +2183,7 @@ static void test_SHCreateShellItem(void)
DeleteFileA
(
".
\\
testfile"
);
pILFree
(
pidl_abstestfile
);
pILFree
(
pidl_testfile
);
pILFree
(
pidl_desktop
);
pILFree
(
pidl_cwd
);
IShellFolder_Release
(
currentfolder
);
IShellFolder_Release
(
desktopfolder
);
...
...
@@ -3270,16 +3293,21 @@ static void test_ShellItemBindToHandler(void)
IPersistFolder2_Release
(
ppf2
);
}
/* BHID_SFUIObject */
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_SFUIObject
,
&
IID_IDataObject
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_SFUIObject
,
&
IID_IContextMenu
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
/* BHID_DataObject */
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_DataObject
,
&
IID_IDataObject
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
MK_E_NOOBJECT
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
todo_wine
{
/* BHID_SFUIObject */
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_SFUIObject
,
&
IID_IDataObject
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_SFUIObject
,
&
IID_IContextMenu
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
/* BHID_SFViewObject */
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_SFViewObject
,
&
IID_IShellView
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
...
...
@@ -3319,11 +3347,6 @@ static void test_ShellItemBindToHandler(void)
ok
(
hr
==
S_OK
||
broken
(
hr
==
MK_E_NOOBJECT
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
/* BHID_DataObject */
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_DataObject
,
&
IID_IDataObject
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
MK_E_NOOBJECT
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
/* BHID_Filter */
hr
=
IShellItem_BindToHandler
(
psi
,
NULL
,
&
BHID_Filter
,
&
IID_IUnknown
,
(
void
**
)
&
punk
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
MK_E_NOOBJECT
/* XP */
),
"Got 0x%08x
\n
"
,
hr
);
...
...
This diff is collapsed.
Click to expand it.
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