Commit 7a762fee authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

oledb32: DataConvert only variant length types can have a null dst.

parent 72845af0
......@@ -191,6 +191,13 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
return S_OK;
}
if(dst == NULL && get_length(dst_type) != 0)
{
*dst_len = get_length(src_type);
*dst_status = DBSTATUS_S_OK;
return S_OK;
}
if(src_type == DBTYPE_STR)
{
BSTR b;
......
......@@ -892,6 +892,13 @@ todo_wine
ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status);
ok(dst_len == 0, "got %ld\n", dst_len);
/* dst = NULL */
*(int *)src = 0x4321cafe;
dst_len = 0x1234;
hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I4, 0, &dst_len, src, NULL, 0, 0, NULL, 0, 0, 0);
ok(hr == S_OK, "got %08x\n", hr);
ok(dst_len == sizeof(i4), "got %ld\n", dst_len);
}
static void test_converttoi8(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment