[v2 PATCH] qedit: Support IAMTimelineGroup interface in IAMTimelineObj

Nikolay Sivov bunglehead at gmail.com
Wed Oct 4 22:34:56 CDT 2017


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.



More information about the wine-devel mailing list