ole32: IStream inherits from ISequentialStream so the HGLOBALStream implementation must also support ISequentialStream.

This commit is contained in:
Rob Shearman 2007-01-07 12:15:59 +00:00 committed by Alexandre Julliard
parent 0c51b6236c
commit 482063bc29
1 changed files with 3 additions and 5 deletions

View File

@ -148,11 +148,9 @@ static HRESULT WINAPI HGLOBALStreamImpl_QueryInterface(
/*
* Compare the riid with the interface IDs implemented by this object.
*/
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
{
*ppvObject = (IStream*)This;
}
else if (memcmp(&IID_IStream, riid, sizeof(IID_IStream)) == 0)
if (IsEqualIID(&IID_IUnknown, riid) ||
IsEqualIID(&IID_ISequentialStream, riid) ||
IsEqualIID(&IID_IStream, riid))
{
*ppvObject = (IStream*)This;
}