mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
ole32: Invalidate open storage objects that are deleted.
This commit is contained in:
parent
8569d547b9
commit
669af158da
@ -1936,6 +1936,16 @@ static HRESULT deleteStorageContents(
|
||||
STATSTG currentElement;
|
||||
HRESULT hr;
|
||||
HRESULT destroyHr = S_OK;
|
||||
StorageInternalImpl *stg, *stg2;
|
||||
|
||||
/* Invalidate any open storage objects. */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(stg, stg2, &parentStorage->storageHead, StorageInternalImpl, ParentListEntry)
|
||||
{
|
||||
if (stg->base.storageDirEntry == indexToDelete)
|
||||
{
|
||||
StorageInternalImpl_Invalidate(stg);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open the storage and enumerate it
|
||||
|
@ -1076,19 +1076,15 @@ static void test_substorage_share(void)
|
||||
ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08x\n", r);
|
||||
if (SUCCEEDED(r)) IStorage_RenameElement(stg, othername, stgname);
|
||||
|
||||
#if 0
|
||||
/* This crashes on Wine. */
|
||||
|
||||
/* destroying an object while it's open invalidates it */
|
||||
r = IStorage_DestroyElement(stg, stgname);
|
||||
ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08x\n", r);
|
||||
|
||||
r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm);
|
||||
todo_wine ok(r==STG_E_REVERTED, "IStorage->CreateStream failed, hr=%08x\n", r);
|
||||
ok(r==STG_E_REVERTED, "IStorage->CreateStream failed, hr=%08x\n", r);
|
||||
|
||||
if (r == S_OK)
|
||||
IStorage_Release(stm);
|
||||
#endif
|
||||
|
||||
IStorage_Release(stg2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user