Module: wine Branch: master Commit: 7dfa56886f9e64ec719e61ca761b113413042d2f URL: http://source.winehq.org/git/wine.git/?a=commit;h=7dfa56886f9e64ec719e61ca76...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Tue May 21 13:43:42 2013 +1000
oledb32: Source status DBSTATUS_S_ISNULL applies to all conversions.
---
dlls/oledb32/convert.c | 14 +++++++------- dlls/oledb32/tests/convert.c | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 4bf2b85..ab188ee 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -184,6 +184,13 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, return DB_E_UNSUPPORTEDCONVERSION; }
+ if(src_status == DBSTATUS_S_ISNULL) + { + *dst_status = DBSTATUS_S_ISNULL; + *dst_len = 0; + return S_OK; + } + if(src_type == DBTYPE_STR) { BSTR b; @@ -805,13 +812,6 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, { VARIANT *v = dst;
- if(src_status == DBSTATUS_S_ISNULL) - { - *dst_status = DBSTATUS_S_ISNULL; - *dst_len = 0; - return S_OK; - } - switch(src_type) { case DBTYPE_BOOL: diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index 305433a..92d3a64 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -884,6 +884,14 @@ todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); ok(dst_len == sizeof(i4), "got %ld\n", dst_len); ok(i4 == 10, "got %08x\n", i4); + + /* src_status = DBSTATUS_S_ISNULL */ + i4 = 0x12345678; + hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), DBSTATUS_S_ISNULL, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); + ok(dst_len == 0, "got %ld\n", dst_len); + }
static void test_converttoi8(void)