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

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 8 06:35:38 CST 2007


Module: wine
Branch: master
Commit: 482063bc295c06a35272fef7d63cd4b361bdddb9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=482063bc295c06a35272fef7d63cd4b361bdddb9

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sun Jan  7 12:15:59 2007 +0000

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

---

 dlls/ole32/hglobalstream.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c
index 99669d3..5774c90 100644
--- a/dlls/ole32/hglobalstream.c
+++ b/dlls/ole32/hglobalstream.c
@@ -148,11 +148,9 @@ static HRESULT WINAPI HGLOBALStreamImpl_
   /*
    * 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;
   }




More information about the wine-cvs mailing list