[PATCH 2/2] windowscodecs: Add support for IMILBitmapScaler interface.

Dmitry Timoshkov dmitry at baikal.ru
Tue May 14 05:01:36 CDT 2019


"Vincent Povirk (they/them)" <vincent at codeweavers.com> wrote:

> +static HRESULT WINAPI
> IMILBitmapScaler_QueryInterface(IMILBitmapScaler *iface, REFIID iid,
> +    void **ppv)
> +{
> +    BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
> +
> +    TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
> +
> +    if (!ppv) return E_INVALIDARG;
> +
> +    if (IsEqualIID(&IID_IUnknown, iid) ||
> +        IsEqualIID(&IID_IMILBitmapScaler, iid) ||
> +        IsEqualIID(&IID_IMILBitmapSource, iid))
> +    {
> +        IUnknown_AddRef(&This->IMILBitmapScaler_iface);
> 
> This violates COM rules by returning a different IUnknown pointer
> depending on the interface queried. Does native do that?

I've added more tests for IMILBitmapScaler_QueryInterface() behaviour,
and under Windows for IID_IUnknown it returns some strange interface
pointer that doesn't match other public interfaces. Then I added the
same test for IWICBitmap_QueryInterface() and it also returns some
strange interface for IID_IUnknown. So both QI implementations in Wine
have similar problems when queried for IID_IUnknown. Or do you mean
some other COM rule violation in the comment above?

-- 
Dmitry.



More information about the wine-devel mailing list