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
a1f73391
Commit
a1f73391
authored
Sep 15, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement Application property for FolderItem.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
03cdddc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
15 deletions
+38
-15
shelldispatch.c
dlls/shell32/shelldispatch.c
+17
-11
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+21
-4
No files found.
dlls/shell32/shelldispatch.c
View file @
a1f73391
...
...
@@ -77,6 +77,7 @@ typedef struct {
typedef
struct
{
FolderItem2
FolderItem2_iface
;
LONG
ref
;
FolderImpl
*
folder
;
VARIANT
dir
;
}
FolderItemImpl
;
...
...
@@ -646,6 +647,7 @@ static ULONG WINAPI FolderItemImpl_Release(FolderItem2 *iface)
if
(
!
ref
)
{
VariantClear
(
&
This
->
dir
);
Folder3_Release
(
&
This
->
folder
->
Folder3_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
...
...
@@ -707,13 +709,13 @@ static HRESULT WINAPI FolderItemImpl_Invoke(FolderItem2 *iface,
return
hr
;
}
static
HRESULT
WINAPI
FolderItemImpl_get_Application
(
FolderItem2
*
iface
,
IDispatch
**
ppid
)
static
HRESULT
WINAPI
FolderItemImpl_get_Application
(
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
);
return
Folder3_get_Application
(
&
This
->
folder
->
Folder3_iface
,
disp
);
}
static
HRESULT
WINAPI
FolderItemImpl_get_Parent
(
FolderItem2
*
iface
,
...
...
@@ -928,7 +930,7 @@ static const FolderItem2Vtbl FolderItemImpl_Vtbl = {
FolderItemImpl_ExtendedProperty
};
static
HRESULT
FolderItem_Constructor
(
VARIANT
*
dir
,
FolderItem
**
ppfi
)
static
HRESULT
FolderItem_Constructor
(
FolderImpl
*
folder
,
VARIANT
*
dir
,
FolderItem
**
ppfi
)
{
FolderItemImpl
*
This
;
HRESULT
ret
;
...
...
@@ -950,7 +952,10 @@ static HRESULT FolderItem_Constructor(VARIANT *dir, FolderItem **ppfi)
return
E_OUTOFMEMORY
;
}
*
ppfi
=
(
FolderItem
*
)
&
This
->
FolderItem2_iface
;
This
->
folder
=
folder
;
Folder3_AddRef
(
&
folder
->
Folder3_iface
);
*
ppfi
=
(
FolderItem
*
)
&
This
->
FolderItem2_iface
;
return
ret
;
}
...
...
@@ -1137,7 +1142,7 @@ static HRESULT WINAPI FolderItemsImpl_Item(FolderItems3 *iface, VARIANT index, F
break
;
case
VT_ERROR
:
return
FolderItem_Constructor
(
&
This
->
folder
->
dir
,
ppid
);
return
FolderItem_Constructor
(
This
->
folder
,
&
This
->
folder
->
dir
,
ppid
);
default:
return
E_NOTIMPL
;
...
...
@@ -1145,7 +1150,7 @@ static HRESULT WINAPI FolderItemsImpl_Item(FolderItems3 *iface, VARIANT index, F
V_VT
(
&
path_var
)
=
VT_BSTR
;
V_BSTR
(
&
path_var
)
=
SysAllocString
(
path_str
);
ret
=
FolderItem_Constructor
(
&
path_var
,
ppid
);
ret
=
FolderItem_Constructor
(
This
->
folder
,
&
path_var
,
ppid
);
VariantClear
(
&
path_var
);
return
ret
;
}
...
...
@@ -1451,6 +1456,7 @@ static HRESULT WINAPI FolderImpl_Items(Folder3 *iface, FolderItems **ppid)
static
HRESULT
WINAPI
FolderImpl_ParseName
(
Folder3
*
iface
,
BSTR
name
,
FolderItem
**
item
)
{
FolderImpl
*
This
=
impl_from_Folder
(
iface
);
FolderItem
*
self
;
BSTR
str
;
WCHAR
pathW
[
MAX_PATH
];
...
...
@@ -1479,7 +1485,7 @@ static HRESULT WINAPI FolderImpl_ParseName(Folder3 *iface, BSTR name, FolderItem
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
SysAllocString
(
pathW
);
hr
=
FolderItem_Constructor
(
&
v
,
item
);
hr
=
FolderItem_Constructor
(
This
,
&
v
,
item
);
VariantClear
(
&
v
);
return
hr
;
}
...
...
@@ -1523,7 +1529,7 @@ static HRESULT WINAPI FolderImpl_get_Self(Folder3 *iface, FolderItem **ppfi)
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppfi
);
return
FolderItem_Constructor
(
&
This
->
dir
,
ppfi
);
return
FolderItem_Constructor
(
This
,
&
This
->
dir
,
ppfi
);
}
static
HRESULT
WINAPI
FolderImpl_get_OfflineStatus
(
Folder3
*
iface
,
LONG
*
pul
)
...
...
dlls/shell32/tests/shelldispatch.c
View file @
a1f73391
...
...
@@ -483,7 +483,7 @@ static void test_items(void)
if
(
item
)
FolderItem_Release
(
item
);
VariantClear
(
&
var
);
/* recreate the
folder
object */
/* recreate the
items
object */
FolderItems_Release
(
items
);
items
=
NULL
;
r
=
Folder_Items
(
folder
,
&
items
);
...
...
@@ -491,7 +491,11 @@ static void test_items(void)
ok
(
!!
items
,
"items is null
\n
"
);
r
=
FolderItems_QueryInterface
(
items
,
&
IID_FolderItems2
,
(
void
**
)
&
items2
);
ok
(
r
==
S_OK
||
broken
(
r
==
E_NOINTERFACE
)
/* xp and later */
,
"FolderItems::QueryInterface failed: %08x
\n
"
,
r
);
if
(
r
==
S_OK
)
ok
(
!!
items2
,
"items2 is null
\n
"
);
if
(
r
==
S_OK
)
{
ok
(
!!
items2
,
"items2 is null
\n
"
);
FolderItems2_Release
(
items2
);
}
r
=
FolderItems_QueryInterface
(
items
,
&
IID_FolderItems3
,
(
void
**
)
&
items3
);
ok
(
r
==
S_OK
,
"FolderItems::QueryInterface failed: %08x
\n
"
,
r
);
ok
(
!!
items3
,
"items3 is null
\n
"
);
...
...
@@ -510,11 +514,25 @@ static void test_items(void)
V_VT
(
&
var
)
=
VT_I2
;
V_I2
(
&
var
)
=
0
;
EXPECT_REF
(
folder
,
2
);
EXPECT_REF
(
items
,
2
);
item
=
NULL
;
r
=
FolderItems_Item
(
items
,
var
,
&
item
);
ok
(
r
==
S_OK
,
"FolderItems::Item failed: %08x
\n
"
,
r
);
ok
(
!!
item
,
"item is null
\n
"
);
if
(
item
)
FolderItem_Release
(
item
);
EXPECT_REF
(
folder
,
3
);
EXPECT_REF
(
items
,
2
);
r
=
Folder_get_Application
(
folder
,
&
disp
);
ok
(
r
==
S_OK
,
"Failed to get application pointer %#x.
\n
"
,
r
);
r
=
FolderItem_get_Application
(
item
,
&
disp2
);
ok
(
r
==
S_OK
,
"Failed to get application pointer %#x.
\n
"
,
r
);
ok
(
disp
==
disp2
,
"Unexpected application pointer.
\n
"
);
IDispatch_Release
(
disp2
);
IDispatch_Release
(
disp
);
FolderItem_Release
(
item
);
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
0
;
...
...
@@ -740,7 +758,6 @@ todo_wine
FolderItems_Release
(
items
);
Folder_Release
(
folder
);
if
(
items2
)
FolderItems2_Release
(
items2
);
if
(
items3
)
FolderItems3_Release
(
items3
);
IShellDispatch_Release
(
sd
);
}
...
...
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