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
3ff33e93
Commit
3ff33e93
authored
Dec 04, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Implement Revert for transacted storage objects.
parent
226363f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
storage32.c
dlls/ole32/storage32.c
+17
-1
storage32.c
dlls/ole32/tests/storage32.c
+3
-9
No files found.
dlls/ole32/storage32.c
View file @
3ff33e93
...
@@ -4044,7 +4044,23 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit(
...
@@ -4044,7 +4044,23 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit(
static
HRESULT
WINAPI
TransactedSnapshotImpl_Revert
(
static
HRESULT
WINAPI
TransactedSnapshotImpl_Revert
(
IStorage
*
iface
)
IStorage
*
iface
)
{
{
FIXME
(
"(%p): stub
\n
"
,
iface
);
TransactedSnapshotImpl
*
This
=
(
TransactedSnapshotImpl
*
)
iface
;
StorageBaseImpl
*
newSnapshot
;
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
iface
);
/* Create a new copy of the parent data. */
hr
=
CreateSnapshotFile
(
This
->
transactedParent
,
&
newSnapshot
);
if
(
FAILED
(
hr
))
return
hr
;
/* Destroy the open objects. */
StorageBaseImpl_DeleteAll
(
&
This
->
base
);
/* Replace our current snapshot. */
IStorage_Release
((
IStorage
*
)
This
->
snapshot
);
This
->
snapshot
=
newSnapshot
;
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/ole32/tests/storage32.c
View file @
3ff33e93
...
@@ -1195,7 +1195,6 @@ static void test_revert(void)
...
@@ -1195,7 +1195,6 @@ static void test_revert(void)
r
=
IStorage_Revert
(
stg
);
r
=
IStorage_Revert
(
stg
);
/* all open objects become invalid */
/* all open objects become invalid */
todo_wine
{
r
=
IStream_Write
(
stm
,
"this shouldn't work
\n
"
,
20
,
NULL
);
r
=
IStream_Write
(
stm
,
"this shouldn't work
\n
"
,
20
,
NULL
);
ok
(
r
==
STG_E_REVERTED
,
"IStream_Write should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_REVERTED
,
"IStream_Write should fail %08x
\n
"
,
r
);
...
@@ -1207,7 +1206,6 @@ static void test_revert(void)
...
@@ -1207,7 +1206,6 @@ static void test_revert(void)
r
=
IStorage_Stat
(
stg3
,
&
statstg
,
STATFLAG_NONAME
);
r
=
IStorage_Stat
(
stg3
,
&
statstg
,
STATFLAG_NONAME
);
ok
(
r
==
STG_E_REVERTED
,
"IStorage_Stat should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_REVERTED
,
"IStorage_Stat should fail %08x
\n
"
,
r
);
}
IStream_Release
(
stm
);
IStream_Release
(
stm
);
IStream_Release
(
stm2
);
IStream_Release
(
stm2
);
...
@@ -1226,17 +1224,13 @@ static void test_revert(void)
...
@@ -1226,17 +1224,13 @@ static void test_revert(void)
r
=
IStorage_OpenStorage
(
stg
,
stmname
,
NULL
,
STGM_TRANSACTED
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg2
);
r
=
IStorage_OpenStorage
(
stg
,
stmname
,
NULL
,
STGM_TRANSACTED
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg2
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream failed %08x
\n
"
,
r
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream failed %08x
\n
"
,
r
);
todo_wine
{
r
=
IStorage_OpenStream
(
stg
,
stmname
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
r
=
IStorage_OpenStream
(
stg
,
stmname
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream should fail %08x
\n
"
,
r
);
}
if
(
r
==
S_OK
)
if
(
r
==
S_OK
)
IStream_Release
(
stm
);
IStream_Release
(
stm
);
todo_wine
{
r
=
IStorage_OpenStorage
(
stg
,
stgname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg2
);
r
=
IStorage_OpenStorage
(
stg
,
stgname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg2
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStorage should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStorage should fail %08x
\n
"
,
r
);
}
if
(
r
==
S_OK
)
if
(
r
==
S_OK
)
IStorage_Release
(
stg2
);
IStorage_Release
(
stg2
);
...
@@ -1258,7 +1252,7 @@ static void test_revert(void)
...
@@ -1258,7 +1252,7 @@ static void test_revert(void)
IStorage_Release
(
stg3
);
IStorage_Release
(
stg3
);
r
=
IStorage_OpenStorage
(
stg2
,
stgname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg3
);
r
=
IStorage_OpenStorage
(
stg2
,
stgname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
NULL
,
0
,
&
stg3
);
todo_wine
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStorage should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStorage should fail %08x
\n
"
,
r
);
if
(
r
==
S_OK
)
if
(
r
==
S_OK
)
IStorage_Release
(
stg3
);
IStorage_Release
(
stg3
);
...
@@ -1398,7 +1392,7 @@ static void test_nonroot_transacted(void)
...
@@ -1398,7 +1392,7 @@ static void test_nonroot_transacted(void)
IStream_Release
(
stm
);
IStream_Release
(
stm
);
r
=
IStorage_OpenStream
(
stg2
,
stmname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
r
=
IStorage_OpenStream
(
stg2
,
stmname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
todo_wine
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream should fail %08x
\n
"
,
r
);
if
(
r
==
S_OK
)
if
(
r
==
S_OK
)
IStream_Release
(
stm
);
IStream_Release
(
stm
);
...
@@ -1460,7 +1454,7 @@ static void test_nonroot_transacted(void)
...
@@ -1460,7 +1454,7 @@ static void test_nonroot_transacted(void)
IStream_Release
(
stm
);
IStream_Release
(
stm
);
r
=
IStorage_OpenStream
(
stg2
,
stmname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
r
=
IStorage_OpenStream
(
stg2
,
stmname2
,
NULL
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
&
stm
);
todo_wine
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_FILENOTFOUND
,
"IStorage->OpenStream should fail %08x
\n
"
,
r
);
if
(
r
==
S_OK
)
if
(
r
==
S_OK
)
IStream_Release
(
stm
);
IStream_Release
(
stm
);
...
...
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