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
1a82fbf4
Commit
1a82fbf4
authored
Mar 10, 2021
by
Jactry Zeng
Committed by
Alexandre Julliard
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Handle CF_HDROP format.
Signed-off-by:
Jactry Zeng
<
jzeng@codeweavers.com
>
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6cc5f9a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
clipboard.c
dlls/ole32/clipboard.c
+1
-0
clipboard.c
dlls/ole32/tests/clipboard.c
+32
-0
No files found.
dlls/ole32/clipboard.c
View file @
1a82fbf4
...
...
@@ -1138,6 +1138,7 @@ static DWORD get_tymed_from_nonole_cf(UINT cf)
case
CF_TEXT
:
case
CF_OEMTEXT
:
case
CF_UNICODETEXT
:
case
CF_HDROP
:
return
TYMED_ISTREAM
|
TYMED_HGLOBAL
;
case
CF_ENHMETAFILE
:
return
TYMED_ENHMF
;
...
...
dlls/ole32/tests/clipboard.c
View file @
1a82fbf4
...
...
@@ -28,6 +28,8 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "shellapi.h"
#include "shlobj.h"
#include "wine/test.h"
...
...
@@ -1513,6 +1515,24 @@ static HENHMETAFILE create_emf(void)
return
CloseEnhMetaFile
(
hdc
);
}
static
HDROP
create_dropped_file
(
void
)
{
WCHAR
path
[]
=
L"C:
\\
testfile1
\0
"
;
DROPFILES
*
dropfiles
;
DWORD
offset
;
HDROP
hdrop
;
offset
=
sizeof
(
DROPFILES
);
hdrop
=
GlobalAlloc
(
GHND
,
offset
+
sizeof
(
path
));
dropfiles
=
GlobalLock
(
hdrop
);
dropfiles
->
pFiles
=
offset
;
dropfiles
->
fWide
=
TRUE
;
memcpy
((
char
*
)
dropfiles
+
offset
,
path
,
sizeof
(
path
));
GlobalUnlock
(
hdrop
);
return
hdrop
;
}
static
void
test_nonole_clipboard
(
void
)
{
HRESULT
hr
;
...
...
@@ -1524,6 +1544,7 @@ static void test_nonole_clipboard(void)
HENHMETAFILE
emf
;
STGMEDIUM
med
;
DWORD
obj_type
;
HDROP
hdrop
;
r
=
OpenClipboard
(
NULL
);
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
...
...
@@ -1552,6 +1573,7 @@ static void test_nonole_clipboard(void)
hblob
=
GlobalAlloc
(
GMEM_DDESHARE
|
GMEM_MOVEABLE
|
GMEM_ZEROINIT
,
10
);
emf
=
create_emf
();
hstorage
=
create_storage
();
hdrop
=
create_dropped_file
();
r
=
OpenClipboard
(
NULL
);
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
...
...
@@ -1563,6 +1585,8 @@ static void test_nonole_clipboard(void)
ok
(
h
==
emf
,
"got %p
\n
"
,
h
);
h
=
SetClipboardData
(
cf_storage
,
hstorage
);
ok
(
h
==
hstorage
,
"got %p
\n
"
,
h
);
h
=
SetClipboardData
(
CF_HDROP
,
hdrop
);
ok
(
h
==
hdrop
,
"got %p
\n
"
,
h
);
r
=
CloseClipboard
();
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
...
...
@@ -1609,6 +1633,14 @@ static void test_nonole_clipboard(void)
ok
(
fmt
.
tymed
==
(
TYMED_ISTREAM
|
TYMED_HGLOBAL
),
"tymed %x
\n
"
,
fmt
.
tymed
);
hr
=
IEnumFORMATETC_Next
(
enum_fmt
,
1
,
&
fmt
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
fmt
.
cfFormat
==
CF_HDROP
,
"cf %04x
\n
"
,
fmt
.
cfFormat
);
ok
(
fmt
.
ptd
==
NULL
,
"ptd %p
\n
"
,
fmt
.
ptd
);
ok
(
fmt
.
dwAspect
==
DVASPECT_CONTENT
,
"aspect %x
\n
"
,
fmt
.
dwAspect
);
ok
(
fmt
.
lindex
==
-
1
,
"lindex %d
\n
"
,
fmt
.
lindex
);
ok
(
fmt
.
tymed
==
(
TYMED_ISTREAM
|
TYMED_HGLOBAL
),
"tymed %x
\n
"
,
fmt
.
tymed
);
hr
=
IEnumFORMATETC_Next
(
enum_fmt
,
1
,
&
fmt
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
/* User32 adds some synthesised formats */
ok
(
fmt
.
cfFormat
==
CF_LOCALE
,
"cf %04x
\n
"
,
fmt
.
cfFormat
);
...
...
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