[PATCH 2/3] oleaut32: BSTRs should have 8 byte alignment on 64 bits.

Huw Davies huw at codeweavers.com
Thu Jan 21 06:43:29 CST 2016


On 21 Jan 2016, at 12:32, Jacek Caban wrote:
> On 01/21/16 11:29, Huw Davies wrote:
>> 
>> --- a/dlls/oleaut32/oleaut.c
>> +++ b/dlls/oleaut32/oleaut.c
>> @@ -84,6 +84,9 @@ static CRITICAL_SECTION_DEBUG cs_bstr_cache_dbg =
>> static CRITICAL_SECTION cs_bstr_cache = { &cs_bstr_cache_dbg, -1, 0, 0, 0, 0 };
>> 
>> typedef struct {
>> +#ifdef _WIN64
>> +    DWORD pad;
>> +#endif
>>     DWORD size;
>>     union {
>>         char ptr[1];
> 
> How about changing size type to SIZE_T instead? This should have the
> same effect.

That was my original idea (well DWORD_PTR actually), but it doesn't
work because the size needs to be at byte offset -4.

Huw.




More information about the wine-devel mailing list