[PATCH] msado15: Support VT_I4/I2 for Fields Item property

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Jun 8 17:03:04 CDT 2021


Hi Gabriel,

On 8/6/21 11:17 pm, Gabriel Ivăncescu wrote:
>> +    V_VT( &index ) = VT_I2;
>> +    V_I4( &index ) = 0;
>> +    hr = Fields_get_Item( fields, index, &field );
>> +    ok( hr == S_OK, "got %08x\n", hr );
>> +    Field_Release(field);
>> +
>>       V_VT( &index ) = VT_BSTR;
>>       V_BSTR( &index ) = name;
>>       hr = Fields_get_Item( fields, index, &field );
>>
> 
> Hi Alistair,
> 
> Did you test other integer types? Do they not work? (e.g. I1, and 
> unsigned int variants)
> 
> If they do work, you can just convert via VariantChangeType to an VT_I4 
> when it's not a BSTR, and use that as index. I recall I did something 
> similar in msscript.ocx to handle such.

Locally, I've added extra tests and it does appear to convert the other 
types to integer.  I'll send a patch to convert for non bstr types.

Thanks
Alistair.



More information about the wine-devel mailing list