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
f3db25fc
Commit
f3db25fc
authored
Mar 10, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Don't treat the header as a big block in StorageImpl_SaveFileHeader.
parent
7f3211f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
storage32.c
dlls/ole32/storage32.c
+13
-7
No files found.
dlls/ole32/storage32.c
View file @
f3db25fc
...
...
@@ -3399,29 +3399,35 @@ static HRESULT StorageImpl_LoadFileHeader(
/******************************************************************************
* Storage32Impl_SaveFileHeader
*
* This method will save to the file the header
, i.e. big block -1.
* This method will save to the file the header
*/
static
void
StorageImpl_SaveFileHeader
(
StorageImpl
*
This
)
{
BYTE
headerBigBlock
[
BIG_BLOCK
_SIZE
];
BYTE
headerBigBlock
[
HEADER
_SIZE
];
int
index
;
BOOL
success
;
HRESULT
hr
;
ULARGE_INTEGER
offset
;
DWORD
bytes_read
,
bytes_written
;
/*
* Get a pointer to the big block of data containing the header.
*/
success
=
StorageImpl_ReadBigBlock
(
This
,
-
1
,
headerBigBlock
);
offset
.
u
.
HighPart
=
0
;
offset
.
u
.
LowPart
=
0
;
hr
=
StorageImpl_ReadAt
(
This
,
offset
,
headerBigBlock
,
HEADER_SIZE
,
&
bytes_read
);
if
(
SUCCEEDED
(
hr
)
&&
bytes_read
!=
HEADER_SIZE
)
hr
=
STG_E_FILENOTFOUND
;
/*
* If the block read failed, the file is probably new.
*/
if
(
!
success
)
if
(
FAILED
(
hr
)
)
{
/*
* Initialize for all unknown fields.
*/
memset
(
headerBigBlock
,
0
,
BIG_BLOCK
_SIZE
);
memset
(
headerBigBlock
,
0
,
HEADER
_SIZE
);
/*
* Initialize the magic number.
...
...
@@ -3492,7 +3498,7 @@ static void StorageImpl_SaveFileHeader(
/*
* Write the big block back to the file.
*/
StorageImpl_Write
BigBlock
(
This
,
-
1
,
headerBigBlock
);
StorageImpl_Write
At
(
This
,
offset
,
headerBigBlock
,
HEADER_SIZE
,
&
bytes_written
);
}
/******************************************************************************
...
...
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