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
e71c696b
Commit
e71c696b
authored
Oct 28, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Move the low-level functionality of WriteProperty to a new function.
parent
56622de9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
10 deletions
+32
-10
storage32.c
dlls/ole32/storage32.c
+27
-10
storage32.h
dlls/ole32/storage32.h
+5
-0
No files found.
dlls/ole32/storage32.c
View file @
e71c696b
...
...
@@ -3072,6 +3072,32 @@ HRESULT StorageImpl_ReadRawDirEntry(StorageImpl *This, ULONG index, BYTE *buffer
}
/******************************************************************************
* StorageImpl_WriteRawDirEntry
*
* This method will write the raw data from a directory entry in the file.
*
* buffer must be PROPSET_BLOCK_SIZE bytes long.
*/
HRESULT
StorageImpl_WriteRawDirEntry
(
StorageImpl
*
This
,
ULONG
index
,
const
BYTE
*
buffer
)
{
ULARGE_INTEGER
offset
;
HRESULT
hr
;
ULONG
bytesRead
;
offset
.
u
.
HighPart
=
0
;
offset
.
u
.
LowPart
=
index
*
PROPSET_BLOCK_SIZE
;
hr
=
BlockChainStream_WriteAt
(
This
->
rootBlockChain
,
offset
,
PROPSET_BLOCK_SIZE
,
buffer
,
&
bytesRead
);
return
hr
;
}
/******************************************************************************
* Storage32Impl_ReadProperty
*
* This method will read the specified property from the property chain.
...
...
@@ -3171,12 +3197,7 @@ BOOL StorageImpl_WriteProperty(
const
StgProperty
*
buffer
)
{
BYTE
currentProperty
[
PROPSET_BLOCK_SIZE
];
ULARGE_INTEGER
offsetInPropSet
;
HRESULT
writeRes
;
ULONG
bytesWritten
;
offsetInPropSet
.
u
.
HighPart
=
0
;
offsetInPropSet
.
u
.
LowPart
=
index
*
PROPSET_BLOCK_SIZE
;
memset
(
currentProperty
,
0
,
PROPSET_BLOCK_SIZE
);
...
...
@@ -3242,11 +3263,7 @@ BOOL StorageImpl_WriteProperty(
OFFSET_PS_SIZE
,
buffer
->
size
.
u
.
LowPart
);
writeRes
=
BlockChainStream_WriteAt
(
This
->
rootBlockChain
,
offsetInPropSet
,
PROPSET_BLOCK_SIZE
,
currentProperty
,
&
bytesWritten
);
writeRes
=
StorageImpl_WriteRawDirEntry
(
This
,
index
,
currentProperty
);
return
SUCCEEDED
(
writeRes
)
?
TRUE
:
FALSE
;
}
...
...
dlls/ole32/storage32.h
View file @
e71c696b
...
...
@@ -295,6 +295,11 @@ HRESULT StorageImpl_ReadRawDirEntry(
ULONG
index
,
BYTE
*
buffer
);
HRESULT
StorageImpl_WriteRawDirEntry
(
StorageImpl
*
This
,
ULONG
index
,
const
BYTE
*
buffer
);
BOOL
StorageImpl_ReadProperty
(
StorageImpl
*
This
,
ULONG
index
,
...
...
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