ole32: Fix return code of DeleteStorage for read only storage.
This commit is contained in:
parent
93a155381f
commit
e21adbf45a
|
@ -1797,6 +1797,9 @@ static HRESULT WINAPI StorageImpl_DestroyElement(
|
||||||
if (pwcsName==NULL)
|
if (pwcsName==NULL)
|
||||||
return STG_E_INVALIDPOINTER;
|
return STG_E_INVALIDPOINTER;
|
||||||
|
|
||||||
|
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
|
||||||
|
return STG_E_ACCESSDENIED;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a property enumeration to search the property with the given name
|
* Create a property enumeration to search the property with the given name
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1328,11 +1328,11 @@ void test_readonly(void)
|
||||||
|
|
||||||
/* DestroyElement on read-only storage, name exists */
|
/* DestroyElement on read-only storage, name exists */
|
||||||
hr = IStorage_DestroyElement( stg2, streamW );
|
hr = IStorage_DestroyElement( stg2, streamW );
|
||||||
todo_wine ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
|
ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
|
||||||
|
|
||||||
/* DestroyElement on read-only storage, name does not exist */
|
/* DestroyElement on read-only storage, name does not exist */
|
||||||
hr = IStorage_DestroyElement( stg2, storageW );
|
hr = IStorage_DestroyElement( stg2, storageW );
|
||||||
todo_wine ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
|
ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr);
|
||||||
|
|
||||||
IStorage_Release(stg2);
|
IStorage_Release(stg2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue