Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c12ccd6f
Commit
c12ccd6f
authored
Nov 16, 2022
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Apr 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement SHBindToFolderIDListParent().
Called by IE11. Signed-off-by:
Mohamad Al-Jaf
<
mohamadaljaf@gmail.com
>
parent
a500bb72
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
11 deletions
+28
-11
pidl.c
dlls/shell32/pidl.c
+24
-11
shell32.spec
dlls/shell32/shell32.spec
+1
-0
shlobj.h
include/shlobj.h
+3
-0
No files found.
dlls/shell32/pidl.c
View file @
c12ccd6f
...
...
@@ -1290,12 +1290,20 @@ BOOL WINAPI SHGetPathFromIDListEx(LPCITEMIDLIST pidl, WCHAR *path, DWORD path_si
*/
HRESULT
WINAPI
SHBindToParent
(
LPCITEMIDLIST
pidl
,
REFIID
riid
,
LPVOID
*
ppv
,
LPCITEMIDLIST
*
ppidlLast
)
{
IShellFolder
*
psfDesktop
;
HRESULT
hr
=
E_FAIL
;
return
SHBindToFolderIDListParent
(
NULL
,
pidl
,
riid
,
ppv
,
ppidlLast
);
}
/*************************************************************************
* SHBindToFolderIDListParent [SHELL32.@]
*/
HRESULT
WINAPI
SHBindToFolderIDListParent
(
IShellFolder
*
psf
,
LPCITEMIDLIST
pidl
,
REFIID
riid
,
LPVOID
*
ppv
,
LPCITEMIDLIST
*
ppidlLast
)
{
IShellFolder
*
psfDesktop
=
NULL
;
HRESULT
hr
;
TRACE_
(
shell
)(
"
pidl=%p
\n
"
,
pidl
);
TRACE_
(
shell
)(
"
%p,%p,%s
\n
"
,
psf
,
pidl
,
debugstr_guid
(
riid
)
);
pdump
(
pidl
);
if
(
!
pidl
||
!
ppv
)
return
E_INVALIDARG
;
...
...
@@ -1303,29 +1311,34 @@ HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCI
if
(
ppidlLast
)
*
ppidlLast
=
NULL
;
hr
=
SHGetDesktopFolder
(
&
psfDesktop
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
!
psf
)
{
hr
=
SHGetDesktopFolder
(
&
psfDesktop
);
if
(
FAILED
(
hr
))
return
hr
;
psf
=
psfDesktop
;
}
if
(
_ILIsPidlSimple
(
pidl
))
{
/* we are on desktop level */
hr
=
IShellFolder_QueryInterface
(
psf
Desktop
,
riid
,
ppv
);
hr
=
IShellFolder_QueryInterface
(
psf
,
riid
,
ppv
);
}
else
{
LPITEMIDLIST
pidlParent
=
ILClone
(
pidl
);
ILRemoveLastID
(
pidlParent
);
hr
=
IShellFolder_BindToObject
(
psf
Desktop
,
pidlParent
,
NULL
,
riid
,
ppv
);
hr
=
IShellFolder_BindToObject
(
psf
,
pidlParent
,
NULL
,
riid
,
ppv
);
SHFree
(
pidlParent
);
}
IShellFolder_Release
(
psfDesktop
);
if
(
psfDesktop
)
IShellFolder_Release
(
psfDesktop
);
if
(
SUCCEEDED
(
hr
)
&&
ppidlLast
)
*
ppidlLast
=
ILFindLastID
(
pidl
);
TRACE_
(
shell
)(
"-- p
sf
=%p pidl=%p ret=0x%08lx
\n
"
,
*
ppv
,
(
ppidlLast
)
?*
ppidlLast
:
NULL
,
hr
);
TRACE_
(
shell
)(
"-- p
pv
=%p pidl=%p ret=0x%08lx
\n
"
,
*
ppv
,
(
ppidlLast
)
?*
ppidlLast
:
NULL
,
hr
);
return
hr
;
}
...
...
dlls/shell32/shell32.spec
View file @
c12ccd6f
...
...
@@ -332,6 +332,7 @@
@ stdcall SHAddToRecentDocs (long ptr)
@ stdcall SHAppBarMessage(long ptr)
@ stdcall SHAssocEnumHandlers(wstr long ptr)
@ stdcall SHBindToFolderIDListParent(ptr ptr ptr ptr ptr)
@ stdcall SHBindToObject(ptr ptr ptr ptr ptr)
@ stdcall SHBindToParent(ptr ptr ptr ptr)
@ stdcall SHBrowseForFolder(ptr) SHBrowseForFolderA
...
...
include/shlobj.h
View file @
c12ccd6f
...
...
@@ -1748,6 +1748,9 @@ WINSHELLAPI HRESULT WINAPI SHGetFolderPathW(HWND hwnd, int nFolder, HANDLE hToke
*/
WINSHELLAPI
HRESULT
WINAPI
SHGetDesktopFolder
(
IShellFolder
*
*
);
WINSHELLAPI
HRESULT
WINAPI
SHBindToFolderIDListParent
(
IShellFolder
*
psf
,
LPCITEMIDLIST
pidl
,
REFIID
riid
,
LPVOID
*
ppv
,
LPCITEMIDLIST
*
ppidlLast
);
/****************************************************************************
* SHBindToParent API
*/
...
...
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