[PATCH] wincodecs: Add IWICImagingFactory2 stub.

Nikolay Sivov nsivov at codeweavers.com
Sun Sep 30 01:30:30 CDT 2018


On 09/30/2018 08:59 AM, Dmitry Timoshkov wrote:

> Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
>>>>    static const classinfo wic_classes[] = {
>>>>        {&CLSID_WICImagingFactory, ComponentFactory_CreateInstance},
>>>> +    {&CLSID_WICImagingFactory2, ComponentFactory_CreateInstance},
>>>>        {&CLSID_WICBmpDecoder, BmpDecoder_CreateInstance},
>>>>        {&CLSID_WICPngDecoder, PngDecoder_CreateInstance},
>>>>        {&CLSID_WICPngEncoder, PngEncoder_CreateInstance},
>>>> diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c
>>>> index 06e3f6aceb..f23c824473 100644
>>>> --- a/dlls/windowscodecs/imgfactory.c
>>>> +++ b/dlls/windowscodecs/imgfactory.c
>>>> @@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
>>>>    
>>>>    typedef struct {
>>>>        IWICComponentFactory IWICComponentFactory_iface;
>>>> +    IWICImagingFactory2 IWICImagingFactory2_iface;
>>>>        LONG ref;
>>>>    } ComponentFactory;
>>> IWICImagingFactory2 just extends IWICImagingFactory by one element, this
>>> approach seems to be a bit strange.
>>>
>> Both IWICComponentFactory andIWICImagingFactory2extend IWICImagingFactory.
> If you mean that you have to choose which one should use IWICImagingFactory
> as a base class then an obvious choice would be IWICImagingFactory2. If you
> ment something else please try to be less cryptic in your responses.
>
If you mean it's better to move existing IWICImagingFactory methods 
implementation to newly added IWICImagingFactory2, I don't think it's 
obvious or necessary. It will lead to larger diff without any functional 
impact. Structure was unfortunately renamed from ImagingFactory, but 
well what's done is done.



More information about the wine-devel mailing list