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
3a6ac605
Commit
3a6ac605
authored
Nov 24, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Improved IDataObject::QueryGetData implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
212dd9c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
1 deletion
+59
-1
dataobject.c
dlls/shell32/dataobject.c
+1
-1
shlfolder.c
dlls/shell32/tests/shlfolder.c
+58
-0
No files found.
dlls/shell32/dataobject.c
View file @
3a6ac605
...
...
@@ -349,7 +349,7 @@ static HRESULT WINAPI IDataObject_fnQueryGetData(IDataObject *iface, LPFORMATETC
for
(
i
=
0
;
i
<
MAX_FORMATS
;
i
++
)
{
if
((
This
->
pFormatEtc
[
i
].
cfFormat
==
pformatetc
->
cfFormat
)
&&
(
This
->
pFormatEtc
[
i
].
tymed
==
pformatetc
->
tymed
))
&&
(
This
->
pFormatEtc
[
i
].
tymed
&
pformatetc
->
tymed
))
{
return
S_OK
;
}
...
...
dlls/shell32/tests/shlfolder.c
View file @
3a6ac605
...
...
@@ -5224,6 +5224,63 @@ static void test_SHCreateShellFolderViewEx(void)
IShellFolder_Release
(
desktop
);
}
static
void
test_DataObject
(
void
)
{
IShellFolder
*
desktop
;
IDataObject
*
data_obj
;
HRESULT
hres
;
IEnumIDList
*
peidl
;
LPITEMIDLIST
apidl
;
FORMATETC
fmt
;
DWORD
cf_shellidlist
;
STGMEDIUM
medium
;
SHGetDesktopFolder
(
&
desktop
);
hres
=
IShellFolder_EnumObjects
(
desktop
,
NULL
,
SHCONTF_NONFOLDERS
|
SHCONTF_FOLDERS
|
SHCONTF_INCLUDEHIDDEN
,
&
peidl
);
ok
(
hres
==
S_OK
,
"got %x
\n
"
,
hres
);
if
(
IEnumIDList_Next
(
peidl
,
1
,
&
apidl
,
NULL
)
!=
S_OK
)
{
skip
(
"no files on desktop - skipping GetDataObject tests
\n
"
);
IEnumIDList_Release
(
peidl
);
IShellFolder_Release
(
desktop
);
return
;
}
IEnumIDList_Release
(
peidl
);
hres
=
IShellFolder_GetUIObjectOf
(
desktop
,
NULL
,
1
,
(
LPCITEMIDLIST
*
)
&
apidl
,
&
IID_IDataObject
,
NULL
,
(
void
**
)
&
data_obj
);
ok
(
hres
==
S_OK
,
"got %x
\n
"
,
hres
);
pILFree
(
apidl
);
IShellFolder_Release
(
desktop
);
cf_shellidlist
=
RegisterClipboardFormatW
(
CFSTR_SHELLIDLISTW
);
fmt
.
cfFormat
=
cf_shellidlist
;
fmt
.
ptd
=
NULL
;
fmt
.
dwAspect
=
DVASPECT_CONTENT
;
fmt
.
lindex
=
-
1
;
fmt
.
tymed
=
TYMED_HGLOBAL
;
hres
=
IDataObject_QueryGetData
(
data_obj
,
&
fmt
);
ok
(
hres
==
S_OK
,
"got %x
\n
"
,
hres
);
fmt
.
tymed
=
TYMED_HGLOBAL
|
TYMED_ISTREAM
;
hres
=
IDataObject_QueryGetData
(
data_obj
,
&
fmt
);
ok
(
hres
==
S_OK
,
"got %x
\n
"
,
hres
);
fmt
.
tymed
=
TYMED_ISTREAM
;
hres
=
IDataObject_QueryGetData
(
data_obj
,
&
fmt
);
todo_wine
ok
(
hres
==
S_FALSE
,
"got %x
\n
"
,
hres
);
fmt
.
tymed
=
TYMED_HGLOBAL
|
TYMED_ISTREAM
;
hres
=
IDataObject_GetData
(
data_obj
,
&
fmt
,
&
medium
);
ok
(
hres
==
S_OK
,
"got %x
\n
"
,
hres
);
ok
(
medium
.
tymed
==
TYMED_HGLOBAL
,
"medium.tymed = %x
\n
"
,
medium
.
tymed
);
ReleaseStgMedium
(
&
medium
);
IDataObject_Release
(
data_obj
);
}
START_TEST
(
shlfolder
)
{
init_function_pointers
();
...
...
@@ -5264,6 +5321,7 @@ START_TEST(shlfolder)
test_SHCreateDefaultContextMenu
();
test_SHCreateShellFolderView
();
test_SHCreateShellFolderViewEx
();
test_DataObject
();
OleUninitialize
();
}
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