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
cf5e6c57
Commit
cf5e6c57
authored
Dec 02, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Forbid substorages of simple mode storages.
parent
e48f4253
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
storage32.c
dlls/ole32/storage32.c
+11
-0
storage32.c
dlls/ole32/tests/storage32.c
+10
-1
No files found.
dlls/ole32/storage32.c
View file @
cf5e6c57
...
...
@@ -530,6 +530,12 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
goto
end
;
}
if
(
This
->
openFlags
&
STGM_SIMPLE
)
{
res
=
STG_E_INVALIDFUNCTION
;
goto
end
;
}
/* as documented */
if
(
snbExclude
!=
NULL
)
{
...
...
@@ -1022,6 +1028,11 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
if
(
ppstg
==
0
)
return
STG_E_INVALIDPOINTER
;
if
(
This
->
openFlags
&
STGM_SIMPLE
)
{
return
STG_E_INVALIDFUNCTION
;
}
if
(
pwcsName
==
0
)
return
STG_E_INVALIDNAME
;
...
...
dlls/ole32/tests/storage32.c
View file @
cf5e6c57
...
...
@@ -1774,9 +1774,10 @@ static void test_simple(void)
{
/* Tests for STGM_SIMPLE mode */
IStorage
*
stg
;
IStorage
*
stg
,
*
stg2
;
HRESULT
r
;
IStream
*
stm
;
static
const
WCHAR
stgname
[]
=
{
'S'
,
't'
,
'g'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname2
[]
=
{
'S'
,
'm'
,
'a'
,
'l'
,
'l'
,
0
};
LARGE_INTEGER
pos
;
...
...
@@ -1789,6 +1790,10 @@ static void test_simple(void)
r
=
StgCreateDocfile
(
filename
,
STGM_SIMPLE
|
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stg
);
ok
(
r
==
S_OK
,
"got %08x
\n
"
,
r
);
r
=
IStorage_CreateStorage
(
stg
,
stgname
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
0
,
&
stg2
);
ok
(
r
==
STG_E_INVALIDFUNCTION
,
"got %08x
\n
"
,
r
);
if
(
SUCCEEDED
(
r
))
IStorage_Release
(
stg2
);
r
=
IStorage_CreateStream
(
stg
,
stmname
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
0
,
&
stm
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"got %08x
\n
"
,
r
);
r
=
IStorage_CreateStream
(
stg
,
stmname
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
0
,
&
stm
);
...
...
@@ -1853,6 +1858,10 @@ static void test_simple(void)
}
ok
(
r
==
S_OK
,
"got %08x
\n
"
,
r
);
r
=
IStorage_OpenStorage
(
stg
,
stgname
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg2
);
ok
(
r
==
STG_E_INVALIDFUNCTION
,
"got %08x
\n
"
,
r
);
if
(
SUCCEEDED
(
r
))
IStorage_Release
(
stg2
);
r
=
IStorage_OpenStream
(
stg
,
stmname
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
ok
(
r
==
S_OK
,
"got %08x
\n
"
,
r
);
...
...
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