Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/oledb32/convert.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 267de1b..3634ef4 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -475,10 +475,13 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, } break; case DBTYPE_VARIANT: - if( V_VT((VARIANT*)src) == VT_DATE) + { + VariantInit(&tmp); + + if ((hr = VariantChangeType((VARIANT*)src, &tmp, 0, VT_DATE)) == S_OK) { SYSTEMTIME st; - hr = (VariantTimeToSystemTime( V_DATE((VARIANT*)src), &st) ? S_OK : E_FAIL); + hr = (VariantTimeToSystemTime( V_DATE(&tmp), &st) ? S_OK : E_FAIL); d->year = st.wYear; d->month = st.wMonth; d->day = st.wDay; @@ -489,6 +492,7 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, return E_NOTIMPL; } break; + } default: FIXME("Unimplemented conversion %04x -> DBDATE\n", src_type); return E_NOTIMPL; } break;
Alistair Leslie-Hughes leslie_alistair@hotmail.com writes:
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
dlls/oledb32/convert.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
It breaks the tests:
../../../tools/runtest -q -P wine -T ../../.. -M oledb32.dll -p oledb32_test.exe.so convert && touch convert.ok convert.c:3355: Test failed: got 80004005 convert.c:3356: Test failed: got 00000001 convert.c:3357: Test failed: got 0 convert.c:3358: Test failed: bytes differ Makefile:184: recipe for target 'convert.ok' failed make: *** [convert.ok] Error 4