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
11e4b21a
Commit
11e4b21a
authored
Apr 18, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: More tests and fixes for STGM_PRIORITY.
parent
d7424771
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
storage32.c
dlls/ole32/storage32.c
+7
-1
storage32.c
dlls/ole32/tests/storage32.c
+23
-0
No files found.
dlls/ole32/storage32.c
View file @
11e4b21a
...
...
@@ -5911,8 +5911,14 @@ HRESULT WINAPI StgOpenStorage(
/* STGM_PRIORITY implies exclusive access */
if
(
grfMode
&
STGM_PRIORITY
)
{
if
(
grfMode
&
(
STGM_TRANSACTED
|
STGM_SIMPLE
|
STGM_NOSCRATCH
|
STGM_NOSNAPSHOT
))
return
STG_E_INVALIDFLAG
;
if
(
grfMode
&
STGM_DELETEONRELEASE
)
return
STG_E_INVALIDFUNCTION
;
if
(
STGM_ACCESS_MODE
(
grfMode
)
!=
STGM_READ
)
return
STG_E_INVALIDFLAG
;
grfMode
&=
~
0xf0
;
/* remove the existing sharing mode */
grfMode
|=
STGM_SHARE_
EXCLUSIV
E
;
grfMode
|=
STGM_SHARE_
DENY_WRIT
E
;
}
/*
...
...
dlls/ole32/tests/storage32.c
View file @
11e4b21a
...
...
@@ -478,9 +478,32 @@ static void test_open_storage(void)
stg
=
NULL
;
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
S_OK
,
"should succeed
\n
"
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_PRIORITY
,
NULL
,
0
,
&
stg2
);
ok
(
r
==
S_OK
,
"should succeed
\n
"
);
if
(
stg2
)
IStorage_Release
(
stg2
);
if
(
stg
)
IStorage_Release
(
stg
);
stg
=
NULL
;
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_PRIORITY
|
STGM_READWRITE
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_TRANSACTED
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_SIMPLE
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_DELETEONRELEASE
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFUNCTION
,
"should fail
\n
"
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_NOSCRATCH
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_NOSNAPSHOT
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
r
=
DeleteFileW
(
filename
);
ok
(
r
,
"file didn't exist
\n
"
);
}
...
...
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