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
d3f32bd0
Commit
d3f32bd0
authored
Feb 23, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Partially implement IShellDispatch::BrowseForFolder().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
85f51529
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
19 deletions
+57
-19
shelldispatch.c
dlls/shell32/shelldispatch.c
+57
-19
No files found.
dlls/shell32/shelldispatch.c
View file @
d3f32bd0
...
...
@@ -1674,7 +1674,7 @@ static HRESULT Folder_Constructor(IShellFolder2 *folder, LPITEMIDLIST pidl, Fold
This
->
Folder3_iface
.
lpVtbl
=
&
FolderImpl_Vtbl
;
This
->
ref
=
1
;
This
->
folder
=
folder
;
This
->
pidl
=
pidl
;
This
->
pidl
=
ILClone
(
pidl
)
;
hr
=
SHBindToParent
(
pidl
,
&
IID_IShellFolder2
,
(
void
**
)
&
parent
,
&
last_part
);
IShellFolder2_GetDisplayNameOf
(
parent
,
last_part
,
SHGDN_FORPARSING
,
&
strret
);
...
...
@@ -1820,11 +1820,33 @@ static HRESULT WINAPI ShellDispatch_get_Parent(IShellDispatch6 *iface, IDispatch
return
S_OK
;
}
static
HRESULT
WINAPI
ShellDispatch_NameSpace
(
IShellDispatch6
*
iface
,
VARIANT
dir
,
Folder
**
ret
)
static
HRESULT
create_folder_for_pidl
(
LPITEMIDLIST
pidl
,
Folder
**
ret
)
{
IShellFolder2
*
folder
;
IShellFolder
*
desktop
;
HRESULT
hr
;
*
ret
=
NULL
;
if
(
FAILED
(
hr
=
SHGetDesktopFolder
(
&
desktop
)))
return
hr
;
if
(
_ILIsDesktop
(
pidl
))
hr
=
IShellFolder_QueryInterface
(
desktop
,
&
IID_IShellFolder2
,
(
void
**
)
&
folder
);
else
hr
=
IShellFolder_BindToObject
(
desktop
,
pidl
,
NULL
,
&
IID_IShellFolder2
,
(
void
**
)
&
folder
);
IShellFolder_Release
(
desktop
);
if
(
FAILED
(
hr
))
return
S_FALSE
;
return
Folder_Constructor
(
folder
,
pidl
,
ret
);
}
static
HRESULT
WINAPI
ShellDispatch_NameSpace
(
IShellDispatch6
*
iface
,
VARIANT
dir
,
Folder
**
ret
)
{
LPITEMIDLIST
pidl
;
HRESULT
hr
;
...
...
@@ -1854,29 +1876,45 @@ static HRESULT WINAPI ShellDispatch_NameSpace(IShellDispatch6 *iface,
return
S_FALSE
;
}
if
(
FAILED
(
hr
=
SHGetDesktopFolder
(
&
desktop
)))
return
hr
;
if
(
_ILIsDesktop
(
pidl
))
hr
=
IShellFolder_QueryInterface
(
desktop
,
&
IID_IShellFolder2
,
(
void
**
)
&
folder
);
else
hr
=
IShellFolder_BindToObject
(
desktop
,
pidl
,
NULL
,
&
IID_IShellFolder2
,
(
void
**
)
&
folder
);
IShellFolder_Release
(
desktop
);
hr
=
create_folder_for_pidl
(
pidl
,
ret
);
ILFree
(
pidl
);
if
(
FAILED
(
hr
))
return
S_FALSE
;
return
hr
;
}
return
Folder_Constructor
(
folder
,
pidl
,
ret
);
static
BOOL
is_optional_argument
(
const
VARIANT
*
arg
)
{
return
V_VT
(
arg
)
==
VT_ERROR
&&
V_ERROR
(
arg
)
==
DISP_E_PARAMNOTFOUND
;
}
static
HRESULT
WINAPI
ShellDispatch_BrowseForFolder
(
IShellDispatch6
*
iface
,
LONG
Hwnd
,
BSTR
Title
,
LONG
Options
,
VARIANT
RootFolder
,
Folder
**
ppsdf
)
LONG
hwnd
,
BSTR
title
,
LONG
options
,
VARIANT
rootfolder
,
Folder
**
folder
)
{
FIXME
(
"(%p,%x,%s,%x,%s,%p)
\n
"
,
iface
,
Hwnd
,
debugstr_w
(
Title
),
Options
,
debugstr_variant
(
&
RootFolder
),
ppsdf
);
PIDLIST_ABSOLUTE
selection
;
BROWSEINFOW
bi
=
{
0
};
HRESULT
hr
;
*
ppsdf
=
NULL
;
return
E_NOTIMPL
;
TRACE
(
"(%p,%x,%s,%x,%s,%p)
\n
"
,
iface
,
hwnd
,
debugstr_w
(
title
),
options
,
debugstr_variant
(
&
rootfolder
),
folder
);
*
folder
=
NULL
;
if
(
!
is_optional_argument
(
&
rootfolder
))
FIXME
(
"root folder is ignored
\n
"
);
bi
.
hwndOwner
=
LongToHandle
(
hwnd
);
bi
.
lpszTitle
=
title
;
bi
.
ulFlags
=
options
;
selection
=
SHBrowseForFolderW
(
&
bi
);
if
(
selection
)
{
hr
=
create_folder_for_pidl
(
selection
,
folder
);
ILFree
(
selection
);
}
else
hr
=
S_FALSE
;
return
hr
;
}
static
HRESULT
WINAPI
ShellDispatch_Windows
(
IShellDispatch6
*
iface
,
...
...
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