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
9bacd00c
Commit
9bacd00c
authored
Apr 16, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Apr 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add support for getting storage based objects from a flushed clipboard.
parent
25d7ecde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
clipboard.c
dlls/ole32/clipboard.c
+39
-1
No files found.
dlls/ole32/clipboard.c
View file @
9bacd00c
...
...
@@ -986,6 +986,42 @@ static HRESULT get_stgmed_for_stream(HGLOBAL h, STGMEDIUM *med)
}
/************************************************************************
* get_stgmed_for_storage
*
* Returns a stg medium with a storage based on the handle
*/
static
HRESULT
get_stgmed_for_storage
(
HGLOBAL
h
,
STGMEDIUM
*
med
)
{
HRESULT
hr
;
HGLOBAL
dst
;
ILockBytes
*
lbs
;
med
->
pUnkForRelease
=
NULL
;
med
->
tymed
=
TYMED_NULL
;
hr
=
dup_global_mem
(
h
,
GMEM_MOVEABLE
,
&
dst
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
CreateILockBytesOnHGlobal
(
dst
,
TRUE
,
&
lbs
);
if
(
FAILED
(
hr
))
{
GlobalFree
(
dst
);
return
hr
;
}
hr
=
StgOpenStorageOnILockBytes
(
lbs
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
med
->
u
.
pstg
);
ILockBytes_Release
(
lbs
);
if
(
FAILED
(
hr
))
{
GlobalFree
(
dst
);
return
hr
;
}
med
->
tymed
=
TYMED_ISTORAGE
;
return
hr
;
}
/************************************************************************
* snapshot_GetData
*/
static
HRESULT
WINAPI
snapshot_GetData
(
IDataObject
*
iface
,
FORMATETC
*
fmt
,
...
...
@@ -1030,7 +1066,9 @@ static HRESULT WINAPI snapshot_GetData(IDataObject *iface, FORMATETC *fmt,
else
/* non-Ole format */
mask
=
fmt
->
tymed
&
TYMED_HGLOBAL
;
if
(
mask
&
TYMED_HGLOBAL
)
if
(
mask
&
TYMED_ISTORAGE
)
hr
=
get_stgmed_for_storage
(
h
,
med
);
else
if
(
mask
&
TYMED_HGLOBAL
)
hr
=
get_stgmed_for_global
(
h
,
med
);
else
if
(
mask
&
TYMED_ISTREAM
)
hr
=
get_stgmed_for_stream
(
h
,
med
);
...
...
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