From 80060f2155492b8413b1226e5e6363d2421b2b12 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Mon, 8 May 2023 22:46:05 +0800 Subject: [PATCH] oledb32: Support converting DBTYPE_VARIANT to DBTYPE_VARIANT. --- dlls/oledb32/convert.c | 6 ++++++ dlls/oledb32/tests/convert.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index bb427e0cb54..e634db237f0 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -1093,6 +1093,12 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, hr = S_OK; break; } + case DBTYPE_VARIANT: + { + VariantInit(v); + hr = VariantCopy(v, (VARIANT *)src); + break; + } default: FIXME("Unimplemented conversion %04x -> VARIANT\n", src_type); return E_NOTIMPL; } break; diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index d66141f6655..fe34657b779 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -3947,15 +3947,10 @@ static void test_converttovar(void) V_VT(&var) = VT_UINT; V_UINT(&var) = 1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_VARIANT, 0, &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - todo_wine ok(hr == S_OK, "got %08lx\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); - todo_wine ok(dst_len == sizeof(VARIANT), "got %Id\n", dst_len); - todo_wine ok(V_VT(&dst) == VT_UINT, "got %d\n", V_VT(&dst)); - todo_wine ok(V_UINT(&dst) == 1234, "got %u\n", V_UINT(&dst)); VariantClear(&dst); } -- 2.11.4.GIT