[PATCH 2/4] amstream: Add IAudioMediaStream stub implementation.

Henri Verbeet hverbeet at gmail.com
Wed Apr 4 15:04:01 CDT 2012


On 4 April 2012 21:57, Christian Costa <titan.costa at gmail.com> wrote:
> +static HRESULT WINAPI IAudioMediaStreamImpl_QueryInterface(IAudioMediaStream *iface,
> +        REFIID riid, void **ppv)
> +{
> +    IAudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface);
> +
> +    TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppv);
> +
> +    if (IsEqualGUID(riid, &IID_IUnknown) ||
> +        IsEqualGUID(riid, &IID_IMediaStream) ||
> +        IsEqualGUID(riid, &IID_IAudioMediaStream))
> +    {
> +        IUnknown_AddRef(iface);
> +        *ppv = This;
That's wrong.

> +        return S_OK;
> +    }
> +
> +    ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
> +    return E_NOINTERFACE;
> +}
QueryInterface() should generally set "*ppv" to NULL on failure.



More information about the wine-devel mailing list