On 4 April 2012 21:57, Christian Costa titan.costa@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.