[PATCH 1/3] amstream: Add CLSID_AMAudioData implementation. (try 2)

Michael Stefaniuc mstefani at redhat.com
Tue Apr 3 03:16:22 CDT 2012


Hello Christian,

On 04/03/2012 07:53 AM, Christian Costa wrote:
> +/*** IUnknown methods ***/
> +static HRESULT WINAPI IAudioDataImpl_QueryInterface(IAudioData *iface, REFIID riid, void **ppv)
> +{
> +    AMAudioDataImpl *This = impl_from_IAudioData(iface);
> +
> +    TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppv);
> +
> +    if (IsEqualGUID(riid, &IID_IUnknown) ||
> +        IsEqualGUID(riid, &IID_IMemoryData) ||
> +        IsEqualGUID(riid, &IID_IAudioData))
> +    {
> +        IUnknown_AddRef(iface);
> +        *ppv = This;
even though MS loves to call ppv ppvObject it isn't an object but a
pointer to an interface. As this object has just one interface you can
get rid of This and just assign iface to *ppv.

> +        return S_OK;
> +    }
> +
> +    ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
> +    return E_NOINTERFACE;
> +}
> +

bye
	michael



More information about the wine-devel mailing list