ole32: Add more tracing for reading and writing storage streams.
Add more tracing for read and write operations and warn in the case of failure.
This commit is contained in:
parent
168e2fb98f
commit
8d39c80950
|
@ -268,7 +268,10 @@ static HRESULT WINAPI StgStreamImpl_Read(
|
||||||
iface, pv, cb, pcbRead);
|
iface, pv, cb, pcbRead);
|
||||||
|
|
||||||
if (!This->parentStorage)
|
if (!This->parentStorage)
|
||||||
|
{
|
||||||
|
WARN("storage reverted\n");
|
||||||
return STG_E_REVERTED;
|
return STG_E_REVERTED;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the caller is not interested in the number of bytes read,
|
* If the caller is not interested in the number of bytes read,
|
||||||
|
@ -372,6 +375,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
|
||||||
case STGM_READWRITE:
|
case STGM_READWRITE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
WARN("access denied by flags: 0x%lx\n", STGM_ACCESS_MODE(This->grfMode));
|
||||||
return STG_E_ACCESSDENIED;
|
return STG_E_ACCESSDENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +383,10 @@ static HRESULT WINAPI StgStreamImpl_Write(
|
||||||
return STG_E_INVALIDPOINTER;
|
return STG_E_INVALIDPOINTER;
|
||||||
|
|
||||||
if (!This->parentStorage)
|
if (!This->parentStorage)
|
||||||
|
{
|
||||||
|
WARN("storage reverted\n");
|
||||||
return STG_E_REVERTED;
|
return STG_E_REVERTED;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the caller is not interested in the number of bytes written,
|
* If the caller is not interested in the number of bytes written,
|
||||||
|
@ -395,6 +402,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
|
||||||
|
|
||||||
if (cb == 0)
|
if (cb == 0)
|
||||||
{
|
{
|
||||||
|
TRACE("<-- S_OK, written 0\n");
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -441,6 +449,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
|
||||||
*/
|
*/
|
||||||
This->currentPosition.u.LowPart += *pcbWritten;
|
This->currentPosition.u.LowPart += *pcbWritten;
|
||||||
|
|
||||||
|
TRACE("<-- S_OK, written %lu\n", *pcbWritten);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue