Allow ISequentialStream_Write to work if access mode is STGM_READWRITE.
This commit is contained in:
parent
5b8eb2d838
commit
bdee212058
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue