On 05.10.2017 3:03, Alistair Leslie-Hughes wrote:
+static HRESULT WINAPI timelinegrp_QueryInterface(IAMTimelineGroup *iface, REFIID riid, void **object) +{
- TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
- TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), object);
- if (!object)
return E_POINTER;
There's no test for this condition.
- *object = NULL;
- if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IAMTimelineGroup) )
*object = &This->IAMTimelineGroup_iface;
- else if (IsEqualIID(riid, &IID_IAMTimelineObj) )
*object = &This->IAMTimelineObj_iface;
- else
WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), object);
- if (!*object)
return E_NOINTERFACE;
- IUnknown_AddRef((IUnknown*)*object);
- return S_OK;
+}
That's not what I meant. Tests don't show that you need this. Please take a look how objects supporting multiple interfaces are implemented.