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
56bc0515
Commit
56bc0515
authored
Dec 30, 2009
by
Alexander Kochetkov
Committed by
Alexandre Julliard
Dec 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/storage32: Fix return value for invalid access mode in OpenStream.
parent
75fde14f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
storage32.c
dlls/ole32/storage32.c
+1
-1
storage32.c
dlls/ole32/tests/storage32.c
+13
-0
No files found.
dlls/ole32/storage32.c
View file @
56bc0515
...
...
@@ -448,7 +448,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
if
(
!
(
This
->
openFlags
&
STGM_TRANSACTED
))
{
if
(
STGM_ACCESS_MODE
(
grfMode
)
>
STGM_ACCESS_MODE
(
This
->
openFlags
)
)
{
res
=
STG_E_
ACCESSDENIED
;
res
=
STG_E_
INVALIDFLAG
;
goto
end
;
}
}
...
...
dlls/ole32/tests/storage32.c
View file @
56bc0515
...
...
@@ -355,6 +355,19 @@ static void test_storage_stream(void)
r
=
IStorage_Release
(
stg
);
ok
(
r
==
0
,
"wrong ref count
\n
"
);
/* try create some invalid streams */
stg
=
NULL
;
stm
=
NULL
;
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_READ
|
STGM_SHARE_DENY_WRITE
,
NULL
,
0
,
&
stg
);
ok
(
r
==
S_OK
,
"should succeed
\n
"
);
if
(
stg
)
{
r
=
IStorage_OpenStream
(
stg
,
stmname
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"IStorage->OpenStream should return STG_E_INVALIDFLAG instead of 0x%08x
\n
"
,
r
);
IStorage_Release
(
stg
);
}
r
=
DeleteFileA
(
filenameA
);
ok
(
r
,
"file should 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