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
480c10cc
Commit
480c10cc
authored
Mar 25, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Mar 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add support for parsing the 'CONTENTS' stream.
parent
d864387a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
datacache.c
dlls/ole32/datacache.c
+31
-1
No files found.
dlls/ole32/datacache.c
View file @
480c10cc
...
...
@@ -92,6 +92,7 @@ enum stream_type
{
no_stream
,
pres_stream
,
contents_stream
};
typedef
struct
DataCacheEntry
...
...
@@ -1293,6 +1294,26 @@ static HRESULT parse_pres_streams( DataCache *This, IStorage *stg )
return
S_OK
;
}
static
const
FORMATETC
static_dib_fmt
=
{
CF_DIB
,
NULL
,
DVASPECT_CONTENT
,
-
1
,
TYMED_HGLOBAL
};
static
HRESULT
parse_contents_stream
(
DataCache
*
This
,
IStorage
*
stg
,
IStream
*
stm
)
{
HRESULT
hr
;
STATSTG
stat
;
const
FORMATETC
*
fmt
;
hr
=
IStorage_Stat
(
stg
,
&
stat
,
STATFLAG_NONAME
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
IsEqualCLSID
(
&
stat
.
clsid
,
&
CLSID_Picture_Dib
))
fmt
=
&
static_dib_fmt
;
else
return
E_FAIL
;
return
add_cache_entry
(
This
,
fmt
,
stm
,
contents_stream
);
}
static
const
WCHAR
CONTENTS
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
/************************************************************************
* DataCache_Load (IPersistStorage)
...
...
@@ -1306,12 +1327,21 @@ static HRESULT WINAPI DataCache_Load( IPersistStorage *iface, IStorage *pStg )
{
DataCache
*
This
=
impl_from_IPersistStorage
(
iface
);
HRESULT
hr
;
IStream
*
stm
;
TRACE
(
"(%p, %p)
\n
"
,
iface
,
pStg
);
IPersistStorage_HandsOffStorage
(
iface
);
hr
=
parse_pres_streams
(
This
,
pStg
);
hr
=
IStorage_OpenStream
(
pStg
,
CONTENTS
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stm
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
parse_contents_stream
(
This
,
pStg
,
stm
);
IStream_Release
(
stm
);
}
else
hr
=
parse_pres_streams
(
This
,
pStg
);
if
(
SUCCEEDED
(
hr
))
{
...
...
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