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
1a12141d
Commit
1a12141d
authored
Dec 04, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add a test for modifying read-only substorage objects.
parent
65090440
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
storage32.c
dlls/ole32/tests/storage32.c
+21
-2
No files found.
dlls/ole32/tests/storage32.c
View file @
1a12141d
...
...
@@ -1348,7 +1348,7 @@ static void test_parent_free(void)
static
void
test_nonroot_transacted
(
void
)
{
IStorage
*
stg
=
NULL
,
*
stg2
=
NULL
;
IStorage
*
stg
=
NULL
,
*
stg2
=
NULL
,
*
stg3
=
NULL
;
HRESULT
r
;
IStream
*
stm
=
NULL
;
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
...
...
@@ -1398,7 +1398,26 @@ static void test_nonroot_transacted(void)
IStorage_Release
(
stg2
);
}
IStream_Release
(
stg
);
/* create a read-only transacted substorage */
r
=
IStorage_OpenStorage
(
stg
,
stgname
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
|
STGM_TRANSACTED
,
NULL
,
0
,
&
stg2
);
ok
(
r
==
S_OK
,
"IStorage->OpenStorage failed, hr=%08x
\n
"
,
r
);
if
(
r
==
S_OK
)
{
/* The storage can be modified. */
r
=
IStorage_CreateStorage
(
stg2
,
stgname
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
0
,
&
stg3
);
todo_wine
ok
(
r
==
S_OK
,
"IStorage->CreateStorage failed, hr=%08x
\n
"
,
r
);
if
(
r
==
S_OK
)
IStream_Release
(
stg3
);
/* But changes cannot be committed. */
r
=
IStorage_Commit
(
stg2
,
0
);
todo_wine
ok
(
r
==
STG_E_ACCESSDENIED
,
"IStorage->Commit should fail, hr=%08x
\n
"
,
r
);
IStorage_Release
(
stg2
);
}
IStorage_Release
(
stg
);
/* create a non-transacted file */
r
=
StgCreateDocfile
(
filename
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
...
...
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