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
b05d392d
Commit
b05d392d
authored
Oct 27, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Oct 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Try to load the '\1Ole' stream and create it if it doesn't exist.
parent
0cc2c531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
1 deletion
+40
-1
defaulthandler.c
dlls/ole32/defaulthandler.c
+40
-1
No files found.
dlls/ole32/defaulthandler.c
View file @
b05d392d
...
...
@@ -1598,6 +1598,42 @@ static void init_ole_stream(IStorage *storage)
return
;
}
static
HRESULT
load_ole_stream
(
DefaultHandler
*
This
,
IStorage
*
storage
)
{
IStream
*
stream
;
HRESULT
hr
;
hr
=
IStorage_OpenStream
(
storage
,
OleStream
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stream
);
if
(
SUCCEEDED
(
hr
))
{
DWORD
read
;
ole_stream_header_t
header
;
hr
=
IStream_Read
(
stream
,
&
header
,
sizeof
(
header
),
&
read
);
if
(
hr
==
S_OK
&&
read
==
sizeof
(
header
)
&&
header
.
version
==
ole_stream_version
)
{
if
(
header
.
flags
&
1
)
{
/* FIXME: Read the moniker and deal with the link */
FIXME
(
"Linked objects are not supported yet
\n
"
);
}
}
else
{
WARN
(
"Incorrect OleStream header
\n
"
);
hr
=
DV_E_CLIPFORMAT
;
}
IStream_Release
(
stream
);
}
else
{
init_ole_stream
(
storage
);
hr
=
S_OK
;
}
return
hr
;
}
/************************************************************************
* DefaultHandler_IPersistStorage_InitNew
*
...
...
@@ -1641,7 +1677,10 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_Load(
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pStg
);
hr
=
IPersistStorage_Load
(
This
->
dataCache_PersistStg
,
pStg
);
hr
=
load_ole_stream
(
This
,
pStg
);
if
(
SUCCEEDED
(
hr
))
hr
=
IPersistStorage_Load
(
This
->
dataCache_PersistStg
,
pStg
);
if
(
SUCCEEDED
(
hr
)
&&
object_is_running
(
This
))
hr
=
IPersistStorage_Load
(
This
->
pPSDelegate
,
pStg
);
...
...
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