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
b4ade51a
Commit
b4ade51a
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: Accept STGM_TRANSACTED with no share mode specified.
parent
6417a277
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
storage32.c
dlls/ole32/storage32.c
+7
-0
storage32.c
dlls/ole32/tests/storage32.c
+3
-6
No files found.
dlls/ole32/storage32.c
View file @
b4ade51a
...
...
@@ -8251,6 +8251,10 @@ static HRESULT validateSTGM(DWORD stgm)
case
STGM_SHARE_DENY_WRITE
:
case
STGM_SHARE_EXCLUSIVE
:
break
;
case
0
:
if
(
!
(
stgm
&
STGM_TRANSACTED
))
return
E_FAIL
;
break
;
default
:
return
E_FAIL
;
}
...
...
@@ -8306,6 +8310,9 @@ static DWORD GetShareModeFromSTGM(DWORD stgm)
{
switch
(
STGM_SHARE_MODE
(
stgm
))
{
case
0
:
assert
(
stgm
&
STGM_TRANSACTED
);
/* fall-through */
case
STGM_SHARE_DENY_NONE
:
return
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
case
STGM_SHARE_DENY_READ
:
...
...
dlls/ole32/tests/storage32.c
View file @
b4ade51a
...
...
@@ -3178,9 +3178,9 @@ static const struct lock_test lock_tests[] = {
{
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
,
FALSE
},
{
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
rwex_locked_bytes
,
rwex_fail_ranges
,
FALSE
},
{
STGM_READWRITE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
rw_locked_bytes
,
rw_fail_ranges
,
TRU
E
},
{
STGM_READWRITE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
rw_locked_bytes
,
rw_fail_ranges
,
FALS
E
},
{
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
,
TRU
E
},
{
STGM_READ
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
tr_locked_bytes
,
tr_fail_ranges
,
FALS
E
},
{
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
FALSE
,
GENERIC_READ
,
FILE_SHARE_READ
,
roex_locked_bytes
,
roex_fail_ranges
,
TRUE
},
{
STGM_READ
|
STGM_SHARE_EXCLUSIVE
|
STGM_TRANSACTED
,
FALSE
,
GENERIC_READ
,
FILE_SHARE_READ
,
roex_locked_bytes
,
roex_fail_ranges
,
TRUE
},
};
...
...
@@ -3280,10 +3280,7 @@ static void test_locking(void)
IStorage_Release
(
stg
);
hr
=
StgOpenStorage
(
filename
,
NULL
,
current
->
stg_mode
,
NULL
,
0
,
&
stg
);
if
(
current
->
stg_mode
==
(
STGM_READ
|
STGM_TRANSACTED
)
||
current
->
stg_mode
==
(
STGM_READWRITE
|
STGM_TRANSACTED
))
todo_wine
ok
(
SUCCEEDED
(
hr
),
"StgOpenStorage with mode %x failed with hr %x
\n
"
,
current
->
stg_mode
,
hr
);
else
ok
(
SUCCEEDED
(
hr
),
"StgOpenStorage with mode %x failed with hr %x
\n
"
,
current
->
stg_mode
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"StgOpenStorage with mode %x failed with hr %x
\n
"
,
current
->
stg_mode
,
hr
);
if
(
FAILED
(
hr
))
{
DeleteFileW
(
filename
);
...
...
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