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
c29f3dff
Commit
c29f3dff
authored
Apr 18, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Accept STGM_DIRECT_SWMR mode.
parent
a90c1efe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
storage32.c
dlls/ole32/storage32.c
+10
-1
storage32.c
dlls/ole32/tests/storage32.c
+16
-1
No files found.
dlls/ole32/storage32.c
View file @
c29f3dff
...
@@ -7604,7 +7604,16 @@ HRESULT WINAPI StgOpenStorage(
...
@@ -7604,7 +7604,16 @@ HRESULT WINAPI StgOpenStorage(
/*
/*
* Validate the sharing mode
* Validate the sharing mode
*/
*/
if
(
!
(
grfMode
&
(
STGM_TRANSACTED
|
STGM_PRIORITY
)))
if
(
grfMode
&
STGM_DIRECT_SWMR
)
{
if
((
STGM_SHARE_MODE
(
grfMode
)
!=
STGM_SHARE_DENY_WRITE
)
&&
(
STGM_SHARE_MODE
(
grfMode
)
!=
STGM_SHARE_DENY_NONE
))
{
hr
=
STG_E_INVALIDFLAG
;
goto
end
;
}
}
else
if
(
!
(
grfMode
&
(
STGM_TRANSACTED
|
STGM_PRIORITY
)))
switch
(
STGM_SHARE_MODE
(
grfMode
))
switch
(
STGM_SHARE_MODE
(
grfMode
))
{
{
case
STGM_SHARE_EXCLUSIVE
:
case
STGM_SHARE_EXCLUSIVE
:
...
...
dlls/ole32/tests/storage32.c
View file @
c29f3dff
...
@@ -1889,7 +1889,7 @@ static void test_access(void)
...
@@ -1889,7 +1889,7 @@ static void test_access(void)
STGM_SHARE_EXCLUSIVE
|
STGM_DIRECT
,
0
,
&
stg
);
STGM_SHARE_EXCLUSIVE
|
STGM_DIRECT
,
0
,
&
stg
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
test_file_access
(
"winetest"
,
create
);
test_file_access
(
fileA
,
create
);
hr
=
IStorage_Commit
(
stg
,
STGC_DEFAULT
);
hr
=
IStorage_Commit
(
stg
,
STGC_DEFAULT
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
...
@@ -1955,6 +1955,21 @@ static void test_access(void)
...
@@ -1955,6 +1955,21 @@ static void test_access(void)
test_file_access
(
fileA
,
create_close
);
test_file_access
(
fileA
,
create_close
);
DeleteFileA
(
fileA
);
DeleteFileA
(
fileA
);
/* STGM_DIRECT_SWMR | STGM_READ | STGM_SHARE_DENY_NONE - reader mode for direct SWMR mode */
hr
=
StgCreateDocfile
(
fileW
,
STGM_CREATE
|
STGM_READWRITE
|
STGM_SHARE_DENY_WRITE
|
STGM_TRANSACTED
,
0
,
&
stg
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
IStorage_Release
(
stg
);
hr
=
StgOpenStorage
(
fileW
,
NULL
,
STGM_DIRECT_SWMR
|
STGM_READ
|
STGM_SHARE_DENY_NONE
,
NULL
,
0
,
&
stg
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
test_file_access
(
fileA
,
create
);
IStorage_Release
(
stg
);
test_file_access
(
fileA
,
create_close
);
DeleteFileA
(
fileA
);
}
}
static
void
test_readonly
(
void
)
static
void
test_readonly
(
void
)
...
...
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