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
6417a277
Commit
6417a277
authored
Apr 23, 2014
by
Vincent Povirk
Committed by
Alexandre Julliard
May 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Map STGM_SHARE_EXCLUSIVE to FILE_SHARE_READ.
parent
04735d6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
storage32.c
dlls/ole32/storage32.c
+1
-2
storage32.c
dlls/ole32/tests/storage32.c
+4
-6
No files found.
dlls/ole32/storage32.c
View file @
6417a277
...
...
@@ -8311,9 +8311,8 @@ static DWORD GetShareModeFromSTGM(DWORD stgm)
case
STGM_SHARE_DENY_READ
:
return
FILE_SHARE_WRITE
;
case
STGM_SHARE_DENY_WRITE
:
return
FILE_SHARE_READ
;
case
STGM_SHARE_EXCLUSIVE
:
return
0
;
return
FILE_SHARE_READ
;
}
ERR
(
"Invalid share mode!
\n
"
);
assert
(
0
);
...
...
dlls/ole32/tests/storage32.c
View file @
6417a277
...
...
@@ -868,11 +868,9 @@ static void test_storage_refcount(void)
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_PRIORITY
,
NULL
,
0
,
&
stgprio
);
ok
(
r
==
S_OK
,
"StgOpenStorage failed with error 0x%08x
\n
"
,
r
);
todo_wine
{
/* non-transacted mode read/write fails */
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_LOCKVIOLATION
,
"StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08x
\n
"
,
r
);
}
/* non-transacted mode read-only succeeds */
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_SHARE_DENY_WRITE
|
STGM_READ
,
NULL
,
0
,
&
stg
);
...
...
@@ -3173,13 +3171,13 @@ static const int roex_fail_ranges[] = { 0x0,-1 };
static
const
struct
lock_test
lock_tests
[]
=
{
{
STGM_PRIORITY
,
FALSE
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
priority_locked_bytes
,
pr_fail_ranges
,
FALSE
},
{
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
0
,
TRU
E
},
{
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
|
STGM_TRANSACTED
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
0
,
TRU
E
},
{
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
0
,
FALS
E
},
{
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
|
STGM_TRANSACTED
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
0
,
FALS
E
},
{
STGM_CREATE
|
STGM_READWRITE
|
STGM_TRANSACTED
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
rw_locked_bytes
,
0
,
FALSE
},
{
STGM_CREATE
|
STGM_READWRITE
|
STGM_SHARE_DENY_WRITE
|
STGM_TRANSACTED
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwdw_locked_bytes
,
0
,
FALSE
},
{
STGM_CREATE
|
STGM_WRITE
|
STGM_SHARE_DENY_WRITE
|
STGM_TRANSACTED
,
TRUE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
wodw_locked_bytes
,
0
,
FALSE
},
{
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
rwex_fail_ranges
,
TRU
E
},
{
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
rwex_fail_ranges
,
TRU
E
},
{
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
rwex_fail_ranges
,
FALS
E
},
{
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
rwex_fail_ranges
,
FALS
E
},
{
STGM_READWRITE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
rw_locked_bytes
,
rw_fail_ranges
,
TRUE
},
{
STGM_READ
|
STGM_SHARE_DENY_WRITE
,
FALSE
,
GENERIC_READ
,
FILE_SHARE_READ
,
no_locked_bytes
,
dw_fail_ranges
,
TRUE
},
{
STGM_READ
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
tr_locked_bytes
,
tr_fail_ranges
,
TRUE
},
...
...
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