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
58b73fa0
Commit
58b73fa0
authored
Sep 18, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement Parent() property for ShellDispatch objects.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd67446d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
16 deletions
+67
-16
shelldispatch.c
dlls/shell32/shelldispatch.c
+32
-15
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+35
-1
No files found.
dlls/shell32/shelldispatch.c
View file @
58b73fa0
...
...
@@ -298,7 +298,10 @@ static HRESULT WINAPI FolderItemVerbImpl_get_Application(FolderItemVerb *iface,
static
HRESULT
WINAPI
FolderItemVerbImpl_get_Parent
(
FolderItemVerb
*
iface
,
IDispatch
**
disp
)
{
FIXME
(
"(%p, %p)
\n
"
,
iface
,
disp
);
TRACE
(
"(%p, %p)
\n
"
,
iface
,
disp
);
if
(
disp
)
*
disp
=
NULL
;
return
E_NOTIMPL
;
}
...
...
@@ -477,7 +480,10 @@ static HRESULT WINAPI FolderItemVerbsImpl_get_Application(FolderItemVerbs *iface
static
HRESULT
WINAPI
FolderItemVerbsImpl_get_Parent
(
FolderItemVerbs
*
iface
,
IDispatch
**
disp
)
{
FIXME
(
"(%p, %p)
\n
"
,
iface
,
disp
);
TRACE
(
"(%p, %p)
\n
"
,
iface
,
disp
);
if
(
disp
)
*
disp
=
NULL
;
return
E_NOTIMPL
;
}
...
...
@@ -718,13 +724,19 @@ static HRESULT WINAPI FolderItemImpl_get_Application(FolderItem2 *iface, IDispat
return
Folder3_get_Application
(
&
This
->
folder
->
Folder3_iface
,
disp
);
}
static
HRESULT
WINAPI
FolderItemImpl_get_Parent
(
FolderItem2
*
iface
,
IDispatch
**
ppid
)
static
HRESULT
WINAPI
FolderItemImpl_get_Parent
(
FolderItem2
*
iface
,
IDispatch
**
disp
)
{
F
IXME
(
"(%p,%p)
\n
"
,
iface
,
ppid
);
F
olderItemImpl
*
This
=
impl_from_FolderItem
(
iface
);
*
ppid
=
NULL
;
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
disp
);
if
(
disp
)
{
*
disp
=
(
IDispatch
*
)
&
This
->
folder
->
Folder3_iface
;
IDispatch_AddRef
(
*
disp
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_Name
(
FolderItem2
*
iface
,
BSTR
*
pbs
)
...
...
@@ -1429,11 +1441,12 @@ static HRESULT WINAPI FolderImpl_get_Application(Folder3 *iface, IDispatch **dis
return
S_OK
;
}
static
HRESULT
WINAPI
FolderImpl_get_Parent
(
Folder3
*
iface
,
IDispatch
**
ppid
)
static
HRESULT
WINAPI
FolderImpl_get_Parent
(
Folder3
*
iface
,
IDispatch
**
disp
)
{
FIXME
(
"(%p,%p)
\n
"
,
iface
,
ppid
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
disp
);
*
ppid
=
NULL
;
if
(
disp
)
*
disp
=
NULL
;
return
E_NOTIMPL
;
}
...
...
@@ -1760,13 +1773,17 @@ static HRESULT WINAPI ShellDispatch_get_Application(IShellDispatch6 *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ShellDispatch_get_Parent
(
IShellDispatch6
*
iface
,
IDispatch
**
ppid
)
static
HRESULT
WINAPI
ShellDispatch_get_Parent
(
IShellDispatch6
*
iface
,
IDispatch
**
disp
)
{
FIXME
(
"(%p,%p)
\n
"
,
iface
,
ppid
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
disp
);
*
ppid
=
NULL
;
return
E_NOTIMPL
;
if
(
disp
)
{
*
disp
=
(
IDispatch
*
)
iface
;
IDispatch_AddRef
(
*
disp
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
ShellDispatch_NameSpace
(
IShellDispatch6
*
iface
,
...
...
dlls/shell32/tests/shelldispatch.c
View file @
58b73fa0
...
...
@@ -124,11 +124,18 @@ static void test_namespace(void)
FolderItem
*
item
;
VARIANT
var
;
BSTR
title
,
item_path
;
IDispatch
*
disp
;
int
len
,
i
;
r
=
CoCreateInstance
(
&
CLSID_Shell
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IShellDispatch
,
(
void
**
)
&
sd
);
ok
(
SUCCEEDED
(
r
),
"Failed to create ShellDispatch object: %#x.
\n
"
,
r
);
disp
=
NULL
;
r
=
IShellDispatch_get_Parent
(
sd
,
&
disp
);
ok
(
r
==
S_OK
,
"Failed to get Shell object parent, hr %#x.
\n
"
,
r
);
ok
(
disp
==
(
IDispatch
*
)
sd
,
"Unexpected parent pointer %p.
\n
"
,
disp
);
IDispatch_Release
(
disp
);
VariantInit
(
&
var
);
folder
=
(
void
*
)
0xdeadbeef
;
r
=
IShellDispatch_NameSpace
(
sd
,
var
,
&
folder
);
...
...
@@ -266,6 +273,11 @@ todo_wine {
r
=
IShellDispatch_NameSpace
(
sd
,
var
,
&
folder
);
ok
(
r
==
S_OK
,
"IShellDispatch::NameSpace failed: %08x
\n
"
,
r
);
disp
=
(
void
*
)
0xdeadbeef
;
r
=
Folder_get_Parent
(
folder
,
&
disp
);
ok
(
r
==
E_NOTIMPL
,
"Unexpected hr %#x.
\n
"
,
r
);
ok
(
disp
==
NULL
,
"Unexpected parent pointer %p.
\n
"
,
disp
);
r
=
Folder_get_Title
(
folder
,
&
title
);
ok
(
r
==
S_OK
,
"Failed to get folder title: %#x.
\n
"
,
r
);
ok
(
!
lstrcmpW
(
title
,
winetestW
),
"Unexpected title: %s
\n
"
,
wine_dbgstr_w
(
title
));
...
...
@@ -480,6 +492,17 @@ static void test_items(void)
r
=
FolderItems_Item
(
items
,
var
,
&
item
);
ok
(
r
==
S_OK
,
"FolderItems::Item failed: %08x
\n
"
,
r
);
ok
(
!!
item
,
"item is null
\n
"
);
disp
=
(
void
*
)
0xdeadbeef
;
r
=
FolderItems_get_Parent
(
items
,
&
disp
);
ok
(
r
==
E_NOTIMPL
,
"Unexpected hr %#x.
\n
"
,
r
);
ok
(
disp
==
NULL
,
"Unexpected parent pointer %p.
\n
"
,
disp
);
r
=
FolderItem_get_Parent
(
item
,
&
disp
);
ok
(
r
==
S_OK
,
"Failed to get parent pointer, hr %#x.
\n
"
,
r
);
ok
(
disp
==
(
IDispatch
*
)
folder
,
"Unexpected parent pointer %p.
\n
"
,
disp
);
IDispatch_Release
(
disp
);
if
(
item
)
FolderItem_Release
(
item
);
VariantClear
(
&
var
);
...
...
@@ -1209,6 +1232,7 @@ static void test_Verbs(void)
IShellDispatch
*
sd
;
FolderItem
*
item
;
Folder2
*
folder2
;
IDispatch
*
disp
;
Folder
*
folder
;
HRESULT
hr
;
LONG
count
,
i
;
...
...
@@ -1241,6 +1265,11 @@ if (0) { /* crashes on some systems */
hr
=
FolderItem_Verbs
(
item
,
&
verbs
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
disp
=
(
void
*
)
0xdeadbeef
;
hr
=
FolderItemVerbs_get_Parent
(
verbs
,
&
disp
);
ok
(
hr
==
E_NOTIMPL
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
disp
==
NULL
,
"Unexpected parent pointer %p.
\n
"
,
disp
);
if
(
0
)
{
/* crashes on winxp/win2k3 */
hr
=
FolderItemVerbs_get_Count
(
verbs
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -1267,7 +1296,12 @@ if (0) { /* crashes on winxp/win2k3 */
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
str
!=
NULL
,
"%d: name %s
\n
"
,
i
,
wine_dbgstr_w
(
str
));
if
(
i
==
count
)
ok
(
str
[
0
]
==
0
,
"%d: got teminating item %s
\n
"
,
i
,
wine_dbgstr_w
(
str
));
ok
(
str
[
0
]
==
0
,
"%d: got terminating item %s
\n
"
,
i
,
wine_dbgstr_w
(
str
));
disp
=
(
void
*
)
0xdeadbeef
;
hr
=
FolderItemVerb_get_Parent
(
verb
,
&
disp
);
ok
(
hr
==
E_NOTIMPL
,
"got %#x.
\n
"
,
hr
);
ok
(
disp
==
NULL
,
"Unexpected parent pointer %p.
\n
"
,
disp
);
SysFreeString
(
str
);
FolderItemVerb_Release
(
verb
);
...
...
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