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
908e9e88
Commit
908e9e88
authored
Sep 07, 2005
by
Richard Cohen
Committed by
Alexandre Julliard
Sep 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relax the share mode validation for transacted storage, with a test.
parent
3915b167
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
storage32.c
dlls/ole32/storage32.c
+10
-9
storage32.c
dlls/ole32/tests/storage32.c
+8
-0
No files found.
dlls/ole32/storage32.c
View file @
908e9e88
...
...
@@ -5802,15 +5802,16 @@ HRESULT WINAPI StgOpenStorage(
/*
* Validate the sharing mode
*/
switch
(
STGM_SHARE_MODE
(
grfMode
))
{
case
STGM_SHARE_EXCLUSIVE
:
case
STGM_SHARE_DENY_WRITE
:
break
;
default:
hr
=
STG_E_INVALIDFLAG
;
goto
end
;
}
if
(
!
(
grfMode
&
STGM_TRANSACTED
))
switch
(
STGM_SHARE_MODE
(
grfMode
))
{
case
STGM_SHARE_EXCLUSIVE
:
case
STGM_SHARE_DENY_WRITE
:
break
;
default:
hr
=
STG_E_INVALIDFLAG
;
goto
end
;
}
/*
* Validate the STGM flags
...
...
dlls/ole32/tests/storage32.c
View file @
908e9e88
...
...
@@ -393,6 +393,14 @@ static void test_open_storage(void)
ok
(
r
==
STG_E_INVALIDFLAG
,
"StgOpenStorage failed
\n
"
);
/* open it for real */
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_SHARE_DENY_NONE
|
STGM_READ
|
STGM_TRANSACTED
,
NULL
,
0
,
&
stg
);
/* XLViewer 97/2000 */
ok
(
r
==
S_OK
,
"StgOpenStorage failed
\n
"
);
if
(
stg
)
{
r
=
IStorage_Release
(
stg
);
ok
(
r
==
0
,
"wrong ref count
\n
"
);
}
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_SHARE_DENY_WRITE
|
STGM_READ
,
NULL
,
0
,
&
stg
);
ok
(
r
==
S_OK
,
"StgOpenStorage failed
\n
"
);
if
(
stg
)
...
...
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