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
9d0c4c97
Commit
9d0c4c97
authored
Nov 18, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Always invalidate stream objects when deleting the stream.
parent
a2c405fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
storage32.c
dlls/ole32/storage32.c
+12
-11
storage32.c
dlls/ole32/tests/storage32.c
+1
-1
No files found.
dlls/ole32/storage32.c
View file @
9d0c4c97
...
...
@@ -823,17 +823,6 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
*/
if
(
STGM_CREATE_MODE
(
grfMode
)
==
STGM_CREATE
)
{
StgStreamImpl
*
strm
;
LIST_FOR_EACH_ENTRY
(
strm
,
&
This
->
strmHead
,
StgStreamImpl
,
StrmListEntry
)
{
if
(
strm
->
dirEntry
==
currentEntryRef
)
{
TRACE
(
"Stream deleted %p
\n
"
,
strm
);
strm
->
parentStorage
=
NULL
;
list_remove
(
&
strm
->
StrmListEntry
);
}
}
IStorage_DestroyElement
(
iface
,
pwcsName
);
}
else
...
...
@@ -1914,6 +1903,18 @@ static HRESULT deleteStreamContents(
IStream
*
pis
;
HRESULT
hr
;
ULARGE_INTEGER
size
;
StgStreamImpl
*
strm
;
/* Invalidate any open stream objects. */
LIST_FOR_EACH_ENTRY
(
strm
,
&
parentStorage
->
strmHead
,
StgStreamImpl
,
StrmListEntry
)
{
if
(
strm
->
dirEntry
==
indexToDelete
)
{
TRACE
(
"Stream deleted %p
\n
"
,
strm
);
strm
->
parentStorage
=
NULL
;
list_remove
(
&
strm
->
StrmListEntry
);
}
}
size
.
u
.
HighPart
=
0
;
size
.
u
.
LowPart
=
0
;
...
...
dlls/ole32/tests/storage32.c
View file @
9d0c4c97
...
...
@@ -1121,7 +1121,7 @@ static void test_substorage_share(void)
ok
(
r
==
S_OK
,
"IStorage->DestroyElement failed, hr=%08x
\n
"
,
r
);
r
=
IStream_Write
(
stm
,
"this shouldn't work
\n
"
,
20
,
NULL
);
todo_wine
ok
(
r
==
STG_E_REVERTED
,
"IStream_Write should fail %08x
\n
"
,
r
);
ok
(
r
==
STG_E_REVERTED
,
"IStream_Write should fail %08x
\n
"
,
r
);
IStorage_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