ole32: Use IsGUIDEqual to compare IIDs.

This commit is contained in:
Mike McCormack 2006-08-01 03:10:58 +09:00 committed by Alexandre Julliard
parent 6a5d3600dd
commit 63cbef27a2
1 changed files with 3 additions and 6 deletions

View File

@ -199,15 +199,12 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface(
/*
* Compare the riid with the interface IDs implemented by this object.
*/
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
if (IsEqualGUID(&IID_IUnknown, riid) ||
IsEqualGUID(&IID_IStorage, riid))
{
*ppvObject = (IStorage*)This;
}
else if (memcmp(&IID_IStorage, riid, sizeof(IID_IStorage)) == 0)
{
*ppvObject = (IStorage*)This;
}
else if (memcmp(&IID_IPropertySetStorage, riid, sizeof(IID_IPropertySetStorage)) == 0)
else if (IsEqualGUID(&IID_IPropertySetStorage, riid))
{
*ppvObject = (IStorage*)&This->pssVtbl;
}