gdiplus: Reimplement metafile loading using gdi32 instead of IPicture.
Sebastian Lackner
sebastian at fds-team.de
Wed Aug 17 08:34:06 CDT 2016
On 17.08.2016 11:28, Nikolay Sivov wrote:
> On 17.08.2016 11:26, Sebastian Lackner wrote:
>> +static GpStatus load_wmf(IStream *stream, GpMetafile **metafile)
>> +{
>> + WmfPlaceableFileHeader pfh;
>> + GpStatus status = GenericError;
>> + BOOL is_placeable = FALSE;
>> + LARGE_INTEGER seek;
>> + METAHEADER mh;
>> + HMETAFILE hmf;
>> + HRESULT hr;
>> + UINT size;
>> + void *buf;
>> +
>> + hr = IStream_Read(stream, &mh, sizeof(mh), &size);
>> + if (hr != S_OK || size != sizeof(mh))
>> + return GenericError;
>> +
>> + if (mh.mtType == 0xcdd7 && mh.mtHeaderSize == 0x9ac6)
>
> It'd be more readable to test this as UINT32 it's supposed to be,
> and having this constant defined to GDIP_WMF_PLACEABLEKEY (locally in
> gdiplus, it's only mentioned in comment in SDK) will help looking it up.
>
Probably yes, thanks. I'll wait if Vincent has any other feedback
(for example if he's fine with the simplified error handling for
IStream_Read) before sending a new version.
Regards,
Sebastian
More information about the wine-devel
mailing list