wine-devel Digest, Vol 132, Issue 55

Anton Baskanov baskanov at gmail.com
Thu Jul 28 11:20:40 CDT 2016


On Wed, Jul 27, 2016 at 11:07 PM, <wine-devel-request at winehq.org> wrote:

> ---------- Forwarded message ----------
> From: Nikolay Sivov <bunglehead at gmail.com>
> To: wine-devel at winehq.org
> Cc:
> Date: Wed, 27 Jul 2016 17:39:26 +0300
> Subject: Re: [PATCH 1/6] amstream: Fix AMAudioData::QueryInterface.
> On 27.07.2016 15:51, Anton Baskanov wrote:
> > Signed-off-by: Anton Baskanov <baskanov at gmail.com>
> > ---
> >  dlls/amstream/audiodata.c       |  1 -
> >  dlls/amstream/tests/Makefile.in |  3 +-
> >  dlls/amstream/tests/audiodata.c | 67
> +++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 69 insertions(+), 2 deletions(-)
> >  create mode 100755 dlls/amstream/tests/audiodata.c
>
> Hi, Anton.
>
> Please keep tests in existing amstream.c file.
>
> +
> > +static void test_query_interface(void)
> > +{
> > +    IUnknown *unknown = create_audio_data();
> > +    IMemoryData *memory_data = NULL;
> > +    IAudioData *audio_data = NULL;
> > +
> > +    HRESULT result = S_OK;
>
> result initialization is not needed;
>
> > +
> > +    result = IUnknown_QueryInterface(unknown, &IID_IMemoryData, (void
> **)&memory_data);
> > +    ok(E_NOINTERFACE == result, "got 0x%08x\n", result);
> > +    if (S_OK == result)
> > +    {
> > +        IMemoryData_Release(memory_data);
> > +    }
>
> If it always fails, there's no reason add conditional Release.
>
> > +
> > +    result = IUnknown_QueryInterface(unknown, &IID_IAudioData, (void
> **)&audio_data);
> > +    ok(S_OK == result, "got 0x%08x\n", result);
> > +    if (S_OK == result)
> > +    {
> > +        IAudioData_Release(audio_data);
> > +    }
> > +
> > +    IUnknown_Release(unknown);
> > +}
>
> Could you check if you can query IMemoryData from IAudioData? It seems
> really weird if parent interface is not supported at all.
>

Hi, Nikolay.

Thanks for the review!

I've checked QueryInterface from IAudioData, and it also fails with
IID_IMemoryData.

I've fixed the issues and sent the updated patches.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160728/ebbb2a7c/attachment.html>


More information about the wine-devel mailing list