Commit bdee2120 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Allow ISequentialStream_Write to work if access mode is STGM_READWRITE.

parent 5b8eb2d8
......@@ -414,8 +414,12 @@ HRESULT WINAPI StgStreamImpl_Write(
TRACE("(%p, %p, %ld, %p)\n",
iface, pv, cb, pcbWritten);
if (!(This->grfMode & STGM_WRITE))
return STG_E_ACCESSDENIED;
/*
* Do we have permission to write to this stream?
*/
if (!(This->grfMode & (STGM_WRITE | STGM_READWRITE))) {
return STG_E_ACCESSDENIED;
}
/*
* If the caller is not interested in the number of bytes written,
......@@ -429,12 +433,6 @@ HRESULT WINAPI StgStreamImpl_Write(
*/
*pcbWritten = 0;
/*
* Do we have permission to write to this stream?
*/
if (!(This->grfMode & (STGM_WRITE | STGM_READWRITE)))
return STG_E_ACCESSDENIED;
if (cb == 0)
{
return S_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment