[PATCH 2/4] shell32: Implement IShellImageData::Decode() when created from file path

Nikolay Sivov bunglehead at gmail.com
Tue Feb 7 09:36:27 CST 2017


On 07.02.2017 18:20, Alexandre Julliard wrote:
> Nikolay Sivov <bunglehead at gmail.com> writes:
> 
>> On 07.02.2017 17:44, Alexandre Julliard wrote:
>>> Nikolay Sivov <nsivov at codeweavers.com> writes:
>>>
>>>> @@ -29,9 +29,17 @@ cpp_quote("#endif")
>>>>  
>>>>  cpp_quote("#ifndef _GDIPLUSHEADERS_H")
>>>>  typedef BYTE EncoderParameters;
>>>> +cpp_quote("#endif")
>>>> +
>>>> +/* Wine does not define GDI+ class wrappers */
>>>> +cpp_quote("#if defined(__WINESRC__) || !defined(_GDIPLUSHEADERS_H)")
>>>>  typedef BYTE Image;
>>>>  cpp_quote("#endif")
>>>
>>> We don't have C++ code in the Wine source, so I don't see why you'd need
>>> that.
>>>
>>
>> We do have some class definitions in gdiplus headers, like in
>> gdiplusimaging.h. My motivation was to have a header compatible with SDK
>> one in terms of these include guards. I understand that it won't be
>> possible to use Image class in its C++ form from shell32, luckily I had
>> no need for that to fix the bug.
>>
>> Do you mean it's enough to typedef Image to BYTE uncoditionaly?
> 
> I mean the existing ifndef _GDIPLUSHEADERS_H should be enough, because
> gdiplusheaders.h is a C++ header that can't be used from C code.
> 

This won't work for EncoderParameters, that we define for C code too as
a bare structure, while SDK only has it as a class. So it's probably
already not very compatible. I guess I can change first guard to
_GDIPLUSIMAGING_H, that will work for both SDK and Wine, and keep second
as is.



More information about the wine-devel mailing list