Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
24a690e9
Commit
24a690e9
authored
Jul 19, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use a single implementation for 1Ole stream initialization.
parent
c3fd306f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
31 deletions
+6
-31
defaulthandler.c
dlls/ole32/defaulthandler.c
+6
-31
No files found.
dlls/ole32/defaulthandler.c
View file @
24a690e9
...
...
@@ -58,6 +58,7 @@
#include "ole2.h"
#include "compobj_private.h"
#include "storage32.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -1583,10 +1584,8 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_IsDirty(
}
/***********************************************************************
* init_ole_stream
*
* Creates the '\1Ole' stream.
* The format of this stream is as follows:
* The format of '\1Ole' stream is as follows:
*
* DWORD Version == 0x02000001
* DWORD Flags - low bit set indicates the object is a link otherwise it's embedded.
...
...
@@ -1611,29 +1610,6 @@ typedef struct
}
ole_stream_header_t
;
static
const
DWORD
ole_stream_version
=
0x02000001
;
static
void
init_ole_stream
(
IStorage
*
storage
)
{
HRESULT
hr
;
IStream
*
stream
;
hr
=
IStorage_CreateStream
(
storage
,
OleStream
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
0
,
&
stream
);
if
(
SUCCEEDED
(
hr
))
{
DWORD
written
;
ole_stream_header_t
header
;
header
.
version
=
ole_stream_version
;
header
.
flags
=
0
;
header
.
link_update_opt
=
0
;
header
.
res
=
0
;
header
.
moniker_size
=
0
;
IStream_Write
(
stream
,
&
header
,
sizeof
(
header
),
&
written
);
IStream_Release
(
stream
);
}
return
;
}
static
HRESULT
load_ole_stream
(
DefaultHandler
*
This
,
IStorage
*
storage
)
{
IStream
*
stream
;
...
...
@@ -1663,10 +1639,8 @@ static HRESULT load_ole_stream(DefaultHandler *This, IStorage *storage)
IStream_Release
(
stream
);
}
else
{
init_ole_stream
(
storage
);
hr
=
S_OK
;
}
hr
=
STORAGE_CreateOleStream
(
storage
,
0
);
return
hr
;
}
...
...
@@ -1682,7 +1656,8 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_InitNew(
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pStg
);
init_ole_stream
(
pStg
);
hr
=
STORAGE_CreateOleStream
(
pStg
,
0
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
IPersistStorage_InitNew
(
This
->
dataCache_PersistStg
,
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