ole32: Use IsEqualIID instead of memcmp in HGLOBALLockBytesImpl_QueryInterface.

This commit is contained in:
Rob Shearman 2007-02-23 19:39:17 +00:00 committed by Alexandre Julliard
parent 0101f89a8d
commit 29706e6709
1 changed files with 2 additions and 5 deletions

View File

@ -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;
}