ole32: Reset the parent storage on overwritten streams so that operations on them now fail.
This commit is contained in:
parent
842d1b698d
commit
5ce2d25b32
|
@ -1015,6 +1015,17 @@ 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->ownerProperty == foundPropertyIndex)
|
||||
{
|
||||
TRACE("Stream deleted %p\n", strm);
|
||||
strm->parentStorage = NULL;
|
||||
list_remove(&strm->StrmListEntry);
|
||||
}
|
||||
}
|
||||
IStorage_DestroyElement(iface, pwcsName);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -335,7 +335,6 @@ static void test_storage_stream(void)
|
|||
ok(r==S_OK, "IStorage->CreateStream failed\n");
|
||||
|
||||
r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p);
|
||||
todo_wine
|
||||
ok(r==STG_E_REVERTED, "overwritten stream should return STG_E_REVERTED instead of 0x%08x\n", r);
|
||||
|
||||
r = IStream_Release(stm2);
|
||||
|
|
Loading…
Reference in New Issue