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
5132f602
Commit
5132f602
authored
Apr 19, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Store SMWR storage instance role separately.
parent
8a9ab424
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
storage32.c
dlls/ole32/storage32.c
+9
-3
storage32.h
dlls/ole32/storage32.h
+7
-0
No files found.
dlls/ole32/storage32.c
View file @
5132f602
...
...
@@ -385,9 +385,8 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface(
{
*
ppvObject
=
&
This
->
IPropertySetStorage_iface
;
}
/* locking interface is report for writer only */
else
if
(
IsEqualGUID
(
&
IID_IDirectWriterLock
,
riid
)
&&
(
This
->
openFlags
==
(
STGM_DIRECT_SWMR
|
STGM_READWRITE
|
STGM_SHARE_DENY_WRITE
)))
/* locking interface is reported for writer only */
else
if
(
IsEqualGUID
(
&
IID_IDirectWriterLock
,
riid
)
&&
This
->
lockingrole
==
SWMR_Writer
)
{
*
ppvObject
=
&
This
->
IDirectWriterLock_iface
;
}
...
...
@@ -2785,6 +2784,13 @@ static HRESULT StorageImpl_Construct(
This
->
base
.
ref
=
1
;
This
->
base
.
create
=
create
;
if
(
openFlags
==
(
STGM_DIRECT_SWMR
|
STGM_READWRITE
|
STGM_SHARE_DENY_WRITE
))
This
->
base
.
lockingrole
=
SWMR_Writer
;
else
if
(
openFlags
==
(
STGM_DIRECT_SWMR
|
STGM_READ
|
STGM_SHARE_DENY_NONE
))
This
->
base
.
lockingrole
=
SWMR_Reader
;
else
This
->
base
.
lockingrole
=
SWMR_None
;
This
->
base
.
reverted
=
0
;
/*
...
...
dlls/ole32/storage32.h
View file @
5132f602
...
...
@@ -163,6 +163,12 @@ HRESULT FileLockBytesImpl_Construct(HANDLE hFile, DWORD openFlags, LPCWSTR pwcsN
HRESULT
STORAGE_CreateOleStream
(
IStorage
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
OLECONVERT_CreateCompObjStream
(
LPSTORAGE
pStorage
,
LPCSTR
strOleTypeName
)
DECLSPEC_HIDDEN
;
enum
swmr_mode
{
SWMR_None
,
SWMR_Writer
,
SWMR_Reader
};
/****************************************************************************
* StorageBaseImpl definitions.
...
...
@@ -223,6 +229,7 @@ struct StorageBaseImpl
* the transacted snapshot or cache.
*/
StorageBaseImpl
*
transactedChild
;
enum
swmr_mode
lockingrole
;
};
/* virtual methods for StorageBaseImpl objects */
...
...
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