Rob Shearman : ole32: Use IsEqualIID instead of memcmp in HGLOBALLockBytesImpl_QueryInterface.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 26 07:59:26 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Feb 23 19:39:17 2007 +0000

ole32: Use IsEqualIID instead of memcmp in HGLOBALLockBytesImpl_QueryInterface.

---

 dlls/ole32/memlockbytes.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c
index 18761fb..57c5b0b 100644
--- a/dlls/ole32/memlockbytes.c
+++ b/dlls/ole32/memlockbytes.c
@@ -286,11 +286,8 @@ static HRESULT WINAPI HGLOBALLockBytesImpl_QueryInterface(
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
-  {
-    *ppvObject = (ILockBytes*)This;
-  }
-  else if (memcmp(&IID_ILockBytes, riid, sizeof(IID_ILockBytes)) == 0)
+  if (IsEqualIID(riid, &IID_IUnknown) ||
+      IsEqualIID(riid, &IID_ILockBytes))
   {
     *ppvObject = (ILockBytes*)This;
   }




More information about the wine-cvs mailing list