[PATCH 1/2] oledb32: Support VARIANT(VT_NULL)->DBTYPE_WSTR in GetConversionSize
Nikolay Sivov
bunglehead at gmail.com
Thu Oct 8 04:22:01 CDT 2015
On 08.10.2015 12:11, Michael Stefaniuc wrote:
> Alistair,
>
> On 10/08/2015 11:06 AM, Alistair Leslie-Hughes wrote:
>> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
>> ---
>> dlls/oledb32/convert.c | 2 ++
>> dlls/oledb32/tests/convert.c | 6 ++++++
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c
>> index a92369f..21938aa 100644
>> --- a/dlls/oledb32/convert.c
>> +++ b/dlls/oledb32/convert.c
>> @@ -1416,6 +1416,8 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
>> case DBTYPE_VARIANT:
>> if(V_VT((VARIANT*)src) == VT_BSTR)
>> *dst_len = (SysStringLen(V_BSTR((VARIANT*)src))+1) * sizeof(WCHAR);
>> + else if(V_VT((VARIANT*)src) == VT_NULL)
>> + *dst_len = 110;
> what is the magic number 110?
> I looked at the surrounding code but I don't see any other magic numbers
> assigned to dst_len.
I agree, there should be a better way. It will probably help to actually
perform conversion and look at resulting string.
More information about the wine-devel
mailing list